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

조회 수: 2(최근 30일)
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 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표시숨기기 이전 댓글 수: 1
Ammy 2021년 9월 16일
Thank you very much, I was in the different folder.

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!

Translated by