Name
gen_grid_rectification_mapT_gen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap — Compute the mapping between the distorted image and the rectified image
based upon the points of a regular grid.
Herror gen_grid_rectification_map(Hobject Image, Hobject ConnectingLines, Hobject* Map, Hobject* Meshes, const HTuple& GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HTuple& MapType)
HImage HImage::GenGridRectificationMap(const HXLDArray& ConnectingLines, HXLDArray* Meshes, const HTuple& GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HTuple& MapType) const
void GenGridRectificationMap(const HObject& Image, const HObject& ConnectingLines, HObject* Map, HObject* Meshes, const HTuple& GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HTuple& MapType)
HImage HImage::GenGridRectificationMap(const HXLD& ConnectingLines, HXLD* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HImage::GenGridRectificationMap(const HXLD& ConnectingLines, HXLD* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HImage::GenGridRectificationMap(const HXLD& ConnectingLines, HXLD* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLD::GenGridRectificationMap(const HImage& Image, HXLD* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLD::GenGridRectificationMap(const HImage& Image, HXLD* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLD::GenGridRectificationMap(const HImage& Image, HXLD* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLDCont::GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDCont::GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDCont::GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLDPoly::GenGridRectificationMap(const HImage& Image, HXLDPoly* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDPoly::GenGridRectificationMap(const HImage& Image, HXLDPoly* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDPoly::GenGridRectificationMap(const HImage& Image, HXLDPoly* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLDPara::GenGridRectificationMap(const HImage& Image, HXLDPara* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDPara::GenGridRectificationMap(const HImage& Image, HXLDPara* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDPara::GenGridRectificationMap(const HImage& Image, HXLDPara* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLDModPara::GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDModPara::GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDModPara::GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
HImage HXLDExtPara::GenGridRectificationMap(const HImage& Image, HXLDExtPara* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDExtPara::GenGridRectificationMap(const HImage& Image, HXLDExtPara* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const
HImage HXLDExtPara::GenGridRectificationMap(const HImage& Image, HXLDExtPara* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const
void HOperatorSetX.GenGridRectificationMap(
[in] IHUntypedObjectX* Image, [in] IHUntypedObjectX* ConnectingLines, [out] IHUntypedObjectX** Map, [out] IHUntypedObjectX** Meshes, [in] VARIANT GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT MapType)
IHImageX* HImageX.GenGridRectificationMap(
[in] IHXLDX* ConnectingLines, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDContX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDPolyX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDParaX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDModParaX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
IHImageX* HXLDExtParaX.GenGridRectificationMap(
[in] IHImageX* Image, [out] IHXLDX** Meshes, [in] Hlong GridSpacing, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column, [in] BSTR MapType)
static void HOperatorSet.GenGridRectificationMap(HObject image, HObject connectingLines, out HObject map, out HObject meshes, HTuple gridSpacing, HTuple rotation, HTuple row, HTuple column, HTuple mapType)
HImage HImage.GenGridRectificationMap(HXLD connectingLines, out HXLD meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HImage.GenGridRectificationMap(HXLD connectingLines, out HXLD meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLD.GenGridRectificationMap(HImage image, out HXLD meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLD.GenGridRectificationMap(HImage image, out HXLD meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLDCont.GenGridRectificationMap(HImage image, out HXLDCont meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLDCont.GenGridRectificationMap(HImage image, out HXLDCont meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLDPoly.GenGridRectificationMap(HImage image, out HXLDPoly meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLDPoly.GenGridRectificationMap(HImage image, out HXLDPoly meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLDPara.GenGridRectificationMap(HImage image, out HXLDPara meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLDPara.GenGridRectificationMap(HImage image, out HXLDPara meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLDModPara.GenGridRectificationMap(HImage image, out HXLDModPara meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLDModPara.GenGridRectificationMap(HImage image, out HXLDModPara meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
HImage HXLDExtPara.GenGridRectificationMap(HImage image, out HXLDExtPara meshes, int gridSpacing, HTuple rotation, HTuple row, HTuple column, string mapType)
HImage HXLDExtPara.GenGridRectificationMap(HImage image, out HXLDExtPara meshes, int gridSpacing, string rotation, HTuple row, HTuple column, string mapType)
gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap calculates the mapping between the grid
points (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn), which have been actually detected in
the distorted image ImageImageImageImageImageimage (typically using
saddle_points_sub_pixsaddle_points_sub_pixSaddlePointsSubPixsaddle_points_sub_pixSaddlePointsSubPixSaddlePointsSubPix), and the corresponding grid points of the
ideal regular point grid.
First, all paths that lead from their initial point via exactly four
different connecting lines back to the initial point are assembled from the
grid points (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) and the connecting lines
ConnectingLinesConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLines (detected by connect_grid_pointsconnect_grid_pointsConnectGridPointsconnect_grid_pointsConnectGridPointsConnectGridPoints).
In case that the
input of grid points (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) and of connecting lines
ConnectingLinesConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLines was meaningful, one such 'mesh' corresponds to
exactly one grid cell in the rectification grid. Afterwards, the meshes are
combined to the point grid.
According to the value of RotationRotationRotationRotationRotationrotation, the point grid is rotated by
0, 90, 180 or 270 degrees. Note that the
point grid does not necessarily have the correct orientation. When passing
'auto'"auto""auto""auto""auto""auto" in RotationRotationRotationRotationRotationrotation, the point grid is rotated such that
the black circular mark in the rectification grid is positioned to the left
of the white one (see also create_rectification_gridcreate_rectification_gridCreateRectificationGridcreate_rectification_gridCreateRectificationGridCreateRectificationGrid).
Finally, the mapping MapMapMapMapMapmap between the distorted image and the
rectified image is calculated by interpolation between the grid points.
Each grid cell, for which the coordinates (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) of
all four corner points are known, is projected onto a square of
GridSpacingGridSpacingGridSpacingGridSpacingGridSpacinggridSpacing x GridSpacingGridSpacingGridSpacingGridSpacingGridSpacinggridSpacing pixels.
MapTypeMapTypeMapTypeMapTypeMapTypemapType is used to specify the type of the output MapMapMapMapMapmap.
If 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" interpolation
is chosen, MapMapMapMapMapmap consists of one image containing five channels.
In the first channel for each pixel in the resulting image the linearized
coordinates of the pixel in the input image is stored that is in the upper
left position relative to the transformed coordinates.
The four other channels contain the weights of the four neighboring pixels
of the transformed coordinates which are used for the bilinear interpolation,
in the following order:
The second channel, for example, contains the weights of the pixels that
lie to the upper left relative to the transformed coordinates.
If 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix" is chosen, MapMapMapMapMapmap consists of
one vector field image, in which for each pixel of the resulting image
the subpixel precise coordinates in the input image are stored.
gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap additionally returns the calculated meshes
as XLD contours in MeshesMeshesMeshesMeshesMeshesmeshes.
In contrary to gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMap,
gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap and its predecessors are used when the
coordinates (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) of the grid points in the
distorted image are neither known nor can be derived from the image
contents.
If you want to re-use the created map in another program, you can save it as
a multi-channel image with the operator write_imagewrite_imageWriteImagewrite_imageWriteImageWriteImage, using the format
'tiff'"tiff""tiff""tiff""tiff""tiff".
Each input XLD contour ConnectingLinesConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLines must own the global
attribute 'bright_dark'"bright_dark""bright_dark""bright_dark""bright_dark""bright_dark", as it is described with
connect_grid_pointsconnect_grid_pointsConnectGridPointsconnect_grid_pointsConnectGridPointsConnectGridPoints!
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Image containing the mapping data.
Distance of the grid points in the rectified
image.
Restriction: GridSpacing > 0
Rotation to be applied to the point grid.
Default value:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
List of values: 0, 90, 180, 270, 'auto'"auto""auto""auto""auto""auto"
Row coordinates of the grid points.
Column coordinates of the grid points.
Restriction: number(Column) == number(Row)
Type of mapping.
Default value:
'bilinear'
"bilinear"
"bilinear"
"bilinear"
"bilinear"
"bilinear"
List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix"
gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap returns 2 (H_MSG_TRUE) if all parameter values
are correct. If necessary, an exception is raised.
connect_grid_pointsconnect_grid_pointsConnectGridPointsconnect_grid_pointsConnectGridPointsConnectGridPoints
map_imagemap_imageMapImagemap_imageMapImageMapImage
gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMap
Calibration