Comparing the dots in two images and eliminating the dots which don't have pairs
1 view (last 30 days)
Show older comments
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
2 Comments
Answers (1)
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)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!