Borrar filtros
Borrar filtros

Input matrix must be two dimensional

11 visualizaciones (últimos 30 días)
med-sweng
med-sweng el 24 de Nov. de 2014
Comentada: HumanOptics AG el 19 de Jun. de 2018
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 comentario
HumanOptics AG
HumanOptics AG el 19 de Jun. de 2018
Did you find the solution ? Because i've the same problem

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 24 de Nov. de 2014
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 comentarios
Image Analyst
Image Analyst el 24 de Nov. de 2014
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 el 24 de Nov. de 2014
Thanks for your kind replies.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by