필터 지우기
필터 지우기

Input matrix must be two dimensional

조회 수: 11 (최근 30일)
med-sweng
med-sweng 2014년 11월 24일
댓글: HumanOptics AG 2018년 6월 19일
I'm trying to use the code here .
As you can see, the demo sets the points as follows:
A set of points
x = [1 2 5 7 9 6 3 8;
7 6 8 7 5 7 2 4];
Instead of those points, I wanted to use a 2D image. Thus, I have set
x as follows:
x = imread('xyz.png');
When I try to run the demo, I get the following:
Error using fitellipse>parseinputs (line 321)
Input matrix must be two dimensional
Error in fitellipse (line 81)
[x, params] = parseinputs(x, params, varargin{:});
Error in test_main (line 8)
[z, a, b, alpha] = fitellipse(x, 'linear');
Why is that?
Thanks.
  댓글 수: 1
HumanOptics AG
HumanOptics AG 2018년 6월 19일
Did you find the solution ? Because i've the same problem

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

답변 (1개)

Image Analyst
Image Analyst 2014년 11월 24일
fitellipse probably expects an N rows by 2 column list of x,y coordinates. The badly-named x is probably a grayscale or color image, and from the sounds of the error message I'd bet it's a 3D array - a color image of dimensions rows-by-columns-by-3 color channels. You need to pass it the x,y coordinates of the points you want to fit an ellipse to, not an entire image.
  댓글 수: 3
Image Analyst
Image Analyst 2014년 11월 24일
Yes I do. I have the perfect paper for you: http://www.ecse.rpi.edu/homepages/qji/Papers/ellipse_det_icpr02.pdf. But no, I don't have MATLAB code for it, nor have I studied the algorithm so I can't help you with it. You can try contacting the authors.
med-sweng
med-sweng 2014년 11월 24일
Thanks for your kind replies.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by