How to change only eye color in an image (uiimage)?

I have a face app iphone in uiimage. I only want to change the color of the eyes on the face by pressing a button or clicking on a color wheel. Can you help me on what code I need.

+4
source share
1 answer

I would suggest taking a look at OpenCV. It works great on iOS devices, the main code provides examples of creating applications for iOS, and there is a lot of material on how to make eye detection , and from there you can change the colors.

Keep in mind that this is not an easy task, and you could make it easier. But you can learn a lot, and there are many good resources around this topic.

If you want to do something faster, you can just detect a touch on the UIView (enable user interaction) and present a set of colors, after the color is presented, you can create a simple view on top of the image that has a circle with the selected color . That would be bad, but it might be a good idea to make a simple simple prototype.

+1
source

Source: https://habr.com/ru/post/1344829/


All Articles