create_metrology_model — Create the data structure that is needed to measure geometric shapes.
create_metrology_model( : : : MetrologyHandle)
create_metrology_model creates a metrology model, i.e., the
data structure that is needed to measure objects with a specific
geometric shape (metrology object) via 2D 度量, and returns it
in the handle MetrologyHandle.
For an explanation of the concept of 2D 度量 see the introduction of chapter 2D 度量.
Note, that after calling 该算子 create_metrology_model
该算子 set_metrology_model_image_size should be called
for efficiency reasons.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
MetrologyHandle (output_control) metrology_model → (handle)
Handle of the metrology model.
read_image (Image, 'fabrik')
create_metrology_model (MetrologyHandle)
get_image_size (Image, Width, Height)
set_metrology_model_image_size (MetrologyHandle, Width, Height)
add_metrology_object_rectangle2_measure (MetrologyHandle, 270, 230, 0, 30, \
25, 10, 2, 1, 30, [], [], Index)
apply_metrology_model (Image, MetrologyHandle)
get_metrology_object_result (MetrologyHandle, Index, 'all', 'result_type', \
'all_param', Rectangle)
get_metrology_object_result_contour (Contour, MetrologyHandle, \
Index, 'all', 1.5)
如果参数均有效,算子 create_metrology_model
返回值 2 (
H_MSG_TRUE)
. 如有必要,将引发异常。
set_metrology_model_image_size
2D 度量