Reputation: 863
I have an image of size 144*2209 and its dynamic range is large (from -1108 to 984).
I want to display this image and for that this range needs to be brought into 0 to 255 and for that I need to normalize the image.
Here lies the problem: when such large dynamic range is made compact, the values of pixels after normalization becomes very close to each other such that the image does not show up as it needs to be.
What can be done to resolve this problem???
Here is the link to the IMAGE.
Upvotes: 3
Views: 1621
Reputation: 788
You can use a linear transform to change the dynamic range of the original image, but be aware that you will be modifying the information of the image.
To do so, for a 8-bit range in Matlab, just use the following snippet :
bins = pow2(8); % = range
lin_eq_img = round( (bins - 1) * (img - min_img) / (max_img - min_img) );
But it will slightly affect the image :
Just a few remarks :
Edit :
The 16-bit equalisation version will "keep your shades clearer" (no loss of details) but, of course, the rendered image will take more space. Here is a comparison :
I would strongly recommend you to perform the histogram normalization on a 2^16 intensity values span, in order to avoid details losses.
Upvotes: 2