Prev: indexing
Next: Cell arrays containing cell arrays
From: Ali on 2 Jun 2010 13:11 Hi all, i have a problem using imrotate, the output image have a different size of the input one, i need to get both images with the same size. ideas????? Tx.
From: Walter Roberson on 2 Jun 2010 17:33 Ali wrote: > Hi all, i have a problem using imrotate, the output image have a different size of the input one, > i need to get both images with the same size. When you say that you need to get both images the same size, do you want the rotated image resized back down to the original size, or do you want the rotated image cropped to the original size? Resizing would preserve content but decrease resolution; cropping would preserve resolution but cut content. If it is cropping you want, then use the 'crop' option of imresize. If it is resizing you want, then imresize() it.
From: Matt J on 2 Jun 2010 17:53 Walter Roberson <roberson(a)hushmail.com> wrote in message <hu6iot$jad$2(a)canopus.cc.umanitoba.ca>... > Ali wrote: > > Hi all, i have a problem using imrotate, the output image have a different size of the input one, > > i need to get both images with the same size. > > When you say that you need to get both images the same size, do you want the > rotated image resized back down to the original size, or do you want the > rotated image cropped to the original size? Resizing would preserve content > but decrease resolution; cropping would preserve resolution but cut content. > > If it is cropping you want, then use the 'crop' option of imresize. If it is > resizing you want, then imresize() it. ================= Or do you want to embed the original image in a larger grid the same size as the rotated image? That would sacrifice neither resolution nor content.
From: Ali on 2 Jun 2010 15:29 the original image is for example 600 by 600 when i applied the function i got an image of 486 by 492 so i need this output image in 600 by 600
From: ImageAnalyst on 2 Jun 2010 19:53
On Jun 2, 7:29 pm, Ali <za_ali...(a)hotmail.com> wrote: > the original image is for example 600 by 600 > when i applied the function i got an image of 486 by 492 > so i need this output image in 600 by 600 --------------------------------------------------------- Very, very strange. Can you tell me how you can rotate an image and have it end up being SMALLER than the original image? As the corners rotate away, they image MUST become larger. |