Operator Reference

find_rectification_gridfind_rectification_gridFindRectificationGridFindRectificationGridfind_rectification_grid (Operator)

find_rectification_gridfind_rectification_gridFindRectificationGridFindRectificationGridfind_rectification_grid — Segment the rectification grid region in the image.

Signature

find_rectification_grid(Image : GridRegion : MinContrast, Radius : )

Herror find_rectification_grid(const Hobject Image, Hobject* GridRegion, double MinContrast, double Radius)

Herror T_find_rectification_grid(const Hobject Image, Hobject* GridRegion, const Htuple MinContrast, const Htuple Radius)

void FindRectificationGrid(const HObject& Image, HObject* GridRegion, const HTuple& MinContrast, const HTuple& Radius)

HRegion HImage::FindRectificationGrid(const HTuple& MinContrast, const HTuple& Radius) const

HRegion HImage::FindRectificationGrid(double MinContrast, double Radius) const

static void HOperatorSet.FindRectificationGrid(HObject image, out HObject gridRegion, HTuple minContrast, HTuple radius)

HRegion HImage.FindRectificationGrid(HTuple minContrast, HTuple radius)

HRegion HImage.FindRectificationGrid(double minContrast, double radius)

def find_rectification_grid(image: HObject, min_contrast: Union[int, float], radius: Union[float, int]) -> HObject

Description

find_rectification_gridfind_rectification_gridFindRectificationGridFindRectificationGridfind_rectification_grid searches in the image ImageImageImageimageimage for image parts that contain the rectification grid and returns them in the region GridRegionGridRegionGridRegiongridRegiongrid_region. To do so, essentially image areas with a contrast of at least MinContrastMinContrastMinContrastminContrastmin_contrast are extracted and the holes in these areas are filled up. Then, an opening with the radius RadiusRadiusRadiusradiusradius is applied to these areas to eliminate smaller areas of high contrast.

During grid-rectification, a careful reduction of the input region to those image parts that actually contain the rectification grid is useful for two purposes: First, the computing time can be reduced and secondly, saddle_points_sub_pixsaddle_points_sub_pixSaddlePointsSubPixSaddlePointsSubPixsaddle_points_sub_pix and connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsconnect_grid_points can be prevented from detecting false grid points and connecting lines.

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

ImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHObjectHobject (byte / uint2)

Input image.

GridRegionGridRegionGridRegiongridRegiongrid_region (output_object)  region objectHRegionHObjectHObjectHobject *

Output region containing the rectification grid.

MinContrastMinContrastMinContrastminContrastmin_contrast (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum contrast.

Default: 8.0

Suggested values: 2.0, 4.0, 8.0, 16.0, 32.0

Restriction: MinContrast >= 0

RadiusRadiusRadiusradiusradius (input_control)  real HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius of the circular structuring element.

Default: 7.5

Suggested values: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5

Restriction: Radius >= 0.5

Example (HDevelop)

find_rectification_grid (Image, GridRegion, 8, 10)
dilation_circle (GridRegion, GridRegionDilated, 5.5)
reduce_domain (Image, GridRegionDilated, ImageReduced)
saddle_points_sub_pix (ImageReduced, 'facet', 1.5, 5, Row, Column)
connect_grid_points (ImageReduced, ConnectingLines, Row, Column, 1.1, 5.5)
gen_grid_rectification_map (ImageReduced, ConnectingLines, Map, Meshes, 20, \
                            'auto', Row, Column, 'bilinear')
map_image (Image, Map, ImageMapped)

Result

find_rectification_gridfind_rectification_gridFindRectificationGridFindRectificationGridfind_rectification_grid returns 2 ( H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Possible Successors

dilation_circledilation_circleDilationCircleDilationCircledilation_circle, reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain

Module

Calibration