Comparing the dots in two images and eliminating the dots which don't have pairs

1 view (last 30 days)
Hi,
I have two images which is basically dot patterns. One is an initial image where there is only round dots. Second image is taken when we place a thin film on water above the dot pattern where some dots are dilated and some are convereged. I want to compare these dots in both the images and eliminate those which does not have the corresponding pairs.If anyone could resolve the problem please message.
Thanks

Answers (1)

darova
darova on 18 Feb 2021
See this example
A1 = imread('image1.png');
A2 = imread('image2.png');
I1 = rgb2gray(A1); % convert ot grayscale
I2 = rgb2gray(A2);
B1 = im2bw(I1); % binarize image
B2 = im2bw(I2);
BB = B1 & B2; % find dots on both images
II = I1 .* BB;
imshow(II)
  1 Comment
Megha Emerse
Megha Emerse on 18 Feb 2021
Thanks,
But I have to compare both the images and find the corresponding pair and delete the dots which dont have the pair automatically.
Regards

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!