1 | initial version |
Have you heard of cv::inrange or cv::threshold? Yellow is 255,255,0 in RGB, so I guess your yellow pixels in the final image have a B-value of zero and are therefore not turned to red. Maybe you want to write:
if ! (second[i,j,0]=0 and second[i,j,1]=0 and second[i,j,2]=0):
turn_pixel_red();
2 | No.2 Revision |
Have you heard of cv::inrange or cv::threshold? Yellow is 255,255,0 in RGB, so I guess your yellow pixels in the final image have a B-value of zero and are therefore not turned to red. Maybe you want to write:
if ! (second[i,j,0]=0 not (second[i,j,0]==0 and second[i,j,1]=0 second[i,j,1]==0 and second[i,j,2]=0):
second[i,j,2]==0):
turn_pixel_red();
3 | No.3 Revision |
Have you heard of cv::inrange or cv::threshold? Yellow is 255,255,0 in RGB, so I guess your yellow pixels in the final image have a B-value of zero and are therefore not turned to red. Maybe you want to write:write (now without types):
if not (second[i,j,0]==0 and second[i,j,1]==0 and second[i,j,2]==0):
turn_pixel_red();
4 | No.4 Revision |
Have you heard of cv::inrange or cv::threshold? Yellow is 255,255,0 in RGB, so I guess your yellow pixels in the final image have a B-value of zero and are therefore not turned to red. Maybe you want to write (now without types):typos):
if not (second[i,j,0]==0 and second[i,j,1]==0 and second[i,j,2]==0):
turn_pixel_red();