how to increase the number of rows and columns of an image in Matlab?
Show older comments
Hello,
I would like to increase the number of rows and columns of an image in Matlab since I have different images and they should have the same number of rows and columns for special application. I want to fill the new rows and columns with zero value. How can I do that?
Accepted Answer
More Answers (1)
Image Analyst
on 25 Nov 2011
0 votes
Another option is padarray() (in the Image Processing Toolbox) if you want the zeros evenly distributed around the border instead of just along the bottom and right edge. Or if you want to stretch or scale the image instead of padding it with zeros, you can use imresize().
Categories
Find more on Image Arithmetic 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!