V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
weakiwi
V2EX  ›  问与答

如何提高 PIL 检测相似度的成功率

  •  
  •   weakiwi · Nov 24, 2015 · 1758 views
    This topic created in 3810 days ago, the information mentioned may be changed or developed.
    def When2Esct(im1, im2):#判断是否在回放  
        h1 = im1.histogram()
        h2 = im2.histogram()   
        rms = math.sqrt(reduce(operator.add,  list(map(lambda a,b: (a-b)**2, h1, h2)))/len(h1) )
        return rms
    

    在网上搬过来的函数,结果实际使用中遇到了问题。再检测下面两张图的区别时发现相似度特别高。。。完全达不到想要的目的,想请教下各位有什么提高检测成功率的方法,多谢啦。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2418 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 10:36 · PVG 18:36 · LAX 03:36 · JFK 06:36
    ♥ Do have faith in what you're doing.