why when drawing houghlines with plot draws a different line than manually drawing a line?

조회 수: 3 (최근 30일)
Hello, I'm detecting lines in an image using houghlines function which returns me the two points of the detected line. when I'm using the Matlab plot function the line is drawn precisely where it should be, but when I try to draw it in a loop the start and end points are wrong and don't just away by 20 columns but the start is far to one side and the end is to the other.
thanks in advance :) .

답변 (1개)

Image Analyst
Image Analyst 2017년 11월 25일
We can only guess since you're not sharing your code. My guess is that you made the all too common beginner mistake of thinking (x,y) is (row, column). It is NOT. (x,y) is (column, row) and (row, column) is (y, x). Make sure you know which you are using.
The other option is that you were plotting in a different/new axes where the y axis is flipped. Remember, for images, y is 1 at the top and increases going down and for plots, y increases going upwards.
  댓글 수: 1
noam Y
noam Y 2017년 11월 25일
thanks for the advice that sort of worked. because I'm getting the xy in a 2x2 mat I changed from points being each column to points being each row.

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

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by