필터 지우기
필터 지우기

Get coordinates of edges - Image Processing

조회 수: 8 (최근 30일)
Rajbir Singh
Rajbir Singh 2019년 8월 29일
댓글: KALYAN ACHARJYA 2019년 8월 31일
I am performing Roberts method for edge detection. But my aim is to get the coordinates of the edges after applying Roberts method or any other method.
Before Roberts method:
After Roberts Method:
Further more i want to calculate the coordinate of these 4 vertices.
Is there is any solution for this problem ?

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 8월 29일
편집: KALYAN ACHARJYA 2019년 8월 29일
Lets say image_test is the output binary image (After Roberts Method)
data=corner(image_test);
r_data=data(:,1);
c_data=data(:,2);
min_colm=min(c_data);
idx1=find(c_data==min_colm);
ver1=[r_data(idx1(1)),min_colm]
max_colm=max(c_data);
idx2=find(c_data==max_colm);
ver2=[r_data(idx2(1)),max_colm]
min_row=min(r_data);
idx3=find(r_data==min_row);
ver3=[min_row,c_data(idx3(1))]
max_row=max(r_data);
idx4=find(r_data==max_row);
ver4=[max_row,c_data(idx4(1))]
Please verify?
  댓글 수: 2
Rajbir Singh
Rajbir Singh 2019년 8월 31일
Thank you Sir, it works for me.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 8월 31일
It's my pleasure @Rajbir

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by