paint_gray ( ImageSource, ImageDestination : MixedImage : : )

Paint the gray values of an image into another image.

paint_gray paints the gray values of the image given in ImageSource into the image in ImageDestination and returns the resulting image in MixedImage. Only the gray values of the domain of ImageSource are copied (see reduce_domain).


Parameters

ImageSource (input_object)
image -> object : byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / dvf
Input image containing the desired gray values.

ImageDestination (input_object)
image -> object : byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / dvf
Input image to be painted over.

MixedImage (output_object)
image -> object : byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / dvf
Result image.


Example
/* Copy a circular part of the image 'monkey' into a new image (New1): */

read_image(Image,'monkey') 
gen_circle(Circle,200,200,150) 
reduce_domain(Image,Circle,Mask) 
/* New image with black (0) background */
gen_image_proto(Image,New1,0.0) 
/* Copy a part of the image 'monkey' into New1 */
paint_gray(Mask,New1,New1).

Result

paint_gray returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.


Parallelization Information

paint_gray is reentrant and processed without parallelization.


Possible Predecessors

read_image, gen_image_const, gen_image_proto


Alternatives

get_image_pointer1, set_grayval, copy_image


See also

paint_region


Module

Basic operators



Copyright © 1996-2005 MVTec Software GmbH