The image I'm working with looks like water droplets on a sheet of metal. What I'm trying to do is obtain statistics, such as blob area and centroidal distance of the shapes. I have figured out all of the code to accomplish this, but my code is lacking in the image processing department.
Shadowing has become a factor and due to the non-uniform lighting, it is difficult to do contrast adjustment effectively enough to separate the blobs from the background.
The process I have employed so far to segment the image is to:
(1) adjust the contrast of the image using imadjust
(2) apply a median filter to the image using medfilt2
(3) apply a top-hat filter using a structuring element imtophat(IM, se)
(4) adjust the contrast again using imadjust
(5) threshold the image into a binary using a decision statement
(6) morphologically open the image using bwareaopen and fill in holes using imfill
As of now, my code is able to pick out nearly all of the blobs in the image, but the centroids are obviously skewed, mostly due to shadowing I would guess. The blob area also may be a little skewed, which I think can be attributed to all of the complications that I've listed so far.
I would like to know if there are any suggestions for improving this process or maybe changing it completely. Thank you!
Best Answer