Up | ObjectPosition3D - 105 | CreatePointCloud3D - 109 | ReferenceOnPlane3D - 143 | SphereFit3D - 141 | ModifyReference - 131 | ReferenceDiff3D - 126 | MapTo3D - 125 | ExtractMap3D - 122 | PlaneFit3D - 121 | CylinderFit3D - 112 | ChangeReference3D - 96 | Locate3D - 97 | MoveReference3D - 107 | ExternalReference3D - 95 | Calibrator3D - 155 | LineFromPoints3D - 98 | ReferenceFromPoints3D - 99 | Angle3D - 100 | NearestPointOnLine3D - 101 | ExternalPoint3D - 103 | ExternalLine3D - 104 | Point2Dfrom3D - 106 | GlobalPosition3D - 108 | Point3Dfrom2D - 115 | PointFromLines3D - 116 | ReferenceFromLines3D - 117 | LaserProfiler3D - 166 | NearestPointOnPlane3D - 118 | ChangePointReference3D - 119 | ChangeLineReference3D - 120 | PointOnLine3D - 130 | MoveLine3D - 138 | MovePoint3D - 137 | PlanePlaneIntersect3D - 139 | PlaneLineIntersect3D - 142 | Combine3D- 161

Shortcuts | Commands | Release Notes
 

  

 
ExternalReference3D - 95
The ExternalReference3D is used to do 3D camera calibration in Scorpion.

Below a typical calibration object is shown. When calibrating a stereo vision system with two or more cameras the following procedure is followed:

  • Create a common Field of View - FOV for all cameras
  • 2D Calibrate each camera with Calibrator
  • Place the calibration object in the center of the FOV
  • Locate six or more known points on the calibration object with each camera
  • Create one ExternalReference3D for each camera
  • Populate each instance with the corresponding 2D and 3D coordinate pairs

The result is a Scorpion 3D model, which maps points in 3D to a 2D calibrated plane. This is used as input to other 3D tools.

Below seven  points are located automatically using eight LineFinders and seven PointFromLines instances on a 3D calibration object. The blue dots indicates the PointFromLines constructed corners.




Setup

 

Coordinate System

Reference - Incoming 2D Reference system selection

Global Position - optional 3D offset

Tool - selects GlobalPosition3D instance

Note: The globalPosition3D instance must be connected to all cameras in a Stereo Vision setup

Axis size - defines the length of the 3D axis visualisation

Note: Setting the length can be used to describe the actual 3D FOV


Points 1-18
- describes 3D to 2D conversion. There are three pages, with points 1-6, 7-12 and 13-18. These can be used simultaneously or separately, depending on the application.

Points

Active - activate/deactivate point

3D - real coordinates of the calibration object (X, Y, Z)

2D - screen points (X, Y)

Max deviation - indicates the point with maximum deviation - this is a possible candidate for deactivation

Paste/Copy buttons - transfer a point from/to the clipboard

Import points a-b - Instantly imports current tool values as static values. See below under Imports.

Inactive points a-b - deactivate all points on the current page

Active points a-b - activate all points on the current page

Imports

You can set up tools to provide (2D) points to your calibration. For example a blob tool, or a line intersection tool (as in the sample picture above). When the tool has a correct value, you can import the current value into your ExternalReference3D as a static number.

Active - activate/deactivate import of this point (when the Import button is clicked)

Tool - the tool providing the 2D point

Result - the point result from the selected tool

Import points a-b - Same as the import button under Points

Inactive imports a-b - deactivate all imports on the current page

Active imports a-b - activate all imports on the current page

Hints

RMS value shall be in the same order of magnitude of the pixel size.

Verify the consistency of the relative camera positions from several ExternalReference3D when working with stereo-vision.


Visualisation

Axes The established 3D coordinate system


Results


A11...A43 The 4x3 projection matrix from 3D to 2D coordinates
f focal-length
l, v_x, v_y, b1, b2 These are internal camera parameters resulting from decomposition of the matrix A, in general not interesting to the user
T_x, T_y, T_z The position of the camera in relation to the object coordinate system
Dev A measure of decomposition error
Number of points 3D calibration points used
RMS Projection accuracy, in object coordinates (usually mm)


 
ExecuteCmd support (see also executeCmd)
 

Command

Parameters

Return values

Comments

Import   ok, None Complete import all 2D and 3D points
Import2D   ok, None Complete import all 2D points
Import3D   ok, None Complete import all 3D points
Import POINT=<n> ok,None Import a single point (1-18), if import is active for that point. Fails if the tool's config dialog is open.
Import PAGE=<n> ok,None Import points on page n (1-3). Only points with import active are imported. If the tool's config dialog is open, it is updated.
Compute   ok,None computes new referencesystem, normally followed due to above commands
SaveCalib CAMERA=<0..n-1>
FILENAME=<value>
UPDATE=0/1
True/False Save 3D calibration to file. If CAMERA is omitted, configured camera number will be used. If FILENAME is omitted, profile name and version will be used. If UPDATE<>0, Profilename, version and camera name will be updated due to 'Refresh' button in configuration dialog.
LoadCalib FILENAME=<value>
CAMERA=<0..n.1>
True/False Loads 3D calibration from given file. If CAMERA is omitted configured camera number will be used.
       
       

NOTE: Import commands overrides calibration from file option,  changes to using origin Reference

Example 1: Set 2D points from Python

t1 = GetTool(':1-3DRef') # get camera calibration object

# create 2D points from six PointFromLines tools
s1 = '('
for p in range(1,7):
 s1 = s1+'(%.5f;%.5f)'%(GetValue('1-pnt'+str(p)+'.Point_x'),GetValue('1-pnt'+str(p)+'.Point_y'))
s1 = s1+')'

t1.setConfigValue('2Dpoints',s1)
 

Scorpion Vision Version XV  : Build 764 - Date: 20200529
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2020 Tordivel AS.