calvin tiger
calvin tiger

Reputation: 391

How to resize/scale an image in Octave?

Is there a built-in command to resize/scale a monochrome image (represented by an array of floats for instance) in Octave ?

If not, what would be a fast implementation for a basic algorithm with some amount of interpolation (bilinear let's say) ? I actually only need to downsample my image (scale it down), which may simplify the problem.

Upvotes: 2

Views: 11100

Answers (2)

helfs2
helfs2

Reputation: 1

You could extract some pixels? Tue example here creates a new pic with every second pixel of the original image.

extract = img(1:2:rowMax, 1:2:columnMax, :);
imshow(extract)

Upvotes: -1

Oli
Oli

Reputation: 16045

You can use imresize.

You can see the documentation there: http://www.mathworks.fr/help/toolbox/images/ref/imresize.html

Upvotes: 5

Related Questions