Herror ::paint_gray (
    Hobject ImageSource,
    Hobject ImageDestination,
    Hobject *MixedImage
)
HImage HImage::PaintGray (
    const HImage &ImageDestination
) const

Copy the gray values of an image into another image.

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


Parameters

ImageSource (input_object)
image -> Hobject: HImage
Input image containing the desired gray values.

ImageDestination (input_object)
image -> Hobject: HImage
Input image to be painted over.

MixedImage (output_object)
image -> Hobject * : HImage
Result image.


Example
/* Copy of a circle of the image 'affe' into a new image (New): */

read_image(&Image,"affe");
gen_circle(&Circle,200.0,200.0,150.0);
reduce_domain(Image,Circle,&Mask);
/* New image with black (0) background */
gen_image_proto(Image,&New1,0.0);
/* Copy of a segment of the image 'affe' into New1 */
paint_gray(Mask,New1,&New);

Result

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


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-2002 MVTec Software GmbH