ClassesClasses | | Operators

set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplate (Operator)

Name

set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplate — Gray value offset for template.

Warning

set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate is obsolete and is only provided for reasons of backward compatibility. New applications should use the shape-based or NCC-based operators instead.

Signature

set_offset_template( : : TemplateID, GrayOffset : )

Herror T_set_offset_template(const Htuple TemplateID, const Htuple GrayOffset)

void SetOffsetTemplate(const HTuple& TemplateID, const HTuple& GrayOffset)

void HTemplate::SetOffsetTemplate(Hlong GrayOffset) const

static void HOperatorSet.SetOffsetTemplate(HTuple templateID, HTuple grayOffset)

void HTemplate.SetOffsetTemplate(int grayOffset)

Description

set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate adds a gray value offset to the template to eliminate gray value changes in the image. The parameter GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffset specifies a difference relative to the gray values of the pattern when it was created with create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplate (not relative to the last call of set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate). The values of GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffset has to be chosen according to the gray values of the image: A brighter image results in a positive value, a darker image results in a negative value. set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate has to be called each time the gray values of the image changes. The gray values can be measured in a reference area using intensityintensityIntensityIntensityIntensity or min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGray

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

TemplateIDTemplateIDTemplateIDTemplateIDtemplateID (input_control, state is modified)  template HTemplate, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Template number.

GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffset (input_control)  number HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Offset of gray values.

Default value: 0

Suggested values: -10, -5, -2, -1, 0, 1, 2, 5, 10

Typical range of values: -255 ≤ GrayOffset GrayOffset GrayOffset GrayOffset grayOffset ≤ 255

Minimum increment: 1

Recommended increment: 1

Result

If the parameter values are correct, the operator set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplate returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplate, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplate, read_templateread_templateReadTemplateReadTemplateReadTemplate

Possible Successors

best_matchbest_matchBestMatchBestMatchBestMatch, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMg, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRot, fast_matchfast_matchFastMatchFastMatchFastMatch, fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMg

Module

Matching


ClassesClasses | | Operators