Please explain the concept of zeros for images...the code is [m n]=size(image); image1=zeros(8,m,n);

2 visualizaciones (últimos 30 días)
Please explain the coding for the above syntax

Respuestas (3)

Walter Roberson
Walter Roberson el 3 de Mzo. de 2014
zeros() just returns a matrix the given size, with all of the values in the matrix set to 0. For example, zeros(3,5) would be the same as
[0 0 0 0 0; 0 0 0 0 0; 0 0 0 0 0]

Azzi Abdelmalek
Azzi Abdelmalek el 3 de Mzo. de 2014
image1=zeros(8,5,2)
This line of code allows to pre allocate memory for a matrix 8x5x2, to be used after. you can fill your matrix with other values then zero, and make the process faster
  2 comentarios
Gursheen
Gursheen el 21 de Mzo. de 2014
sir why has the number 8 been fixed? please specify what does 8,5,2 specify here as in 5,2 must be rows and columns then what does 8 signify?

Iniciar sesión para comentar.


DEEPANSHU TRIVEDI
DEEPANSHU TRIVEDI el 18 de Nov. de 2021
A= [2 3 5; 4 6 5]
a= size(A,1);

Categorías

Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by