I have calculated the psnr value for one original image with its reference image, Similarly I have calculated it for 10 images. How can I save the values of those 10 images separately into an array?

 採用された回答

Birdman
Birdman 2018 年 3 月 27 日

0 投票

Use for loop.

7 件のコメント

S.A
S.A 2018 年 3 月 27 日
Is there any other method than using of for loop for storing values in an array
Birdman
Birdman 2018 年 3 月 27 日

The most common way is usage of for loop and for 10 values, it will be really fast.

S.A
S.A 2018 年 3 月 27 日
Yes Sir,I have used for loop but the values which are calculated for 10 images are not stored separately. Because finally I need to calculate the average for those 10 values. I have attached code for that particular module.
S.A
S.A 2018 年 3 月 27 日
Sir,I have attached the image of values which is achieved using the above attached code
Birdman
Birdman 2018 年 3 月 27 日
編集済み: Birdman 2018 年 3 月 27 日

Do this:

Tpsnr=zeros(1,length(srcFiles));
for k=2:length(srcFiles)
   peaksnr = psnr(C,I);
   fprintf('\n The peak-snr value is %0.4f\n', peaksnr);
   Tpsnr(k)=(Tpsnr(k-1)+peaksnr);
end
Apsnr = mean(Tpsnr(Tpsnr~=0),2)
S.A
S.A 2018 年 3 月 27 日
Thank you Sir
Birdman
Birdman 2018 年 3 月 27 日
If my answer helped, you can accept it .

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

S.A
2018 年 3 月 27 日

コメント済み:

2018 年 3 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by