gen_grid_rectification_mapT_gen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map (Operator)

Name

gen_grid_rectification_mapT_gen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map — Berechnet die Abbildung vom verzerrten ins entzerrte Bild, aufbauend auf den Punkten in einem regulären Gitter.

Signatur

gen_grid_rectification_map(Image, ConnectingLines : Map, Meshes : GridSpacing, Rotation, Row, Column, MapType : )

Herror T_gen_grid_rectification_map(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)

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 HImage::GenGridRectificationMap(const HXLD& ConnectingLines, HXLD* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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 HXLD::GenGridRectificationMap(const HImage& Image, HXLD* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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 HXLDCont::GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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 HXLDPoly::GenGridRectificationMap(const HImage& Image, HXLDPoly* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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 HXLDPara::GenGridRectificationMap(const HImage& Image, HXLDPara* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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 HXLDModPara::GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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

HImage HXLDExtPara::GenGridRectificationMap(const HImage& Image, HXLDExtPara* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const   (Nur Windows)

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)

def gen_grid_rectification_map(image: HObject, connecting_lines: HObject, grid_spacing: int, rotation: Union[str, int], row: Sequence[float], column: Sequence[float], map_type: str) -> Tuple[HObject, HObject]

Beschreibung

gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map berechnet die Abbildung der (typischerweise mit saddle_points_sub_pixsaddle_points_sub_pixSaddlePointsSubPixSaddlePointsSubPixSaddlePointsSubPixsaddle_points_sub_pix) gefundenen Gitterpunkte (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) im verzerrten Bild ImageImageImageImageimageimage in die entsprechenden Gitterpunkte im idealen regelmäßigen Punktgitter. Dazu werden aus den Gitterpunkten (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) und den (von connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsConnectGridPointsconnect_grid_points gefundenen) Verbindungslinien ConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLinesconnecting_lines alle Pfade gebildet, die von ihrem Ausgangspunkt über genau vier verschiedene Verbindungslinien zum Ausgangspunkt zurück führen. Sofern die Gitterpunkte (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn) und Verbindungslinien ConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLinesconnecting_lines sinnvolle Eingaben waren, entspricht jede solche 'Masche' genau einem Feld im Entzerrungsgitter. Danach werden die gefundenen Maschen zum gesuchten Punktgitter zusammengesetzt. Das Punktgitter wird, je nachdem, welchen Wert RotationRotationRotationRotationrotationrotation hat, um 0, 90, 180 oder 270 Grad gedreht. Dabei ist zu beachten, dass das gefundene Punktgitter nicht notwendigerweise eine korrekte Ausrichtung aufweisen muss. Wird in RotationRotationRotationRotationrotationrotation 'auto'"auto""auto""auto""auto""auto" übergeben, so wird das Punktgitter so gedreht, dass im entzerrten Bild die schwarze der beiden kreisförmigen Marken im Entzerrungsgitter links neben der weißen zu liegen kommt. Abschließend wird die Abbildung MapMapMapMapmapmap vom verzerrten ins entzerrte Bild durch Interpolation zwischen den Gitterpunkten berechnet. Jede Gitterzelle, für die die Koordinaten (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) aller vier Eckpunkte im verzerrten Bild bekannt sind, wird durch Interpolation auf ein Quadrat von GridSpacingGridSpacingGridSpacingGridSpacinggridSpacinggrid_spacing x GridSpacingGridSpacingGridSpacingGridSpacinggridSpacinggrid_spacing Pixeln abgebildet.

Der Parameter MapTypeMapTypeMapTypeMapTypemapTypemap_type gibt an, in welchem Typ die Abbildungsvorschrift gespeichert werden soll. Wurde die bilineare Interpolation ('bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear") gewählt, so besteht MapMapMapMapmapmap aus einem Bild mit fünf Kanälen. Der erste Kanal enthält für jedes Pixel des Ergebnisbildes die linearen Koordinaten desjenigen Pixels des Eingabebildes, welches links oberhalb von den transformierten Koordinaten liegt. Die übrigen vier Kanäle enthalten die Gewichte der einzelnen vier Nachbarpixel der transformierten Koordinaten für die bilineare Interpolation in folgender Reihenfolge:

2 3
4 5

Der zweite Kanal z.B. enthält die Gewichte der Pixel, die links oberhalb der transformierten Koordinaten liegen. Wurde 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix" gewählt, besteht MapMapMapMapmapmap aus einem Vektorfeld, welches für jedes Pixel des Ergebnisbildes die subpixelgenauen Koordinaten im Eingabebild enthält.

gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map liefert auch die gefundenen Maschen, als XLD-Konturen, in MeshesMeshesMeshesMeshesmeshesmeshes zurück. Im Gegensatz zu gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMapGenArbitraryDistortionMapgen_arbitrary_distortion_map werden gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map und die Vorgängerfunktionen verwendet, falls die Koordinaten (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) der Gitterpunkte im verzerrten Bild weder bekannt sind noch aus den Bildinhalten gewonnen werden können.

Wenn die erzeugte Abbildung in einem anderen Programm wiederverwendet werden soll, kann man sie mit dem Operator write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image als Mehrkanalbild abspeichern (Format: 'tiff'"tiff""tiff""tiff""tiff""tiff").

Achtung

Jede Eingabekontur ConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLinesconnecting_lines muss, so wie bei connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsConnectGridPointsconnect_grid_points beschrieben, das globale Attribut 'bright_dark'"bright_dark""bright_dark""bright_dark""bright_dark""bright_dark" besitzen!

Ausführungsinformationen

Parameter

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / uint2)

Eingabebild.

ConnectingLinesConnectingLinesConnectingLinesConnectingLinesconnectingLinesconnecting_lines (input_object)  xld-array objectHXLDHObjectHXLDHobject

Eingabekonturen.

MapMapMapMapmapmap (output_object)  multichannel-image objectHImageHObjectHImageHobject * (int4 / uint2 / vector_field)

Bild mit Transformationsdaten.

MeshesMeshesMeshesMeshesmeshesmeshes (output_object)  xld-array objectHXLDHObjectHXLDHobject *

Ausgabekonturen.

GridSpacingGridSpacingGridSpacingGridSpacinggridSpacinggrid_spacing (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Abstand der Gitterpunkte im entzerrten Bild.

Restriktion: GridSpacing > 0

RotationRotationRotationRotationrotationrotation (input_control)  string HTupleUnion[str, int]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Drehung, die am Punktgitter vorgenommen wird.

Defaultwert: 'auto' "auto" "auto" "auto" "auto" "auto"

Werteliste: 0, 90, 180, 270, 'auto'"auto""auto""auto""auto""auto"

RowRowRowRowrowrow (input_control)  point.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Zeilenkoordinaten der Gitterpunkte.

ColumnColumnColumnColumncolumncolumn (input_control)  point.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Spaltenkoordinaten der Gitterpunkte.

Restriktion: number(Column) == number(Row)

MapTypeMapTypeMapTypeMapTypemapTypemap_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Typ der Transformationsdaten.

Defaultwert: 'bilinear' "bilinear" "bilinear" "bilinear" "bilinear" "bilinear"

Werteliste: '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"

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map den Wert TRUE. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

connect_grid_pointsconnect_grid_pointsConnectGridPointsConnectGridPointsConnectGridPointsconnect_grid_points

Nachfolger

map_imagemap_imageMapImageMapImageMapImagemap_image

Siehe auch

gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMapGenArbitraryDistortionMapgen_arbitrary_distortion_map

Modul

Calibration