#!/usr/bin/perl #script fait pour creer le fichier ifb necessaire a PIRIA pour faire du CBIR #et ARGV[0] pour dire s'il s'agit de l'etape d'indexation (ARGV[0] ne contient la chaine .jpg) ou la recherche (il y a .jpg dans ARGV[0]) $out = @ARGV[2].'/paramIfb.if'; #`chmod 777 "$out"`; open OUTP, ">$out" or die "cannot open output $out\n"; print OUTP "_#\n"; print OUTP '_directories'."\n"; $idx = @ARGV[1].'/idx'; if(!(-e $idx)) { `mkdir $idx`; `chmod 777 $idx`; } print OUTP 'BASE_IMAGES=/mnt/sdb/Lic2m_site/demos/cars/'.@ARGV[1].' ='."\n"; print OUTP 'INDEXES=/mnt/sdb/Lic2m_site/demos/cars/'.@ARGV[1].'/idx ='."\n"; print OUTP 'OUTPUT_RES=/mnt/sdb/Lic2m_site/demos/cars/'.@ARGV[2].' =* -o'."\n"; if(index(@ARGV[0], '.jpg') > 0) { print OUTP 'QUESTION=/mnt/sdb/Lic2m_site/demos/cars/'.@ARGV[1].'/'.@ARGV[0].' ='."\n"; } else { print OUTP '_QUESTION=/mnt/sdb/Lic2m_site/demos/cars/'.@ARGV[1].'/'.@ARGV[0].' ='."\n"; } print OUTP '_do'."\n"; print OUTP '_REDUCTION=16 ='."\n"; print OUTP 'DO=texture_lep = tlep'."\n"; print OUTP 'OUTPUT=_res ='."\n"; print OUTP '_flags'."\n"; print OUTP 'DISTANCE=rieman,0.6 ='."\n"; print OUTP '_IMAGE_IP=on ='."\n"; print OUTP '_NOTATION=on ='."\n"; print OUTP 'MAX_ANSWERS=20 ='."\n"; print OUTP 'IMAGE_FORMAT=* ='."\n"; print OUTP '_DETECTOR=susan ='."\n"; print OUTP 'FUSION=sisc ='."\n"; print OUTP 'VERBOSE=none ={none,minimal,full}'."\n"; print OUTP 'RESULTAT=ascii ='."\n"; print OUTP 'KEY_WORDS="" ='."\n"; if(index(@ARGV[0], '.jpg') > 0) { print OUTP 'INDEXING=none = {force, update, none}'."\n"; } else { print OUTP 'INDEXING=force = {force, update, none}'."\n"; } close OUTP;