Error in an image

1 visualización (últimos 30 días)
Nathan Formby
Nathan Formby el 21 de Nov. de 2019
Respondida: Walter Roberson el 21 de Nov. de 2019
What code do I need in order to find out:
How to check that one image is larger than another image (both rows and columns).
AND
Check that both images are viewable images (three-dimensional, three-layered matrices).
AND
If either of these conditions are not met, produce an error and terminate the program.
  1 comentario
Rik
Rik el 21 de Nov. de 2019
Have a read here and here. It will greatly improve your chances of getting an answer.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 21 de Nov. de 2019
ndims(First_Image) == 3 && ndims(Second_Image) == 3 && size(First_Image,[1 2]) >= size(Second_Image, [1 2]) && size(First_Image,3) == 3 && size(Second_Image,3) == 3
This can be written more clearly.
Note: size(First_Image,[1 2]) requires a pretty new MATLAB.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by