How to divide intensity values of one grayscale image to the intensity values of another grayscale image??
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hamza Ahmed
am 2 Sep. 2014
Kommentiert: Hamza Ahmed
am 2 Sep. 2014
Please help! I have two gray scale images. I want to divide each pixel value of one image with the corresponding pixel value of the other gray scale image.
Simply put, how to divide pixels of one gray scale image to the other?
Thanks.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Sep. 2014
If they're uint8, be sure to cast to double first or else you'll get clipping.
ratioImage = double(image1) ./ double(image2);
To display, use []:
imshow(ratioimage, []);
You can cast back to uint8 if you want, but that will lose fractions less than 1, so it should only be done when you know all the numbers will be well above 1.
ratioImage = uint8(ratioImage);
Weitere Antworten (1)
Stephen23
am 2 Sep. 2014
If each of your grayscale images is the same size matrix, then you can simply use the matrix right division . This also has the shorthand ./ .
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!