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

조회 수: 1 (최근 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
Vinai Datta Thatiparthi 2019년 12월 16일
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