MATLAB: About image intensity equalization

equalizationintensitytransform

How to make two images intensity wise same(intensity eualization)

Best Answer

inten1 = sum(double(TheFirstImage(:)));
inten2 = sum(double(TheSecondImage(:)));
TheSecondImage = cast( TheSecondImage .* (inten1 ./ inten2), class(TheSecondImage));
However, the above has some subtle problems in areas that area already quite bright.