I have six square image matrices and I wish to make them all scale to the same size so I can combine them...
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How would I do so? I found I can use B = repelem(A,3,3); where 3 by 3 is scale factor To scale the images but I would then have to scale them all to a common integer which for an image would be really large. Is there no way to make a larger matrix than one of the squares and do like a... best fit into the larger square?
0 comentarios
Respuestas (1)
Walter Roberson
el 12 de Feb. de 2018
Loop through and find the minimum size. imresize() so that the images are all the same size in that direction, maintaining the aspect ratio. crop the images down to the same aspect ratio.
Or... loop through and find the minimum height, and the minimum width. imresize() so that the images are all that size, probably messing up the aspect ratio, but not requiring any cropping.
Or do these things with maximum instead of minimum, creating blurred images where you invent new information during the resize.
0 comentarios
Ver también
Categorías
Más información sobre Read, Write, and Modify Image 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!