DCT and DST (+ inverse) in arbitrary dimension

버전 1.5.0.0 (8.53 KB) 작성자: Damien Garcia
Discrete cosine/sine transforms and their inverses
다운로드 수: 3.9K
업데이트 날짜: 2011/11/25

라이선스 보기

Y = DCTN(X) returns the discrete cosine transform (DCT) of X.

X = IDCTN(Y) returns the inverse discrete cosine transform (IDCT) of Y.

Y = DSTN(X) returns the discrete sine transform (DST) of X.

X = IDSTN(Y) returns the inverse discrete sine transform (IDST) of Y.

X and Y can be N-dimensional.

D = DSTMTX(k) returns the k-by-k DST transform matrix.

Faster DCT2 and IDCT2 are also included in the zip file.

Enter "help dctn", "help dstn", "help idctn", "help idstn" and "help dstmtx" in the Matlab command window for complete information.

Example
-------
RGB = imread('autumn.tif');
I = rgb2gray(RGB);
J = dstn(I);
imshow(log(abs(J)),[]), colormap(jet), colorbar

The commands below set values less than magnitude 10 in the DST matrix to zero, then reconstruct the image using the inverse DST.

J(abs(J)<10) = 0;
K = idstn(J);
figure, imshow(I)
figure, imshow(K,[0 255])

------
http://www.biomecardio.com/matlab
-----

인용 양식

Damien Garcia (2024). DCT and DST (+ inverse) in arbitrary dimension (https://www.mathworks.com/matlabcentral/fileexchange/26040-dct-and-dst-inverse-in-arbitrary-dimension), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.0

faster DCT2 and IDCT2 are also included

1.4.0.0

Faster DCT2 and IDCT2 are also included

1.2.0.0

DCT and IDCT have been added upon request

1.0.0.0