Resize N-D arrays and images

版本 1.3.0.0 (6.4 KB) 作者: Damien Garcia
Y = RESIZE(X,newsize) resizes input array X using a discrete cosine transform.
3.1K 次下载
更新时间 2014/10/12

查看许可证

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.

引用格式

Damien Garcia (2025). Resize N-D arrays and images (https://www.mathworks.com/matlabcentral/fileexchange/26385-resize-n-d-arrays-and-images), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.3.0.0

.

1.2.0.0

The functions IDCTN and DCTN are now in RESIZE

1.1.0.0

DCTN and IDCTN are now included, as requested

1.0.0.0