To create a false color image

20 vues (au cours des 30 derniers jours)
Tu Nguyen
Tu Nguyen le 31 Mar 2022
Modifié(e) : Tu Nguyen le 31 Mar 2022
Hi all;
I am doing an assignment that create a false color image from stretched channel of each color. I got stuck in creating an image from 4 color channel. Any possible to create an rgb image from 4 color channels. Sorry, I cannot attach the files because the file is .tif files
If I have that image, the next step I do for creating false color image is changing to index image by using rgb2ind function and convert back to false color image by using ind2rgb(indexedImage, jet(256)) right? The false color image will be from infrad_red to red, red to green, and green to blue
I really appreciate about your help.
close all;
clear all;
I1 = imread('red.tif');
I2 = imread('blue.tif');
I3 =imread('green.tif');
I4 = imread('infra_red.tif');
I1g = im2gray(I1);
I2g = im2gray(I2);
I3g = im2gray(I3);
I4g = im2gray(I4);
Ir = imadjust(I1, [0.3 0.6],[0.0,1.0]);
Ir_eq = histeq(I1);
Ib = imadjust(I2, [0.22 0.72],[0.0,1.0]);
Ib_eq = histeq(I2);
Ig = imadjust(I3, [0.02 0.48], [0 1]);
Ig_eq = histeq(I3);
Ii = imadjust(I4, [0.7 1], [0 1]);
Ii_eq = histeq(I4);
rgbImage = cat(3, Ir, Ig, Ib);
Coloredimage = cat(4,I1g,I2g,I3g,I4g);
falseColoredImage = ind2rgb(cat(4,Ii_ind,Ir_ind,Ig_ind,Ib_ind), jet(256));

Réponses (0)


En savoir plus sur Import, Export, and Conversion dans Help Center et File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by