I have six square image matrices and I wish to make them all scale to the same size so I can combine them...
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 12 Feb 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 Comments
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!