1

I'm starting with openCV and Python, and I need to do the following tasks:

  1. Get the profile picture of a person, detect the face and save it
  2. Use the saved face as the replacement of a puppet head in a video

Point 1 is already done.

Can you help me with point 2?

Kind regards and thanks in advance.

Neuron
  • 5,141
  • 5
  • 38
  • 59
user461054
  • 41
  • 2
  • 4
  • Could you post a link to your code? I'm trying to learn OpenCV for Python and point 1 sounds like a good learning example – JustinDanielson Jul 23 '12 at 23:44
  • You'll need to detect the puppet face and then replace its are with a (probably warped in some way) face image. http://whathaveyoutried.com? – Danica Jul 23 '12 at 23:47

1 Answers1

3

You can detect the puppet face and replace it with the image that you got cropped out from the profile picture.

Try out detecting faces with the same algorithm (Probably you used Haar Object Detection) on the puppet video and see if it's detecting. If it's detecting the puppet face, simply get the co-ordinates and replace it with the face. Check out this question.

If the puppet face is not too similar with a human face you will need Haar Templates to detect the Puppet head on the video. For that you would have to prepare a template yourself. Look into this link.

Also look into this link. It's in C but you can convert it to Python without much effort.

Community
  • 1
  • 1
  • Thanks for your answer. The problem I'm having is that I can't get the information of the video with GetCaptureProperty, because I always get 0. – user461054 Jul 25 '12 at 15:22