set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplateset_offset_template (算子)
名称
set_offset_templateT_set_offset_templateSetOffsetTemplateSetOffsetTemplateset_offset_template — 模板的灰度值偏移。
警告
set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于形状或基于 NCC 的算子。
签名
描述
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
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子修改后续输入参数的状态:
在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。
参数
TemplateIDTemplateIDTemplateIDTemplateIDtemplateIDtemplate_id (输入控制,状态被修改) template → HTemplate, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
模板编号。
GrayOffsetGrayOffsetGrayOffsetGrayOffsetgrayOffsetgray_offset (输入控制) number → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Offset of gray values.
默认值:
0
建议值:
-10, -5, -2, -1, 0, 1, 2, 5, 10
值范围:
-255
≤
GrayOffset
GrayOffset
GrayOffset
GrayOffset
grayOffset
gray_offset
≤
255
最小增量:
1
建议增量:
1
结果
如果参数值正确,算子
set_offset_templateset_offset_templateSetOffsetTemplateSetOffsetTemplateSetOffsetTemplateset_offset_template 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
create_templatecreate_templateCreateTemplateCreateTemplateCreateTemplatecreate_template,
adapt_templateadapt_templateAdaptTemplateAdaptTemplateAdaptTemplateadapt_template,
read_templateread_templateReadTemplateReadTemplateReadTemplateread_template
可能的后继
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
模块
匹配