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