Intersection of two colored images and display output also as colored image where common regions are only highlighted
2 views (last 30 days)
Show older comments
I have to find out the difference between two colored images. For example, I have two colored images named as img1 and img2. I want t subtract img2 from img1 and show the result as coloredi image using imshow command in Matlab. The resultant image only show the common regions/difference of img1 and img2. Kindly answer this question.
0 Comments
Accepted Answer
Image Analyst
on 8 Jan 2022
diffImage = imabsdiff(img1, img2);
show(diffImage);
Common pixel values will subtract to zero and be black. Any non-black pixel values have a difference between the two images.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!