After using floodfill algorithm, the RGB values of pixel is showing 0,0,0
I am using the floodfill algorithm given in opencv library.Initially the region is white so its RGB value is 0,0,0. On clickng a region, floodfill algorithm fills that region with some color.In my algorithm, before applying fllodfill ,I have put a check that if the RGB value of the pixel is non-zero, the开发者_开发问答n dont call this function.But the problem is that, sometimes its says that the RGB value of pixel after floodfill is zero and sometimes it says non-zero.
It is due to previous color of your image.Try to recognize the color that has been filled in area that u want to fill.
精彩评论