gen_image_protogen_image_protoGenImageProtoGenImageProtogen_image_proto (算子名称)

名称

gen_image_protogen_image_protoGenImageProtoGenImageProtogen_image_proto — Create an image with a specified constant gray value.

参数签名

gen_image_proto(Image : ImageCleared : Grayval : )

Herror gen_image_proto(const Hobject Image, Hobject* ImageCleared, double Grayval)

Herror T_gen_image_proto(const Hobject Image, Hobject* ImageCleared, const Htuple Grayval)

void GenImageProto(const HObject& Image, HObject* ImageCleared, const HTuple& Grayval)

HImage HImage::GenImageProto(const HTuple& Grayval) const

HImage HImage::GenImageProto(double Grayval) const

static void HOperatorSet.GenImageProto(HObject image, out HObject imageCleared, HTuple grayval)

HImage HImage.GenImageProto(HTuple grayval)

HImage HImage.GenImageProto(double grayval)

def gen_image_proto(image: HObject, grayval: Union[int, float]) -> HObject

描述

gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto creates an output image ImageClearedImageClearedImageClearedImageClearedimageClearedimage_cleared with the constant gray value GrayvalGrayvalGrayvalGrayvalgrayvalgrayval. If the input image is of type direction, gray values in result image that are not in the value range that is valid for direction images are set to the value 255 to mark them as invalid. ImageClearedImageClearedImageClearedImageClearedimageClearedimage_cleared has the same dimensions and pixel type as the input image ImageImageImageImageimageimage.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Input image.

ImageClearedImageClearedImageClearedImageClearedimageClearedimage_cleared (output_object)  image objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Image with constant gray value.

GrayvalGrayvalGrayvalGrayvalgrayvalgrayval (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Gray value to be used for the output image.

Default: 0

Suggested values: 0, 1, 2, 5, 10, 16, 32, 64, 128, 253, 254, 255

结果

gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto returns 2 ( H_MSG_TRUE) if all parameters are correct. 如有必要,将引发异常。

可替代算子

set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval, paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray, gen_image_constgen_image_constGenImageConstGenImageConstGenImageConstgen_image_const, copy_imagecopy_imageCopyImageCopyImageCopyImagecopy_image

参考其它

get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1

模块

Foundation