Since your image is indexed, with only 4 colours (0 = reddish, 1 = bluish, 2 = yellowish and 3 = white) it's actually trivial to detects the pixels of each colour:
[img, map] = imread('example.png'); bluepixels = img == 1;
You can then use regionprops to get the pixels, bounding box, perimeter, etc. of the rectangles:
props = regionprops(bluepixels, 'basic'); %will return the bounding box, area and centroid of each blue object.