Limiting Intensity Values of an Image

2 views (last 30 days)
Amadeus
Amadeus on 13 Jan 2013
Hi,
I have about 200 CT scans that I need to limit their intensity values between -2048 and 2048. I tried histeq and imadjust but they did not work. I get the best result when I use imshow(image, [-2048,2048]). But I need to save the result data of this imshow.
What can I do?
Best

Answers (2)

Walter Roberson
Walter Roberson on 13 Jan 2013
See the FEX contribution "freezeColors"

Image Analyst
Image Analyst on 13 Jan 2013
Of course histeq() is not what you want. But I don't know why imadjust() didn't work - you must have called it incorrectly. Alternatively you could do
scaledImage = uint8(255 * (single(yourImage) + 2048)/4096);
imwrite(scaledImage, fullFileName);
That will scale your image between -2048 and +2048 and look like what imshow() does.

Categories

Find more on Images in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!