overpaint_gray ( ImageDestination, ImageSource : : : )

Overpaint the gray values of an image.

overpaint_gray copies the gray values of the image given in ImageSource into the image in ImageDestination. Only the gray values of the domain of ImageSource are copied (see reduce_domain).

If you do not want to modify ImageDestination itself, you can use the operator paint_gray, which returns the result in a newly created image.


Attention

overpaint_gray modifies the content of an already existing image (ImageDestination). Besides, even other image objects may be affected: For example, if you created ImageDestination via copy_obj from another image object (or vice versa), overpaint_gray will also modify the image matrix of this other image object. Therefore, overpaint_gray should only be used to overpaint newly created image objects. Typical operators for this task are, e.g., gen_image_const (creates a new image with a specified size), gen_image_proto (creates an image with the size of a specified prototype image) or copy_image (creates an image as the copy of a specified image).


Parameters

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

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


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 */
overpaint_gray(New1,Mask).

Result

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


Parallelization Information

overpaint_gray is reentrant and processed without parallelization.


Possible Predecessors

read_image, gen_image_const, gen_image_proto


Alternatives

get_image_pointer1, paint_gray, set_grayval, copy_image


See also

paint_region, overpaint_region


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH