Patter buffer count vs index confusion

General Information

  • Product: X36
  • Ensenso SDK Version: 4.3.880
  • Operating System: Windows

Problem / Question

We are running a combined calibration process where we are performing a hand-eye calibration of two stationary X36 3D-cameras as well as additional custom calibration steps including multiple 2D-cameras. As usual, we first move the calibration plate which is fixed to the robot in the cameras field of view and then Capture with both 3D cameras. In the next step, we run CollectPattern on both cameras, taking care to check if any stereo pattern matches could be performed by checking the Stereo node in the commands result for both cameras. This is necessary since the pattern might be in only one 3D-cameras field of view in such a way that one mono-sensor of the other camera can still detect the pattern. If no stereo observation could me achieved we skip the next steps.

Now, for our custom calibration steps, we need to determine the pattern coordinates before we can move to the next calibration robot position. We do this by running the command EstimatePatternPose while setting the commands filter parameters such that only the last index pattern detection is used. I.e. we use

{"Filter": {"Type": "Index", "Value": count - 1}}

where count in turn is obtained by running the command PatternBufferInfo. And this is where we introduced the bug in our code: PatternBufferInfo only returns the number of stereo observations. However, for EstimatePatternPose you need to count the index also including mono observations. So once we had a mono camera observation in our calibration process, the pattern coordinates obtained by EstimatePatternPose were off by one robot positions.

What is the recommended way to get the number of total pattern observations in the patter buffer such that can be used in EstimatePatternPose to get the last captures patter pose? Or would it be better to remove non-stereo patterns form the buffer after the check above? How would one go about doing that?

One way to determine the correct index for the EstimatePatternPose filter is to make the current pattern buffer visible by enabling ShowPatterns. You can then iterate through the available collections and identify the most recent collection that contains a valid left and right chessboard for your camera.

At the moment, there is no filter option that restricts the results to full stereo chessboard collections only. Given that limitation, this approach is likely the simplest and most reliable way to resolve the issue.

Kind regards,
Peter

1 Like