logankilpatrick
logankilpatrick

Reputation: 14551

How to resize an image in Julia?

I am trying to use some pre-trained computer vision models which require images of a certain dimension. I need to re-size my custom dataset to be a certain dimension. How can I do this with Julia?

Upvotes: 3

Views: 1427

Answers (1)

logankilpatrick
logankilpatrick

Reputation: 14551

In Julia, you can use the imresize function as follows:

using Images

img_square = imresize(img_source, (224, 224))

where img_source is the original image which you want to resize and 224x224 is the new image size. You can find out more about the resizing operations in the Julia Images docs.

Upvotes: 4

Related Questions