set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplateset_offset_template (Operator)

Name

set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplateset_offset_template — Gray value offset for template.

Warning

set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template 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)

def set_offset_template(template_id: HHandle, gray_offset: int) -> None

Description

set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template adds a gray value offset to the template to eliminate gray value changes in the image. The parameter GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffsetgray_offset specifies a difference relative to the gray values of the pattern when it was created with create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template (not relative to the last call of set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template). The values of GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffsetgray_offset 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_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template has to be called each time the gray values of the image changes. The gray values can be measured in a reference area using intensityintensityIntensityIntensityIntensityintensity or min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (input_control, state is modified)  template HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Template number.

GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffsetgray_offset (input_control)  number HTupleintHTupleHtuple (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 gray_offset ≤ 255

Minimum increment: 1

Recommended increment: 1

Result

If the parameter values are correct, the operator set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template returns the value TRUE. If necessary, an exception is raised.

Possible Predecessors

create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template, adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template, read_templateread_templateReadTemplateReadTemplateReadTemplateread_template

Possible Successors

best_matchbest_matchBestMatchBestMatchBestMatchbest_match, best_match_mgbest_match_mgBestMatchMgBestMatchMgBestMatchMgbest_match_mg, best_match_rotbest_match_rotBestMatchRotBestMatchRotBestMatchRotbest_match_rot, fast_matchfast_matchFastMatchFastMatchFastMatchfast_match, fast_match_mgfast_match_mgFastMatchMgFastMatchMgFastMatchMgfast_match_mg

Module

Matching