Skip to content

region_to_meanRegionToMeanRegionToMeanregion_to_meanregion_to_mean🔗

Short description🔗

region_to_meanRegionToMeanRegionToMeanregion_to_meanregion_to_mean — Paint regions with their average gray value.

Signature🔗

region_to_mean( region Regions, image Image, out image ImageMean )void RegionToMean( const HObject& Regions, const HObject& Image, HObject* ImageMean )static void HOperatorSet.RegionToMean( HObject regions, HObject image, out HObject imageMean )def region_to_mean( regions: HObject, image: HObject ) -> HObject

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 )

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

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

HImage HImage.RegionToMean( HRegion regions )

HImage HRegion.RegionToMean( HImage image )

Description🔗

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

Parameters🔗

Regionsregionsregions (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Input regions.

Imageimageimage (input_object) (multichannel-)image → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

original gray-value image.

ImageMeanimageMeanimage_mean (output_object) image → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject * (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)
(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)\;

Result🔗

region_to_meanRegionToMean 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>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

regiongrowingRegiongrowing, connectionConnection

Possible successors

disp_imageDispImage

Alternatives

paint_regionPaintRegion, intensityIntensity

Module🔗

Foundation