Hi, I've looked at the code and I've worked out what you need. Before your final loop "% Loop over all blobs printing their measurements to the command window", add the line
vols = zeros(1,numberOfBlobs);
and then at the end of the loop (before end), simply add
Then, the code you require to plot two images (one for the smaller, one for the bigger) as binary images. The lists idxs_1 and idx_2 contain the indexes for the cells belonging to each group. You can use this to add more qualifiers, and create different groups if you need to.
idxs_1 = find(vols < 2000);
idxs_2 = find(vols >= 2000);
cells_1 = zeros(size(hImage));
cells_2 = zeros(size(hImage));
for i = 1:numel(idxs_1)
cells_1(blobMeasurements(idxs_1(i)).PixelIdxList) = 1;
for i = 1:numel(idxs_2)
cells_2(blobMeasurements(idxs_2(i)).PixelIdxList) = 1;
figure(4), subplot (2,2,1), imshow(cells_1,);
figure(4), subplot (2,2,2), imshow(cells_2,);
I hope this solves your problem.