简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM