measure_projection — 提取垂直于矩形或环形弧的灰度值剖面。
measure_projection(Image : : MeasureHandle : GrayValues)
measure_projection extracts a one-dimensional gray value
profile perpendicular to a rectangle or annular arc. This is done by
averaging the
gray values in “slices” perpendicular to the major axis of the
rectangle or arc. The sampling is done at subpixel positions in the image
Image at integer row and column distances (in the
coordinate frame of the rectangle) from the center of the rectangle.
Since this involves some calculations which can be used repeatedly
in several projections, the operator gen_measure_rectangle2
is used to perform these calculations only once, thus increasing
the speed of measure_projection significantly.
Since there is a trade-off between accuracy and speed in the
subpixel calculations of the gray values, different interpolation
schemes can be selected in gen_measure_rectangle2 (the
interpolation only influences rectangles not aligned with the image
axes). The measure object generated with
gen_measure_rectangle2 is passed in MeasureHandle。
For an explanation of the concept of 1D measuring see the introduction of chapter 一维测量。
It should be kept in mind that measure_projection ignores
the domain of Image for efficiency reasons. If certain
regions in the image should be excluded from the measurement a new
measure object with appropriately modified parameters should be
generated.
Image (输入对象) singlechannelimage → object (byte / uint2 / real)
输入图像。
MeasureHandle (输入控制) measure → (handle)
Measure object handle.
GrayValues (输出控制) number-array → (real)
Gray value profile.
如果参数值正确,算子 measure_projection 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
一维计量