region_to_meanregion_to_meanRegionToMeanRegionToMeanregion_to_mean (Operator)

Name

region_to_meanregion_to_meanRegionToMeanRegionToMeanregion_to_mean — Paint regions with their average gray value.

Signature

region_to_mean(Regions, Image : ImageMean : : )

Herror region_to_mean(const Hobject Regions, const Hobject Image, Hobject* ImageMean)

Herror T_region_to_mean(const Hobject Regions, const Hobject Image, Hobject* ImageMean)

void RegionToMean(const HObject& Regions, const HObject& Image, HObject* ImageMean)

HImage HImage::RegionToMean(const HRegion& Regions) const

HImage HRegion::RegionToMean(const HImage& Image) const

static void HOperatorSet.RegionToMean(HObject regions, HObject image, out HObject imageMean)

HImage HImage.RegionToMean(HRegion regions)

HImage HRegion.RegionToMean(HImage image)

def region_to_mean(regions: HObject, image: HObject) -> HObject

Description

region_to_meanregion_to_meanRegionToMeanRegionToMeanRegionToMeanregion_to_mean returns an image in which the regions RegionsRegionsRegionsRegionsregionsregions are painted with their average gray value based on the image ImageImageImageImageimageimage. This operator is mainly intended to visualize segmentation results.

Execution Information

Parameters

RegionsRegionsRegionsRegionsregionsregions (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Input regions.

ImageImageImageImageimageimage (input_object)  (multichannel-)image objectHImageHObjectHImageHobject (byte / uint2)

original gray-value image.

ImageMeanImageMeanImageMeanImageMeanimageMeanimage_mean (output_object)  image objectHImageHObjectHImageHobject * (byte / uint2)

Result image with painted regions.

Example (HDevelop)

read_image(Image,'fabrik')
regiongrowing(Image,Regions,3,3,6,100)
region_to_mean(Regions,Image,Disp)
dev_display(Disp)
dev_set_draw('margin')
dev_display(Regions)

Example (C)

read_image(&Image,"fabrik");
regiongrowing(Image,&Regions,3,3,6,100);
region_to_mean(Regions,Image,&Disp);
disp_image(Disp,WindowHandle);
set_draw(WindowHandle,"margin");
disp_region(Regions,WindowHandle);

Example (HDevelop)

read_image(Image,'fabrik')
regiongrowing(Image,Regions,3,3,6,100)
region_to_mean(Regions,Image,Disp)
dev_display(Disp)
dev_set_draw('margin')
dev_display(Regions)

Example (HDevelop)

read_image(Image,'fabrik')
regiongrowing(Image,Regions,3,3,6,100)
region_to_mean(Regions,Image,Disp)
dev_display(Disp)
dev_set_draw('margin')
dev_display(Regions)

Example (HDevelop)

read_image(Image,'fabrik')
regiongrowing(Image,Regions,3,3,6,100)
region_to_mean(Regions,Image,Disp)
dev_display(Disp)
dev_set_draw('margin')
dev_display(Regions)

Result

region_to_meanregion_to_meanRegionToMeanRegionToMeanRegionToMeanregion_to_mean returns 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>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

Possible Successors

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

Alternatives

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region, intensityintensityIntensityIntensityIntensityintensity

Module

Foundation