I need to generate a false color image based on intensity of a grayscale image which must be adjust the range of intensity by GUI slider bar

2 次查看(过去 30 天)
I'm very new to Matlab, so please give me an advice please.
I have a gray scale image and I want to divide it into 3 regions based on intensity of the image then color them in to red green and blue.
but it must be able to adject the range of each intensity by GUI slider bar (guide)
Do you have any suggestion for coding this? Thank you so much for you kindness

回答(1 个)

Vinai Datta Thatiparthi
Hey!
Welcome to MATLAB!
MATLAB provides support for multilevel thresholding through the function multithresh. Here, since you need 3 regions, the number of threshold values (N) when using multithresh will be 2.
im = imread('Your Image'); % Read your Grayscale image here
levels = multithresh(im, 2); % Get two threshold value outputs to divide into three regions
segIm = imquantize(im, levels); % The output image has quantized intensity values
imshow(segIm);
"...then color them in to red green and blue."
Since your input image is a grayscale image, it's not clear to me how you want to add color to it.
You can alter the callbacks for different components in your app to include these functions. Also, as an extension, consider using App Designer to ease your process.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Modify Image Colors 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by