How can I subtract data of an Image keeping the original image and not just a canal?
Show older comments
I need to subtract data of a whole RGB image. Imsubtract works only for a canal. Or, is there a function that can use merging the canals after the subtraction?.
Answers (2)
Angela Blanco
on 10 Sep 2012
0 votes
Image Analyst
on 10 Sep 2012
You can just subtract them directly. If they are uint8, cast to single so that you don't clip negative values.
diffImage = single(rgbImage1) - single(rgbImage2);
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!