But one has to put some subsequent effort in using the code. It gives you all the face candidates that are detected by the Viola-Jones algorithm. But to be able to use these candidates for further programming one has to think about how to group the candidates and just keep those rectangles that overlap each other.
And this is not an easy part... at least for me by now... :D
Hey guys...the code is not running possibly because it contains openCV1.0 files. If anybody is using the same version of openCV then i hope the code will run. If anybody is using new version of openCV then try to find the equivalent files contained in the codes include,bin and lib folder.
Best of Luck
Ok fair enough. But the other issue I have is that the rect used to specify the position is not consistent with java coordinates (mentioned in your code). These have coordinates at top left - yours is bottom left and for some inexplicable reason (0,0) is off screen in your coordinate system. I see there are "estimated uncertainties" but where do these come from? Should be just a simple translation/reflection between the two with zero uncertainty. I can reverse engineer the offset and subtract it out but will this be different each time?
Murray - that's the entire point: the only way to interactively select a screen-capture box anywhere on the desktop (not just within a Matlab figure) is to create an almost-transparent figure that spans the entire desktop area, and then let the user click-and-drag within it. You don't need to find the edges at all - simply drag a box of your requested screen-capture area and then the almost-transparent window will disappear and you will get your desired screen-capture.
A technical explanation is provided here: http://undocumentedmatlab.com/blog/screencapture-utility