MiuMiu
MiuMiu

Reputation: 1925

How can I detect an upward-facing arrow in an image on iOS?

I have an image that contains an upward-facing arrow in its left-hand side. I would like to be able to detect that particular shape in that orientation, and if it's present, capture just that portion of the image. If the arrow faces downward, I want it to be ignored.

I've looked into using SURF descriptors and OpenCV to detect and match a shape like this, but there are licensing issues around the SURF algorithms. What alternative method(s) could I use to detect this shape in this particular orientation within an image on iOS?

Upvotes: 1

Views: 414

Answers (1)

Ankur Kumar
Ankur Kumar

Reputation: 46

A simple template matching can solve this. Build a template (or crop from an existing image) an 'upwards arrow.' Then use Normalized Cross Correlation to see where all the 'upwards arrows' are present in your test image. Since you are only looking for 'upwards arrows' on left-side of image, limit your Normalized Cross Correlation search in that region. Here is a good tutorial: http://www.mathworks.com/products/demos/image/cross_correlation/imreg.html

Upvotes: 1

Related Questions