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!