Name
create_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot — Preparing a pattern for template matching with rotation.
Herror create_template_rot(const Hobject Template, const Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const char* Optimize, const char* GrayValues, Hlong* TemplateID)
Herror T_create_template_rot(const Hobject Template, const Htuple NumLevel, const Htuple AngleStart, const Htuple AngleExtend, const Htuple AngleStep, const Htuple Optimize, const Htuple GrayValues, Htuple* TemplateID)
Herror create_template_rot(Hobject Template, const HTuple& NumLevel, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& AngleStep, const HTuple& Optimize, const HTuple& GrayValues, Hlong* TemplateID)
HTemplate HImage::CreateTemplateRot(const HTuple& NumLevel, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& AngleStep, const HTuple& Optimize, const HTuple& GrayValues) const
void HTemplate::CreateTemplateRot(const HImage& Template, const HTuple& NumLevel, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& AngleStep, const HTuple& Optimize, const HTuple& GrayValues)
void CreateTemplateRot(const HObject& Template, const HTuple& NumLevel, const HTuple& AngleStart, const HTuple& AngleExtend, const HTuple& AngleStep, const HTuple& Optimize, const HTuple& GrayValues, HTuple* TemplateID)
void HTemplate::HTemplate(const HImage& Template, Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const HString& Optimize, const HString& GrayValues)
void HTemplate::HTemplate(const HImage& Template, Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const char* Optimize, const char* GrayValues)
void HTemplate::CreateTemplateRot(const HImage& Template, Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const HString& Optimize, const HString& GrayValues)
void HTemplate::CreateTemplateRot(const HImage& Template, Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const char* Optimize, const char* GrayValues)
HTemplate HImage::CreateTemplateRot(Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const HString& Optimize, const HString& GrayValues) const
HTemplate HImage::CreateTemplateRot(Hlong NumLevel, double AngleStart, double AngleExtend, double AngleStep, const char* Optimize, const char* GrayValues) const
void HOperatorSetX.CreateTemplateRot(
[in] IHUntypedObjectX* Template, [in] VARIANT NumLevel, [in] VARIANT AngleStart, [in] VARIANT AngleExtend, [in] VARIANT AngleStep, [in] VARIANT Optimize, [in] VARIANT GrayValues, [out] VARIANT* TemplateID)
void HTemplateX.CreateTemplateRot(
[in] IHImageX* Template, [in] Hlong NumLevel, [in] double AngleStart, [in] double AngleExtend, [in] double AngleStep, [in] BSTR Optimize, [in] BSTR GrayValues)
IHTemplateX* HImageX.CreateTemplateRot(
[in] Hlong NumLevel, [in] double AngleStart, [in] double AngleExtend, [in] double AngleStep, [in] BSTR Optimize, [in] BSTR GrayValues)
static void HOperatorSet.CreateTemplateRot(HObject template, HTuple numLevel, HTuple angleStart, HTuple angleExtend, HTuple angleStep, HTuple optimize, HTuple grayValues, out HTuple templateID)
public HTemplate(HImage template, int numLevel, double angleStart, double angleExtend, double angleStep, string optimize, string grayValues)
void HTemplate.CreateTemplateRot(HImage template, int numLevel, double angleStart, double angleExtend, double angleStep, string optimize, string grayValues)
HTemplate HImage.CreateTemplateRot(int numLevel, double angleStart, double angleExtend, double angleStep, string optimize, string grayValues)
The operator create_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot preprocesses a pattern,
which is passed as an image, for the template matching.
An extension to create_templatecreate_templateCreateTemplatecreate_templateCreateTemplateCreateTemplate the matching can
applied to rotated patterns.
The parameters AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend
define the maximum rotation of the pattern: AngleStartAngleStartAngleStartAngleStartAngleStartangleStart
specifies the maximum counter clockwise rotation and
AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend the maximum clockwise rotation relative
to this angle. Therefore
AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend has to be smaller than
2 * pi. With the parameter AngleStepAngleStepAngleStepAngleStepAngleStepangleStep
the maximum angle resolution (on the highest resolution level)
can be specified.
You have to be aware, that all possible rotations
are calculated beforehand to reduce runtime during matching.
This leads to a higher execution time for
create_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot and high memory
requirements for the template.
The amount of memory depends on the parameters
AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend and AngleStepAngleStepAngleStepAngleStepAngleStepangleStep.
The number of pyramid levels can be neglected.
If A is the number of pixels of
TemplateTemplateTemplateTemplateTemplatetemplate, the memory M needed for the template
in byte is about:
M = A * 12 * AngleExtendAngleExtendAngleExtendAngleExtendAngleExtendangleExtend / AngleStepAngleStepAngleStepAngleStepAngleStepangleStep
After the transformation, a number (TemplateIDTemplateIDTemplateIDTemplateIDTemplateIDtemplateID) is
assigned to the template for being used in the further process.
A description of the other parameters can be found at the
operator create_templatecreate_templateCreateTemplatecreate_templateCreateTemplateCreateTemplate.
You have to be aware, that depending on the resolution a large
number of pre calculated patterns have to be created
which might result in a large amount of memory needed.
- Multithreading type: exclusive (runs in parallel only with independent operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Input image whose domain will be processed
for the pattern matching.
Maximal number of pyramid levels.
Default value: 4
List of values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Smallest Rotation of the pattern.
Default value: -0.39
Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0
Step rate (angle precision) of matching.
Default value: 0.0982
Suggested values: 0.3927, 0.1963, 0.0982, 0.0491, 0.0245
Restriction: AngleStep > 0
Kind of optimizing.
Default value:
'sort'
"sort"
"sort"
"sort"
"sort"
"sort"
List of values: 'none'"none""none""none""none""none", 'sort'"sort""sort""sort""sort""sort"
Kind of grayvalues.
Default value:
'original'
"original"
"original"
"original"
"original"
"original"
List of values: 'gradient'"gradient""gradient""gradient""gradient""gradient", 'normalized'"normalized""normalized""normalized""normalized""normalized", 'original'"original""original""original""original""original", 'sobel'"sobel""sobel""sobel""sobel""sobel"
If the parameters are valid, the operator
create_template_rotcreate_template_rotCreateTemplateRotcreate_template_rotCreateTemplateRotCreateTemplateRot returns the value 2 (H_MSG_TRUE).
If necessary an exception is raised.
draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion,
reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain,
thresholdthresholdThresholdthresholdThresholdThreshold
best_match_rotbest_match_rotBestMatchRotbest_match_rotBestMatchRotBestMatchRot,
best_match_rot_mgbest_match_rot_mgBestMatchRotMgbest_match_rot_mgBestMatchRotMgBestMatchRotMg,
adapt_templateadapt_templateAdaptTemplateadapt_templateAdaptTemplateAdaptTemplate,
set_reference_templateset_reference_templateSetReferenceTemplateset_reference_templateSetReferenceTemplateSetReferenceTemplate,
clear_templateclear_templateClearTemplateclear_templateClearTemplateClearTemplate,
set_offset_templateset_offset_templateSetOffsetTemplateset_offset_templateSetOffsetTemplateSetOffsetTemplate,
write_templatewrite_templateWriteTemplatewrite_templateWriteTemplateWriteTemplate
create_ncc_modelcreate_ncc_modelCreateNccModelcreate_ncc_modelCreateNccModelCreateNccModel,
create_templatecreate_templateCreateTemplatecreate_templateCreateTemplateCreateTemplate
Matching