Skip to content

dots_imageDotsImageDotsImagedots_imagedots_image🔗

Short description🔗

dots_imageDotsImageDotsImagedots_imagedots_image — Enhance circular dots in an image.

Signature🔗

dots_image( image Image, out image DotImage, integer Diameter, string FilterType, integer PixelShift )void DotsImage( const HObject& Image, HObject* DotImage, const HTuple& Diameter, const HTuple& FilterType, const HTuple& PixelShift )static void HOperatorSet.DotsImage( HObject image, out HObject dotImage, HTuple diameter, HTuple filterType, HTuple pixelShift )def dots_image( image: HObject, diameter: int, filter_type: str, pixel_shift: int ) -> HObject

Herror dots_image( const Hobject Image, Hobject* DotImage, const Hlong Diameter, const char* FilterType, const Hlong PixelShift )

Herror T_dots_image( const Hobject Image, Hobject* DotImage, const Htuple Diameter, const Htuple FilterType, const Htuple PixelShift )

HImage HImage::DotsImage( Hlong Diameter, const HString& FilterType, Hlong PixelShift ) const

HImage HImage::DotsImage( Hlong Diameter, const char* FilterType, Hlong PixelShift ) const

HImage HImage::DotsImage( Hlong Diameter, const wchar_t* FilterType, Hlong PixelShift ) const (Windows only)

HImage HImage.DotsImage( int diameter, string filterType, int pixelShift )

Description🔗

dots_imageDotsImage enhances circular dots of diameter Diameterdiameterdiameter in the input image Imageimageimage. Hence, dots_imageDotsImage is especially suited for the segmentation of dot prints, e.g., in OCR applications. The enhancement is performed by using matched filters with filter masks that are tuned for a particular dot size. For example, for \(\textrm{Diameter} = 5\) the filter mask is given by:

\[\begin{eqnarray*} \frac{1}{336} \left(\begin{array}{ccccccc} & & -21 & -21 & -21 & & \\ & -21 & 16 & 16 & 16 & -21 & \\ -21 & 16 & 16 & 16 & 16 & 16 & -21 \\ -21 & 16 & 16 & 16 & 16 & 16 & -21 \\ -21 & 16 & 16 & 16 & 16 & 16 & -21 \\ & -21 & 16 & 16 & 16 & -21 & \\ & & -21 & -21 & -21 & & \end{array} \right) \end{eqnarray*}\]

The parameter FilterTypefilterTypefilter_type selects whether 'dark'"dark", 'light'"light", or 'all'"all" dots in the image should be enhanced. The PixelShiftpixelShiftpixel_shift can be used either to increase the contrast of the output image (\(\textrm{PixelShift} > 0\)) or to dampen the values in extremely bright areas that would be cut off otherwise (\(\textrm{PixelShift} = -1\)).

Attention🔗

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution information🔗

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

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

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on domain level.

Parameters🔗

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

Input image.

DotImagedotImagedot_image (output_object) (multichannel-)image(-array) → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject * (byte / uint2)

Output image.

Diameterdiameterdiameter (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Diameter of the dots to be enhanced.

Default: 55
List of values: 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 233, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23

FilterTypefilterTypefilter_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enhance dark, light, or all dots.

Default: 'light'"light"
List of values: 'all', 'dark', 'light'"all", "dark", "light"

PixelShiftpixelShiftpixel_shift (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Shift of the filter response.

Default: 00
List of values: -1, 0, 1, 2-1, 0, 1, 2

Combinations with other operators🔗

Combinations

Possible successors

thresholdThreshold

Alternatives

laplaceLaplace, laplace_of_gaussLaplaceOfGauss, diff_of_gaussDiffOfGauss, derivate_gaussDerivateGauss, convol_imageConvolImage

Module🔗

Foundation