python中的vl\u covdet替换

2024-06-11 17:30:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用matlab从图像中检测sift特征,使用vl\u covdet的vl\u feat命令
但是我想用python来计算我试过这个代码

        def process_image(self, imagename,resultname,params="--edge-thresh 10 --peak-thresh 5"):
    """ process an image and save the results in a file"""


    if imagename[-3:] != 'pgm':
        #create a pgm file
        im = Image.open(imagename).convert('L')
        im.save('tmp.pgm')
        imagename = 'tmp.pgm'

    cmmd = str("/home/hassan/vlfeat/bin/glnxa64/sift "+imagename+" --output="+resultname+
            " "+params)
    os.system(cmmd)
    print 'processed', imagename, 'to', resultname

但它并没有给我完美的答案,像vlèU covdet那么有什么选择吗 因为在python中有仿射适应和方向选项 在matlab中,但在python中找不到


Tags: imagesaveparamsprocesstmpfilesiftmatlab