KlassenKlassenKlassenKlassen | | | | Operatoren

gen_cube_map_mosaicT_gen_cube_map_mosaicGenCubeMapMosaicgen_cube_map_mosaicGenCubeMapMosaicGenCubeMapMosaic (Operator)

Name

gen_cube_map_mosaicT_gen_cube_map_mosaicGenCubeMapMosaicgen_cube_map_mosaicGenCubeMapMosaicGenCubeMapMosaic — Erzeugen von 6 Cube Maps eines sphärischen Mosaiks.

Signatur

gen_cube_map_mosaic(Images : Front, Rear, Left, Right, Top, Bottom : CameraMatrices, RotationMatrices, CubeMapDimension, StackingOrder, Interpolation : )

Herror T_gen_cube_map_mosaic(const Hobject Images, Hobject* Front, Hobject* Rear, Hobject* Left, Hobject* Right, Hobject* Top, Hobject* Bottom, const Htuple CameraMatrices, const Htuple RotationMatrices, const Htuple CubeMapDimension, const Htuple StackingOrder, const Htuple Interpolation)

Herror gen_cube_map_mosaic(Hobject Images, Hobject* Front, Hobject* Rear, Hobject* Left, Hobject* Right, Hobject* Top, Hobject* Bottom, const HTuple& CameraMatrices, const HTuple& RotationMatrices, const HTuple& CubeMapDimension, const HTuple& StackingOrder, const HTuple& Interpolation)

HImage HImageArray::GenCubeMapMosaic(HImage* Rear, HImage* Left, HImage* Right, HImage* Top, HImage* Bottom, const HTuple& CameraMatrices, const HTuple& RotationMatrices, const HTuple& CubeMapDimension, const HTuple& StackingOrder, const HTuple& Interpolation) const

void GenCubeMapMosaic(const HObject& Images, HObject* Front, HObject* Rear, HObject* Left, HObject* Right, HObject* Top, HObject* Bottom, const HTuple& CameraMatrices, const HTuple& RotationMatrices, const HTuple& CubeMapDimension, const HTuple& StackingOrder, const HTuple& Interpolation)

HImage HImage::GenCubeMapMosaic(HImage* Rear, HImage* Left, HImage* Right, HImage* Top, HImage* Bottom, const HHomMat2DArray& CameraMatrices, const HHomMat2DArray& RotationMatrices, Hlong CubeMapDimension, const HTuple& StackingOrder, const HString& Interpolation) const

HImage HImage::GenCubeMapMosaic(HImage* Rear, HImage* Left, HImage* Right, HImage* Top, HImage* Bottom, const HHomMat2DArray& CameraMatrices, const HHomMat2DArray& RotationMatrices, Hlong CubeMapDimension, const HString& StackingOrder, const HString& Interpolation) const

HImage HImage::GenCubeMapMosaic(HImage* Rear, HImage* Left, HImage* Right, HImage* Top, HImage* Bottom, const HHomMat2DArray& CameraMatrices, const HHomMat2DArray& RotationMatrices, Hlong CubeMapDimension, const char* StackingOrder, const char* Interpolation) const

void HOperatorSetX.GenCubeMapMosaic(
[in] IHUntypedObjectX* Images, [out] IHUntypedObjectX*Front, [out] IHUntypedObjectX*Rear, [out] IHUntypedObjectX*Left, [out] IHUntypedObjectX*Right, [out] IHUntypedObjectX*Top, [out] IHUntypedObjectX*Bottom, [in] VARIANT CameraMatrices, [in] VARIANT RotationMatrices, [in] VARIANT CubeMapDimension, [in] VARIANT StackingOrder, [in] VARIANT Interpolation)

IHImageX* HImageX.GenCubeMapMosaic(
[out] IHImageX*Rear, [out] IHImageX*Left, [out] IHImageX*Right, [out] IHImageX*Top, [out] IHImageX*Bottom, [in] IHHomMat2DX* CameraMatrices, [in] IHHomMat2DX* RotationMatrices, [in] Hlong CubeMapDimension, [in] VARIANT StackingOrder, [in] BSTR Interpolation)

static void HOperatorSet.GenCubeMapMosaic(HObject images, out HObject front, out HObject rear, out HObject left, out HObject right, out HObject top, out HObject bottom, HTuple cameraMatrices, HTuple rotationMatrices, HTuple cubeMapDimension, HTuple stackingOrder, HTuple interpolation)

HImage HImage.GenCubeMapMosaic(out HImage rear, out HImage left, out HImage right, out HImage top, out HImage bottom, HHomMat2D[] cameraMatrices, HHomMat2D[] rotationMatrices, int cubeMapDimension, HTuple stackingOrder, string interpolation)

HImage HImage.GenCubeMapMosaic(out HImage rear, out HImage left, out HImage right, out HImage top, out HImage bottom, HHomMat2D[] cameraMatrices, HHomMat2D[] rotationMatrices, int cubeMapDimension, string stackingOrder, string interpolation)

Beschreibung

gen_cube_map_mosaicgen_cube_map_mosaicGenCubeMapMosaicgen_cube_map_mosaicGenCubeMapMosaicGenCubeMapMosaic erzeugt 6 Cube Maps eines sphärischen Mosaiks FrontFrontFrontFrontFrontfront, LeftLeftLeftLeftLeftleft, RearRearRearRearRearrear, RightRightRightRightRightright, TopTopTopTopToptop und BottomBottomBottomBottomBottombottom aus den in ImagesImagesImagesImagesImagesimages übergebenen Bildern. Die Lage der Bilder im Raum, aus der die Lage der Bilder in Bezug auf die Kugeloberfläche berechnet wird, kann mit stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration bestimmt werden. Die dort berechneten Kameramatrizen und Rotationsmatrizen können direkt in CameraMatricesCameraMatricesCameraMatricesCameraMatricesCameraMatricescameraMatrices und RotationMatricesRotationMatricesRotationMatricesRotationMatricesRotationMatricesrotationMatrices übergeben werden. Ein sphärisches Mosaik kann nur von Aufnahmen einer stationären Kamera berechnet werden (siehe stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration).

Die Breite und Höhe der Cube Maps wird durch CubeMapDimensionCubeMapDimensionCubeMapDimensionCubeMapDimensionCubeMapDimensioncubeMapDimension festgelegt. Dieser Parameter wird in Pixeln angegeben.

Der Modus, in dem die Bilder dem Mosaik hinzugefügt werden, wird durch StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder bestimmt. Für StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder = 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi" werden die Punkte im Mosaikbild aus der Voronoi-Zelle des jeweiligen Eingabebildes entnommen. Das heißt, dass die Grauwerte aus den zum Mittelpunkt des jeweiligen Bildes auf der Kugeloberfläche am nächsten gelegenen Punkten bestimmt werden. Dieser Modus hat den Vorteil, dass eventuelle Vignettierungen oder unkorrigierte radiale Verzeichnungen im Mosaik weniger auffällig sind, da sie typischerweise symmetrisch zum Bildmittelpunkt sind. Alternativ kann mit der im folgenden beschriebenen Wahl der Parameter ein Modus gewählt werden, der denselben Effekt hat, wie wenn die Bilder nacheinander in das Mosaikbild gezeichnet würden. Hierbei ist die Reihenfolge des Eintragens der Bilder in das Mosaik wichtig. Deswegen kann in StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder ein Array von ganzen Zahlen angegeben werden. Das erste Element dieses Arrays bildet das unterste Bild des Mosaiks, während das letzte ganz oben auf dem Mosaik erscheint. Wird statt einem Array von ganzen Zahlen der Wert 'default'"default""default""default""default""default" angegeben, so wird die kanonische Ordnung (Bilder in der Reihenfolge in ImagesImagesImagesImagesImagesimages) verwendet. Wenn weder 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi" noch 'default'"default""default""default""default""default" verwendet wird, muss also in StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder eine Permutation der Zahlen 1,...,n verwendet werden, wobei n die Anzahl der in ImagesImagesImagesImagesImagesimages übergebenen Bilder ist. Es ist zu beachten, dass der Modus 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi" nicht immer angewendet werden kann. So müssen z.B. mindestens zwei Bilder übergeben werden. Weiterhin können die Voronoi-Zellen für sehr spezielle Lagen der Bildmittelpunkte auf der Kugel nicht eindeutig bestimmt werden. Darüber hinaus steht mit dem Modus 'blend'"blend""blend""blend""blend""blend" ein Modus bereit, welcher die Bilder des Mosaiks weich ineinander überblendet. Als Grenzen zwischen den Bildern werden hier die gleichen Voronoi-Zellen verwendet, wie im Modus 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi". Dieser Modus liefert besonders angenehm wirkende Bilder, benötigt jedoch erheblich mehr Ressourcen. Sollte der Modus 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi" oder 'blend'"blend""blend""blend""blend""blend" aus irgendeinem Grund nicht anwendbar sein, wird intern automatisch auf den Modus 'default'"default""default""default""default""default" umgeschaltet.

Mit dem Parameter InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation wird der gewünschte Interpolationsmodus für die Erstellung der Cube Maps gewählt. Es besteht die Wahlmöglichkeit zwischen bilinearer und bikubischer Interpolation für alle Modi von StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder. 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor" ist nur verfügbar wenn für StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder 'default'"default""default""default""default""default" oder 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi" gewählt ist.

Parallelisierung

Parameter

