How to find uaci by fixing one image and changing the other?

2 ビュー (過去 30 日間)
Ammy
Ammy 2021 年 9 月 16 日
コメント済み: Ammy 2021 年 9 月 16 日
The code for uaci for two images A and B.
uaci= sum( abs( double(A(:)) - double(B(:)) ) ) / num_of_pix / largest_allowed_val;
If A is a fixed image and there are differnt various B images say '50' then how to find uaci by fixing image A and varying B.
All the B images are in one folder.

採用された回答

KSSV
KSSV 2021 年 9 月 16 日
A = imread('whatever_is_A') ;
B_images = dir('*.png') ; % you are in the folder of images and give extension
N = length(B_images) ;
uaci = zeros(N,1) ;
for i = 1:N
B = imread(B_images(i).name) ;
uaci(i) = sum( abs( double(A(:)) - double(B(:)) ) ) / num_of_pix / largest_allowed_val;
end
  2 件のコメント
KSSV
KSSV 2021 年 9 月 16 日
Are you in the same folder where the image is present? What is B_images class? What is value of N? Are you giving the extension of the image properly?
Ammy
Ammy 2021 年 9 月 16 日
Thank you very much, I was in the different folder.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by