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

intensityintensityintensityIntensityIntensity (Operator)

Name

intensityintensityintensityIntensityIntensity — Calculate the mean and deviation of gray values.

Signature

intensity(Regions, Image : : : Mean, Deviation)

Herror intensity(const Hobject Regions, const Hobject Image, double* Mean, double* Deviation)

Herror T_intensity(const Hobject Regions, const Hobject Image, Htuple* Mean, Htuple* Deviation)

Herror intensity(Hobject Regions, Hobject Image, double* Mean, double* Deviation)

Herror intensity(Hobject Regions, Hobject Image, HTuple* Mean, HTuple* Deviation)

double HRegion::Intensity(const HImage& Image, double* Deviation) const

HTuple HRegionArray::Intensity(const HImage& Image, HTuple* Deviation) const

void HOperatorSetX.Intensity(
[in] IHUntypedObjectX* Regions, [in] IHUntypedObjectX* Image, [out] VARIANT* Mean, [out] VARIANT* Deviation)

VARIANT HImageX.Intensity(
[in] IHRegionX* Regions, [out] VARIANT* Deviation)

VARIANT HRegionX.Intensity(
[in] IHImageX* Image, [out] VARIANT* Deviation)

static void HOperatorSet.Intensity(HObject regions, HObject image, out HTuple mean, out HTuple deviation)

HTuple HImage.Intensity(HRegion regions, out HTuple deviation)

double HImage.Intensity(HRegion regions, out double deviation)

HTuple HRegion.Intensity(HImage image, out HTuple deviation)

double HRegion.Intensity(HImage image, out double deviation)

Description

The operator intensityintensityintensityIntensityIntensity calculates the mean and the deviation of the gray values in the input image within RegionsRegionsRegionsRegionsregions. If R is a region, p a pixel from R with the gray value g(p) and F the plane (F = |R|), the features are defined by:

                ----
                \
   Mean      =  /     g(p)
                ----
               p in R
               -----------
                    F

                 -----------------------
                 |    ----
                 | 1  \                2
   Deviation =   | -  /     (g(p)-Mean)
               \ | F  ----
                \|   p in R

Attention

The calculation of DeviationDeviationDeviationDeviationdeviation does not follow the usual definition if the region of the image contains only one pixel. In this case 0.0 is returned.

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions the features of which are to be calculated.

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

Gray value image.

MeanMeanMeanMeanmean (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Mean gray value of a region.

DeviationDeviationDeviationDeviationdeviation (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Deviation of gray values within a region.

Complexity

If F is the area of the region, the runtime complexity is O(F).

Result

The operator intensityintensityintensityIntensityIntensity returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator 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>), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:)set_system("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary an exception is raised.

Possible Successors

thresholdthresholdthresholdThresholdThreshold

Alternatives

select_grayselect_grayselect_graySelectGraySelectGray, min_max_graymin_max_graymin_max_grayMinMaxGrayMinMaxGray

See also

mean_imagemean_imagemean_imageMeanImageMeanImage, mean_imagemean_imagemean_imageMeanImageMeanImage, gray_histogray_histogray_histoGrayHistoGrayHisto, gray_histo_absgray_histo_absgray_histo_absGrayHistoAbsGrayHistoAbs

Module

Foundation


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