Scale RGB values for a matrix and plot it as image according to the scaled values
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Osama Tabbakh
am 3 Mär. 2019
Beantwortet: Image Analyst
am 3 Mär. 2019
I have a matrix Tot_Magnet (100,100,3) and when I plot it as image then I get black image, because the RGB vales are very small. That's why I want to plot it with a scaled values:
Bx=Tot_Magnet (:,:,1);
By=Tot_Magnet (:,:,2);
Bz=Tot_Magnet (:,:,3);
max_r = max(abs(Bx(:)));
min_r = min(abs(Bx(:)));
max_g = max(abs(By(:)));
min_g = min(abs(By(:)));
max_b = max(abs(Bz(:)));
min_b = min(abs(Bz(:)));
And now how I can determine the minimum value und the maximum for the neu scaled RGB values instead [0-255] and then plot it as image?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 3 Mär. 2019
Try []:
imshow(Tot_Magnet, []);
or else mat2gray()
imshow(mat2gray(Tot_Magnet));
or imadjust():
imshow(imadjust(Tot_Magnet));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!