Luma Key (create alpha mask from image) for iOS

There is a reason why typically blue or green screens are used in movie production for chroma keying, instead of white. Anything can be white or sufficiently close to white in a photo, especially eyes or highlights or just parts of the skin. Also, it is quite hard to find an uniform white wall without shadows, cast by your subject at least.
I would recommend building a histogram, finding the most frequently used color among the brightest ones, then search for the biggest area of that color using some threshold. Then do a flood fill from that area until sufficiently different colors are encountered. All of that can be quite easily done in software, unless you want a realtime video stream.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)