This application relates to machine vision systems and more particularly to systems and methods for calibrating vision systems having multiple camera assemblies oriented to image a scene from different points of view using a calibration object or “target”.
In manufacturing and assembly processes, it is often desirable to analyze an object surface to determine the nature of features and/or irregularities. The displacement (or “profile”) of the object surface can be determined using a machine vision system (also termed herein “vision system”) in the form of a laser displacement sensor (also termed a laser beam “profiler”). A laser displacement sensor captures and determines the (three dimensional) profile of a scanned object surface using a planar curtain or “fan” of a laser beam at a particular plane transverse to the beam propagation path. In a conventional arrangement, a vision system camera assembly is oriented to view the plane of the beam from outside the plane. This arrangement captures the profile of the projected line (e.g. extending along the physical x-axis) on the object surface, which, due to the baseline (i.e. the relative spacing along the y-axis) between the beam (sometimes characterized as a “fan”) plane and the camera causes the imaged line to appear as varying in the image y axis direction as a function of the physical z-axis height of the imaged point (along the image x axis). This deviation represents the profile of the surface. Laser displacement sensors are useful in a wide range of inspection and manufacturing operations where the user desires to measure and characterize surface details of a scanned object via triangulation. One form of laser displacement sensor uses a vision system camera having a lens assembly and image sensor (or “imager”) that can be based upon a CCD or CMOS design. The imager defines a predetermined field of grayscale or color-sensing pixels on an image plane that receives focused light from an imaged scene through a lens.
In a typical arrangement, the displacement sensor(s) and/or object are in relative motion (usually in the physical y-coordinate direction) so that the object surface is scanned by the sensor(s), and a sequence of images are acquired of the laser line at desired spatial intervals—typically in association with an encoder or other motion measurement device (or, alternatively, at time based intervals). Each of these single profile lines is typically derived from a single acquired image. These lines collectively describe the surface of the imaged object and surrounding imaged scene and define a “range image” or “depth image”.
Other camera assemblies, know to those of skill, can also be employed to capture a 3D image (range image) of an object in a scene, such as stereoscopic cameras, time-of-flight cameras, LIDAR-based cameras, etc. The term range image is used to characterize an image (a two-dimensional array of values) with pel values characterizing Z height at each location, or characterizing that no height is available at that location. The term range image is alternatively used to refer to generic 3D data, such as 3D point cloud data, or 3D mesh data. The term range and gray image is used to characterize an image with pel values characterizing both Z height and associated gray level at each location, or characterizing that no height is available at that location, or alternatively a range and gray image can be characterized by two corresponding images—one image characterizing Z height at each location, or characterizing that no Z height is available at that location, and one image characterizing associated gray level at each location, or characterizing that no gray level is available at that location. The term range image is alternatively used to refer to range and gray image, or 3D point cloud data and associated gray level data, or 3D mesh data and associated gray level data. For example, structured light systems, stereo vision systems, DLP metrology, and other arrangements can be employed. These systems all generate an image that provides a height value (e.g. z-coordinate) to pixels.
A 3D range image generated by various types of camera assemblies (or combinations thereof) can be used to locate and determine the presence and/or characteristics of particular features on the object surface. In certain vision system implementations, such as the inspection of circuit boards, a plurality of displacement sensors (e.g. laser profilers) are mounted together to extend the overall field of view (FOV) (wherein the term “field of view” refers to measurement range) of the vision system so as to fully image a desired area of the object (e.g. its full width) with sufficient resolution. In the example of a laser profiler, the object moves in relative motion with respect to the camera(s) so as to provide a scanning function that allows construction of a range (or, more generally a “3D”) image from a sequence of slices acquired at various motion positions. This is often implemented using a conveyor, motion stage, robot end effector or other motion conveyance. This motion can be the basis of a common (motion) coordinate space with the y-axis defined along the direction of “scan” motion.
It is often highly challenging to calibrate all sensors to a common coordinate space, particularly where the sensors are arranged to image opposing sides of an object under inspection (i.e. above and below the object), so as to accurately measure opposite sides of an object, such as for thickness measurements. Such measurements require at least two sensors—one measuring each opposing side, and, furthermore, such measurements further require “field calibration” to align the sensors' measurements. Accurate calibration can be achieved by using an accurate target object (presumably, measured to the sensor's accuracy). However, a disadvantage to relying on an accurate target is that the field calibration (and all subsequent measurements) are limited by the accuracy to which the target is measured. This invention, in contrast, achieves field calibration to the accuracy of the sensor using a “mostly inaccurate object”.
This invention overcomes disadvantages of the prior art by providing an easy-to-manufacture, easy-to-analyze calibration object which combines measurable and repeatable, but not necessarily accurate, 3D features—such as a two-sided calibration object/target in (e.g.) the form of a frustum, with a pair of accurate and measurable features, more particularly parallel faces separated by a precise specified thickness, so as to provide for simple field calibration of opposite-facing DS sensors. Illustratively, a composite calibration object can be constructed, which includes the two-sided frustum that has been sandblasted and anodized (to provide measurable, repeatable features), with a flange whose above/below parallel surfaces have been ground to a precise specified thickness. The 3D corner positions of the two-sided frustum are used to calibrate the two sensors in X and Y, but cannot establish absolute Z without accurate information about the thickness of the two-sided frustum; the flange provides the absolute Z information.
In an illustrative embodiment a calibration target is provided, which includes a base defining a first side and an opposing second side. A first three-dimensional element projects from the first side, and this first three-dimensional element has a first top. A second three-dimensional element projects from the second side, and this second three-dimensional element has a second top. A first plane is located relative to the first side and a second plane is located relative to the second side. The first plane and the second plane are substantially parallel, based upon a machining process that uses the first top face as a basis for forming the second top face with the machining process. Illustratively, the first plane and the second plane are located on at least one of (a) a flange extending from the base, (b) at least a portion of the base, and (c) the first top and the second top, respectively. The first plane and the second plane can also have a predetermined thickness therebetween, and can be formed by a machining process in which the first plane is the basis for machining the second plane. At least one of the first three-dimensional element and the second three-dimensional element comprises a frustum. The first three-dimensional element is similar in shape and size to the second three dimensional element and the first three-dimensional element is centered about a common z-axis with respect to the second three dimensional element. In this embodiment, each frustum is discretely identified by an adjacent number, in which even numbers are located on one of the first side and the second side and odd numbers are located on the other of the first side and the second side. Illustratively, the machining process is arranged to define a predetermined spacing between the first plane and the second plane. More particularly, at least one of the first plane and the second plane is one of ground and planed. Additionally, at least one of the first element and the second element can define a textured surface that diffuses incident light thereon, for example, based upon sandblasting or beadblasting, anodizing, etc. The base can include a discrete first indicia formed adjacent to the first three-dimensional element and a discrete second indicia formed adjacent to the second three-dimensional element. These indicia can be molded, etched, printed or adhered (e.g. labels) defining 2D or 3D letters, numbers and/or symbols. In an embodiment, the target can also include, (a) a plurality of first three-dimensional elements projecting from the first side, in which the first three-dimensional elements respectively have a first top face defining a plane, and (b) a plurality of a second three-dimensional elements projecting from the second side, in which the second three-dimensional elements respectively have a second top face defining a plane.
In another exemplary embodiment, a method for calibrating a vision system having at least a first 3D sensor and a second 3D sensor, respectively imaging each of opposing sides of an object in a scene, is provided. Tis method includes the step of positioning, within the scene, a calibration target having (a) a first three-dimensional element projecting from the first side. The first three-dimensional element has a first top face defining a plane and (b) a second three-dimensional element projecting from the second side. The second three-dimensional element has a second top face defining a plane. The first top face and the second top face are substantially parallel, based upon a machining process that uses the first top face as a basis for forming the second top face with the machining process. The method also includes the step of acquiring a first image of the first three-dimensional element with the first camera assembly and a second image of the second three-dimensional element with the second camera assembly. Based upon at least the first image and the second image, the method locates features, and with the features, determines calibration parameters for the first camera assembly and the second camera assembly. The determination of calibration parameters can comprise the use of the substantially parallel relationship and a predetermined distance value between the top face and the bottom face as a portion of a calibration computation. The method can locate features of a first plurality of frusta arranged on the first side and a second plurality of frusta arranged on the second side, and/or can determine discrete indicia adjacent to respective of the frusta in the first plurality of frusta and the second plurality of frusta. The method can also generate calibration parameters that map local coordinate spaces of at least the first 3D sensor and the second 3D sensor to a common coordinate space.
In another exemplary embodiment a system and method for constructing a calibration target for use in a vision system having 3D sensors arranged to image each of opposing sides of an object in a scene is provided. A calibration target base is provided, which defines a first side and an opposing second side. At least one first three-dimensional element is formed, projecting from the first side, in which the first three-dimensional element has a first top. At least one second three-dimensional element is also formed, projecting from the second side, in which the second three-dimensional element has a second top. On the calibration target, a first plane and a second plane parallel to the first plane, are machined by mounting the calibration target in registration with the first plane in the surfacing device, so that the first plane and the second plane are substantially parallel and at a predetermined spacing apart. Illustratively, the first plane is located on the first top and the second plane is located on the second top. The first three-dimensional element can be a first frustum and the second three-dimensional element can be a second frustum. Additionally, a first discrete identifier adjacent to the first frustum and a second discrete identifier adjacent to the second frustum can be applied to the target (e.g. on the base).
The invention description below refers to the accompanying drawings, of which:
I. System Overview
By way of non-limiting example the depicted, exemplary laser displacement sensors 110, 112, 114 and 116 of the arrangement 100 consist of an image sensor (or imager) S and a separate laser illuminator generates a plane LP of laser light that is characterized as a “structured” illumination source in that it generates a specific optical effect on the surface of the object under inspection. The projected laser light plane LP projects a line LL on a portion of the underlying object 130 that is imaged. The laser plane LP is oriented to reside in a plane at a non-parallel (acute) angle relative to the optical axis OA of the imager optics O. In this manner, the image characterizes height deviations (variations in the local z-axis) on the surface as an offset in the line LL—generally along the local y-axis direction where the x-axis represents the direction of extension of the line LL along the surface. Each 3D sensor 110, 112, 114 and 116 inherently defines its own local coordinate space. This local coordinate space, associated with each 3D sensor, is potentially misaligned relative to the coordinate space of another one of the sensors.
Notably, the calibration of each individual 3D sensor is significantly accurate in terms of the relationship between displacement of the projected laser line LL along the local x-axis versus the local y-axis and the relative height of the imaged surface along the local z-axis. In many implementations, such accuracy can be measured in the micron or sub-micron level. Hence, the system and method herein can rely upon this inherent accuracy in making certain assumptions that speed and simplify calibration of the 3D sensors with respect to a common coordinate space. In the depicted exemplary arrangement of
The object 120 shown in
Motion My of the conveyor/stage 130 can be tracked by a motion encoder within the conveyor/stage (or by another motion sensing device, including a visual motion sensor that tracks movement of features (e.g. tick marks on the conveyor/stage) through the FOV of one or more sensors. The encoder signal (motion data) 158 as well as image data (dashed links 168) acquired by the sensors 110, 112, 114, 116, are provided to a vision process(or) 170. The processor 170 can be integrated in one or more of the sensor assemblies, or as depicted, can be located on a separate computing device 180 having appropriate user interface (e.g. mouse 182, keyboard 184) and display functions (screen and/or touchscreen 186). The computing device 180 can comprise a server, PC, laptop, tablet, smartphone or purpose-built processing device, among other types of processors with associated memory, networking arrangements, data storage, etc., that should be clear to those of skill.
The vision system process(or) 170 can include a variety of functional software processes and modules. The processes/modules can include various vision tools 172, such as feature detectors (e.g. edge detectors, corner detectors, blob tools, etc.). The vision system process(or) 170 further includes a calibration process(or) 174 that carries out the various functions of the system and method, and optionally, can include a grayscale rendering process(or) 176 that allows 3D images of objects acquired by the system to be rendered into a visible grayscale (and/or color-based) version of the object.
The mechanism for mounting the 3D sensors with respect to the imaged scene is highly variable. In an embodiment a rigid overlying beam is used. It is desirable to limit vibration, as such vibration introduces inaccuracy to the calibrated system.
There are a variety of advantages to arranging a plurality of side-by-side sensors, all calibrated to a common coordinate space. Reference is made to
Likewise, as depicted in
Notably, adjacent 3D sensors are mounted at an offset (at least) along the y-axis direction as indicated by the offset Yo1, Yo2 (from dashed line 190) of sensors 110, 114 with respect to sensors 112, 116. This offset ensures that there is no cross-talk or interference between the laser lines of each sensor. Each sensor's image is acquired separately and, as described below, is subsequently stitched together during the calibration process. Likewise, it is contemplated that each projected laser line LL, overlap at least one other line along the x-axis. This ensures that the entire surface of the object is fully imaged. As also described below, overlaps are aligned by the system and method during the stitching step. To further ensure that every portion of the object is viewed from both sides, thereby reducing opportunities for occlusion,
With reference now to
II. Definitions
Before discussing the details of the calibration system and method, the following definitions are provided to assist in understanding the concepts and terms presented herein:
III. Calibration Procedure
Reference is now made to
Next, in step 620, the procedure 600 automatically computes acquisition parameters by performing the illustrative setup procedure and analyzing measurements. By automatic, it is meant that the setup is commanded by a user in a manner that minimizes the need for particular numerical or parametric input, rendering the setup and calibration process relatively “user-friendly” and free-of the need of significant knowledge or training. Such actions as computing parameters and transforms between coordinate spaces, identifying and measuring features on calibration objects, and the like, are desirably self-contained (and invisible to the user) within the algorithms/processes of the system. As described below, the system and method allows for straightforward operation by a user through navigation of a series of prompts on associated GUI screens.
In step 630 of procedure 600, the user arranges the calibration object in a manner that allows it to be “scanned” (i.e. imaged by the one or more of the sensor(s)) (note also that the terms “scanned” and “imaged” refer to being measured) during motion of the conveyance a collection of 3D (range) images acquired from one or more displacement sensors (where all of the acquisitions involve the same conveyance) in a plurality of orientations with respect to the FOV(s) of the sensor(s). Note that the scans can alternatively output generic 3D data, and are not limited to particular range images. In an alternate embodiment, the 3D sensor calibration process can acquire and employ 3D point cloud data, instead of 3D (range) image data. With reference to
As part of the first scan, and as described further in
It is expressly contemplated that the measurement step(s) (i.e. the first “scan” herein) can be omitted in various embodiments where the measurements of 3D features are available from a data file—for example based upon factory-provided data for the calibration object and/or a coordinate measuring machine (CMM) based specification of the object. In such cases, the measurement data is provided to the calibration step described below for use in the concurrent calibration of the 3D sensors.
In step 640 of the procedure 600 (
Referring to
With reference to the definitions above, the measured feature positions Mscan,sensor,subobject,feature are measured in OriginalSensor3D coordinates. These are the measured feature positions of the calibration subobjects detected by the feature detector for each of 3D sensors for each of the scans.
With reference now to step 650 of the procedure 600 (
Calibration object physical feature positions Ffrusta,feature
Object3DFromPhys3DPose=p
OriginalSensorXZ3DFromPhys3D Sensor=i
MotionVectorInPhys3D
Note that, for each sensor i, OriginalSensor3DFromPhys3DSensor=i is computed by combining the x and z axes of OriginalSensorXZ3DFromPhys3DSensor=i with they axis of MotionVectorInPhys3D. It follows:
Note, in some embodiments, for selected sensors, where the vector cross product of the selected sensor's X and Z coordinate axes has a negative dot product with the measured y-coordinate motion direction, the negative of the MotionDirectionInPhys3D is treated as the y axis for that some sensor's OriginalSensorXZ3D. The calibration object physical feature positions Ffrusta,feature are characterized by 3D points (x,y,z) for each feature. All but the first three feature positions are characterized by three numbers. Note that the first three feature positions herein illustratively define a canonical coordinate space, and, as such, their values are constrained. The feature points define a canonical coordinate space so that the Phys3D coordinate space constrains the feature pose; otherwise, if the feature positions were unconstrained, then the Phys3D coordinate space would be redundant with respect to the object coordinate space because the Phys3D coordinate space could be traded off against the feature positions. Illustratively, the first three calibration feature vertex positions are constrained (so that there are no redundant degrees of freedom). For example, the first vertex position is (0,0,0). The second vertex position is (x1,0,0) and the third vertex position is (x2,y2,0). In this manner, the calibration feature object illustratively defines a reference plane for further calibration computation steps.
Except for the first pose, p==0, the object poses Object3DFromPhys3DPose=p each have six degrees of freedom (since they characterize 3D rigid transforms). Each object pose Object3DFromPhys3DPose=p is characterized by three-value quaternion, and an identifier specifying which quaternion value is 1 (or −1), and a 3D vector characterizing the 3D translation. The first pose is constrained to be the identity transform so that the Phys3D coordinate space is not redundant (where, illustratively, gradient descent solvers have difficulty when there are redundant degrees of freedom). Three value quaternions characterize three of the four quaternion values where the characterization also includes an identifier which says which quaternion is fixed (to either +1 or −1) (Quaternions are classically characterized by four homogeneous values where p2+q2+r2+s2==1, and more generally, unit quaternions are used to represent 3D rotations, as is well known in the art==1). The use of three quaternion values and an identifier to characterize the 3D rotation is known to those of skills. By way of useful background information refer to U.S. Pat. No. 8,111,904, entitled METHODS AND APPARATUS FOR PRACTICAL 3D VISION SYSTEM, by Aaron S. Wallack, et al., the teachings of which are incorporated herein by reference.
The sensor poses OriginalSensorXZ3DFromPhys3DSensor=I are each characterized by eight (8) values, including an x scale and a y scale, as well as a rigid transform. In an embodiment, each 3D sensor pose OriginalSensorXZ3DFromPhys3DSensor is characterized by a 3D vector for the x axis and a 2D vector for the z axis (where one of the coefficients is derived from the x axis and the two components of the z axis to arrive at a dot-product of 0 and an identifier saying which value the z axis is missing), and the y axis is computed as the unit length cross product of the z axis and the x axis, and the translation is a 3D vector characterized by three numbers. In another embodiment, each 3D sensor pose OriginalSensorXZ3DFromPhys3DSensor is characterized by a three-value quaternion, an identifier specifying which quaternion value is 1 (or −1), a 3D vector characterizing the 3D translation, and two additional numbers (one number for x scale and one number for z scale). In addition, the 3D vector MotionVectorInPhys3D has three independent degrees of freedom, and is characterized by three numbers.
In an embodiment, the 3D sensor calibration parameters can be estimated via least squares analysis. In an alternate embodiment, the 3D sensor calibration parameters can be estimated via sum of absolute differences. In another embodiment, the 3D sensor calibration parameters are estimated via minimizing the maximum error. Other numerical approximation techniques for estimating calibration parameters should be clear to those of skill. For an embodiment that estimates the calibration using least squares analysis for each measured feature position, the system computes its estimated feature position based on the parameters and then computes the difference between the estimated feature position and the corresponding measured feature position. The system then computes the square of the length of that difference (e.g. by dot-producting that difference vector with itself). All squared differences are then summed to compute a sum-of-squared differences (including contributions from all measured feature positions). This approach assumes that the parameters which induce the minimum sum-of-squares difference is the optimal 3D sensor calibration. Least squares analysis assumes that there is one particular set of parameters which induces the minimum squared error. For an embodiment employing the sum of absolute differences, the total error is computed as the sum of the absolute differences, and the parameters which induce the minimum sum of absolute differences provides an optimal 3D sensor calibration. For an embodiment employing the minimized maximum error, the parameters which induce the minimum maximum discrepancy provide optimal 3D sensor calibration.
Least squares analysis characterizes the sum squared error by an error function of the parameters given the measured feature points i.e., E( . . . |M)=E(Calibration object physical feature positions Ffrusta,feature [0 . . . X1], Object3DFromPhys3DPose=p, [0 . . . X2], OriginalSensorXZ3DFromPhys3DSensor=I [0 . . . X3], MotionVectorInPhys3D|Mscan,sensor,subobject,feature) (the nomenclature [0 . . . num X] signifies that the error function includes multiple instances of each set of variables—one for each of the unknowns and the nomenclature “|M” signifies that the error function is a function of the measured features, M, but those measurements are not variables). Iterative methods are used to find the parameters which minimize E( . . . |M). The parameters which induce the minimum error characterizes the 3D sensor calibration.
In various embodiments, the user specifies (in an embodiment, using the GUI, in other embodiments, via a stored file, and in further embodiments, via information encoded in the scene which is extracted from 3D data in a scan) the calibration object feature positions and these values are used, but not estimated. In these embodiments, the error function depends on the measured feature positions and the specified feature positions, but those measurements are not variables . . . , E( . . . |M,F)=E(Object3DFromPhys3Dpose=p, [0 . . . X1], OriginalSensorXZ3DFromPhys3DSensor=I [0 . . . X2], MotionVectorInPhys3D|Mscan,sensor,subobject,feature, Ffrusta,feature)
The estimated feature position can be computed in accordance with the following illustrative steps. Given a 3D feature position Ffrusta,feature (specified in Object3D coordinates) corresponding to scan pose p and sensor i, the first step is to compute that feature position in Phys3D coordinates by mapping it using the inverse of the Object3DFromPhys3DPose=p transform to compute FPhys3Dfrusta,feature:
FPhys3Dfrusta,feature=(Object3DFromPhys3DPose=p)−1*Ffrusta,feature.
In the next step, the system computes the intersection plane in Phys3D, which involves mapping the sensorXZ's origin to Phys3D coordinates and mapping its y-axis (normal to its plane) to Phys3D coordinates.
SensorXZPhys3Dorigin=(OriginalSensorXZ3DFromPhys3DSensor=I)−1*(0, 0, 0)
SensorXZPhys3DyAxis=(OriginalSensorXZ3DFromPhys3DSensor=I)−1*(0, 1, 0)−SensorXZPhys3Dorigin
The y-coordinate of the intersection corresponds to how many instances of motionVectorPhys3D must be added to the feature position in order to intersect the sensor plane. A 3D point traveling along direction motionVectorPhys3D changes its dot product with SensorXZPhys3DyAxis at a rate of (motionVectorPhys3D dot (SensorXZPhys3DyAxis)). Originally the point FPhys3Dfrusta,feature differed in dot product from the plane SensorXZPhys3DyAxis by a value of (FPhys3Dfrusta,feature−SensorXZPhys3Dorigin) dot (SensorXZPhys3DyAxis)), therefore the 3D moves by the following number of instances of motionVectorPhys3D to intersect the plane:
numInstances=((FPhys3Dfrusta,feature−SensorXZPhys3Dorigin) dot (SensorXZPhys3DyAxis)))/motionVectorPhys3D dot (SensorXZPhys3DyAxis))
After those instances, the feature position intersects the plane at the intersectionPoint,
intersectionPoint=FPhys3Dfrusta,feature+numInstances*motionVectorPhys3D in Phys3D coordinates.
The intersection point in OriginalSensor3D coordinates can be computed by mapping through the transform OriginalSensor3DFromPhys3DSensor=I.
Note that this mapping is linear for a given set of parameters, and it follows that the mapping OriginalSensor3DFromPhys3DSensor=I is a linear transform and computable from OriginalSensorXZ3DFromPhys3DSensor=I and MotionVectorPhys3D. The multiplicative factor 1/motionVectorPhys3D dot (SensorXZPhys3DyAxis) is constant for a given parameter set.
The overall error function, E( . . . |M) characterizes the sum-square of the discrepancies between the measured feature positions and the estimated feature positions. Each measured feature position (Mscan,sensor,subobject,feature) is measured in its respective sensor's OriginalSensor3D coordinates. Each calibration object feature position is originally specified in Object3D coordinates. In order to compare each corresponding pair of positions, they must first be transformed into consistent coordinates. For the embodiment where the errors are measured in each sensor's OriginalSensor3D coordinates, the feature positions (which are originally specified in Object3D coordinates) are transformed into OriginalSensor3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform and then mapping through the transform OriginalSensor3DFromPhys3DSensor=i.
E( . . . |M)=EOriginalSensor3D( . . . |M)=Sum|(Mscan,sensor,subobject,feature−(OriginalSensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
In an embodiment that measures the error in each sensor's OriginalSensor3D coordinates, the advantage of measuring the error in each sensor's OriginalSensor3D coordinates is that coordinates are not scaled because they are tied to measured feature positions. The disadvantage of measuring the error in each sensor's OriginalSensor3D coordinates is that the coordinates are not necessarily physically accurate or orthonormal, whereby the measurements in OriginalSensor3D coordinates may be biased by the presentation poses of the calibration object; for each sensor's OriginalSensor3D coordinates, the y coordinates correspond to the magnitude of the conveyance (the motionVectorInPhys3D) whereas the x coordinate and z coordinate were defined by the factory calibration, and the scale of the conveyance magnitude is one of the things that displacement sensor field calibration is estimating.
In another embodiment of the displacement sensor field calibration procedure, the displacement sensor field calibration computation is repeated after estimating the motionVectorInPhys3D and compensated for. Thus, the non-orthogonality of the OriginalSensor3D coordinates is reduced so that the bias due to computing the error in a non-orthonormal coordinate space is reduced. Alternatively, in an embodiment in which the errors are measured in each sensor's Sensor3D coordinates, the measured feature positions are transformed into each sensor's Sensor3D coordinates by mapping them through the coordinate change transform Phys3DFromOriginalSensor3DSensor=I ,which is the inverse of OriginalSensor3DFromPhys3DSensor=i. The procedure then maps through the transform Sensor3DFromPhys3DSensor=i. The feature positions (which are originally specified in Object3D coordinates) are transformed into Sensor3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform. The procedure then maps through the transform Sensor3DFromPhys3DSensor=i.
E( . . . |M)=ESensor3D( . . . |M)=Sum|((Sensor3DFromPhys3DSensor=I*(OriginalSensor3DFromPhys3DSensor=I)−1*Mscan,sensor,subobject,feature)−(Sensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
In an embodiment in which the measured error is measured in Phys3D coordinates, the measured feature positions are transformed into Phys3D coordinates by mapping them through the coordinate change transform Phys3DFromOriginalSensor3DSensor=I, which is the inverse of OriginalSensor3DFromPhys3DSensor=i. The feature positions (which are originally specified in Object3D coordinates) are transformed into Phys3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform.
( . . . |M)=EPhys3D( . . . |M)=Sum|(((OriginalSensor3DFromPhys3DSensor=I)−1*Mscan,sensor,subobject,feature)−((Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
Note that the embodiment measuring the error in each sensor's Sensor3D coordinates and the embodiment measuring the error in Phys3D coordinates can be the same because distances are preserved under 3D rigid transforms and Sensor3D and Phys3D are related by a 3D rigid transform.
The following is a further description of the process of estimating initial parameters in view of the above-described error function E( . . . |M). The system and method illustratively employs gradient descent refinement techniques to compute the parameters which minimize E( . . . |M). Gradient descent techniques require an initial set of parameters (to initiate the process). Since the above-described error function can exhibit local minima, it is preferable that the initial parameters be nearby the optimal parameter estimates (because, then, the gradient descent method is more likely to converge on the true minima rather than converge to a local minima).
Illustratively, 3D sensor calibration involves estimating the initial values of the following parameters:
Calibration object physical feature positions;
Object3DFromPhys3DPose=p;
OriginalSensorXZ3DFromPhys3DSensor=I; and
MotionVectorInPhys3D.
In an embodiment, coarse estimation illustratively mandates that at least one sensor measure of the subobject features in one (i.e. initial) scan. In an alternate embodiment, coarse estimation illustratively mandates that the subobject features should be determinable by combining measurements from multiple scans. In a further embodiment, when multiple subobjects are measured by the same sensor within one scan, each pair of relative positions are computed (up to a linear transform due to the sensing modality), and one set of pairs of relative positions are boot-strapped to induce an estimate of all of the subobject feature positions. A coarse estimation procedure 1400 is shown in further detail with reference to
In an embodiment, the coarse parameter values corresponding to OriginalSensorXZ3D transforms are computed directly, and in this embodiment, transforms corresponding to OriginalSensorXZ3D are combined with the motion vector estimate to induce OriginalSensor3D transforms, where the derived OriginalSensor3D are used for computations.
In an alternate embodiment, the coarse parameter values corresponding to OriginalSensorXZ3D transforms are computed by estimating the OriginalSensor3D transforms, and then estimating the OriginalSensorXZ3D transforms from the OriginalSensor3D transforms. In various embodiments, the OriginalSensorXZ3D transforms are computed from these OriginalSensor3D transforms by replacing the y-axis of this transform with the cross-product of the x-axis and the z-axis. In further embodiments, the motion vector estimate is estimated by averaging the y-axes of the OriginalSensor3D transforms for the sensors.
III. User Interface
Before describing further details of the 3D sensor calibration process, reference is made to
With reference to
In
In
Once the user initiates a scan, the screen 1940 in
With reference to
When calibration has initiated (typically via a separate screen (not shown), in which the user toggles a calibrate button 1972), GUI display screen 1970 in
When calibration is complete, the user is presented with GUI display screen 1980 in
IV. Thermal Calibration
It is contemplated that changes in temperature can affect the accuracy of the calibration as described above. In an illustrative embodiment, multiple field calibrations are performed at various temperatures so that the overall calibration can be interpolated for a given runtime temperature. In a further embodiment, this interpolation includes linearly interpolating two transforms for calibrations below the expected runtime (environmental) temperature and above the runtime temperature. Temperature can be varied based upon natural variations in ambient conditions or applying external heating/cooling. In another embodiment, this interpolation includes nonlinearly interpolating between transforms for calibrations and the nonlinear interpolation is a function of the runtime temperature and the calibration-time temperatures. In yet another embodiment, this interpolation includes interpolating between the motionVectorInPhys3D using linear interpolation and interpolating between 3D rigid transforms (such as for Sensor3DFromPhys3D) using practices known in the art, such as references found (by way of useful background information on the World Wide Web at the URL address http://www.engr.colostate.edu/ECE555/reading/article_8.pdf, or techniques such as interpolating between R0 and R1 by an amount a by using the equation: Ri=(R1*(inverse(R0)))̂a*R0 where we R̂a is defined as an operation that gives us a rotation about vector [kx,ky,kz] by a*theta.
V. System Setup
3D sensor calibration relies upon the sensors being appropriately configured in order to provide useable data. The exemplary displacement sensors include a multiplicity of parameters that are carefully set (e.g. exposure, detection zone, acquisition rate, camera direction, acquisition length, and resolution) to produce effective data. If multiple sensors are employed, the some of these parameters should also be consistent between sensors. If any of these parameters are selected improperly, then the data inaccuracy can compromise field calibration or be completely incompatible. Automated setup in accordance with an illustrative embodiment is an optional two-step process of deriving these parameters without any prior knowledge of the setup or conveyance for an arbitrary set of displacement sensors. It is constructed and arranged to overcome certain limitations of the sensors' functionalities. Reference is now made to
Next in step 2130 of the procedure 2100, the system optimizes acquisition parameters for each sensor. Each sensor (simultaneously or serially) acquires 3D data (which in one exemplary embodiment is a range image, in another exemplary embodiment is a range with gray image, in another exemplary embodiment is 3D point cloud data, and in yet another exemplary embodiment is 3D point cloud data including gray information) of the calibration object using a set of default parameters. After acquiring an image, the system first computes and corrects the YScale of the clientFromImage transform. One approach is to exploit the symmetrical design of square frustums and the accuracy in the X-axis to search for rectangular blobs in the range image and correct them to a square. Since all the sensors share the same conveyance and driver, the corrected YScale can be shared by every sensor.
Next in step 2140, an acquired gray image from each sensor is used to correct the exposure. By exploiting the correlation between exposure and gray pixel value and knowledge of a sensor model's optimal gray value, the exposure of each sensor can be tuned to avoid saturation while minimizing missing pixels. This corrects for differences in the sensors and calibration subobjects. Assuming that all the subobjects of the calibration object have the same reflectivity (i.e. darkness) then the differences in gray values derive from variations in the sensor sensitivity (e.g. laser intensity). Otherwise, any additional differences would stem from variations between subobjects. In one embodiment, if subobject variations are to be accounted for, then an additional acquisition in which all the subobjects are found/recognized by a single sensor is desired to isolate and characterize variations in subobject reflectivity.
The detected subobjects form the lower bound window for the detection zone in which subsequent acquisitions should expect to find the calibration object as measured by each sensor. Since the accuracy and field of view scales with the distance from the sensor, the distance from the sensor is also used to optimize the 3D resolutions and field of view. In step 2150, the target YScale resolution is also balanced against the motion speed of conveyance to avoid overruns. The orientation of the detected subobject is used to correct coordinate space of the images such that they are consistent.
Additional optional functionalities are available to support edge case scenarios. In an embodiment, if the motion is not very consistent (i.e. the instantaneous speed can be much higher than the average speed), then a tolerance factor can be manually or automatically increased if the displacement sensor cannot poll the encoder quickly enough to adequately read the instantaneous speed (step 2170). In an embodiment, if the motion speed is significantly fast relative to the maximum acquisition rate of the sensor, then the initial detection zone can be reduced to support that higher speed (step 2160). In various embodiments, these optional functionalities can be manually or automatically driven. Additional a priori knowledge, such as the traversal distance or motion speed, can be optionally entered to speed up the process.
VI. Additional Parameter Refinement
As described above coarse estimation employs at least one scan of the calibration object with at least one sensor, which is referred to as the base sensor. Generally, the base sensor should be able to measure all of the subobject features in that scan. This provides an initial definition of Phys3D coordinates. It is assumed that the motion direction is (0,1,0) in OriginalSensorXZ3D of the sensor used for estimation and can thereby estimate that sensors pose. This coarse estimation scan can be used to bootstrap the poses of the other sensors by analyzing other scans in which one sensor already has a computed pose and another sensor has not, and the scan includes data from both sensors. Since the system has knowledge of the relationship between the feature positions, this knowledge can be extrapolated to determine each other sensor's pose. This bootstrapping approach continues until the system has estimated the poses for all of the sensors subsequently, for each scan, the system can estimate the scan poses since it has generated estimates for each sensor as well as estimates for the calibration object features.
Given a set of measured feature positions of the calibration object, which is positioned at different poses and captured by different sensors (where the term “captured” characterizes that the object has been measured),
In an embodiment, multiple sensors are selectively applied as the base sensor, and the computations are re-performed for that sensor. The sum squared errors generated from the computations for each base sensor are then compared. The base sensor which induced the minimum sum squared error is selected and is used to select its corresponding displacement sensor field calibration. In another embodiment, the subobject feature positions are specified, in which case, the initial parameter estimation step which estimates the subobject feature positions is skipped (and the specified feature positions are used).
The quality in the estimated initial parameter values directly affects the performance of the displacement sensor field calibration, e.g., whether it can converge to the minimum through the refinement and how fast if converging. Thus, in a further embodiment, to overcome the discrepancy in final calibration results that can possibly be caused by the uncertainty in initial estimated parameters, an advanced initial parameter estimation procedure 2300 is provided in
Advantageously, the above-described procedure(s) grant the best possible initial parameter estimation that results in the minimum feature predication error for given measured feature positions. They ensure the correct configuration status regarding sensors' acquisition directions and motion direction, which makes the latter refinement process converge on the measured feature position (possibly modified). The procedure(s) also overcome the uncertainty in estimated initial parameter values for a given set of measured feature positions and further lead to deterministic calibration results even if the ordering of calibration scans are changed. Moreover, regardless of each sensor's configuration in acquisition direction and the motion direction, the initial parameter estimation automatically fixes the inconsistency existing among feature positions measured by different sensors, ensuring the field calibration algorithm to reach consensus among the sensors in term of a converged small prediction error. The procedure(s) also enhance the flexibility in the setup/installation of multiple displacement sensors and the motion of moving the objects to be captured, which reduces the effort in configuring displacement sensors applied to a broad range of applications. Also advantageously, the procedure(s) support calibration of sensors whose captured 3D data (such as range images or point clouds) derived feature positions are represented either left-handed or right-handed due to respective sensors being differently configured.
Illustratively, the system and method employs a Levenberg-Marquardt gradient descent procedure to refine the parameter estimates. According to a further embodiment, the system can (a) normalize the input data so as to condition the input data (b) translate the input positions so that each scan's mean positions are (0,0,0); (c) scale all the input positions so that the standard deviation of the input positions are 1.0; and (d) after renormalizing the data for the gradient descent, undo the translation and upscale the estimated parameters. For robustness, one embodiment can include refining the parameters using numerically computed derivatives (such as Levenberg-Marquardt gradient descent), and a further embodiment can include using different step sizes (for the numerically computed derivative) to increase the probability of arriving at the global solution.
With reference to
For robustness, an embodiment can include a procedure (2500 in
VII. Grayscale Rendering
With reference again to the generalized calibration procedure 600 of
A description of an illustrative procedure for rendering physically accurate 3D (range) images using calibration data is now provided. By way of background, machine vision systems are often adapted to process 2D images, and so it is sometimes useful to generate calibrated 3D (range) images (with physically accurate coordinates and Z measurements). Rendering field calibrated data includes combining the measured sensor data with the field calibration to generate field calibrated data, and then rendering 3D images from such data. For individual rendered range images, the user specifies a destination client coordinate space—for example, the destination client coordinate space could be Sensor3DSensor=i, which is aligned to particular sensor i and is a physically accurate coordinate space. The user also specifies a desired pixel size (in x and y) and a desired z level quantization. In an alternate embodiment, the user also specifies a desired gray level quantization. The 3D (range) image rendering function can automatically determine the extents of the 3D image based on the measured 3D data, the destination 3D image coordinate space, and the 3D image pixel size and quantization. Alternatively, the user can specify the desired extents of the 3D image via (e.g.) the GUI. When multiple sensors are used, it can be advantageous to render all of their individual 3D (range) images into the same coordinate space, because this simplifies the task of merging the individual 3D images into a composite range image (because, then, the system is only required to process corresponding pel values and can avoid performing any resampling in the merging step).
Reference is now made to
With further reference to the procedure 2700 of
VIII. Two-Sided Calibration Target
Note that the type and number of 3D sensors employed herein are highly variable. In alternate embodiments, 3D sensors can be based upon stereoscopic cameras, LIDAR, time-of-flight sensing, or any other technology that provides the desired image resolution and accuracy.
The calibration target 2830 is a one-piece, unitary or integral structure that includes a base 2831, which is generally defined by the opposing, substantially planar surfaces 2832, 2834. The base 2831 surrounds a series of three-dimensional elements that, in this example, comprise one or more frusta 2835 and 2836, on each opposing face 2832, 2834, respectively, as described generally above. With further reference to the cross section of the object 2830, shown in
Notably, the calibration target 2830 can be constructed from any acceptable material with dimensional stability at normal environmental temperatures—e.g. between 20 and 120 degrees Fahrenheit. By way of non-limiting example, such materials can include aluminum, titanium, steel, magnesium, nickel and/or associated alloys thereof, glass, certain machineable polymers and/or composites, and/or any other material that can be subjected to the processes of this description. The structure can be formed, for example, by molding, casting, machining of a billet. It can be unitary or integral—for example with separate frusta attached to a base by an appropriate attachment mechanism (e.g. welding, adhesives, rivets, screws, snap-fit, etc.). Notably, the base 2831 includes printed, adhered or unitarily formed (stamped, molded, cast, etc.) indicia 2950 and 2952, located adjacent to each of the frusta 2835 and 2836. Each indicia is discrete and unique. That is, the indicia on each of opposing faces 2832 and 2834 of the target 2830 is a discrete symbol—for example, sequential letters, numbers, etc. in the Arabic, Roman, Latin, Greek, etc. alphanumeric system. In the depicted, exemplary embodiment, the first two, opposing indicia 2950 and 2952 are raised numbers (e.g. 0 and 1, respectively). These indicia are unitarily formed into the base 2831. In an embodiment, the remaining indicia 2838 on each side of the base 2831 can be applied decals (either flat-printed or raised-letter) with appropriate, discrete values. These decals can be varied as desired by the user. As described above, the decals allow the user to associate various frusta with images acquired by the camera assemblies and register the images of the target within a common (global) coordinate system—which can be a 360-degree coordinate system in this embodiment.
With particular reference to the cross section of
More generally, the calibration target can be fabricated in a manner in which the two opposing 3D elements are not precise with respect to each other, but that is finished, by an appropriate machining technique to include two opposing parallel surfaces that are dimensionally precise, parallel (i.e. defining z-spaced-apart parallel planes) where the z-axis spacing is known via the machine tool's setting and/or subsequent metrology operations (e.g. use of a caliper, micrometer, coordinate measuring machine (CMM), etc.). By way of non-limiting example, reference is made to a
In yet another exemplary embodiment, illustrated by the optional dashed lines 3150, the target can be fabricated as a composite calibration object in which each of the 3D elements (e.g. frusta) 3110 and 3120) are constructed separately and then adhered to predetermined locations on the base 3130 using an appropriate attachment mechanism known to those of skill including, but not limited to, adhesives, welding, braising, fasteners, friction fit, etc. The base can include the above-described accurate and parallel flange/plate 3140, or the base can omit such a flange and is, itself be formed accurately as a precision thickness plate using appropriate machining (or other formation) techniques prior to attachment of the 3D elements to the opposing surfaces thereof.
Reference is now made to
The calibration procedure can determine all the corner positions on both sides of the target from the presentation of the target at multiple orientations. Advantageously, that the 3D calibration can be accurate to the limits of vision system accuracy using this approach. This calibration process is operated in step 3250 and results are stored in step 3260 for use in subsequent (e.g.) runtime operations. Having flat, parallel faces in a known location (e.g. at the top of each opposing frustum) of a precise thickness has the advantage in that the user is free of a requirement to input any values to the system during calibration. Illustratively, those values are known based on the frustum size, and can be saved in a look-up table within the calibration process. By way of example, a frustum size TS5 defines a thickness A millimeters, a frustum size TS10 defines a thickness B millimeters, etc. Alternatively, a procedure can be provided to calibrate a mocked-up two-sided calibration target and a known thickness object, but the user would typically be required to specify the location of the flat faces and specify the known thickness.
More particularly, the calibration of vision system in the x and y coordinates can follow the above-described procedure as provided generally, inter alia, with reference to
As part of the specific calibration procedure using a two-sided target the following additional terms can be added to the section II. Definitions above:
Reference is again made to the description of
In the present two-sided (top and bottom) calibration embodiment, in which the frusta tops are precision formed, the feature detector also makes measurements of one or more specific regions for subobjects—the regions specified with respect to measured subobject features. In a further embodiment, the measurements can include a plane estimate computed by fitting a plane (i.e. the plane of each frusta top 3352 and 3354) to the data within a region, and an average position of the data within the region. In a further embodiment, the region can be specified as 3D volume which has been registered to a nominal position with respect to the measured subobject features. In yet a further embodiment, the measurements can be plane fit to the measured subobject features (e.g. corners) Mxx00, Mxx01, Mxx02, Mxx03, and the average position will be the average of the measured subobject features Mxx00, Mxx01, Mxx02, Mxx03 (see
In a further embodiment, the measured planes and positions are used in conjunction with the specified distance between specific planes to determine the relative positions of the sensors.
With reference to the definitions above, the measured feature positions Mscan,sensor,subobject,feature are measured in OriginalSensor3D coordinates. These are the measured feature positions of the calibration subobjects detected by the feature detector for each of 3D sensors for each of the scans.
The system can then compute the displacement sensor calibration (i.e. the “field calibration”) for all sensors concurrently by estimating sensor configuration parameters. Based on the given measured feature positions Mscan,sensor,subobject,feature, the 3D sensor calibration involves estimating the following parameters:
Calibration object physical feature positions Ffrusta,feature
Object3DFromPhys3DPose=p
OriginalSensorXZ3DFromPhys3DSensor=i
MotionVectorInPhys3D
Note that, for each sensor i, OriginalSensor3DFromPhys3DSensor=i is computed by combining the x and z axes of OriginalSensorXZ3DFromPhys3DSensor=i with the y axis of MotionVectorInPhys3D. It follows:
Note, in some embodiments, for selected sensors, where the vector cross product of the selected sensor's x and z coordinate axes has a negative dot product with the measured y-coordinate motion direction, the negative of the MotionDirectionInPhys3D is treated as the y axis for that some sensor's OriginalSensorXZ3D. The calibration object physical feature positions Ffiusta,feature are characterized by 3D points (x,y,z) for each feature. All but the first three feature positions are characterized by three numbers. Note that the first three feature positions herein illustratively define a canonical coordinate space, and, as such, their values are constrained. The feature points define a canonical coordinate space so that the Phys3D coordinate space constrains the feature pose; otherwise, if the feature positions were unconstrained, then the Phys3D coordinate space would be redundant with respect to the object coordinate space because the Phys3D coordinate space could be traded off against the feature positions. Illustratively, the first three calibration feature vertex positions are constrained (so that there are no redundant degrees of freedom). For example, the first vertex position is (0,0,0). The second vertex position is (x1,0,0) and the third vertex position is (x2,y2,0). In this manner, the calibration feature object illustratively defines a reference plane for further calibration computation steps.
Except for the first pose, p==0, the object poses Object3DFromPhys3DPose=p each have six degrees of freedom (since they characterize 3D rigid transforms). Each object pose Object3DFromPhys3DPose=p is characterized by three-value quaternion, and an identifier specifying which quaternion value is 1 (or −1), and a 3D vector characterizing the 3D translation. The first pose is constrained to be the identity transform so that the Phys3D coordinate space is not redundant (where, illustratively, gradient descent solvers have difficulty when there are redundant degrees of freedom). Three value quaternions characterize three of the four quaternion values where the characterization also includes an identifier which says which quaternion is fixed (to either +1 or −1) (As noted above, quaternions are classically characterized by four homogeneous values where p2+q2+r2+s2==1, and more generally, unit quaternions are used to represent 3D rotations, as is well known in the art==1). The use of three quaternion values and an identifier to characterize the 3D rotation is known to those of skills.
The sensor poses OriginalSensorXZ3DFromPhys3DSensor=I are each characterized by eight (8) values, including an x scale and a y scale, as well as a rigid transform. In an embodiment, each 3D sensor pose OriginalSensorXZ3DFromPhys3DSensor is characterized by a 3D vector for the x axis and a 2D vector for the z axis (where one of the coefficients is derived from the x axis and the two components of the z axis to arrive at a dot-product of 0 and an identifier saying which value the z axis is missing), and the y axis is computed as the unit length cross product of the z axis and the x axis, and the translation is a 3D vector characterized by three numbers. In another embodiment, each 3D sensor pose OriginalSensorXZ3DFromPhys3DSensor is characterized by a three-value quaternion, an identifier specifying which quaternion value is 1 (or −1), a 3D vector characterizing the 3D translation, and two additional numbers (one number for x scale and one number for z scale). In addition, the 3D vector MotionVectorInPhys3D has three independent degrees of freedom, and is characterized by three numbers.
Reference is now also again made to
In an embodiment, the 3D sensor calibration parameters can be estimated via least squares analysis. In an alternate embodiment, the 3D sensor calibration parameters can be estimated via sum of absolute differences. In another embodiment, the 3D sensor calibration parameters are estimated via minimizing the maximum error. Other numerical approximation techniques for estimating calibration parameters should be clear to those of skill. For an embodiment that estimates the calibration using least squares analysis for each measured feature position, the system computes its estimated feature position based on the parameters and then computes the difference between the estimated feature position and the corresponding measured feature position. The system then computes the square of the length of that difference (e.g. by dot-producting that difference vector with itself). All squared differences are then summed to compute a sum-of-squared differences (including contributions from all measured feature positions). This approach assumes that the parameters which induce the minimum sum-of-squares difference is the optimal 3D sensor calibration. Least squares analysis assumes that there is one particular set of parameters which induces the minimum squared error. For an embodiment employing the sum of absolute differences, the total error is computed as the sum of the absolute differences, and the parameters which induce the minimum sum of absolute differences provides an optimal 3D sensor calibration. For an embodiment employing the minimized maximum error, the parameters which induce the minimum maximum discrepancy provide optimal 3D sensor calibration.
An embodiment of the parameter estimation incorporates the difference between specified distances between parallel planar features and the corresponding measured distances between planar features. One embodiment measures the distance between both faces of a parallel planar feature pair are observed during the same pose. One embodiment incorporates at least one such distance measurement from the data set; another embodiment incorporates all such distance measurements from the data set. One embodiment computes the distances between measured planes as the average of two distances—the former distance being the distance between a nominal point on the first plane and the estimated second plane, and the latter distance being the distance between a nominal point on the second plane and the estimated first plane. One embodiment which estimates the parameters using least squares analysis incorporates the sum of the squares of the differences between the measured parallel planar distance and the specified parallel planar distances. One embodiment which estimates the parameters using minimum maximum discrepancy incorporates the sum of the absolute values of the differences between the measured parallel planar distance and the specified parallel planar distances.
Least squares analysis characterizes the sum squared error by an error function of the parameters given the measured feature points i.e., E( . . . |M)=E(Calibration object physical feature positions Ffrusta,feature [0 . . . X1], Object3DFromPhys3DPose=p, [0 . . . X2], OriginalSensorXZ3DFromPhys3DSensor=I [0 . . . X3], MotionVectorInPhys3D|Mscan,sensor,subobject,feature) (the nomenclature [0 . . . num X] signifies that the error function includes multiple instances of each set of variables—one for each of the unknowns and the nomenclature “|M” signifies that the error function is a function of the measured features, M, but those measurements are not variables). Iterative methods are used to find the parameters which minimize E( . . . |M). The parameters which induce the minimum error characterizes the 3D sensor calibration.
As described above in
In various embodiments, the user specifies (in an embodiment, using the GUI, in other embodiments, via a stored file, and in further embodiments, via information encoded in the scene which is extracted from 3D data in a scan) the calibration object feature positions and these values are used, but not estimated. In these embodiments, the error function depends on the measured feature positions and the specified feature positions, but those measurements are not variables . . . , E( . . . |M,F)=E(Object3DFromPhys3DPose=p, [0 . . . X1], OriginalSensorXZ3DFromPhys3DSensor=I [0 . . . X2], MotionVectorInPhys3D|Mscan,sensor,subobject,feature, Ffrusta,feature)
The estimated feature position can be computed in accordance with the following illustrative steps. Given a 3D feature position Ffrusta,feature (specified in Object3D coordinates) corresponding to scan pose p and sensor i, the first step is to compute that feature position in Phys3D coordinates by mapping it using the inverse of the Object3DFromPhys3DPose=p transform to compute FPhys3Dfrusta,feature:
FPhys3Dfrusta,feature=(Object3DFromPhys3DPose=p)−1*Ffrusta,feature.
In the next step, the system computes the intersection plane in Phys3D, which involves mapping the sensorXZ's origin to Phys3D coordinates and mapping its y-axis (normal to its plane) to Phys3D coordinates.
SensorXZPhys3Dorigin=(OriginalSensorXZ3DFromPhys3DSensor=I)−1*(0, 0, 0)
SensorXZPhys3DyAxis=(OriginalSensorXZ3DFromPhys3DSensor=I)−1*(0, 1, 0)−SensorXZPhys3Dorigin
The y-coordinate of the intersection corresponds to how many instances of motionVectorPhys3D must be added to the feature position in order to intersect the sensor plane. A 3D point traveling along direction motionVectorPhys3D changes its dot product with SensorXZPhys3DyAxis at a rate of (motionVectorPhys3D dot (SensorXZPhys3DyAxis)). Originally the point FPhys3Dfrusta,feature differed in dot product from the plane SensorXZPhys3DyAxis by a value of (FPhys3Dfrusta,feature−SensorXZPhys3Dorigin dot (SensorXZPhys3DyAxis)), therefore the 3D moves by the following number of instances of motionVectorPhys3D to intersect the plane:
numInstances=((FPhys3Dfrusta,feature−SensorXZPhys3Dorigin) dot (SensorXZPhys3DyAxis)))/motionVectorPhys3D dot (SensorXZPhys3DyAxis))
After those instances, the feature position intersects the plane at the intersectionPoint,
intersectionPoint=FPhys3Dfrusta,feature+numInstances*motionVectorPhys3D in Phys3D coordinates.
The intersection point in OriginalSensor3D coordinates can be computed by mapping through the transform Original Sensor3DFromPhys3DSensor=I.
Note that this mapping is linear for a given set of parameters, and it follows that the mapping OriginalSensor3DFromPhys3DSensor=I is a linear transform and computable from OriginalSensorXZ3DFromPhys3DSensor=I and MotionVectorPhys3D. The multiplicative factor 1/motionVectorPhys3D dot (SensorXZPhys3DyAxis) is constant for a given parameter set.
The overall error function, E( . . . |M) characterizes the sum-square of the discrepancies between the measured feature positions and the estimated feature positions. Each measured feature position (Mscan,sensor,subobject,feature) is measured in its respective sensor's OriginalSensor3D coordinates. Each calibration object feature position is originally specified in Object3D coordinates. In order to compare each corresponding pair of positions, they must first be transformed into consistent coordinates. For the embodiment where the errors are measured in each sensor's OriginalSensor3D coordinates, the feature positions (which are originally specified in Object3D coordinates) are transformed into OriginalSensor3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform and then mapping through the transform OriginalSensor3DFromPhys3DSensor=i.
E( . . . |M)=EOriginalSensor3D( . . . |M)=Sum|(Mscan,sensor,subobject,feature−(OriginalSensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
In another embodiment of the displacement sensor field calibration procedure, the sum squared error includes the squares of the differences between the measured parallel planar features and the specified parallel planar features
E( . . . |M)=EOriginalSensor3D( . . . |M)=Sum|(Mscan,sensor,subobject,feature−(OriginalSensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2+Sum|((OriginalSensor3DFromPhys3DSensor=I)−1*PPlanescan, Sensor=I,parallelPlanarFeature,top).pointToPlaneDistance((OriginalSensor3DFromPhys3DSensor=j)−1*PPointscan, Sensor=j,parallelPlanarFeature,bottom−ParallelPlanarFeatureDistanceparallelPlanarFeaturePair|2
Note that a 3D plane is mapped by a transform by mapping the plane's normal by the rotation portion of the transform and by mapping a point on the plane by the transform (rotation and translation). The pointToPlaneDistance( ) function characterizes the distance from a point to the closest point on the plane, which is absolute value of the dot product of the plane's normal by the vector subtract of the point and a point on the plane.
In an embodiment that measures the error in each sensor's OriginalSensor3D coordinates, the advantage of measuring the error in each sensor's OriginalSensor3D coordinates is that coordinates are not scaled because they are tied to measured feature positions. The disadvantage of measuring the error in each sensor's OriginalSensor3D coordinates is that the coordinates are not necessarily physically accurate or orthonormal, whereby the measurements in OriginalSensor3D coordinates may be biased by the presentation poses of the calibration object; for each sensor's OriginalSensor3D coordinates, the y coordinates correspond to the magnitude of the conveyance (the motionVectorInPhys3D) whereas the x coordinate and z coordinate were defined by the factory calibration, and the scale of the conveyance magnitude is one of the things that displacement sensor field calibration is estimating.
In another embodiment of the displacement sensor field calibration procedure, the displacement sensor field calibration computation is repeated after estimating the motionVectorInPhys3D and compensated for. Thus, the non-orthogonality of the OriginalSensor3D coordinates is reduced so that the bias due to computing the error in a non-orthonormal coordinate space is reduced. Alternatively, in an embodiment in which the errors are measured in each sensor's Sensor3D coordinates, the measured feature positions are transformed into each sensor's Sensor3D coordinates by mapping them through the coordinate change transform Phys3DFromOriginalSensor3DSensor=I, which is the inverse of OriginalSensor3DFromPhys3DSensor=i. The procedure then maps through the transform Sensor3DFromPhys3DSensor=i. The feature positions (which are originally specified in Object3D coordinates) are transformed into Sensor3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform. The procedure then maps through the transform Sensor3DFromPhys3DSensor=i.
E( . . . |M)=ESensor3D( . . . |M)=Sum|((Sensor3DFromPhys3DSensor=I*(OriginalSensor3DFromPhys3DSensor=I)−1*Mscan,sensor,subobject,feature)−(Sensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
In another embodiment of the displacement sensor field calibration procedure, the sum squared error includes the squares of the differences between the measured parallel planar features and the specified parallel planar features
E( . . . |M)=ESensor3D( . . . |M)=Sum|((Sensor3DFromPhys3DSensor=I*(OriginalSensor3DFromPhys3DSensor=I)−1*Mscan,sensor,subobject,feature)−(Sensor3DFromPhys3DSensor=I*(Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2+Sum|((OriginalSensor3DFromPhys3DSensor=I)−1*PPlanescan, Sensor=I,parallelPlanarFeature,top).pointToPlaneDistance((OriginalSensor3DFromPhys3DSensor=j)−1*PPointscan, Sensor=j,parallelPlanarFeature,bottom−ParallelPlanarFeatureDistanceparallelPlanarFeaturePair|2
In an embodiment in which the measured error is measured in Phys3D coordinates, the measured feature positions are transformed into Phys3D coordinates by mapping them through the coordinate change transform Phys3DFromOriginalSensor3DSensor=I, which is the inverse of OriginalSensor3DFromPhys3DSensor=i. The feature positions (which are originally specified in Object3D coordinates) are transformed into Phys3D coordinates by mapping through the Phys3DFromObject3DPose=p transform, which is the inverse of the Object3DFromPhys3DPose=p transform.
( . . . |M)=EPhys3D( . . . |M)=Sum|(((OriginalSensor3DFromPhys3DSensor=I)−1*Mscan,sensor,subobject,feature)−((Object3DFromPhys3DPose=p)−1*Ffrusta,feature)|2
Note that the embodiment measuring the error in each sensor's Sensor3D coordinates and the embodiment measuring the error in Phys3D coordinates can be the same because distances are preserved under 3D rigid transforms and Sensor3D and Phys3D are related by a 3D rigid transform.
Other aspects of the filed calibration procedure for a two-sided calibration object can proceed in accordance with the principles described above.
IX. Conclusion
It should be clear that the above-described system and method effectively provides automatic setup and calibration of a plurality of 3D (e.g. laser displacement) sensors concurrently (i.e. not one-at-a-time or in a serial manner) in a manner that is scalable to an arbitrary, desired number of sensors and width of FOV. Advantageously, the illustrative calibration technique does not require a precisely manufactured (or precisely measured) calibration object. One reason this approach does not require a precisely manufactured (or precisely measured) calibration object is because a 3D sensor configuration can require calibration subobjects to be at particular positions so that they can be observed by the 3D sensors. Furthermore, fabricating such a specific calibration object can be unacceptable due to increased cost or time until availability. Likewise, the contemplated 3D sensors for use herein are very accurate, thereby avoiding the need for an accurately manufactured calibration object, which can otherwise prove cost-prohibitive or time-prohibitive.
Advantageously, the teachings herein also provide a system to overcome challenges when imaging opposing faces in that the 3D corner positions of the (e/g/) two-sided calibration target can be used to calibrate at least two sensors in x and y-axis dimensions, but cannot establish absolute z-axis measurements without accurate information about the thickness of the two-sided target. This disadvantage is overcome by providing a straightforward-to-manufacture, straightforward-to-analyze calibration target, which combines measurable and repeatable, but not necessarily accurate, 3D features—such as a two-sided frustum, with a pair of accurate and measurable features—for example, parallel faces separated by a precise, specified thickness, so as to provide for straightforward field calibration of opposite-facing vision system (e.g. DS) sensors. These parallel faces can be machined to a known, repeatable, parallel and accurate dimension and can reside on the target base or 3D elements (frusta)—for example on opposing top surfaces thereof.
More particularly, the illustrative system and method expressly differs from a so-called “naïve” displacement sensor calibration approach. Such a naïve approach could be implemented, for example, by performing a first scan, in which the features of the calibration object are measured (where one displacement sensor registers all of the subobjects of the calibration object) using a single displacement sensor, and in a second scan, the models for the displacement sensors are computed based on those measured feature positions. The naïve displacement sensor calibration approach could then model the displacement sensor measurements using 3D affine transforms. Disadvantageously, this exemplary naïve displacement sensor calibration approach does not optimally make use of all the available data and does not constrain all of the displacement sensors to use a single estimate for the conveyance, or motion vector (the term motion vector is used to characterize a model estimate of the conveyance).
Conversely, the illustrative system and method for calibration of a plurality of 3D sensors, advantageously employs all of the available data concurrently by incorporating all of the data into one overall expression, and then uses that one single overall expression to compute the calibration. This expression includes a single estimate of the conveyance for all of the displacement sensors, instead of requiring each displacement sensor measurement model including separate estimates for the conveyance—as in the naïve calibration approach.
The foregoing has been a detailed description of illustrative embodiments of the invention. Various modifications and additions can be made without departing from the spirit and scope of this invention. Features of each of the various embodiments described above may be combined with features of other described embodiments as appropriate in order to provide a multiplicity of feature combinations in associated new embodiments. Furthermore, while the foregoing describes a number of separate embodiments of the apparatus and method of the present invention, what has been described herein is merely illustrative of the application of the principles of the present invention. For example, as used herein the terms “process” and/or “processor” should be taken broadly to include a variety of electronic hardware and/or software based functions and components (and can alternatively be termed functional “modules” or “elements”). Moreover, a depicted process or processor can be combined with other processes and/or processors or divided into various sub-processes or processors. Such sub-processes and/or sub-processors can be variously combined according to embodiments herein. Likewise, it is expressly contemplated that any function, process and/or processor herein can be implemented using electronic hardware, software consisting of a non-transitory computer-readable medium of program instructions, or a combination of hardware and software. Additionally, as used herein various directional and dispositional terms such as “vertical”, “horizontal”, “up”, “down”, “bottom”, “top”, “side”, “front”, “rear”, “left”, “right”, and the like, are used only as relative conventions and not as absolute directions/dispositions with respect to a fixed coordinate space, such as the acting direction of gravity. Additionally, where the term “substantially” or “approximately” is employed with respect to a given measurement, value or characteristic, it refers to a quantity that is within a normal operating range to achieve desired results, but that includes some variability due to inherent inaccuracy and error within the allowed tolerances of the system (e.g. 1-5 percent). By way of further example, where relative motion is described, it can refer to exclusively moving objects, exclusively moving image sensors or both moving objects and moving image sensors. Thus, in certain implementation relative motion can be a predictable rotational motion, such as objects positioned on a moving carousel. Accordingly, this description is meant to be taken only by way of example, and not to otherwise limit the scope of this invention.
This application is a continuation-in-part of co-pending U.S. patent application Ser. No. 14/936,616, entitled SYSTEM AND METHOD FOR CALIBRATING A PLURALITY OF 3D SENSORS WITH RESPECT TO A MOTION CONVEYANCE, filed Nov. 9, 2015, the teachings of which are expressly incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 14936616 | Nov 2015 | US |
Child | 15784043 | US |