Borrar filtros
Borrar filtros

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 visualización (últimos 30 días)
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);

Respuestas (1)

Walter Roberson
Walter Roberson el 31 de En. de 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 comentarios

Iniciar sesión para comentar.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by