Measuring angle in an image
9 ビュー (過去 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!