identify directions of arrows in a image

3 Ansichten (letzte 30 Tage)
Amy
Amy am 31 Mär. 2014
Beantwortet: Image Analyst am 31 Mär. 2014
i need to count the number of arrows that point upward,downward,northeast,etc.
------
transform the picture to
↓↑↓
←←↑
→→↑
and there are two ↓ ,two ←,two → and three↑
------ can somebody tell me how to do this??thank you:)

Antworten (1)

Image Analyst
Image Analyst am 31 Mär. 2014
  1. use bwdistline to measure the distance from the center of the spot to near the tip of the arrow.
  2. Threshold the image.
  3. call bwlabel
  4. call regionprops and ask for centroid.
  5. Go out in all 4 directions and measure the intensity at a distance of the arrow tip distance from the centroid. The darkest location will be the location of the arrow tip.
There are more robust ways to do it, but you'll probably discover them as you try this out. For example the upper left arrow is tilted and you need to be able to handle that, such as by asking regionprops for the orientation and looking only along the major axis for the arrow tip.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by