intensityIntensityIntensityintensityintensity
Short description
intensityIntensityIntensityintensityintensity — Calculate the mean and deviation of gray values.
Signature
intensity( region Regions, image Image, out real Mean, out real Deviation )void Intensity( const HObject& Regions, const HObject& Image, HTuple* Mean, HTuple* Deviation )static void HOperatorSet.Intensity( HObject regions, HObject image, out HTuple mean, out HTuple deviation )def intensity( regions: HObject, image: HObject ) -> Tuple[Sequence[float], Sequence[float]]
def intensity_s( regions: HObject, image: HObject ) -> Tuple[float, float]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 )
HTuple HImage::Intensity( const HRegion& Regions, HTuple* Deviation ) const
double HImage::Intensity( const HRegion& Regions, double* Deviation ) const
HTuple HRegion::Intensity( const HImage& Image, HTuple* Deviation ) const
double HRegion::Intensity( const HImage& Image, double* Deviation ) const
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 intensityIntensity calculates the mean and the
deviation of the gray values in the input image within
Regionsregionsregions. 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:
\[\begin{eqnarray*}
\textrm{Mean} = \frac{\sum_{p \in R} {g(p)}}{F}
\end{eqnarray*}\]
\[\begin{eqnarray*}
\textrm{Deviation} = \sqrt{
\frac{\sum_{p \in R}{(g(p) - \textrm{Mean})^2}}{F}}
\end{eqnarray*}\]
Attention
Note that the operator intensityIntensity only considers
the given Regionsregionsregions and ignores any previously set domain
of the input image Imageimageimage.
The calculation of Deviationdeviationdeviation does not follow the usual
definition if the region of the image contains only one pixel. In
this case 0.0 is returned.
Execution information
Parameters
Regionsregionsregions (input_object) region(-array) → objectHObjectHRegionHObjectHobject
Regions in which the features are calculated.
Imageimageimage (input_object) singlechannelimage → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)
Gray value image.
Meanmeanmean (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
Mean gray value of a region.
Deviationdeviationdeviation (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (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 intensityIntensity 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>:),
the behavior in case of empty region is set via
set_system(::'empty_region_result',<Result>:).
If necessary an exception is raised.
Combinations with other operators
Combinations
Possible successors
thresholdThreshold
Alternatives
select_graySelectGray, min_max_grayMinMaxGray
See also
mean_imageMeanImage, gray_histoGrayHisto, gray_histo_absGrayHistoAbs
Module
Foundation