Image value to value conversion

How can I convert an image of value(64*64*3 double) to another value(128*128*3 double) ?

5 件のコメント

Walter Roberson
Walter Roberson 2019 年 8 月 8 日
Suppose we call the 64*64*3 Old, and call the 128*128*3 New. Then for any given Row R and Column C and Pane P, how do you calculate New(R,C,P) from Old ?
Alex Mcaulley
Alex Mcaulley 2019 年 8 月 8 日
imresize (and think about Walter's comment)
Walter Roberson
Walter Roberson 2019 年 8 月 8 日
There are a number of ways to double the size of an array, but most of them are likely not going to give you the output you want. For example, you could take the 64 * 64 * 3 image, A, and copy it twice in each direction, getting
A A
A A
This would be 128 x 128 x 3. Is it what you want? Or do you want
A zeros
zeros zeros
where zeros is 64 x 64 x 3 ? Or do you want something else?
OLUFEMI SONEYE
OLUFEMI SONEYE 2019 年 8 月 8 日
@Walter Roberson,thank you so much. Below is my code. I think this will assist in giving me a perfect answer.
code(i.e. is on watermarking):
t=0.3;
[wm_LL,wm_LH,wm_HL,wm_HH]=dwt2(wkdim2,'haar');
[wm_LL1,wm_LH1,wm_HL1,wm_HH1]=dwt2(wm_LL,'haar');
wr_HH1= (2*(wm_HH1)-(h_HH1))/t;
wr=idwt2(w_LL,w_LH,w_HL,wr_HH1,'haar');
figure;imshow(uint8(wr)); title('Recovered watermark');
imwrite((uint8(wr)),'images/recover.png');
save wr1 wr1
note: wm_HH1 is 64*64*3 double and h_HH1 is 128*128*3 double. I need an assistance to convert the value of wm_HH1 to match the value of h_HH1. Thank you.
Walter Roberson
Walter Roberson 2019 年 8 月 8 日
Your wr_HH1 has to end up the same size as wm_HH1 so that you can do the idwt2() properly. You do not want to convert the 64*64*3 to 128*128*3: you want to convert the 128*128*3 to 64*64*3

回答 (0 件)

この質問は閉じられています。

質問済み:

2019 年 8 月 8 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by