Shan
Shan

Reputation: 19243

how to pad images of different sizes and making them of same size by putting the original image in the middle in matlab?

I have images of different sizes. I want to specify the width and the height. All the images should be padded with black pixels putting the actual image in the middle.

Thanks a lot

Upvotes: 1

Views: 955

Answers (1)

Jonas
Jonas

Reputation: 74940

You can use padarray to specify how many black pixels you want to add around the edge of the image.

Upvotes: 3

Related Questions