how to solve the problem of matrices dimension must agree
7 ビュー (過去 30 日間)
古いコメントを表示
Hello, i need an assistance on how to add two variables/matrices in my code below. one is w_LL(256x256x3 double) and the other is Ir_LL(256x256 double).Attached is the code.Thank you.
CODE------------------
t=0.10;
newhost_LLr =Ir_LL+(t*w_LL);
r2=idwt2(newhost_LLr,Ir_LH,Ir_HL,Ir_HH,'haar');
figure(2);imshow(uint8(r2));title('Watermarked image of r component');
newhost_LLg =Ig_LL+(t*w_LL);
g2=idwt2(newhost_LLg,Ig_LH,Ig_HL,Ig_HH,'haar');
figure(2);imshow(uint8(g2));title('Watermarked image of g component');
newhost_LLb =Ib_LL+(t*w_LL);
b2=idwt2(newhost_LLb,Ib_LH,Ib_HL,Ib_HH,'haar');
figure(2);imshow(uint8(r2));title('Watermarked image of g component');
%imwrite(uint8(rgb2),'images/Watermarked33.jpg');
0 件のコメント
採用された回答
Image Analyst
2019 年 5 月 25 日
Make it an RGB image also
rgbImage = cat(3, Ir_LL, Ir_LL, Ir_LL);
newhost_LLr = rgbImage + (t * w_LL);
3 件のコメント
Image Analyst
2019 年 5 月 25 日
Sorry - I don't have the Wavelets toolbox so I can't help you on the idwt2() function. Make sure what kind of image (color or gray scale) you're supposed to pass it.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Display and Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!