Name
image_to_world_planeT_image_to_world_planeImageToWorldPlaneimage_to_world_planeImageToWorldPlaneImageToWorldPlane — Rektifizieren eines Bildes durch Transformation in die Ebene z=0 eines
Weltkoordinatensystems.
Herror image_to_world_plane(Hobject Image, Hobject* ImageWorld, const HTuple& CameraParam, const HTuple& WorldPose, const HTuple& Width, const HTuple& Height, const HTuple& Scale, const HTuple& Interpolation)
HImage HImage::ImageToWorldPlane(const HTuple& CameraParam, const HTuple& WorldPose, const HTuple& Width, const HTuple& Height, const HTuple& Scale, const HTuple& Interpolation) const
HImageArray HImageArray::ImageToWorldPlane(const HTuple& CameraParam, const HTuple& WorldPose, const HTuple& Width, const HTuple& Height, const HTuple& Scale, const HTuple& Interpolation) const
void ImageToWorldPlane(const HObject& Image, HObject* ImageWorld, const HTuple& CameraParam, const HTuple& WorldPose, const HTuple& Width, const HTuple& Height, const HTuple& Scale, const HTuple& Interpolation)
HImage HImage::ImageToWorldPlane(const HTuple& CameraParam, const HPose& WorldPose, Hlong Width, Hlong Height, const HTuple& Scale, const HString& Interpolation) const
HImage HImage::ImageToWorldPlane(const HTuple& CameraParam, const HPose& WorldPose, Hlong Width, Hlong Height, const HString& Scale, const HString& Interpolation) const
HImage HImage::ImageToWorldPlane(const HTuple& CameraParam, const HPose& WorldPose, Hlong Width, Hlong Height, const char* Scale, const char* Interpolation) const
void HOperatorSetX.ImageToWorldPlane(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX** ImageWorld, [in] VARIANT CameraParam, [in] VARIANT WorldPose, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT Scale, [in] VARIANT Interpolation)
IHImageX* HImageX.ImageToWorldPlane(
[in] VARIANT CameraParam, [in] VARIANT WorldPose, [in] Hlong Width, [in] Hlong Height, [in] VARIANT Scale, [in] BSTR Interpolation)
static void HOperatorSet.ImageToWorldPlane(HObject image, out HObject imageWorld, HTuple cameraParam, HTuple worldPose, HTuple width, HTuple height, HTuple scale, HTuple interpolation)
HImage HImage.ImageToWorldPlane(HTuple cameraParam, HPose worldPose, int width, int height, HTuple scale, string interpolation)
HImage HImage.ImageToWorldPlane(HTuple cameraParam, HPose worldPose, int width, int height, string scale, string interpolation)
image_to_world_planeimage_to_world_planeImageToWorldPlaneimage_to_world_planeImageToWorldPlaneImageToWorldPlane rektifiziert ein Bild ImageImageImageImageImageimage durch
Transformation in die Ebene z=0 (Messebene) eines Weltkoordinatensystems. Das
resultierende Bild ImageWorldImageWorldImageWorldImageWorldImageWorldimageWorld weist weder radiale noch
perspektivische Verzerrungen auf; es entspricht einem Bild, das von einer
verzerrungsfreien Kamera aufgenommen wird, die senkrecht auf die Messebene im
Weltkoordinatensystem schaut. Das Weltkoordinatensystem wird gewählt, indem
man seine 3D-Lage in Kamerakoordinaten in WorldPoseWorldPoseWorldPoseWorldPoseWorldPoseworldPose übergibt. In
CameraParamCameraParamCameraParamCameraParamCameraParamcameraParam müssen die internen Kameraparameter übergeben werden
(siehe write_cam_parwrite_cam_parWriteCamParwrite_cam_parWriteCamParWriteCamPar für ihre Reihenfolge und das zu Grunde liegende
Kameramodell).
In vielen Fällen sind CameraParamCameraParamCameraParamCameraParamCameraParamcameraParam und WorldPoseWorldPoseWorldPoseWorldPoseWorldPoseworldPose das
Ergebnis einer vorherigen Kamerakalibrierung mit dem Operator
calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras. Ein Beispiel findet sich weiter unten.
Die Pixel-Position der linken oberen Ecke des Ergebnisbildes
ImageWorldImageWorldImageWorldImageWorldImageWorldimageWorld ist durch den Ursprung des Weltkoordinatensystems
festgelegt. Die Ausdehnung des Ergebnisbildes ImageWorldImageWorldImageWorldImageWorldImageWorldimageWorld kann durch
die Parameter WidthWidthWidthWidthWidthwidth, HeightHeightHeightHeightHeightheight und ScaleScaleScaleScaleScalescale gewählt
werden. Dabei sind WidthWidthWidthWidthWidthwidth und HeightHeightHeightHeightHeightheight in Pixel anzugeben.
Mit dem Parameter ScaleScaleScaleScaleScalescale kann die Größe eines Pixels im
transformierten Bild festgelegt werden. Hierbei gibt es zwei typische
Szenarien: Erstens kann das Bild so skaliert werden, dass Pixelkoordinaten im
transformierten Bild direkt in einer metrischen Einheit vorliegen, dass ein
Pixel also z.B. einem Mikrometer entspricht. Dies ist nützlich, falls im
transformierten Bild Messaufgaben durchgeführt werden sollen, deren
Ergebnisse dann automatisch in metrischen Einheiten vorliegen. Im
zweiten Szenario skaliert man das Bild so, dass sein Inhalt im
transformierten Bild in ähnlicher Größe vorliegt wie im Originalbild. Diese
Art der Skalierung ist z.B. günstig, wenn man im transformierten Bild
formbasiertes Matching anwenden will.
ScaleScaleScaleScaleScalescale entspricht dem Verhältnis gewünschte
Pixelgröße/ursprüngliche Einheit. Ein Pixelgröße von 1um heißt, dass ein
Pixel im transformierten Bild der Fläche 1um x 1um in der Messebene
entspricht. Die ursprüngliche Einheit ist durch die Koordinaten des
Kalibrierkörpers gegeben. Falls dies, wie bei der Standard-Kalibrierplatte,
Meter sind, ist es auch möglich, die gewünschte Einheit der Pixelkoordinaten
direkt durch 'm'"m""m""m""m""m", 'cm'"cm""cm""cm""cm""cm", 'mm'"mm""mm""mm""mm""mm", 'microns'"microns""microns""microns""microns""microns"
oder 'um'"um""um""um""um""um" anzugeben.
Der Parameter InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation gibt an, ob zwischen den Pixeln des
Eingabebildes bilinear interpoliert ('bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear") oder lediglich der
Grauwert des am nächsten liegenden Pixels ('nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor")
verwendet werden soll.
Sollen mehrere Bilder unter Verwendung derselben Parameter transformiert
werden, so ist die Kombination aus gen_image_to_world_plane_mapgen_image_to_world_plane_mapGenImageToWorldPlaneMapgen_image_to_world_plane_mapGenImageToWorldPlaneMapGenImageToWorldPlaneMap und
map_imagemap_imageMapImagemap_imageMapImageMapImage wesentlich effizienter als der Operator
image_to_world_planeimage_to_world_planeImageToWorldPlaneimage_to_world_planeImageToWorldPlaneImageToWorldPlane, da die Abbildungsvorschrift nur einmal berechnet
werden muss.
image_to_world_planeimage_to_world_planeImageToWorldPlaneimage_to_world_planeImageToWorldPlaneImageToWorldPlane kann auf OpenCL Geräten ausgeführt werden,
wenn das Eingangsbild die maximale Größe für Bildobjekte des ausgewählten
Gerätes nicht überschreitet. Das Ergebnis kann dabei geringfühgig von dem
auf der CPU berechneten abweichen.
- Unterstützt OpenCL Compute Devices.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf Tupelebene.
Interne Kameraparameter.
Parameteranzahl: CameraParam == 8 || CameraParam == 11 || CameraParam == 12
3D-Lage des Weltkoordinatensystems in
Kamerakoordinaten.
Parameteranzahl: 7
Breite des Ergebnisbildes in Pixel.
Höhe des Ergebnisbildes in Pixel.
ScaleScaleScaleScaleScalescale (input_control) number → HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)
Maßstab oder Dimension.
Defaultwert:
'm'
"m"
"m"
"m"
"m"
"m"
Wertevorschläge: 'm'"m""m""m""m""m", 'cm'"cm""cm""cm""cm""cm", 'mm'"mm""mm""mm""mm""mm", 'microns'"microns""microns""microns""microns""microns", 'um'"um""um""um""um""um", 1.0, 0.01, 0.001, 1.0e-6, 0.0254, 0.3048, 0.9144
Art der Interpolation.
Defaultwert:
'bilinear'
"bilinear"
"bilinear"
"bilinear"
"bilinear"
"bilinear"
Werteliste: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"
* perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, \
'all', FinalCamParam, NFinalPose, Errors)
* world coordinate system is defined by calibration plate in first image
FinalPose1 := NFinalPose[0:6]
* compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.0006, WorldPose)
* goal: rectify image
* first determine parameters such that the entire image content is visible
* and that objects have a similar size before and after the rectification
* -> transform image boundary into world plane, determine smallest
* rectangle around it
get_image_pointer1(Image, Pointer, Type, Width, Height)
gen_rectangle1 (ImageRect, 0, 0, Height-1, Width-1)
gen_contour_region_xld (ImageRect, ImageBorder, 'border')
contour_to_world_plane_xld(ImageBorder, ImageBorderWCS, FinalCamParam, \
WorldPose, 1)
smallest_rectangle1_xld (ImageBorderWCS, MinY, MinX, MaxY, MaxX)
* -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, PoseForEntireImage)
* -> determine the scaling factor such that the center pixel has the same
* size in the original and in the rectified image
* method: transform corner points of the pixel into the world
* coordinate system, compute their distances, and use their
* mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage, \
[Height/2, Height/2, Height/2+1], \
[Width/2, Width/2+1, Width/2], \
1, WorldPixelX, WorldPixelY)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[1], WorldPixelX[1], \
WorldLength1)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[2], WorldPixelX[2], \
WorldLength2)
ScaleForSimilarPixelSize := (WorldLength1+WorldLength2)/2
* -> determine output image size such that entire input image fits into it
ExtentX := MaxX-MinX
ExtentY := MaxY-MinY
WidthRectifiedImage := ExtentX/ScaleForSimilarPixelSize
HeightRectifiedImage := ExtentY/ScaleForSimilarPixelSize
* transform the image with the determined parameters
image_to_world_plane(Image, RectifiedImage, FinalCamParam, \
PoseForEntireImage, WidthRectifiedImage, \
HeightRectifiedImage, ScaleForSimilarPixelSize, \
'bilinear')
* perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, \
'all', FinalCamParam, NFinalPose, Errors)
* world coordinate system is defined by calibration plate in first image
FinalPose1 := NFinalPose[0:6]
* compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.0006, WorldPose)
* goal: rectify image
* first determine parameters such that the entire image content is visible
* and that objects have a similar size before and after the rectification
* -> transform image boundary into world plane, determine smallest
* rectangle around it
get_image_pointer1(Image, Pointer, Type, Width, Height)
gen_rectangle1 (ImageRect, 0, 0, Height-1, Width-1)
gen_contour_region_xld (ImageRect, ImageBorder, 'border')
contour_to_world_plane_xld(ImageBorder, ImageBorderWCS, FinalCamParam, \
WorldPose, 1)
smallest_rectangle1_xld (ImageBorderWCS, MinY, MinX, MaxY, MaxX)
* -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, PoseForEntireImage)
* -> determine the scaling factor such that the center pixel has the same
* size in the original and in the rectified image
* method: transform corner points of the pixel into the world
* coordinate system, compute their distances, and use their
* mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage, \
[Height/2, Height/2, Height/2+1], \
[Width/2, Width/2+1, Width/2], \
1, WorldPixelX, WorldPixelY)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[1], WorldPixelX[1], \
WorldLength1)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[2], WorldPixelX[2], \
WorldLength2)
ScaleForSimilarPixelSize := (WorldLength1+WorldLength2)/2
* -> determine output image size such that entire input image fits into it
ExtentX := MaxX-MinX
ExtentY := MaxY-MinY
WidthRectifiedImage := ExtentX/ScaleForSimilarPixelSize
HeightRectifiedImage := ExtentY/ScaleForSimilarPixelSize
* transform the image with the determined parameters
image_to_world_plane(Image, RectifiedImage, FinalCamParam, \
PoseForEntireImage, WidthRectifiedImage, \
HeightRectifiedImage, ScaleForSimilarPixelSize, \
'bilinear')
* perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, \
'all', FinalCamParam, NFinalPose, Errors)
* world coordinate system is defined by calibration plate in first image
FinalPose1 := NFinalPose[0:6]
* compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.0006, WorldPose)
* goal: rectify image
* first determine parameters such that the entire image content is visible
* and that objects have a similar size before and after the rectification
* -> transform image boundary into world plane, determine smallest
* rectangle around it
get_image_pointer1(Image, Pointer, Type, Width, Height)
gen_rectangle1 (ImageRect, 0, 0, Height-1, Width-1)
gen_contour_region_xld (ImageRect, ImageBorder, 'border')
contour_to_world_plane_xld(ImageBorder, ImageBorderWCS, FinalCamParam, \
WorldPose, 1)
smallest_rectangle1_xld (ImageBorderWCS, MinY, MinX, MaxY, MaxX)
* -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, PoseForEntireImage)
* -> determine the scaling factor such that the center pixel has the same
* size in the original and in the rectified image
* method: transform corner points of the pixel into the world
* coordinate system, compute their distances, and use their
* mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage, \
[Height/2, Height/2, Height/2+1], \
[Width/2, Width/2+1, Width/2], \
1, WorldPixelX, WorldPixelY)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[1], WorldPixelX[1], \
WorldLength1)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[2], WorldPixelX[2], \
WorldLength2)
ScaleForSimilarPixelSize := (WorldLength1+WorldLength2)/2
* -> determine output image size such that entire input image fits into it
ExtentX := MaxX-MinX
ExtentY := MaxY-MinY
WidthRectifiedImage := ExtentX/ScaleForSimilarPixelSize
HeightRectifiedImage := ExtentY/ScaleForSimilarPixelSize
* transform the image with the determined parameters
image_to_world_plane(Image, RectifiedImage, FinalCamParam, \
PoseForEntireImage, WidthRectifiedImage, \
HeightRectifiedImage, ScaleForSimilarPixelSize, \
'bilinear')
HImage Image, RectifiedImage;
HTuple NX, NY, NZ, NRow, NCol;
HTuple StartCamParam, NStartPose, FinalCamParam, NFinalPose, Errors;
HTuple FinalPose1, WorldPose, PoseForEntireImage;
HTuple Width, Height, Type, MinX, MinY, MaxX, MaxY;
HTuple UpperLeftX, UpperLeftY, UpperRightX, UpperRightY;
HTuple LowerLeftX, LowerLeftY, WorldLength1, WorldLength2;
HTuple ScaleForSimilarPixelSize, ExtentX, ExtentY;
HTuple WidthRectifiedImage, HeightRectifiedImage;
// perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, 'all',
&FinalCamParam, &NFinalPose, &Errors);
// world coordinate system is defined by calibration plate in first image
FinalPose1 = NFinalPose(0,6);
// compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.000073, &WorldPose);
// goal: rectify image
// first determine parameters such that the entire image content is visible
// and that objects have a similar size before and after the rectification
// -> transform image boundary into world plane, determine smallest
// rectangle around it
Image.GetImagePointer1(&Type, &Width, &Height);
HRegion ImageRect = HRegion::GenRectangle1(0, 0, Height-1, Width-1);
HXLDCont ImageBorder = ImageRect.GenContourRegionXld("border");
Hobject ImageBorderWCSObj;
contour_to_world_plane_xld(ImageBorder.Id(), &ImageBorderWCSObj,
FinalCamParam, WorldPose, 1);
HXLDArray ImageBorderWCS(ImageBorderWCSObj);
MinY = ImageBorderWCS.SmallestRectangle1Xld(&MinX, &MaxY, &MaxX);
// -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, &PoseForEntireImage);
// -> determine the scaling factor such that the center pixel has the same
// size in the original and in the rectified image
// method: transform corner points of the pixel into the world
// coordinate system, compute their distances, and use their
// mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage,
Height/2, Width/2,
1, &UpperLeftX, &UpperLeftY);
image_points_to_world_plane(FinalCamParam, PoseForEntireImage,
Height/2, Width/2+1,
1, &UpperRightX, &UpperRightY);
image_points_to_world_plane(FinalCamParam, PoseForEntireImage,
Height/2+1, Width/2,
1, &LowerLeftX, &LowerLeftY);
distance_pp(UpperLeftY, UpperLeftX, UpperRightY, UpperRightX,
&WorldLength1);
distance_pp(UpperLeftY, UpperLeftX, LowerLeftY, LowerLeftX,
&WorldLength2);
ScaleForSimilarPixelSize = (WorldLength1+WorldLength2)/2;
// -> determine output image size such that entire input image fits into it
ExtentX = MaxX-MinX;
ExtentY = MaxY-MinY;
WidthRectifiedImage = ExtentX/ScaleForSimilarPixelSize;
HeightRectifiedImage = ExtentY/ScaleForSimilarPixelSize;
// transform the image with the determined parameters
RectifiedImage =
Image.ImageToWorldPlane(FinalCamParam, PoseForEntireImage,
WidthRectifiedImage, HeightRectifiedImage,
ScaleForSimilarPixelSize, "bilinear");
* perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, \
'all', FinalCamParam, NFinalPose, Errors)
* world coordinate system is defined by calibration plate in first image
FinalPose1 := NFinalPose[0:6]
* compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.0006, WorldPose)
* goal: rectify image
* first determine parameters such that the entire image content is visible
* and that objects have a similar size before and after the rectification
* -> transform image boundary into world plane, determine smallest
* rectangle around it
get_image_pointer1(Image, Pointer, Type, Width, Height)
gen_rectangle1 (ImageRect, 0, 0, Height-1, Width-1)
gen_contour_region_xld (ImageRect, ImageBorder, 'border')
contour_to_world_plane_xld(ImageBorder, ImageBorderWCS, FinalCamParam, \
WorldPose, 1)
smallest_rectangle1_xld (ImageBorderWCS, MinY, MinX, MaxY, MaxX)
* -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, PoseForEntireImage)
* -> determine the scaling factor such that the center pixel has the same
* size in the original and in the rectified image
* method: transform corner points of the pixel into the world
* coordinate system, compute their distances, and use their
* mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage, \
[Height/2, Height/2, Height/2+1], \
[Width/2, Width/2+1, Width/2], \
1, WorldPixelX, WorldPixelY)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[1], WorldPixelX[1], \
WorldLength1)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[2], WorldPixelX[2], \
WorldLength2)
ScaleForSimilarPixelSize := (WorldLength1+WorldLength2)/2
* -> determine output image size such that entire input image fits into it
ExtentX := MaxX-MinX
ExtentY := MaxY-MinY
WidthRectifiedImage := ExtentX/ScaleForSimilarPixelSize
HeightRectifiedImage := ExtentY/ScaleForSimilarPixelSize
* transform the image with the determined parameters
image_to_world_plane(Image, RectifiedImage, FinalCamParam, \
PoseForEntireImage, WidthRectifiedImage, \
HeightRectifiedImage, ScaleForSimilarPixelSize, \
'bilinear')
* perform camera calibration (with standard calibration plate)
camera_calibration(NX, NY, NZ, NRow, NCol, StartCamParam, NStartPose, \
'all', FinalCamParam, NFinalPose, Errors)
* world coordinate system is defined by calibration plate in first image
FinalPose1 := NFinalPose[0:6]
* compensate thickness of plate
set_origin_pose(FinalPose1, 0, 0, 0.0006, WorldPose)
* goal: rectify image
* first determine parameters such that the entire image content is visible
* and that objects have a similar size before and after the rectification
* -> transform image boundary into world plane, determine smallest
* rectangle around it
get_image_pointer1(Image, Pointer, Type, Width, Height)
gen_rectangle1 (ImageRect, 0, 0, Height-1, Width-1)
gen_contour_region_xld (ImageRect, ImageBorder, 'border')
contour_to_world_plane_xld(ImageBorder, ImageBorderWCS, FinalCamParam, \
WorldPose, 1)
smallest_rectangle1_xld (ImageBorderWCS, MinY, MinX, MaxY, MaxX)
* -> move the pose to the upper left corner of the surrounding rectangle
set_origin_pose(WorldPose, MinX, MinY, 0, PoseForEntireImage)
* -> determine the scaling factor such that the center pixel has the same
* size in the original and in the rectified image
* method: transform corner points of the pixel into the world
* coordinate system, compute their distances, and use their
* mean as the scaling factor
image_points_to_world_plane(FinalCamParam, PoseForEntireImage, \
[Height/2, Height/2, Height/2+1], \
[Width/2, Width/2+1, Width/2], \
1, WorldPixelX, WorldPixelY)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[1], WorldPixelX[1], \
WorldLength1)
distance_pp(WorldPixelY[0], WorldPixelX[0], WorldPixelY[2], WorldPixelX[2], \
WorldLength2)
ScaleForSimilarPixelSize := (WorldLength1+WorldLength2)/2
* -> determine output image size such that entire input image fits into it
ExtentX := MaxX-MinX
ExtentY := MaxY-MinY
WidthRectifiedImage := ExtentX/ScaleForSimilarPixelSize
HeightRectifiedImage := ExtentY/ScaleForSimilarPixelSize
* transform the image with the determined parameters
image_to_world_plane(Image, RectifiedImage, FinalCamParam, \
PoseForEntireImage, WidthRectifiedImage, \
HeightRectifiedImage, ScaleForSimilarPixelSize, \
'bilinear')
Sind die Parameterwerte korrekt, dann liefert
image_to_world_planeimage_to_world_planeImageToWorldPlaneimage_to_world_planeImageToWorldPlaneImageToWorldPlane den Wert 2 (H_MSG_TRUE).
create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose,
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration,
hand_eye_calibrationhand_eye_calibrationHandEyeCalibrationhand_eye_calibrationHandEyeCalibrationHandEyeCalibration,
set_origin_poseset_origin_poseSetOriginPoseset_origin_poseSetOriginPoseSetOriginPose
gen_image_to_world_plane_mapgen_image_to_world_plane_mapGenImageToWorldPlaneMapgen_image_to_world_plane_mapGenImageToWorldPlaneMapGenImageToWorldPlaneMap,
map_imagemap_imageMapImagemap_imageMapImageMapImage
contour_to_world_plane_xldcontour_to_world_plane_xldContourToWorldPlaneXldcontour_to_world_plane_xldContourToWorldPlaneXldContourToWorldPlaneXld,
image_points_to_world_planeimage_points_to_world_planeImagePointsToWorldPlaneimage_points_to_world_planeImagePointsToWorldPlaneImagePointsToWorldPlane
Calibration