oevislib_net  0.14.3.0
Loading...
Searching...
No Matches
Normalized Cross-Correlation (NCC)

Classes

class  oevislib_net.ComputerVision.TemplateMatching.NCC.TemplateModel
 Template model, used to find similar objects during (NCC-based) template matching. More...
class  oevislib_net.ComputerVision.TemplateMatching.NCC.ModelParams
 Parameters for model creation in NCC-based template matching. More...
class  oevislib_net.ComputerVision.TemplateMatching.NCC.SearchParams
 Parameters for object search in NCC-based template matching. More...

Functions

static TemplateModel oevislib_net.ComputerVision.TemplateMatching.NCC.TemplateMatching.CreateModel (Image inImage, Optional< ShapeRegion > inTemplateRegion=null, Optional< Rectangle2D > inObjectFrame=null, ModelParams inModelParams=null, Optional< Array< Image > > outTemplatePyramid=null)
 Creates a template model for NCC-based template matching.
static Array< TemplateObjectoevislib_net.ComputerVision.TemplateMatching.NCC.TemplateMatching.FindObjects (Image inImage, TemplateModel inTemplateModel, Optional< ShapeRegion > inSearchRegion=null, Optional< UCS2D > inSearchRegionAlignment=null, SearchParams inSearchParams=null, Optional< int > outPyramidHeight=null, Optional< ShapeRegion > outAlignedSearchRegion=null, Optional< Array< Array< float > > > outLevelScores=null, Optional< Array< TemplateObject > > outCandidates=null)
 Finds all occurrences of a predefined template on an image using a model based on NCC.

Detailed Description

Function Documentation

◆ CreateModel()

TemplateModel oevislib_net.ComputerVision.TemplateMatching.NCC.TemplateMatching.CreateModel ( Image inImage,
Optional< ShapeRegion > inTemplateRegion = null,
Optional< Rectangle2D > inObjectFrame = null,
ModelParams inModelParams = null,
Optional< Array< Image > > outTemplatePyramid = null )
inlinestatic

Creates a template model for NCC-based template matching.

Uses the Normalized Cross Correlation-based image alignment algorithm.

Parameters
inImageImage from which model will be extracted.
inTemplateRegionRegion of the image from which model will be extracted.
inObjectFramePosition of the model object in the image.
inModelParamsParameters of the model.
outTemplatePyramidPyramid downsample of the model image.
Returns
Created model that can be used in findObjects.

◆ FindObjects()

Array< TemplateObject > oevislib_net.ComputerVision.TemplateMatching.NCC.TemplateMatching.FindObjects ( Image inImage,
TemplateModel inTemplateModel,
Optional< ShapeRegion > inSearchRegion = null,
Optional< UCS2D > inSearchRegionAlignment = null,
SearchParams inSearchParams = null,
Optional< int > outPyramidHeight = null,
Optional< ShapeRegion > outAlignedSearchRegion = null,
Optional< Array< Array< float > > > outLevelScores = null,
Optional< Array< TemplateObject > > outCandidates = null )
inlinestatic

Finds all occurrences of a predefined template on an image using a model based on NCC.

Parameters
inImageImage on which object occurrences will be searched.
inTemplateModelModel of objects to be searched.
inSearchRegionRegion of possible object centers.
inSearchRegionAlignmentAdjusts the region of interest to the position of the inspected object.
inSearchParamsParameters that defines how to search for the objects and how many ones to keep.
outPyramidHeightHighest pyramid level used to speed up computations.
outAlignedSearchRegionTransformed input shape region.
outLevelScoresScores of the found objects at each pyramid level.
outCandidatesAnomalies (or matches obtained with a lower score) that differ from the original template.
Returns
Found objects.