Measuring angle in an image
18 views (last 30 days)
Show older comments
Dear Image Analyst,
I need to draw a line between two points in an image during execution of the program and measure the angle w.r.t. horizontal. This need to be done interactively for a large set of images. Need idea on how to start with?
Thanks. Darren
0 Comments
Answers (4)
Matt J
on 28 Jun 2013
Edited: Matt J
on 28 Jun 2013
Those pair of patches are not point like and finding/clicking the centre of the patch is not very accurate. hence the measured angle as well.
You can use regionprops to pre-compute the centroids of all the patches. Then, as long as you are clicking reasonably close to the center of the patch, you can use the ginput coordinates to find the closest centroid.
0 Comments
Image Analyst
on 27 Jun 2013
Do you need to know how to process a sequence of files, like the FAQ shows: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
Or do you need to know how to calculate the angle given 3 points?
Or do you need to know how to ask the user to draw the angle (like with imline function in the Image Processing Toolbox)?
0 Comments
See Also
Categories
Find more on Polygons in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!