Image Processing: Break straight lines

조회 수: 1 (최근 30일)
Philip
Philip 2011년 9월 28일
I have an edge image of a square, and would like to treat it as 4 separate lines: 2 horizontal and 2 vertical. Is there a way to disconnect the corner edges so that I can process each side individually?

답변 (2개)

Image Analyst
Image Analyst 2011년 9월 28일
Do you have the Image Processing Toolbox? See the help on corner():
corner
Find corner points in image
Description
C = corner(I) detects corners in image I and returns them in matrix C.
C = corner(I, method) detects corners in image I using the specified method.
C = corner(I, N) detects corners in image I and returns a maximum of N corners.
C = corner(I, method, N) detects corners using the specified method and maximum number of corners.
C = corner(..., Name,Value) specifies parameters and corresponding values that control various aspects of the corner detection algorithm.
  댓글 수: 1
Philip
Philip 2011년 9월 28일
Thanks for your help. I do have the image processing toolbox, but I am missing the "corner" function. Is it possible that this is a new function? I am running MATLAB R2009a...

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


Image Analyst
Image Analyst 2011년 9월 28일
Yes, corner() is somewhat new. Then use bwmorph() with the 'diag' option, or use bwhitmiss().

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by