Error using ISWT2 " Index exceeds matrix dimensions. Error in iswt2 (line 127) , tmp{j} = reconsLOC(a(:,:,j ),h(:,:,j,:),v(:,:,j,:),d(:,: ,j,:));"
1 回表示 (過去 30 日間)
古いコメントを表示
Hi I am trying to perform a simple inverse stationary wavelet transform using the code below but i get the following error
Index exceeds matrix dimensions.
Error in iswt2 (line 127), tmp{j} = reconsLOC(a(:,:,j),h(:,:,j,:),v(:,:,j,:),d(:,:,j,:));
Code
[A,H,V,D] = swt2(i,2,'sym4');
y = iswt2(A,H,V,D,'sym4'); % this function gives the error%
All the size of the coefficient is same as the input so how can index exceed the matrix dimension.
the size of i(input image) is 512x512 unit 16
size 0f A = 512x512x2 single
size of H = 512x512x2 single
size of D = 512x512x2 single
size of V = 512x512x2 single
0 件のコメント
回答 (2 件)
Image Analyst
2016 年 12 月 8 日
a,h,d,v are different from A,H,D,V since MATLAB is case sensitive. A,H,D,V are all 3D matrices according to you.
a(:,:,j),h(:,:,j,:),v(:,:,j,:),d(:,:,j,:) are a 3-D, 4-D, 4-D, and 4-D matrix. Plus if you specify an index other than that last one, you will not extract a 3-D matrix. For example h(:,:,j,:) is a 512x512x1xN 4-D matrix, NOT a 3-D matrix. You might need to use squeeze() on the 4-D matrices.
6 件のコメント
Walter Roberson
2017 年 5 月 17 日
iswt2() is broken for reconstructing data that was originally grayscale and not of data type double. RGB non-double is okay, and grayscale double is okay, but not (for example) grayscale uint8, or grayscale single.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Denoising and Compression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!