필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Reconstructing the image from specific number of coefficicents

조회 수: 2 (최근 30일)
Ayesha
Ayesha 2014년 1월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi there!
Alright, so I've been working on this little piece of code to construct an image using specific coefficicents and there's this error I'm getting:
Subscripted assignment dimension mismatch.
So the code goes this way:
j0=128;
M = 2^(-j0);
m=sqrt(M);
I = imread('lena.png');
J = perform_wavelet_transf(I,j0,+1);
n = size(I,1);
J1 = zeros(n);
J1(1:n/4,1:n/4) = J(1:m,1:m);
result = perform_wavelet_transf(J1,j0,-1);
imshow(result,[]);
I'm getting the error at this line: J1(1:n/4,1:n/4) = J(1:m,1:m);
What do you think?
And yes, Thanks alot!!! for your help in advance :)
  댓글 수: 2
Amit
Amit 2014년 1월 19일
attach the image please
Amit
Amit 2014년 1월 19일
I meant, can you upload lena.png here. That way I can test it.

답변 (1개)

Amit
Amit 2014년 1월 19일
One thing I see first is that M = 2^(-128) = 2.93e-39 and thus m = 5.42e-20 m is not an integer, thus J(1:m,1:m) would not work and give you atleast one error.
  댓글 수: 8
Amit
Amit 2014년 1월 19일
its alright. In a nut shell, I think there is a problem at M = 2^(-j0) which you use to define m = sqrt(M).
Please double check the algorithm that you must be following that this is the correct way to do this.
Ayesha
Ayesha 2014년 1월 19일
I've been doing the same since long. Anyways, Thanks.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by