tanchinluh / IPCV

Scilab Image Processing and Computer Vision Module
GNU General Public License v3.0
1 stars 1 forks source link

imconvexhull example in documentation #3

Closed tanchinluh closed 9 months ago

tanchinluh commented 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,'.');

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