From: Carnë D. <car...@gm...> - 2012-09-07 11:55:54
|
On 7 September 2012 13:06, Kris Thielemans <kri...@gm...> wrote: > I have only 1 problem. In my matlab code, I normally pass a (double) array with 0,1 to bwlabeln. This doesn't work for your implementation: > > bwlabeln(ones([2,2,3])) > error: bwlabeln: first input argument must be a 'logical' ND-array > > I can fix this by converting to bools of course > > bwlabeln(ones([2,2,3]~=0)) > > but for matlab compatibility, ideally bwlabeln would do that itself. The same holds for bwlabel by the way. What does matlab do if the double matrix has values different from 0 and 1? Carnë |