Measuring angle in an image
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(4 个)
Matt J
2013-6-28
编辑:Matt J
2013-6-28
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 个评论
Image Analyst
2013-6-27
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!