HALCON Reference Manual 10.0.2
Name
overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion — Overpaint regions in an image.
static void HOperatorSet.OverpaintRegion(HObject image, HObject region, HTuple grayval, HTuple type)
void HImage.OverpaintRegion(HRegion region, HTuple grayval, string type)
void HImage.OverpaintRegion(HRegion region, double grayval, string type)
void HRegion.OverpaintRegion(HImage image, HTuple grayval, string type)
void HRegion.OverpaintRegion(HImage image, double grayval, string type)
overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion paints the regions given in
RegionRegionRegionRegionregion with a constant gray value into the image given in
ImageImageImageImageimage. These gray values can either
be specified for each channel once, valid for all regions, or for each
region separately. To define the latter, group the channel gray values
g of each region and concatenate them to a tuple according to
the regions' order, e.g., for a three channel image:
[g(channel1,region1), g(channel2,region1), g(channel3,region1), g(channel1,region2), ... ].
The parameter TypeTypeTypeTypetype determines whether
the region should be painted filled ('fill'"fill""fill""fill""fill") or whether
only its boundary should be painted ('margin'"margin""margin""margin""margin").
If you do not want to modify ImageImageImageImageimage itself, you can use the operator
paint_regionpaint_regionpaint_regionPaintRegionPaintRegion, which returns the result in a newly created image.
overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion modifies the content of an already existing image
(ImageImageImageImageimage). Besides, even other image objects may be affected: For
example, if you created ImageImageImageImageimage via copy_objcopy_objcopy_objCopyObjCopyObj from another
image object (or vice versa), overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion will also modify the
image matrix of this other image object. Therefore, overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion
should only be used to overpaint newly created image objects. Typical
operators for this task are, e.g., gen_image_constgen_image_constgen_image_constGenImageConstGenImageConst (creates a new
image with a specified size), gen_image_protogen_image_protogen_image_protoGenImageProtoGenImageProto (creates an image with
the size of a specified prototype image) or copy_imagecopy_imagecopy_imageCopyImageCopyImage (creates an
image as the copy of a specified image).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Image in which the regions are to be painted.
Regions to be painted into the input image.
Desired gray values of the regions.
Default value: 255.0
Suggested values: 0.0, 1.0, 2.0, 5.0, 10.0, 16.0, 32.0, 64.0, 128.0, 253.0, 254.0, 255.0
Paint regions filled or as boundaries.
Default value:
'fill'
"fill"
"fill"
"fill"
"fill"
List of values: 'fill'"fill""fill""fill""fill", 'margin'"margin""margin""margin""margin"
* Paint a rectangle into a new image (New1)
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* generate a black image
gen_image_const(New1,'byte', 768, 576)
* paint a white rectangle
overpaint_region(New1,Rectangle,255.0,'fill')
/* Paint a rectangle into a new image (New1) */
gen_rectangle1(&Rectangle,100.0,100.0,300.0,300.0);
/* generate a black image */
gen_image_const(&New1,"byte", 768, 576)
/* paint a white rectangle */
overpaint_region(New1,Rectangle,255.0,"fill");
* Paint a rectangle into a new image (New1)
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* generate a black image
gen_image_const(New1,'byte', 768, 576)
* paint a white rectangle
overpaint_region(New1,Rectangle,255.0,'fill')
* Paint a rectangle into a new image (New1)
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* generate a black image
gen_image_const(New1,'byte', 768, 576)
* paint a white rectangle
overpaint_region(New1,Rectangle,255.0,'fill')
* Paint a rectangle into a new image (New1)
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* generate a black image
gen_image_const(New1,'byte', 768, 576)
* paint a white rectangle
overpaint_region(New1,Rectangle,255.0,'fill')
overpaint_regionoverpaint_regionoverpaint_regionOverpaintRegionOverpaintRegion returns 2 (H_MSG_TRUE) if all parameters are
correct. If the input is empty the behavior can be set via
set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>).
If necessary, an exception is raised.
read_imageread_imageread_imageReadImageReadImage,
gen_image_constgen_image_constgen_image_constGenImageConstGenImageConst,
gen_image_protogen_image_protogen_image_protoGenImageProtoGenImageProto,
reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain
set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval,
paint_regionpaint_regionpaint_regionPaintRegionPaintRegion,
paint_xldpaint_xldpaint_xldPaintXldPaintXld
reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain,
set_drawset_drawset_drawSetDrawSetDraw,
paint_graypaint_graypaint_grayPaintGrayPaintGray,
overpaint_grayoverpaint_grayoverpaint_grayOverpaintGrayOverpaintGray,
gen_image_constgen_image_constgen_image_constGenImageConstGenImageConst
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |