Name
paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion — Paint regions into an image.
void PaintRegion(const HObject& Region, const HObject& Image, HObject* ImageResult, const HTuple& Grayval, const HTuple& Type)
HImage HImage::PaintRegion(const HRegion& Region, const HTuple& Grayval, const HString& Type) const
HImage HImage::PaintRegion(const HRegion& Region, double Grayval, const HString& Type) const
HImage HImage::PaintRegion(const HRegion& Region, double Grayval, const char* Type) const
HImage HRegion::PaintRegion(const HImage& Image, const HTuple& Grayval, const HString& Type) const
HImage HRegion::PaintRegion(const HImage& Image, double Grayval, const HString& Type) const
HImage HRegion::PaintRegion(const HImage& Image, double Grayval, const char* Type) const
static void HOperatorSet.PaintRegion(HObject region, HObject image, out HObject imageResult, HTuple grayval, HTuple type)
HImage HImage.PaintRegion(HRegion region, HTuple grayval, string type)
HImage HImage.PaintRegion(HRegion region, double grayval, string type)
HImage HRegion.PaintRegion(HImage image, HTuple grayval, string type)
HImage HRegion.PaintRegion(HImage image, double grayval, string type)
paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion paints the regions given in RegionRegionRegionRegionRegionregion with a
constant gray value into the image given in ImageImageImageImageImageimage and returns the
result in ImageResultImageResultImageResultImageResultImageResultimageResult. 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), ... ].
If the input image is of type 'direction', gray values that are not
in the value range that is valid for 'direction' images are set to
the value 255 to mark them as invalid.
The parameter TypeTypeTypeTypeTypetype determines whether the region should be painted
filled ('fill'"fill""fill""fill""fill""fill") or whether only its boundary should be painted
('margin'"margin""margin""margin""margin""margin").
As an alternative to paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion, you can use the operator
overpaint_regionoverpaint_regionOverpaintRegionoverpaint_regionOverpaintRegionOverpaintRegion, which directly paints the regions into
ImageImageImageImageImageimage.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Regions to be painted into the input image.
Image in which the regions are to be painted.
Image containing the result.
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"
"fill"
List of values: 'fill'"fill""fill""fill""fill""fill", 'margin'"margin""margin""margin""margin""margin"
* Paint a rectangle into the image 'monkey'
read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')
/* Paint a rectangle into the image 'monkey' */
read_image(&Image,"monkey");
gen_rectangle1(&Rectangle,100.0,100.0,300.0,300.0);
/* paint a white rectangle */
paint_region(Rectangle,Image,&ImageResult,255.0,"fill");
* Paint a rectangle into the image 'monkey'
read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')
* Paint a rectangle into the image 'monkey'
read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')
* Paint a rectangle into the image 'monkey'
read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')
* Paint a rectangle into the image 'monkey'
read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')
paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion 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>)SetSystem("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_imageReadImageread_imageReadImageReadImage,
gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst,
gen_image_protogen_image_protoGenImageProtogen_image_protoGenImageProtoGenImageProto,
reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain
set_grayvalset_grayvalSetGrayvalset_grayvalSetGrayvalSetGrayval,
overpaint_regionoverpaint_regionOverpaintRegionoverpaint_regionOverpaintRegionOverpaintRegion,
paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld
reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain,
paint_graypaint_grayPaintGraypaint_grayPaintGrayPaintGray,
overpaint_grayoverpaint_grayOverpaintGrayoverpaint_grayOverpaintGrayOverpaintGray,
set_drawset_drawSetDrawset_drawSetDrawSetDraw,
gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst
Foundation