ios - OpenCV Floodfill - Replace pixel color with transparent pixel -


i'm trying floodfill on uiimage , ended using opencv framework. can replace color solid color defining color cv::scalar(255,0,0). want floodfill selection transparent.

i don't know how can define transparent color in opencv , best of knowledge it's not possible , option merge image transparent background. again doesn't make sense floodfill using solid color , merge transparent layer result original image solid color in fill areas. please correct me if i'm wrong.

much appreciate in solving this.

cheers

you cannot define transparent color in opencv since not support image alpha channel.

however, there exists tricky solution. may first refer this question create mask of floodfill area. can calculate alpha channel mask.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -