Skip to content
Snippets Groups Projects
Commit 465c95f3 authored by Walt Mankowski's avatar Walt Mankowski
Browse files

added try/catch to convhull() call

parent 2ce78622
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,16 @@ function [objs features] = FluorHulls(im, t)
[r c] = find(L==n);
pix = find(L == n);
% If convhull throws an exception, it's almost certainly either
% because we passed in too few points, or the points are
% collinear. Since we wouldn't want to use them anyway, we'll
% just ignore those.
try
ch = convhull(c, r);
catch e
continue;
end
no = [];
no.t = t;
no.points = [c(ch), r(ch)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment