cv.jit.faces question/help needed!

houghtond's icon

Right, I have a feeling there is either going to be a really obvious and simple solution to my problem, or a massively complex one - hoping it's the latter so I don't look like a complete idiot

Anyway, I am currently using the cv.jit.faces object to detect the co ordinates of a person as they enter a space. These co ordinates then effect the playback of a video file, essentially creating a forward/rewind effect. When there is no face present, the video slowly rewinds back to its starting point.

All was going well until I started testing the installation with multiple users, where cv.jit.faces would randomly jump between the face for which it would take the co ordinates.

I figured the easiest solution to this would be to limit the number of faces that can be tracked at any one time to one, but I can't seem to find out how to do this. I know you can get the number of faces detected at any one time (get nfaces into cv.jit.faces), so I was wondering if there was any way to set a maximum value for nfaces?

I'm also not sure if I have the most efficient setup for extracting the co ordinates from cv.jit.faces, I'm currently using jit.spill into an unpack object into integers; I'd appreciate it if someone could point out a better way of doing this - as I only seem to be getting the first x value of the co ordinates out.

Thanks in advance!

I've uploaded my patch (without the video files I'm afraid, took the file size to 4.5mb )