Closed tanchinluh closed 9 months ago
Hello,
the example of imconvexhull seems to be broken:
--> S = imread(fullpath(getIPCVpath() + "/images/hand.jpg"));
--> Sbw = im2bw(~S,0.5);
--> imshow(Sbw);
--> Sc = imfindContours(Sbw);
--> [A, BB, ctr] = imblobprop(Sc); at line 34 of function imblobprop ( /Users/mottelet/git/IPCV/macros/imblobprop.sci line 38 )
max: Wrong size for input argument #2: All arguments must have the same size.
--> [maxV,maxI] = max(A);
Undefined variable: A
--> [row,col] = find(Sc==maxI);
Undefined variable: maxI
--> [cart_x,cart_y] = sub2cartesian(size(Sc), row,col);
Undefined variable: row
--> SS = [(cart_x)',(cart_y)'];
Undefined variable: cart_x
--> H = imconvexHull(SS);
Undefined variable: SS
--> sz = size(S);
--> plot(cart_x,cart_y,'.');
--> Hd = double(H);
Undefined variable: H
--> plot(Hd(:,1),Hd(:,2),'r');
Undefined variable: Hd
Can you have a look to it.
Thanks,
Stephane
Hello,
the example of imconvexhull seems to be broken:
--> S = imread(fullpath(getIPCVpath() + "/images/hand.jpg"));
--> Sbw = im2bw(~S,0.5);
--> imshow(Sbw);
--> Sc = imfindContours(Sbw);
--> [A, BB, ctr] = imblobprop(Sc); at line 34 of function imblobprop ( /Users/mottelet/git/IPCV/macros/imblobprop.sci line 38 )
max: Wrong size for input argument #2: All arguments must have the same size.
--> [maxV,maxI] = max(A);
Undefined variable: A
--> [row,col] = find(Sc==maxI);
Undefined variable: maxI
--> [cart_x,cart_y] = sub2cartesian(size(Sc), row,col);
Undefined variable: row
--> SS = [(cart_x)',(cart_y)'];
Undefined variable: cart_x
--> H = imconvexHull(SS);
Undefined variable: SS
--> sz = size(S);
--> plot(cart_x,cart_y,'.');
Undefined variable: cart_x
--> Hd = double(H);
Undefined variable: H
--> plot(Hd(:,1),Hd(:,2),'r');
Undefined variable: Hd
Can you have a look to it.
Thanks,
Stephane