Borrar filtros
Borrar filtros

how i can reshape image from original size to new size

32 visualizaciones (últimos 30 días)
Ahmed almansory
Ahmed almansory el 23 de Ag. de 2013
Editada: Deokar Kaustubh Santosh el 8 de Oct. de 2018
hello
i want to reshape image (matrix) from 6x5000 to another size must be power of 2 such as 64x64,128x128 or 256x256 to do some calculation then return image to original size.
(these calculation must contain all pixels in original image)
thanks

Respuestas (3)

David Sanchez
David Sanchez el 23 de Ag. de 2013
The resizing of the image comes to a price, and that's a loss of information. You can resize your image, do whatever you want to it, but then, you can not expect to go back to the original size (bigger) and get back the same original image with the same information, or even worse, the extra information obtained with the process extended to the original image.

Image Analyst
Image Analyst el 23 de Ag. de 2013
Editada: Image Analyst el 23 de Ag. de 2013
Have you seen the imresize() function in the Image Processing Toolbox?
image64 = imresize(originalImage, [64, 64]);
  2 comentarios
Ahmed almansory
Ahmed almansory el 23 de Ag. de 2013
Yes I've seen, but this function does not take all image pixels means i have 6x5000 pixels (irregular dimension.... i want to apply wcompress function on this image ,this function take power 2 dimention. thanks for your replay
Image Analyst
Image Analyst el 23 de Ag. de 2013
It can take all pixels into consideration when you do some resizing (i.e. bicubic interpolation) but does not under some other options ('nearest'). So I don't know why you say that.
I've never heard of the wcompress() function.

Iniciar sesión para comentar.


Deokar Kaustubh Santosh
Deokar Kaustubh Santosh el 8 de Oct. de 2018
Editada: Deokar Kaustubh Santosh el 8 de Oct. de 2018
image='gray.png';
a=imread(image);
b=imresize(a,[256 256]);
imshow(b);

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by