dice icon indicating copy to clipboard operation
dice copied to clipboard

Error... Cross correlation between left and right images, Throw test that evaluated to true: F(2,2)==0.0

Open TestedNotBested opened this issue 4 months ago • 1 comments

Hello,

I'm new to DICe (v3.0-beta.8-win32-x64) and having issues running stereo analysis. Our facility has a custom build DIC setup which we performed our own stereoscopic calibration (xml attached). When running stereo analysis, this error occurs:

**Processing cross correlation between left and right images C:\Users\dzturne\Software\DICe_nightly\src\core\DICe_CameraSystem.cpp:864:

Throw number = 1

Throw test that evaluated to true: F(2,2)==0.0**

I cannot find anywhere what this "F(2,2)==0.0" relates to. I believe its related to the stereoscopic setup/calibration. Nearest thing I came across was maybe issue #334, but this was lost data/lack of correlation rather than an error. Any help would be appreciated! Thnx!

cam_cal.xml code:

        <ParameterList>
        <Parameter name="xml_file_format" type="string" value="DICe_xml_camera_system_file" />  
        <Parameter name="system_type_3D" type="string" value="OPENCV" />  
        <Parameter name="extrinsics_relative_camera_to_camera" type="bool" value="true" />  
        <ParameterList name="CAMERA 0">
        <Parameter name="CAMERA_ID" type="string" value="left" />  
        <Parameter name="CX" type="double" value="2718.977482340661" />  
        <Parameter name="CY" type="double" value="1775.827499917535" />  
        <Parameter name="FX" type="double" value="7062.755643996395" />  
        <Parameter name="FY" type="double" value="7054.803096733428" />  
        <Parameter name="K1" type="double" value="-0.079346427111222" />  
        <Parameter name="K2" type="double" value="0.6533242703200949" />  
        <Parameter name="T1" type="double" value="-0.001960989673335046" />
        <Parameter name="T2" type="double" value="-0.002469313183044595" />  
        <Parameter name="K3" type="double" value="-2.604648666342961" />  
        <Parameter name="LENS_DISTORTION_MODEL" type="string" value="OPENCV_LENS_DISTORTION" />  
        <Parameter name="TX" type="double" value="0.000000000000e+00" />  
        <Parameter name="TY" type="double" value="0.000000000000e+00" />  
        <Parameter name="TZ" type="double" value="0.000000000000e+00" /> 
        <ParameterList name="rotation_3x3_matrix">
        <Parameter name="ROW 0" type="string" value="{ 1.000000000000e+00, 0.000000000000e+00, 0.000000000000e+00 }" />  
        <Parameter name="ROW 1" type="string" value="{ 0.000000000000e+00, 1.000000000000e+00, 0.000000000000e+00 }" />  
        <Parameter name="ROW 2" type="string" value="{ 0.000000000000e+00, 0.000000000000e+00, 1.000000000000e+00 }" />  
        </ParameterList>
        <Parameter name="IMAGE_HEIGHT_WIDTH" type="string" value="{ 3648, 5472 }" />
        <Parameter name="PIXEL_DEPTH" type="int" value="-1" />
        </ParameterList>
        <ParameterList name="CAMERA 1">
        <Parameter name="CAMERA_ID" type="string" value="right" />  
        <Parameter name="CX" type="double" value="2668.118598584845" />  
        <Parameter name="CY" type="double" value="1803.484912901735" />  
        <Parameter name="FX" type="double" value="6939.784952511713" />  
        <Parameter name="FY" type="double" value="6941.145312045388" />  
        <Parameter name="K1" type="double" value="-0.03603486570964273" />  
        <Parameter name="K2" type="double" value="-0.1113251309077883" />  
        <Parameter name="T1" type="double" value="-0.001250108886784325" />
        <Parameter name="T2" type="double" value="-0.002892110993966586" />  
        <Parameter name="K3" type="double" value="1.217068689080285" />  
        <Parameter name="LENS_DISTORTION_MODEL" type="string" value="OPENCV_LENS_DISTORTION" />  
        <Parameter name="TX" type="double" value="0.0" />  
        <Parameter name="TY" type="double" value="0.0" />  
        <Parameter name="TZ" type="double" value="0.0" />
        <ParameterList name="rotation_3x3_matrix">
        <Parameter name="ROW 0" type="string" value="{ 1.000000000000e+00, -2.231137996593335e-18, 2.8349207983971663e-18 }" />  
        <Parameter name="ROW 1" type="string" value="{ 1.914092490161805e-18, 0.9999999999999998, -9.829623835260243e-20 }" />  
        <Parameter name="ROW 2" type="string" value="{ 3.2531290188510594e-17, -6.972488414467216e-19, 1.0000000000000002 }" />  
        </ParameterList>
        <!-- Euler angles: ALPHA 9.829623835260241e-20 BETA 2.8349207983971655e-18 GAMMA 2.231137996593335e-18 (radians) -->
        <Parameter name="IMAGE_HEIGHT_WIDTH" type="string" value="{ 3648, 5472 }" />
        <Parameter name="PIXEL_DEPTH" type="int" value="-1" />
        </ParameterList>
        </ParameterList>

Images below. Had to convert to jpg in order to upload

Left-Ref Image

Left-Def Image

Right-Ref Image

Right-Def Image

Many Thanks! Ryan

TestedNotBested avatar Jul 25 '25 15:07 TestedNotBested

This error means that something went wrong with computing the fundamental matrix, F. You can see how this is computed based on what you put in the cam_cal.xml file for "FX", "FY", etc. here: https://github.com/dicengine/dice/blob/5ebcdfafad1d0ac4ed120ebc1a3fe04138216d5b/src/core/DICe_CameraSystem.cpp#L842 Note that FX and FY in the cam_cal.xml file are the individual camera focal lengths, not the fundamental matrix which gets computed based on FX and FY.

The error happens when there is a 0 value for the last diagonal element, F(2,2). I would suggest doing the same operations as in the link above using matlab and you can verify if your calibration routine produces a singular fundamental matrix or where the problem is coming from.

dicengine avatar Jul 25 '25 16:07 dicengine