Skip to content

histo_2dimHisto2dimHisto2dimhisto_2dimhisto_2dim🔗

Short description🔗

histo_2dimHisto2dimHisto2dimhisto_2dimhisto_2dim — Calculate the histogram of two-channel gray value images.

Signature🔗

histo_2dim( region Regions, image ImageCol, image ImageRow, out image Histo2Dim )void Histo2dim( const HObject& Regions, const HObject& ImageCol, const HObject& ImageRow, HObject* Histo2Dim )static void HOperatorSet.Histo2dim( HObject regions, HObject imageCol, HObject imageRow, out HObject histo2Dim )def histo_2dim( regions: HObject, image_col: HObject, image_row: HObject ) -> HObject

Herror histo_2dim( const Hobject Regions, const Hobject ImageCol, const Hobject ImageRow, Hobject* Histo2Dim )

Herror T_histo_2dim( const Hobject Regions, const Hobject ImageCol, const Hobject ImageRow, Hobject* Histo2Dim )

HImage HImage::Histo2dim( const HRegion& Regions, const HImage& ImageRow ) const

HImage HRegion::Histo2dim( const HImage& ImageCol, const HImage& ImageRow ) const

HImage HImage.Histo2dim( HRegion regions, HImage imageRow )

HImage HRegion.Histo2dim( HImage imageCol, HImage imageRow )

Description🔗

The operator histo_2dimHisto2dim calculates the 2-dimensional histogram of two images within Regionsregionsregions. The gray values of channel 1 (ImageColimageColimage_col) are interpreted as row index, those of channel 2 (ImageRowimageRowimage_row) as column index. The gray value at one point \(P(g1,g2)\) in the output image Histo2Dimhisto2Dimhisto_2dim indicates the frequency of the gray value combination (\(g1\),\(g2\)) with \(g1\) indicating the line index and \(g2\) the column index.

Attention🔗

Note that the operator histo_2dimHisto2dim only considers the given Regionsregionsregions and ignores any previously set domain of the input images.

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

Regionsregionsregions (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Region in which the histogram is to be calculated.

ImageColimageColimage_col (input_object) (multichannel-)image → object (byte / direction / cyclic / int1)HObject (byte / direction / cyclic / int1)HImage (byte / direction / cyclic / int1)HObject (byte / direction / cyclic / int1)Hobject (byte / direction / cyclic / int1)

Channel 1.

ImageRowimageRowimage_row (input_object) (multichannel-)image → object (byte / direction / cyclic / int1)HObject (byte / direction / cyclic / int1)HImage (byte / direction / cyclic / int1)HObject (byte / direction / cyclic / int1)Hobject (byte / direction / cyclic / int1)

Channel 2.

Histo2Dimhisto2Dimhisto_2dim (output_object) image → object (int4)HObject (int4)HImage (int4)HObject (int4)Hobject * (int4)

Histogram to be calculated.

Example🔗

(HDevelop)


read_image(Image,'monkey')
get_domain (Image, Domain)
gauss_filter (Image, ImageGauss, 7)
histo_2dim(Domain,ImageGauss, Image,Histo2Dim)
dev_display(Histo2Dim)
(C)
read_image(&Image,"monkey")\;
get_domain (Image, &Domain)
gauss_filter(Image,&ImageGauss,7)\;
histo_2dim(Domain,Image,ImageGauss,&Histo2Dim)\;
set_part(WindowHandle,0,0,511,511)\;
disp_image(Histo2Dim,WindowHandle)\;

Complexity🔗

If \(F\) is the plane of the region, the runtime complexity is \(O(F + 256^2)\).

Result🔗

The operator histo_2dimHisto2dim returns the value 2 (H_MSG_TRUE) if both images have defined gray values. 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 predecessors

decompose3Decompose3, decompose2Decompose2, draw_regionDrawRegion

Possible successors

thresholdThreshold, class_2dim_supClass2dimSup, pouringPouring, local_maxLocalMax, gray_skeletonGraySkeleton

Alternatives

gray_histoGrayHisto, gray_histo_absGrayHistoAbs

See also

get_grayvalGetGrayval

Module🔗

Foundation