Normalization of figure based on colour (RGB)
Show older comments
Hello,
I have my code here;
color_image = {};
map = hsv(256);
for i = 1:size(Data_SWS_BMd_A3,2)
image = Data_SWS_BMd_A3{i}.SWS_Img;
uint_image = uint8(255*mat2gray(image));
color_image{i} = ind2rgb(uint_image, map);
end
I want to normalize my figures base on one range colour to find a relationship between them.
Can anyone help me 1) how I can nomalize it?
2) how should I change the binary of my picture to expand the range of colour?
I need the answer soon, I would be grateful if anyone can help me regarding that.
Regards
Thanks
Answers (1)
Image Analyst
on 26 Aug 2020
0 votes
I can't really tell you how to standardize the images unless I know what's in it, and your intent. I mean you could simply use rescale(rgbImage, 0, 255) but that may not be what you want. Maybe you have a Color Checker Chart in the image and want to use that do to a true color standardization like the pros do. I don't know. Anyway, see my attached tutorial.
6 Comments
Fatemeh Shomal Zadeh
on 26 Aug 2020
Image Analyst
on 26 Aug 2020
You don't want to do that in color. It's just applying a pseudocolor look up table to grayscale data. You need to figure out what the gray scales are of the pixels in the area you want to look at and then apply a colormap that will be appropriate to see those. Can you post the same layout in gray scale. Make sure you call impixelinfo after you display each one.
Fatemeh Shomal Zadeh
on 26 Aug 2020
Fatemeh Shomal Zadeh
on 26 Aug 2020
Image Analyst
on 27 Aug 2020
What is the class and range of your images? Are they uint8 (0-255), or uint16 (0-65535), or double?
Zip up your images and attach the zip file and let me know what intensity range should be each color. Like what values should be green, what values should be yellow, etc.
Fatemeh Shomal Zadeh
on 27 Aug 2020
Categories
Find more on Color and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!