Mostrar comentarios más antiguos
readImage1=imread(image_file1);
[x1,y1,z1] = size(readImage1);
what does mean by the second line of the code ?
2 comentarios
nabeel raza
el 10 de Oct. de 2017
the readImage1 size will be assigned to x1,y1,z1; that would be 512*512*3
Image Analyst
el 11 de Oct. de 2017
Those numbers are not necessarily the size of her image. The numbers could be anything - depends on the image.
Make sure you read my answer below as to why that code is wrong, and why the accepted answer from Jorge is also wrong even though she accepted it. It's a common beginner mistake.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 5 de En. de 2015
It gives the rows in x1 and columns in y1, and either the number of slices in a 3D volumetric image, or color channels in a color image.
Calling rows x1 and columns y1 is kind of backwards to the usual convention of having the vertical direction be y and the horizontal direction be x. So it should be
[y1,x1,z1] = size(readImage1);
to go along with the standard convention.
For a thorough discussion, see Steve's blog: http://blogs.mathworks.com/steve/2011/03/22/too-much-information-about-the-size-function/
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!