当前位置: 首页>>代码示例>>Python>>正文


Python Image.drawKeypointMatches方法代码示例

本文整理汇总了Python中SimpleCV.Image.drawKeypointMatches方法的典型用法代码示例。如果您正苦于以下问题:Python Image.drawKeypointMatches方法的具体用法?Python Image.drawKeypointMatches怎么用?Python Image.drawKeypointMatches使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleCV.Image的用法示例。


在下文中一共展示了Image.drawKeypointMatches方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import drawKeypointMatches [as 别名]
while True:
    image = cam.getImage().scale(320, 240) # get image, scale to speed things up
    faces = image.findHaarFeatures("face") # load in trained face file
    if faces:
        if not password:
            faces.draw()
            face = faces[-1]
            password = face.crop().save("password.jpg")
            break
        else:
            faces.draw()
            face = faces[-1]
            template = face.crop()
            template.save("passwordmatch.jpg")
            keypoints = password.findKeypointMatch(template,quality,minDist,minMatch)
            password.drawKeypointMatches(template).save("password2.jpg")
            if keypoints:
                print "YOU ARE THE ONE!!! CONGRATS"
                question = raw_input("WOULD YOU LIKE TO CHANGE YOUR FACE PASSWORD? Y/N: ").strip()
                if question == "Y":
                    image = cam.getImage().scale(320, 240)
                    faces = image.findHaarFeatures("facetrack-training.xml")
                    tryit = 1
                    while not tryit == 10 or not faces:
                        image = cam.getImage().scale(320, 240)
                        faces = image.findHaarFeatures("facetrack-training.xml")
                        tryit += 1
                    if not faces:
                        "CANNOT FIND ANY FACE, QUITING"
                        break
                    else:
开发者ID:rodgomesc,项目名称:SlidesPython,代码行数:33,代码来源:senha.py

示例2: range

# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import drawKeypointMatches [as 别名]
from SimpleCV import Image

for i in range(10):
    template = Image('wave1.jpg')
    img = Image('wave2.jpg')
    match = img.drawKeypointMatches(template,490.00,0.05)
    match.save("match.jpg")
    print i
开发者ID:InkCoder,项目名称:irkit,代码行数:10,代码来源:matchin.py


注:本文中的SimpleCV.Image.drawKeypointMatches方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。