We are working on recoloring of object in image. User can define area of recolor by drawing shape on image and that shape would define boundary for coloring algorithm. After drawing shape user can tap inside shape and based on color of the tapped point, application would run flood fill algorithm and flood fill algorithm will obey the boundary of drawn shape.
Mask created from shape has some jagged because slant lines always comes with Jagged edges. so, output image comes up with serrated edges. I want to create smooth edges.
Detail of How I am doing
User created shape on image by dragging points,
Created mask based on selected area(you can see clear problem in edges),
3.Output image (Notice edges of shape)
You can see that output image has serrated edges.
I tried anti-aliasing in mask image but it is also not working. In output it is coming as bad effect.
I have used OpenCV to achieve this. So, solution surrounding would be more helpful.