Error using ISWT2 " Index exceeds matrix dimensions. Error in iswt2 (line 127) , tmp{j} = reconsLOC(a(:,:,j ),h(:,:,j,​:),v(:,:,j​,:),d(:,: ,j,:));"

1 vue (au cours des 30 derniers jours)
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

Réponses (2)

Image Analyst
Image Analyst le 8 Déc 2016
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 commentaires
Akshra
Akshra le 8 Déc 2016
its not my function , its Matlab inbuilt function
Image Analyst
Image Analyst le 8 Déc 2016
I don't know - call tech support.

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 17 Mai 2017
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.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by