필터 지우기
필터 지우기

extraction of corner points in grid image and how to calculate the distance between corner points

조회 수: 2 (최근 30일)
I ma providing the grid image & i want to find the each corner points of box/square in my image and want to calculate the distance between each corner points

채택된 답변

Image Analyst
Image Analyst 2017년 12월 22일
You can use the sqrt function. So if x and y are 4 element arrays, then do get the diagonal distances, use the appropriate indexes, for example
diagonalDistance1 = sqrt((x(1)-x(3))^2 + (y(1)-y(3))^2);
diagonalDistance2 = sqrt((x(2)-x(4))^2 + (y(2)-y(4))^2);
You forgot to provide your image (so read this), but assuming you have a white square box on a black background, you can use regionprops to find the centroid of the box, then use bwboundaries to find all the (x,y) coordinates of the perimeter. Then use sqrt() to find the distances of every point to the centroid, and use findpeaks() (in the Signal Processing Toolbox) to find the 4 peaks, which should be at the corners.
  댓글 수: 19
praveen rai
praveen rai 2017년 12월 28일
what is d purpose of finding end points and horizontal lines i mean to say i need d corners points and there respective location(x,y)
praveen rai
praveen rai 2017년 12월 28일
is there any function in matlab like circle detector to detect square and find the corner?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by