get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated (算子)
名称
get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated — 返回图像在行和列元组给出的位置处的灰度值。
签名
void GetGrayvalInterpolated(const HObject& Image, const HTuple& Row, const HTuple& Column, const HTuple& Interpolation, HTuple* Grayval)
HTuple HImage::GetGrayvalInterpolated(const HTuple& Row, const HTuple& Column, const HString& Interpolation) const
double HImage::GetGrayvalInterpolated(double Row, double Column, const HString& Interpolation) const
double HImage::GetGrayvalInterpolated(double Row, double Column, const char* Interpolation) const
double HImage::GetGrayvalInterpolated(double Row, double Column, const wchar_t* Interpolation) const
(
Windows only)
def get_grayval_interpolated(image: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]], interpolation: str) -> Sequence[float]
def get_grayval_interpolated_s(image: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]], interpolation: str) -> float
描述
算子 get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated returns interpolated
gray values at several subpixel positions of an ImageImageImageImageimageimage. The
coordinates of the row positions are given in the tuple
RowRowRowRowrowrow, the coordinates of column positions are given in the
tuple ColumnColumnColumnColumncolumncolumn. The gray values are returned in
GrayvalGrayvalGrayvalGrayvalgrayvalgrayval as a tuple of floating point numbers.
The interpolation method can be selected via the parameter
InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation. The following interpolation methods are
supported:
- 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear":
-
The parameter
GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is computed using a bilinear interpolation of the
four neighboring gray values of the selected coordinates. Note:
direction and cyclic images are treated like byte images.
- 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic":
-
The parameter
GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is computed using a bicubic interpolation of
sixteen neighboring gray values of the selected coordinates.
Direction and cyclic images are treated like byte images. In this
mode, the resulting gray values may contain values that lie
outside of the range of numbers that can be represented by the
input image type.
- 'bicubic_clipped'"bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped":
-
The parameter
GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is computed using a bicubic interpolation of
sixteen neighboring gray values of the selected coordinates.
Direction and cyclic images are treated like byte images. In this
mode, resulting gray values that lie outside of the range of
numbers that can be represented by the input image type are
clipped to that range.
Note that get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated does not take the domain of
the image into account, i.e., if the domain has been reduced, e.g.,
with reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, gray values are returned even for points
that lie outside the domain.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImageImageImageImageimageimage (输入对象) singlechannelimage → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)
Image whose gray values are to be accessed.
RowRowRowRowrowrow (输入控制) point.y(-array) → HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinates of positions.
默认值:
0
建议值:
0, 64, 128, 256, 512, 1024
值范围:
-0.5
≤
Row
Row
Row
Row
row
row
限制:
-0.5 <= Row && Row < height(Image) - 0.5
ColumnColumnColumnColumncolumncolumn (输入控制) point.x(-array) → HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinates of positions.
元素数量:
Column == Row
默认值:
0
建议值:
0, 64, 128, 256, 512, 1024
值范围:
-0.5
≤
Column
Column
Column
Column
column
column
限制:
-0.5 <= Column && Column < width(Image) - 0.5
InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Interpolation method.
默认值:
'bilinear'
"bilinear"
"bilinear"
"bilinear"
"bilinear"
"bilinear"
值列表:
'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic", 'bicubic_clipped'"bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear"
GrayvalGrayvalGrayvalGrayvalgrayvalgrayval (输出控制) grayval(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Gray values of the selected image coordinates.
结果
如果参数有效,算子
get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
read_imageread_imageReadImageReadImageReadImageread_image
替代
get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld,
get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval
模块
基础