paint_graypaint_grayPaintGrayPaintGraypaint_graypaint_gray
Short description
paint_graypaint_grayPaintGrayPaintGraypaint_graypaint_gray — Paint the gray values of an image into another image.
Signature
paint_gray( image ImageSource, image ImageDestination, out image MixedImage )paint_gray( ImageSource, ImageDestination : MixedImage : : )void PaintGray( const HObject& ImageSource, const HObject& ImageDestination, HObject* MixedImage )static void HOperatorSet.PaintGray( HObject imageSource, HObject imageDestination, out HObject mixedImage )def paint_gray( image_source: HObject, image_destination: HObject ) -> HObject
Herror paint_gray( const Hobject ImageSource, const Hobject ImageDestination, Hobject* MixedImage )
Herror T_paint_gray( const Hobject ImageSource, const Hobject ImageDestination, Hobject* MixedImage )
HImage HImage::PaintGray( const HImage& ImageDestination ) const
HImage HImage.PaintGray( HImage imageDestination )
Description
paint_grayPaintGray paints the gray values of the image given in
ImageSourceimageSourceimage_source into the image in ImageDestinationimageDestinationimage_destination and returns
the resulting image in MixedImagemixedImagemixed_image. Only the gray values of the
domain of ImageSourceimageSourceimage_source are copied (see reduce_domainReduceDomain).
As an alternative to paint_grayPaintGray, you can use the operator
overpaint_grayOverpaintGray, which directly paints the gray values into
ImageDestinationimageDestinationimage_destination.
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters
ImageSourceimageSourceimage_source (input_object) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Input image containing the desired gray values.
ImageDestinationimageDestinationimage_destination (input_object) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Input image to be painted over.
MixedImagemixedImagemixed_image (output_object) image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Result image.
Example
(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)\;
Result
paint_grayPaintGray returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
Combinations with other operators
Combinations
Possible predecessors
read_imageReadImage, gen_image_constGenImageConst, gen_image_protoGenImageProto
Alternatives
get_image_pointer1GetImagePointer1, set_grayvalSetGrayval, copy_imageCopyImage, overpaint_grayOverpaintGray
See also
paint_regionPaintRegion, overpaint_regionOverpaintRegion
Module
Foundation