How to measure % intensity difference between 2 image?

3 views (last 30 days)
Hi,
May i know how to calculate the percentage intensity difference between 2 image of the same size. Then i need to apply this % of intensity different to another image of different size.

Accepted Answer

David Young
David Young on 6 Jul 2011
imDiff = image1 - image2;
imSum = image1 + image2;
percentDiff = 200 * mean(imDiff(:)) / mean(imSum(:));
imAdjusted = (1 + percentDiff/100) * image3;
  4 Comments
Kyle
Kyle on 7 Jul 2011
yep i encountered that, when i tried the code. so i make the image to int16 so that it could store negative value as well.
Thanks
suja rani
suja rani on 27 May 2017
why 200 is used for finding the percentage of difference

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox 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!