How to get back to the nearest equal original image from the exposure image.?

1 次查看(过去 30 天)
I am working to normalize images from over and under exposure.
I=imread('cameraman.tif');
imshow(I);
[r,c]=size(I);
avg=sum(sum(I))/(r*c);
Imask=-avg;
U=I+Imask;
I1mask=avg;
O=I+I1mask;
imwrite(O,"over.png");
imwrite(U,"under.png");
From this Over and Under exposure images, i wanted to get back to the nearest original image without taking original image into reference.
I tried these steps,
grayImage=imread('over.png');
I=imread('cameraman.tif');
normalizedImage = uint8(255*mat2gray(grayImage));
figure
imshow(I);
figure
imshow(grayImage);
figure
imshow(normalizedImage);
But still I need a better image. Is that possible? Can you help me.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by