Matrix dimensions must agree error when using DCT2?
조회 수: 6(최근 30일)
표시 이전 댓글
Hi I am trying to use the dct2 function on some images. When I try to use the following code, I get the error "Matrix dimensions must agree," any ideas? Here's my code:
A = imread('IC1.png');
imshow(A);
D = dct2(A);
I am aware that I can get this to work if I use rgb2gray however I want to compress rgb images, is this not possible?
댓글 수: 0
답변(1개)
Abhishek Gupta
2020년 12월 14일
Hi Harry,
The 'dct2' function takes only a 2-D numeric matrix as input. Please see the documentation for more details: -
I am referring you to the following File Exchange link, which might resolve your issue: -
댓글 수: 0
참고 항목
범주
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!