Quantcast
Channel: MATLAB Central Newsreader - tag:"qhullmx"
Viewing all articles
Browse latest Browse all 15

Re: crash of convhulln

0
0


"Jean Du'g'nou" <tacsunday@yahoo.fr> wrote in message
news:msriis$qpc$1@newscl01ah.mathworks.com...
> Dear all,
>
> Im using a GUI that analyses 3D point clouds data. When it load the data,
> the GUI try to fit a convex hull. This process does not work with my data,
> and matlab return the following error message :
>
> Error using qhullmx
> The data is degenerate in at least one dimension - ND set of points lying
> in (N+1)D space.
>
> Error in convhulln (line 65)
> [k,vv] = qhullmx(x', opt);
>
> There is very little information about the qhullmx function and this error
> message; I cannot manage to find a solution. My dataset contains 3 columns
> (X, Y, Z) and about 13,000 lines. Each line is a 3D point (the center of a
> voxel, actually). My points were initially integers (eg., 1,1,1) and I
> thought it might be a problem, so I added a random number (sampled from a
> normal distribution N ~ (0.5,0.5)) to each coordinates, just to add some
> noise and see whether it would solve the problem. It does not.
>
> Would anyone have a clue about what I might do to investigate this issue?

This isn't really related to the main topic of this thread, which had to do
with a crash in CONVHULLN. In your case, CONVHULLN throws an error and does
not crash. But anyway ...


You have a set of data consisting of X, Y, and Z coordinates. But what if
all your data points were measured by placing the measuring device at a
certain point on top of a table? While your data would LOOK like it has 3
dimensions since each point has 3 coordinates, it's actually 2 dimensional
data.

This is a very simplified version of what I suspect is happening in your
CONVHULLN call. But this type of problem can occur even if the Z coordinates
of your data points are different -- consider leaning a plank of wood
against the wall and putting your coordinate sensor at various points on its
surface. To check if this is what's happening, SCATTER3 your data and rotate
it around. If you can see a view where the data looks like a plane (or even
worse a straight line) that would explain this error. For instance,
consider:

>> [x, y] = meshgrid(1:100);
>> z = 3 - 2*x - 4*y;
>> scatter3(x(:), y(:), z(:))

You can rotate this around until you can look "along the tabletop". If you
tried to use CONVHULLN on the matrix [x(:), y(:), z(:)] you'd get a rather
verbose message that more or less boils down to the same problem your
message described.

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Viewing all articles
Browse latest Browse all 15

Latest Images

Trending Articles





Latest Images