ImagesImagesImagesImagesImagesimages (input_object)  (multichannel-)image-array objectHImageHImageHImageArrayHImageXHobject (byte / uint2 / real)

Eingabebilder.

FrontFrontFrontFrontFrontfront (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Vordere Cube Map.

RearRearRearRearRearrear (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Hinterer Cube Map.

LeftLeftLeftLeftLeftleft (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Linke Cube Map.

RightRightRightRightRightright (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Rechte Cube Map.

TopTopTopTopToptop (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Obere Cube Map.

BottomBottomBottomBottomBottombottom (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Untere Cube Map.

CameraMatricesCameraMatricesCameraMatricesCameraMatricesCameraMatricescameraMatrices (input_control)  hom_mat2d-array HHomMat2D, HTupleHTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

(Array von) 3x3 projektiven Kameramatrizen, die die internen Kameraparameter bestimmen.

RotationMatricesRotationMatricesRotationMatricesRotationMatricesRotationMatricesrotationMatrices (input_control)  hom_mat2d-array HHomMat2D, HTupleHTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

Array von 3x3 Transformationsmatrizen, die die Rotation der Kamera im jeweiligen Bild bestimmen.

CubeMapDimensionCubeMapDimensionCubeMapDimensionCubeMapDimensionCubeMapDimensioncubeMapDimension (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Breite und Höhe der zu berechnenden Cube Maps.

Defaultwert: 1000

Restriktion: CubeMapDimension >= 0

StackingOrderStackingOrderStackingOrderStackingOrderStackingOrderstackingOrder (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong) (BSTR / Hlong) (char* / Hlong)

Modus des Eintragens der Bilder in das Mosaik.

Defaultwert: 'voronoi' "voronoi" "voronoi" "voronoi" "voronoi" "voronoi"

Wertevorschläge: 'blend'"blend""blend""blend""blend""blend", 'voronoi'"voronoi""voronoi""voronoi""voronoi""voronoi", 'default'"default""default""default""default""default"

InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Modus der Interpolation der Bilder.

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

Wertevorschläge: 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic"

Beispiel (HDevelop)

* For the input data to stationary_camera_self_calibration, please
* refer to the example for stationary_camera_self_calibration.
stationary_camera_self_calibration (4, 640, 480, 1, From, To, \
                                    HomMatrices2D, Rows1, Cols1, \
                                    Rows2, Cols2, NumMatches, \
                                    'gold_standard', \
                                    ['focus','principal_point'], \
                                    'true', CameraMatrix, Kappa, \
                                    RotationMatrices, X, Y, Z, Error)
gen_cube_map_mosaic (Images, Front, Left, Rear, Right, Top, Bottom, \
                     CameraMatrix, RotationMatrices, 1000, 'default', \
                     'bicubic')

* Alternatively, if kappa should be determined, the following calls
* can be made:
stationary_camera_self_calibration (4, 640, 480, 1, From, To, \
                                    HomMatrices2D, Rows1, Cols1, \
                                    Rows2, Cols2, NumMatches, \
                                    'gold_standard', \
                                    ['focus','principal_point','kappa'], \
                                    'true', CameraMatrix, Kappa, \
                                    RotationMatrices, X, Y, Z, Error)
cam_mat_to_cam_par (CameraMatrix, Kappa, 640, 480, CamParam)
change_radial_distortion_cam_par ('fixed', CamParam, 0, CamParOut)
gen_radial_distortion_map (Map, CamParam, CamParOut, 'bilinear')
map_image (Images, Map, ImagesRect)
gen_cube_map_mosaic (Images, Front, Left, Rear, Right, Top, Bottom, \
                     CameraMatrix, RotationMatrices, 1000, 'default', \
                     'bicubic')

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_cube_map_mosaicgen_cube_map_mosaicGenCubeMapMosaicgen_cube_map_mosaicGenCubeMapMosaicGenCubeMapMosaic den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration

Alternativen

gen_spherical_mosaicgen_spherical_mosaicGenSphericalMosaicgen_spherical_mosaicGenSphericalMosaicGenSphericalMosaic, gen_projective_mosaicgen_projective_mosaicGenProjectiveMosaicgen_projective_mosaicGenProjectiveMosaicGenProjectiveMosaic

Literatur

Lourdes Agapito, E. Hayman, I. Reid: „Self-Calibration of Rotating and Zooming Cameras“; International Journal of Computer Vision; vol. 45, no. 2; pp. 107--127; 2001.
Olivier Faugeras, Quang-Tuan Luong: „The Geometry of Multiple Images: The Laws That Govern the Formation of Multiple Images of a Scene and Some of Their Applications“; MIT Press, Cambridge, MA; 2001.

Modul

Matching


KlassenKlassenKlassenKlassen | | | | Operatoren