zero pad to resize an image
Mostrar comentarios más antiguos
How to add zeros by comparing the file sizes of the two images?
Suppose the first image is 240x152 and the second image is 240x168
And i need to resize the first image using zeros to the same as the bigger one that is 240x168
so how is it possible to do the same?
Respuestas (2)
Himanshu tripathi
el 28 de Jun. de 2019
Try this
I = rand(240,152) ; // first image
iwant = zeros(240,168) ;
iwant(1:240,1:152) = I ;
3 comentarios
Pravita Lekshmanan
el 28 de Jun. de 2019
Himanshu tripathi
el 28 de Jun. de 2019
Are you looking for this?
zero_matrix = zeros(240,168-152);
I = [zero_matrix,I]
Pravita Lekshmanan
el 28 de Jun. de 2019
AISWARYA SUBRAMANIAN
el 28 de Jun. de 2019
Editada: AISWARYA SUBRAMANIAN
el 28 de Jun. de 2019
0 votos
I would suggest you to look through the following link:
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!