Borrar filtros
Borrar filtros

a very quick question

2 visualizaciones (últimos 30 días)
Ahmed Abdulla
Ahmed Abdulla el 14 de Jun. de 2019
Comentada: dpb el 14 de Jun. de 2019
i wanted to ask if matlab is reading RGB values of pixels from rows and columns. i wanted to ask does it for rows does it go from top to bottom of an image or from bottom to top and for the columns does it go from left to right or from right to left
for i = 1:rows
for j = 1:columns
red = myImage(i,j,1);
green = myImage(i,j,2);
blue = myImage(i,j,3);
rgb = red*256*256 + green*256 + blue;
compressed(i,j) = rgb;
end
end
  1 comentario
dpb
dpb el 14 de Jun. de 2019
Array data are column major as any other array.
If you use the high-level version of image to display an array, then the displayed axes has Y in the 'reverse' mode and view [0 90] but the low-level version (if use CData) doesn't make those changes.
So, what you see depends on how displayed but "memory is memory"

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by