Code covered by the BSD License  

Highlights from
Resize any arrays and images

5.0

5.0 | 1 rating Rate this file 36 Downloads (last 30 days) File Size: 5.64 KB File ID: #26385
image thumbnail

Resize any arrays and images

by Damien Garcia

 

15 Jan 2010 (Updated 22 Jan 2010)

Y = RESIZE(X,newsize) resizes input array X using a discrete cosine transform.

| Watch this File

File Information
Description

Y = RESIZE(X,NEWSIZE) resizes input array X using a DCT (discrete cosine transform) method. X can be any array of any size. Output Y is of size NEWSIZE.

Input and output formats: Y has the same class as X.

As an example, if you want to multiply the size of an RGB image by a factor N, use the following syntax:
newsize = size(I).*[N N 1];
J = resize(I,newsize);

------
% Upsample and stretch an RGB image
I = imread('onion.png');
sizeJ = size(I).*[2 2 1];
J = resize(I,sizeJ);
sizeK = size(I).*[1/2 2 1];
K = resize(I,sizeK);
figure,imshow(I),figure,imshow(J),figure,imshow(K)

------
Enter "help resize" to obtain other examples.

------
The functions DCTN and IDCTN are required. Visit:
http://www.biomecardio.com/matlab
------

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
16 Jan 2010 us

why do you not put the required functions DCTN and IDCTN into the package as well(?)...

us

06 Oct 2011 Lili

Nice job! Thanks!!

Please login to add a comment or rating.
Updates
22 Jan 2010

DCTN and IDCTN are now included, as requested

Tag Activity for this File
Tag Applied By Date/Time
image processing Damien Garcia 15 Jan 2010 12:29:10
resizing Damien Garcia 22 Jan 2010 10:28:41
dct Matt J 19 Aug 2011 04:48:49

Contact us at files@mathworks.com