GithubHelp home page GithubHelp logo

templatematching's Introduction

TemplateMatching

Powershell cmdlet for template matching.
You can find out where the template image is in the target image.

Install

You can install from PowerShell Gallery.

Install-Module -Name TemplateMatching

Cmdlet

  • Invoke-TemplateMatching

Parameter

Target

(Type = string, Mandatory = True, Positional = False)
Specifies the image file in which you expect to find a match to the template image.

Template

(Type = string, Mandatory = True, Positional = False)
Specifies the patch image which will be compared to the target image.
The image must be smaller than the target image.

Threshold

(Type = double, Mandatory = False, Positional = False)
Specifies similarity threshold for image matching.
This cmdlet returns all matched points that has more similar than the threshold.
You can specifies threshold between 0.1 to 1.0 (greater is best match)
The default threshold is 0.95

Example

  • Template image
    Template

  • Target image
    Template

  • Command

PS C:\> Invoke-TemplateMatching -Target ".\target.png" -Template ".\template.png"

Rect                             Similarity
----                             ----------
(x:720 y:101 width:74 height:66)  0.9999997

The template image found in the target image.
The coordinate of the image is (x=720, y=101).
Similarity is 0.9999997, it's nearly equal 1. that indicates perfect match.


License

TemplateMatching is released under the MIT License. See LICENSE.

This module includes these libraries.

templatematching's People

Contributors

mkht avatar

Watchers

James Cloos avatar Fatih Akdoğan avatar

templatematching's Issues

Freeze when Threshold = 0.0

When I specify threshold=0.0. PowerShell console is not returned.

# this command will not return
Invoke-TemplateMatching -Target '.\target.png', -Template '.\template.png' -Threshold 0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.