I am facing the same problem when using CIDetectorTypeRectangle. I could not get more than 1 function from featuresInImage(image)
. There are no comments in Apple Developer docs regarding the maximum number of functions returned, but I could find some evidence in wwdc 2014 sessions ( http://asciiwwdc.com/2014/sessions/514 ).
[...] So, we created a common rectangle detector object, and it takes one parameter parameter, which is the format we want to find.
And again, you can ask the detector to return an array of functions.
Now right now it is returning only one rectangle, but that could change the future. [...]
Hope someone can falsify this assumption, otherwise I have to get stuck with openCV2 to detect the rectangle.