How to detect corner in rectangle?

Hi, i'm new in matlab image processing. As we know, the rectangle has 4 corner A,B,C,D. How to detect every corner in rectangle automatically? it's like :
if (corner was in A) then
do..
end
if (corner was in B) then
do..
end
if (corner was in C) then
do..
end
if (corner was in D) then
do..
end
please help me..thank in advance
Best Regards,

답변 (1개)

Image Analyst
Image Analyst 2013년 1월 6일

0 개 추천

I don't know what you want to do. Did you use the corner() function in the Image Processing Toolbox to detect your corners? Okay, let's say you did. Then do you look at all the points that are returned and determine which is A, which is B, etc.? I assume you did. But I don't know what you want to do inside the if blocks.

댓글 수: 6

Lily
Lily 2013년 1월 6일
actually, it's so hard to explain what i mean here. i've made some codes with two function. but it have to be attached, it's like an email. so, do you mind if i ask you more in your email? please help me.. thank in advance
Image Analyst
Image Analyst 2013년 1월 7일
편집: Image Analyst 2013년 1월 7일
We don't do offline private consulting here. Here are options for uploading files: http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
okay,let me ask about the corner. How about this error? i take it from http://www.mathworks.com/help/images/ref/corner.html
I = checkerboard(50,2,2);
C = corner(I);
imshow(I);
hold on
plot(C(:,1), C(:,2), 'r*');
??? Undefined function or method 'corner' for
input arguments of type 'double'.
Image Analyst
Image Analyst 2013년 1월 7일
Do "which corner" to see if you have it. It's fairly new, just introduced around a couple of years ago. You probably need to upgrade your version of MATLAB.
Walter Roberson
Walter Roberson 2013년 1월 7일
Alternately, Lily might not have the Image Processing toolbox installed or perhaps installed but not licensed. If she is using Student Version then she might not have gone back and installed it from her installation CD.
corner was introduced in R2010b. The release notes for that version say
In R2008b and later releases, you could find corners by computing a cornermetric matrix with the cornermetric function and then finding peak values. Now, you can simplify your workflow by using the corner function.

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

태그

질문:

2013년 1월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by