What I'm currently doing is loading an image of a face into a Mat, setting the centre point X and Y coordinates of each eye, creating a circle around each of the eyes, setting the ROI to the circles around the eyes (using a Rect and setting a mask), and lowering the red value in the eye images.
My problem is around merging the corrected eye (with lowered red colour) back onto the original image because the corrected eyes have a black mask. I'm not sure how to get rid of the black mask.
I'm currently stuck on a bit of OpenCV code which has gotten me to this point:
Original image:
Extracted eye with black mask:
Corrected eye:
Current result displaying my problem:
This is a continuation from my thread here: Getting ROI from a Circle/Point
My understanding is that you cannot create a circular ROI, thus why I have gone with the Rect ROI and black mask. A normal Rect does not suffice.
Any advice is much appreciated!! Thank you.