Remove Rows/columns of a rgb Image

7 visualizaciones (últimos 30 días)
marie lasz
marie lasz el 10 de Oct. de 2020
Comentada: Ameer Hamza el 10 de Oct. de 2020
Hello ,
I have a rgb image 512x512 pixels. I want to remove it's rows or columns pixels. How can I do that in matlab? Any help please :)
Thanks

Respuestas (1)

Ameer Hamza
Ameer Hamza el 10 de Oct. de 2020
Something like this
img; % 3D RGB image array
c = []; % list of columns to delete
r = []; % list of rows to delete
img(r,c,:) = []
  2 comentarios
marie lasz
marie lasz el 10 de Oct. de 2020
thanks for you kind response. I didn't get this line of code: img(r,c,:) = []?
Ameer Hamza
Ameer Hamza el 10 de Oct. de 2020
This line delete the rows specified in vector 'r', and columns specified in vector 'c' from variable img. [] tells MATLAB to delete those lines.

Iniciar sesión para comentar.

Categorías

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