BoundingBox
is [ul_corner_x ul_corner_y x_width y_width]
where the 1st 2 elements specify the upper-left corner of the bounding box, and the last 2 elements specify the width of the bounding box along each dimension. Note that it is not the width of the connected component, but the width of bounding box. And each bounding box just includes all the connected components with the same specified label. Actually it doesn't make sense to define the width for a connected component (polygonal).
A = randi([0 1], 10, 10);
bw=bwlabel(A);
cc=regionprops(bw,'BoundingBox');
and you have,
>> cc(1)
ans =
BoundingBox: [0.5000 0.5000 10 10]
>> cc(2)
ans =
BoundingBox: [3.5000 0.5000 1 1]
>> cc(3)
ans =
BoundingBox: [8.5000 8.5000 1 2]
with
bw =
0 0 0 2 0 0 1 0 0 1
0 1 0 0 0 0 0 1 1 0
0 0 1 0 0 1 0 0 1 0
0 1 0 1 1 1 1 1 0 0
0 0 1 1 1 0 1 1 1 0
0 1 1 0 0 1 0 1 0 0
1 1 1 1 1 1 0 1 0 0
0 0 0 1 0 1 0 0 0 0
1 1 1 1 1 0 0 0 3 0
1 0 1 1 1 1 0 0 3 0