]> AND Private Git Repository - canny.git/blob - stc/exp/steganalysers/aump/test_aump_nous.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
t
[canny.git] / stc / exp / steganalysers / aump / test_aump_nous.m
1 %build matrix for ensemble
2
3
4 dir_canny='/home/couturie/BossBase-1.0-canny/';
5 dir_cover='/localhome/couturie/ensemble/BossBase-1.0-cover/';
6
7 b=strcat(dir_canny,'*.pgm')
8 files=dir(b)
9
10 label=[];
11 scores=[];
12 l=0;
13 threshold=200;
14 for i = 1:size(files, 1)
15                                         if l<threshold
16                                           img=imread(strcat(dir_canny,files(i).name));
17                                           scores=[scores;aump(img,16,5)];
18                                                 label=[label;'stego'];
19           end
20                                         l=l+1;
21 end
22 l=0;
23 for i = 1:size(files, 1)
24                                         if l>=threshold & l<2*threshold
25                                           img=imread(strcat(dir_cover,files(i).name));
26                                           scores=[scores;aump(img,16,5)];
27                                                 label=[label;'cover'];
28           end
29                                         l=l+1;
30 end
31 [X,Y,T,AUC] = perfcurve(label,scores,'stego');
32
33
34 l=0;
35 tp=0;
36 fp=0;
37 total=0;
38 for i = 1:size(files, 1)
39                                         if l>=2*threshold
40                                           total=total+1;
41                                           img=imread(strcat(dir_canny,files(i).name));
42                                           s=aump(img,16,5);
43             if s<AUC
44                                                   fp=fp+1;
45             else
46                                                         tp=tp+1;
47             end
48           end
49                                         l=l+1;
50 end
51 fp/total
52 tp/total
53
54
55 l=0;
56 tn=0;
57 fn=0;
58 total=0;
59 for i = 1:size(files, 1)
60                                         if l>2*threshold
61                                           total=total+1;
62                                           img=imread(strcat(dir_cover,files(i).name));
63                                           s=aump(img,16,5);
64             if s<AUC
65                                                         tn=tn+1;
66             else
67                                                   fn=fn+1;
68             end
69           end
70                                         l=l+1;
71 end
72 fn/total
73 tn/total