help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image resizing


From: Søren Hauberg
Subject: Re: image resizing
Date: Fri, 24 Jul 2009 13:28:35 +0200

fre, 24 07 2009 kl. 16:15 +0530, skrev Anwesha Dastidar (Trainee):
> I am a beginner in image processing techniques. I have been trying to
> resize a 20x46 bmp image to 32x32 bmp image in Octave. I used the
> imresize command but it distorts the shape of the object.
> 
> How do I resize without distorting the image?

I am not sure I understand. You wish to convert a 20x46 image into a
32x32. You really can't avoid changing the aspect ratio, which I guess
is what you mean with 'distortion'. You can crop the image to avoid this
(see below).

> Also, is there any command available in Octave which allows us to crop
> an image? (equivalent to imcrop() in Matlab which is undefined in
> Octave)

To crop an image you can do something like

  new_im = old_im (10:20, 1:20);

where the coordinates depend on how you wish to crop. You can use
'ginput' to get coordinates.

Søren
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]