import os
import sys
if __name__ == "__main__":
fid = open("image_500k.haystack.log", "r");
dfid = open("djpeg.sh", "w");
hfid = open("detect_points.sh", "w");
sfid = open("compute_descriptors.sh", "w");
dstr = "djpeg -fast -grayscale %s > %s.pgm\n";
rstr = "detect_points.ln -hesaff -i %s.pgm -o %s.hesaff -thres 1000\n";
sstr = "compute_descriptors.ln -sift -i %s.pgm -p1 %s.hesaff -o2 %s.sift\n";
for line in fid:
a, b = line.split(" ");
b = b.strip();
dfid.write(dstr % (b, b));
hfid.write(rstr % (b, b));
sfid.write(sstr %(b, b, b));
fid.close();
dfid.close();
hfid.close();
sfid.close();
python 调用可执行文件
最新推荐文章于 2023-09-17 12:54:11 发布