I am working on an app that allows a user to upload a photo or take a photo of a clothing item (shirt, pants, shorts, hoodie, etc) and then it is going to get the color or colors of the image. Currently I have it configured to just take a picture of the clothing item and everything in the background is included as well. Is there a way for once the user selects or takes a picture, the app automatically selects the subject (clothing item) so that way the color calculator does not get confused by background colors?
Selecting a ClothingItem as a Subject from an Image
Not sure it answers completely to your question, but you could try to use the extract item in image:
- ask user to long press on the clothing item
- and to copy it
- then get it in the clipboard and process.
May also have a look at this (I did not check precisely if that would do the job):
or
- https://medium.com/macoclock/remove-the-image-background-in-swift-using-core-ml-8646ed3a1c14