0

I'm developing application that uses DirectShow combined with C++. Its main goal is to capture users' faces. I have reached the phase when I capture a image from my webcam. The problem is I need an intelligent render. In fact, I need that render to be able to detect a face inside a rectangle. I'm wondring if there is a filter that I can use for this purpose, or if I need to create my own custmized filter. If so enlighten my mind. It would look like this:
enter image description here


I need to understand how I can draw a recangle in my render in the first place. Because otherwise, even if I know the algorithm, I will not be able to apply it. This is my main goal now.

I have some idea but I don't know if they are correct. I think I need to grab each frame separately and apply some modification in some pixels, like what's drawn in the live render.

Esoteric Screen Name
  • 6,082
  • 4
  • 29
  • 38
merou mmxm
  • 19
  • 4

3 Answers3

2

Have a look at OpenCV

Quick look inside and I found this.

Making your own "filter" that works well is no easy job.

Science_Fiction
  • 3,403
  • 23
  • 27
  • yes interesting but unfortunately i' have the obligation to use directshow (microsoft ) @@ – merou mmxm Aug 10 '12 at 11:20
  • This should not hinder you to additionally use the OpenCV library. Btw - the Haarlike-methods in OpenCV build exactly on the class of algorithms I mentioned in my answer. So I think taking OpenCV with these (complicated!) algorithms ready to go and readily parameterized (!!! this is a LOT of work!!) is definitely a good idea in your case. – Jakob S. Aug 10 '12 at 11:40
  • Surely you can just use DirectShow to connect to the webcam, and then pass the frames over to OpenCV to run the image processing side of things. – Science_Fiction Aug 10 '12 at 12:14
0

Are you talking about automatic detection of where there is something like a human face in the shot you have taken with the webcam? In this case object detection algorithms like Viola-Jones might be interesting for you.

Jakob S.
  • 1,851
  • 2
  • 14
  • 29
  • the problem is not in the algorithms the problem is how to draw a recangle in this render after that i can apply this algo – merou mmxm Aug 10 '12 at 14:40
  • So the question is only about how to draw a rectangle with DirectShow? – Jakob S. Aug 10 '12 at 18:17
  • Do http://stackoverflow.com/questions/3115399/how-to-draw-on-an-unfilled-box-on-a-video-stream-using-the-mouse or http://stackoverflow.com/questions/9377901/drawing-a-rectangle-or-line-or-bitmap-on-the-camera-preview-stream-net-comp help? – Jakob S. Aug 11 '12 at 19:27
0

If a commercial package is an option, you can use the Montivision Filter SDK which includes filters that should do the job out of the box. They offer a free eval which is perfect for experimentation.

PixelRouter
  • 103
  • 6