a=imread('image201504160001.jpg');>> figure,imshow(a);>> title('Original Image');>> %Convert the Image to binary
>> b=im2bw(a);>> %Fill the holes
>> c=imfill(b,'hole');>> %Label the connected components
>> [Label,Total]=bwlabel(c,8);>> figure,imshow(c);title('Labelled Image');>> %Rectangle containing the region
>> Sdata=regionprops(Label,'BoundingBox');>> %crop all the car
>> for i=1:Totalimg=imcrop(a,sdata(i).BoundingBox);Name=strcat('Object Number:',num2str(i));figure,imshow(Img); title(Name);end
MATLAB: Reference to non-existent field ‘BoundingBox’. can you help me? why
boundingboxComputer Vision ToolboxImage Processing Toolbox
Best Answer