Skip to content

plane_deviationPlaneDeviationPlaneDeviationplane_deviationplane_deviation🔗

Short description🔗

plane_deviationPlaneDeviationPlaneDeviationplane_deviationplane_deviation — Calculate the deviation of the gray values from the approximating image plane.

Signature🔗

plane_deviation( region Regions, image Image, out real Deviation )void PlaneDeviation( const HObject& Regions, const HObject& Image, HTuple* Deviation )static void HOperatorSet.PlaneDeviation( HObject regions, HObject image, out HTuple deviation )def plane_deviation( regions: HObject, image: HObject ) -> Sequence[float]

def plane_deviation_s( regions: HObject, image: HObject ) -> floatHerror plane_deviation( const Hobject Regions, const Hobject Image, double* Deviation )

Herror T_plane_deviation( const Hobject Regions, const Hobject Image, Htuple* Deviation )

HTuple HImage::PlaneDeviation( const HRegion& Regions ) const

HTuple HRegion::PlaneDeviation( const HImage& Image ) const

HTuple HImage.PlaneDeviation( HRegion regions )

HTuple HRegion.PlaneDeviation( HImage image )

Description🔗

The operator plane_deviationPlaneDeviation calculates the deviation of the gray values in Imageimageimage from the approximation of the gray values through a plane. Contrary to the standard deviation in case of intensityIntensity slanted gray value planes also receive the value zero. The gray value plane is calculated according to gen_image_gray_rampGenImageGrayRamp. If \(F\) is the area of the region, \(\alpha\), \(\beta\), and \(\mu\) the parameters of the image plane, and \((r',c')\) the center of the region, Deviationdeviationdeviation is defined by:

\[\begin{eqnarray*} \textrm{Deviation} = \sqrt{\frac{sum_{(r,c) \in \textrm{Regions}} {((\alpha (r-r') + \beta (c-c') + \mu) - \textrm{Image}(r,c))^2}} {F}} \enspace . \end{eqnarray*}\]

Attention🔗

Note that the operator plane_deviationPlaneDeviation only considers the given Regionsregionsregions and ignores any previously set domain of the input image Imageimageimage. It should be noted that the calculation of Deviationdeviationdeviation does not follow the usual definition. It is defined to return the value 0.0 for an image with only one pixel.

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

Regions, of which the plane deviation is to be calculated.

Imageimageimage (input_object) singlechannelimage → object (byte / cyclic)HObject (byte / cyclic)HImage (byte / cyclic)HObject (byte / cyclic)Hobject (byte / cyclic)

Gray value image.

Deviationdeviationdeviation (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Deviation of the gray values within a region.

Complexity🔗

If \(F\) is the area of the region the runtime complexity amounts to \(O(F)\).

Result🔗

The operator plane_deviationPlaneDeviation returns the value 2 (H_MSG_TRUE) if Imageimageimage is of the type byte. 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

Alternatives

intensityIntensity, gen_image_gray_rampGenImageGrayRamp, sub_imageSubImage

See also

moments_gray_planeMomentsGrayPlane

Module🔗

Foundation