Filter löschen
Filter löschen

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 Ansicht (letzte 30 Tage)
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);

Antworten (1)

Walter Roberson
Walter Roberson am 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 Kommentare

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type 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!

Translated by