oevislib_net  0.14.3.0
Loading...
Searching...
No Matches

Classes

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

Functions

static Conditional< TemplateModeloevislib_net.ComputerVision.TemplateMatching.Edge.TemplateMatching.CreateModel (Image inImage, Optional< ShapeRegion > inTemplateRegion=null, Optional< Rectangle2D > inObjectFrame=null, ModelParams inModelParams=null, AbortCallback inAbortCallback=null, Optional< Array< Point2D > > outTemplateEdges=null)
 Creates a template model for edge-based template matching.
static Array< TemplateObjectoevislib_net.ComputerVision.TemplateMatching.Edge.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 by comparing object edges.

Detailed Description

Function Documentation

◆ CreateModel()

Conditional< TemplateModel > oevislib_net.ComputerVision.TemplateMatching.Edge.TemplateMatching.CreateModel ( Image inImage,
Optional< ShapeRegion > inTemplateRegion = null,
Optional< Rectangle2D > inObjectFrame = null,
ModelParams inModelParams = null,
AbortCallback inAbortCallback = null,
Optional< Array< Point2D > > outTemplateEdges = null )
inlinestatic

Creates a template model for edge-based template matching.

Parameters
inImageImage from which model will be extracted. Only UInt8 images are supported. If the image is RGB, it is first converted using Image::convertToGrayscale.
inTemplateRegionRegion of the image from which model will be extracted.
inObjectFramePosition of the model object in the image.
inModelParamsParameters of the model.
inAbortCallbackCallback function cyclically called during model creation to check if the process needs to be stopped. The function should return true if the process should be aborted.
outTemplateEdgesEdges found at the top resolution level.
Returns
Created model that can be used in findObjects.

◆ FindObjects()

Array< TemplateObject > oevislib_net.ComputerVision.TemplateMatching.Edge.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 by comparing object edges.

Parameters
inImageImage on which object occurrences will be searched. Only UInt8 images are supported. If the image is RGB, it is first converted using Image::convertToGrayscale.
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.