필터 지우기
필터 지우기

Calculating the number of pixels between objects in an image

조회 수: 4 (최근 30일)
John F
John F 2012년 2월 1일
I'm working on estimating the distance between 2 lines in an image. I need to know how to determine the number of pixels between 2 lines in an image. Assuming the 2 lines are the only objects in the image, how can I do this? I see that I can use a video object to find the edges. Can I get the edge coordinates from that?
Thanks!

답변 (1개)

Image Analyst
Image Analyst 2012년 2월 1일
You could use bwdist() and choose from a variety of ways of measuring distance, or just use bwlabel() followed by find() to find the pixels in each line, then use hypot() to calculate the Euclidean distance.

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by