X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/canny.git/blobdiff_plain/6642f8003d7e1cdfb33d3da88fb41702eb237af2..0034914f915f708b3a77d94538f21c080e474895:/stc/exp/raphus/sobel555_for_ensemble.py diff --git a/stc/exp/raphus/sobel555_for_ensemble.py b/stc/exp/raphus/sobel555_for_ensemble.py index 5252647..89e0cbd 100644 --- a/stc/exp/raphus/sobel555_for_ensemble.py +++ b/stc/exp/raphus/sobel555_for_ensemble.py @@ -458,9 +458,9 @@ def compute_filter_canny(level,image,MsgLen): sub = range(len(level2)) - print "avail P3",len(AvailablePixel3) - print "avail P5",len(AvailablePixel5) - print "avail P7",len(AvailablePixel7) + #print "avail P3",len(AvailablePixel3) + #print "avail P5",len(AvailablePixel5) + #print "avail P7",len(AvailablePixel7) Weight=[0 for _ in sub] @@ -549,7 +549,7 @@ def mystego(filein, fileout): leng_cor=leng List_pack=a2b_list(leng_cor) List_pack += message - print List_pack + #print List_pack leng_msg=len(List_pack) @@ -572,14 +572,14 @@ def mystego(filein, fileout): Message=[(int(List_pack[l])^int(List_random[l])) for l in xrange(len(List_pack))] - print "support",len(List_bit_to_change) - print "message",len(Message) - print "weight",len(Weight) + #print "support",len(List_bit_to_change) + #print "message",len(Message) + #print "weight",len(Weight) (x_b,Stc_message,H_hat) = stc(Support,Weight,Message) - print "pourcentage modif",nbdif(x_b,Stc_message) - print "taille Stc_message",len(Stc_message) + #print "pourcentage modif",nbdif(x_b,Stc_message) + #print "taille Stc_message",len(Stc_message) # Stc_message=Message @@ -597,9 +597,9 @@ def mystego(filein, fileout): level[l]=float64(setBit(level[l],bit_to_read,Stc_message[size_mesg])) size_mesg+=1 - print 'size mesg',size_mesg - print 'val mod',val_mod - print 'len message',len(Message),len(List_pack) + #print 'size mesg',size_mesg + #print 'val mod',val_mod + #print 'len message',len(Message),len(List_pack) @@ -610,7 +610,7 @@ def mystego(filein, fileout): #zz4.show() - + """ dd2 = im.open(fileout) dd2 = dd2.convert('RGB') @@ -703,33 +703,35 @@ def mystego(filein, fileout): list_nb_bit.append(filein) list_nb_bit.append(len(List_bit_to_change2)) - +""" #path_cover = '/localhome/couturie/ensemble/cover_bad_laplace/' -path_stego = '/localhome/couturie/ensemble/BossBase-1.0-canny_new/' -path_cover = '/localhome/couturie/ensemble/BossBase-1.0-cover/' +path_stego = '/home/couchot/rech/CCG12/canny/stc/exp/raphus/stego/' +path_cover = '/home/couchot/rech/BCG10/Oxford11/experiments/images/' #path_stego = '/tmp/' #path_stego = '/home/couturie/BossBase-1.0-canny/' #listing = os.listdir(path_cover) + list_nb_bit=[] l=0 -mystego(argv[1],argv[2]) + # entree sortie -raise SystemExit + +listing = [957, 108, 106, 29, 431, 924, 262, 477, 346, 809] for infile in listing: # if l<10: - if infile[0]==argv[1]: - print "current file is: " + infile, path_stego+infile - mystego(path_cover+infile,path_stego+infile) + fi = path_cover+str(infile)+'.png' + fo = path_stego+str(infile)+'.png' + mystego(fi,fo) l+=1 #f = open('histogram_boss_canny_100255', 'w') #f = open('histogram', 'w') #for item in list_nb_bit: -# f.write("%s\n" % item) +#f.write("%s\n" % item)