Hi
I have done & understood the project ‘face recognition’ as taught by instructor & based on that help me out how can I approach this problem.
As I have understood by reading this problem is that through cascade file which is provided we will be able to detect region of interest in the frame and then we need to replace that frame with moustache & glasses ? if it’s so please help me out how to approach this …
Need help to understand how to approach this problem
Hey @pasta, you will get a good idea with the help of this post,
while reading moustache and glasses image use,
img=cv2.imread(“Train/glasses.png”,cv2.IMREAD_UNCHANGED))
print(img.shape)
You will notice that img has 4 channels and not 3. These channels are bgra. Where ‘a’ channel stores the opacity of channel. It will be greater than 0 if there is some opacity otherwise zero.
Next step is to resize this image, to the one having same width and height to that of nose/eyes detected.
Than you need to iterate on every pixels value on actual image from x to x+w and from y to y+h. And replace the pixel values to that of moustache/glasses image if ‘a’ channel value i.e. opacity value is greater than 0.
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts 
ok I’ll give it a try
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.