Borrar filtros
Borrar filtros

please explain size function in MATLAB

2 visualizaciones (últimos 30 días)
tina jain
tina jain el 18 de Oct. de 2017
Respondida: Image Analyst el 18 de Oct. de 2017
if(size(img,3) == 1) disp('Error: Pick a color image'); return;

Respuestas (1)

Image Analyst
Image Analyst el 18 de Oct. de 2017
size(img,3) returns the number of color channels in an image. It will be 1 for a gray scale image and 3 for an RGB image. That should explain it (why they ask for a color image if the program was given a gray scale image).

Categorías

Más información sobre Image Processing Toolbox 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