Image processing on irregular shaped water droplets

8 views (last 30 days)
Currently, I am working on a project about condensation of droplets on flat surfaces. What I need to do is detecting all the droplets occurring on surfaces in series of pictures using MATLAB. For example, one of the pictures will look like this:
I was able to detect all the small droplets (which are more likely to be complete circles) using imfindcircles . However, the problem is detecting irregular shaped droplets (like 3 biggest circles in the picture). I am planning to used regionprops on these droplets; however, I was not able to clearly extract the binary image on this picture.
The code that I am using to process image is:
I=imread('test003.jpg');
im = mean(I,3);
im = (im-min(im(:))) / (max(im(:))-min(im(:)));
bw=im2bw(im,0.28);
imshow(bw)
[~, threshold] = edge(im,'canny');
fudgefactor = .92;
bws = edge(im, 'canny', threshold * fudgefactor);
figure, imshow(bws)
se90 = strel('line', 3, 80);
se0 = strel('line', 3, 0);
BWsdil = imdilate(bws, [se90 se0]);
figure, imshow(BWsdil)
BWdfill = imfill(BWsdil, 'holes');
figure, imshow(BWdfill);
so far I was able to get these images:
So droplets I have a problem with are 1, 2 and 3. I am planning to combine the regionprops and imfindcircles once I am able to extract the regions of irregular shaped droplets. Could you please suggest to me what I can do to improve this image processing?
Thank you!
  1 Comment
Ashish Uthama
Ashish Uthama on 27 May 2015
Do you have control on how the images are captured? (I am thinking if alternate means of lighting the surface would yield better results)

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!