paint_graypaint_grayPaintGrayPaintGraypaint_gray(算子)
名称
paint_graypaint_grayPaintGrayPaintGraypaint_gray — 将一个图像的灰度值绘制到另一个图像中。
签名
描述
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray paints the gray values of the image given in
ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source into the image in ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination and returns
the resulting image in MixedImageMixedImageMixedImageMixedImagemixedImagemixed_image. Only the gray values of the
domain of ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source are copied (see reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain).
As an alternative to paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray, you can use the operator
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray, which directly paints the gray values into
ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source (输入对象) (multichannel-)image → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Input image containing the desired gray values.
ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination (输入对象) (multichannel-)image → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Input image to be painted over.
MixedImageMixedImageMixedImageMixedImagemixedImagemixed_image (输出对象) image → objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Result image.
示例(HDevelop)
* Copy a circular part of the image 'monkey' into the image 'fabrik':
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
read_image(Image2,'fabrik')
* Copy a part of the image 'monkey' into 'fabrik'
paint_gray(Mask,Image2,MixedImage)
示例(C)
/* Copy a circular part of the image 'monkey' into the image 'fabrik': */
read_image(&Image,"monkey");
gen_circle(&Circle,200.0,200.0,150.0);
reduce_domain(Image,Circle,&Mask);
read_image(&Image,"fabrik");
/* Copy a part of the image 'monkey' into 'fabrik' */
paint_gray(Mask,Image2,&MixedImage);
示例(HDevelop)
* Copy a circular part of the image 'monkey' into the image 'fabrik':
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
read_image(Image2,'fabrik')
* Copy a part of the image 'monkey' into 'fabrik'
paint_gray(Mask,Image2,MixedImage)
示例(HDevelop)
* Copy a circular part of the image 'monkey' into the image 'fabrik':
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
read_image(Image2,'fabrik')
* Copy a part of the image 'monkey' into 'fabrik'
paint_gray(Mask,Image2,MixedImage)
示例(HDevelop)
* Copy a circular part of the image 'monkey' into the image 'fabrik':
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
read_image(Image2,'fabrik')
* Copy a part of the image 'monkey' into 'fabrik'
paint_gray(Mask,Image2,MixedImage)
结果
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray 在所有参数正确时返回 2 (H_MSG_TRUE)。如有必要,则抛出异常。
可能的前趋
read_imageread_imageReadImageReadImageReadImageread_image,
gen_image_constgen_image_constGenImageConstGenImageConstGenImageConstgen_image_const,
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto
替代
get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1,
set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval,
copy_imagecopy_imageCopyImageCopyImageCopyImagecopy_image,
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray
另见
paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region,
overpaint_regionoverpaint_regionOverpaintRegionOverpaintRegionOverpaintRegionoverpaint_region
模块
基础