MATLAB: A problem with ‘bwconncomp’ function ….

image processing

hi all,
please i need a help this is a part of my code ,
T = maketform('affine',[cn -sn 0;
sn cn 0;
(size(im,2)/2-ct(2)) (size(im,1)/2-ct(1)) 1]);
im = imtransform(im,T);
BW = im>thr;
CC = bwconncomp(BW);
when i tried to run it ,i got this error : "??? Undefined function or method 'bwconncomp' for input arguments of type 'logical'."
what is the solution please?
Thanks

Best Answer

bwconncomp() was introduced in R2009a.