Help me for error array dimensions must match for binary array op.

1 visualización (últimos 30 días)
Helmi
Helmi el 7 de Abr. de 2014
[gambarasli] = uigetfile('*.bmp','Select Original Image');
gambarasli1=imread(gambarasli);
gambarasli2=im2double(gambarasli1);
figure, imshow(gambarasli2);
gambarasli3=imresize(gambarasli2,[1024 1024]);
[LL,LH,HL,HH] = dwt2(gambarasli3,'db2');
[LL1,LH1,HL1,HH1] = dwt2(LL,'db2');
[LL2,LH2,HL2,HH2] = dwt2(LL1,'db2');
[gambarwatermark] = uigetfile('*.bmp','Select File Image Watermark');
gambarwatermark1=imread(gambarwatermark);
gambarwatermark2=im2double(gambarwatermark1);
figure, imshow(gambarwatermark2);
gambarwatermark3=imresize(gambarwatermark2,[1024 1024]);
[WLL,WLH,WHL,WHH] = dwt2(gambarwatermark3,'db2');
[WLL1,WLH1,WHL1,WHH1] = dwt2(WLL,'db2');
[WLL2,WLH2,WHL2,WHH2] = dwt2(WLL1,'db2');
Watermarkedimage=LL2+0.01*WLL2;
Watermarkedimage_level1= idwt2(Watermarkedimage,LH2,HL2,HH2,'db2');
Watermarkedimage_level2=idwt2(Watermarkedimage_level1,LH1,HL1,HH1,'db2');
Watermarkedimage_final=idwt2(Watermarkedimage_level2,LH,HL,HH,'db2');
figure, imshow(Watermarkedimage_final,'DisplayRange',[]), title('Watermarkedimage final');
save Watermarkedimage_final.mat Watermarkedimage_final;
imwrite(Watermarkedimage_final,'D:\Tugas & Bahan Kuliah\Tugas Akhir Helmi\Watermarkingsip\work\Watermarkedimagedaubechies.bmp','bmp');
[a b c d]=dwt2(Watermarkedimage_final,'db2');
[aa bb cc dd]=dwt2(a,'db2');
[aaa bbb ccc ddd]=dwt2(aa,'db2');
recovered_image=(aa-kiriatas1)/0.04;
recovered_image1=imresize(recovered_image,[256 256]);
figure, imshow(recovered_image1,[]);
this code for watermarking image using wfilters db2, if this code using wfilters db1 or haar its ok no problem
error message is : _Array dimensions must match for binary array op.
Error in idwt2 (line 90) x = upsconv2(a,{Lo_R,Lo_R},sx,dwtEXTM,shift)+ ... % Approximation.
Error in testtanpadouble (line 35) Watermarkedimage_final=idwt2(Watermarkedimage_level2,LH,HL,HH,'db2');_
please help me for my final project

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by