开发者

After using floodfill algorithm, the RGB values of pixel is showing 0,0,0

开发者 https://www.devze.com 2023-03-15 06:14 出处:网络
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 alg

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消