As you can see from this corrected code:
fprintf('Beginning to run %s.m ...\n', mfilename);
imtool close all;
fontSize = 22;
myFolder = pwd;
filePattern = fullfile(myFolder, 'ar*.png');
theFiles = dir(filePattern)
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(theFiles(k).folder, baseFileName);
rgbImage = imread(fullFileName);
BW = im2bw(rgbImage,0.3);
BW2 = imcomplement(BW);
BW3 = imfill(BW2,4,'holes');
stats = regionprops(BW3,'area','PixelList','BoundingBox');
areaInPixels = [stats.Area]
bb = vertcat(stats.BoundingBox);
allWidthsInPixels = bb(:, 3)
allHeightInPixels = bb(:, 4)
scale = 1e-6;
areaInMm = areaInPixels * scale
fprintf('Done running %s.m ...\n', mfilename);
The areas, widths, and heights are
400 10000 20000 39204
0.0004 0.01 0.02 0.039204
so your last rectangle is not 200x200, it's 198x198.
It is probably because your large rectangle is ringed with a value of 127, unlike the other rectangles, and that 127 is below the threshold so it's not considered part of the blob. Why does only that one blob have a one pixel wide layer of 127 surrounding it?
Try a manual threshold instead.
BW = rgbImage(:, :, 1) < 255;
BW3 = imfill(BW,4,'holes');
That will work.