HALCON Reference Manual 10.0.2
Table of Contents / Image / Creation ClassesClassesClasses | | | Operators

region_to_meanregion_to_meanregion_to_meanRegionToMeanRegionToMean (Operator)

Name

region_to_meanregion_to_meanregion_to_meanRegionToMeanRegionToMean — 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)

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

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

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

void HOperatorSetX.RegionToMean(
[in] IHUntypedObjectX* Regions, [in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageMean)

IHImageX* HImageX.RegionToMean([in] IHRegionX* Regions)

IHImageX* HRegionX.RegionToMean([in] IHImageX* Image)

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

HImage HImage.RegionToMean(HRegion regions)

HImage HRegion.RegionToMean(HImage image)

Description

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

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Input regions.

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte / uint2)

original gray-value image.

ImageMeanImageMeanImageMeanImageMeanimageMean (output_object)  image objectHImageHImageHImageXHobject * (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)
disp_image(Disp,WindowHandle)
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'black')
disp_region(Regions,WindowHandle)

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");
set_color(WindowHandle,"black");
disp_region(Regions,WindowHandle);

Example (HDevelop)

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')
set_color(WindowHandle,'black')
disp_region(Regions,WindowHandle)

Example (HDevelop)

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')
set_color(WindowHandle,'black')
disp_region(Regions,WindowHandle)

Example (HDevelop)

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')
set_color(WindowHandle,'black')
disp_region(Regions,WindowHandle)

Result

region_to_meanregion_to_meanregion_to_meanRegionToMeanRegionToMean 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.

Possible Predecessors

regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionconnectionConnectionConnection

Possible Successors

disp_imagedisp_imagedisp_imageDispImageDispImage

Alternatives

paint_regionpaint_regionpaint_regionPaintRegionPaintRegion, intensityintensityintensityIntensityIntensity

Module

Foundation


Table of Contents / Image / Creation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH