Home how to implementation Center Location Error (CLE) code
Reply: 0

how to implementation Center Location Error (CLE) code

user1388
1#
user1388 Published in April 24, 2018, 6:27 am

I'm trying to write the which corresponds to this formula, which one is correct I'm grad for any help I load the groundtruth variables and the results too they are in a txt file in this form [x,y,w,h] = 100,22,12,32

filename_groundtruth = 'D:\data_seq\david2\anno\groundtruth_rect.txt';
[groundtruth,delimiterOut]=importdata(filename_groundtruth);
filename_result = 'D:\data_seq\david2\anno\result_rect.txt';
[output_result,delimiterOut]=importdata(filename_result);

Nrg=size(groundtruth,1); %number of images
cle = 0;% The Center Location Error
for i=1 : Nrg
    xg = groundtruth(i,1);
    yg = groundtruth(i,2);
    xr = output_result(i,1);
    yr = output_result(i,2);

    % formula 1
    cle = cle+ (1/Nrg)*sqrt((xg-xr).^2+(yg-yr).^2);

end

cle

or

filename_groundtruth = 'D:\data_seq\david2\anno\groundtruth_rect.txt';
[groundtruth,delimiterOut]=importdata(filename_groundtruth);
filename_result = 'D:\data_seq\david2\anno\result_rect.txt';
[output_result,delimiterOut]=importdata(filename_result);

Nrg=size(groundtruth,1); %number of images
cle = 0;% The Center Location Error
for i=1 : Nrg
    xg = groundtruth(i,1);
    yg = groundtruth(i,2);
    xr = output_result(i,1);
    yr = output_result(i,2);


 % formula 2
     cle = cle+ sqrt((xg-xr).^2+(yg-yr).^2);
end
cle = (1/Nrg)*cle;

cle
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.3358 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO