Message Boards Message Boards

2
|
4357 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Example for FindFaces does not seem to work

Hi everyone,

in version 10.3 on OSX10.11 several examples in the documentation of FindFaces do not appear to work. In fact, most examples do not work. Also this:

f[i_Image, size_] := HighlightImage[i, Rectangle @@@ FindFaces[i, size], Method -> "Boundary"];
Dynamic[f[CurrentImage[], {50, 150}]]

does not run properly on my computer. I can modify it to:

f[i_Image, size_] := HighlightImage[i, (Rectangle @@@ FindFaces[i, size])[[1]], Method -> "Boundary"];
Dynamic[f[CurrentImage[], {50, 150}]]

to make it work; well at least sort of. If you then look to the side so that the face is not recognised you get an error. This can be fixed by:

f[i_Image, size_] := HighlightImage[i, If[Length[(Rectangle @@@ FindFaces[i, size])] < 1, Rectangle[ImageDimensions[i]], (Rectangle @@@ FindFaces[i, size])[[1]]], Method -> "Boundary"];
Dynamic[f[CurrentImage[], {50, 150}]]

The same trick works for the other examples as long as there are no multiple faces. In MMA10.2 the examples work without modification. I checked that on a number of computers I have access to. Can anyone reproduce that?

This actually seems to be an issue with HighlightImage. If there are more than one regions to mark it appears to fail. The example that contains:

HighlightImage[image, Table[{i, i}, {i, 1, 100, 10}]]

does not appear to work either.

Cheers,

Marco

POSTED BY: Marco Thiel

Thanks for reporting Marco. We have become aware of a regression bug in HighlightImage in 10.3. Annoying indeed.

On OS X 10.10.5 and Mathematica 10.3, FindFaces works as expected as far as I can tell. The face is detected, and it's the visualization that runs into the above-mentioned bug .

POSTED BY: Matthias Odisio
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract