Effacer les filtres
Effacer les filtres

hi sir in this matlab code the gray image is not converting into color image ?showing error in 10th line please say what is the error and make it correct the code and help me

1 vue (au cours des 30 derniers jours)
clc;
clear all;
close all;
imt=imread('flowers.jpg');
figure(1)
imshow(imt);
ims=imread('flower2.jpg');
figure(2)
imshow(ims);
colorIm = gray2rgb('flowers.jpg','flower2.jpg');
figure(3)
imshow(colorIm);

Réponses (1)

Walter Roberson
Walter Roberson le 31 Jan 2016
gray2rgb() is not a Mathworks provided function.
It appears you might be wanting to use the File Exchange contribution http://www.mathworks.com/matlabcentral/fileexchange/8214-gray-image-to-color-image-conversion . You will need to download that .zip file, unzip it into a convenient directory that is not underneath the MATLAB installation directory, and then use pathtool to add that directory to the MATLAB path.
  3 commentaires

Connectez-vous pour commenter.

Catégories

En savoir plus sur Convert Image Type 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