dice icon indicating copy to clipboard operation
dice copied to clipboard

DICe execution failed

Open Bestzi opened this issue 1 year ago • 25 comments

error dice image dimensions: 2448 x 2048 Output will be written to one file per frame with all subsets included Execution information will be written to a separate file (not placed in the output headers) C:\Users\dzturne\Software\DICe_nightly\src\core\DICe_Decomp.cpp:73:

Throw number = 1

Throw test that evaluated to true: comm_->get_rank()==0&&subset_centroids_x.size()<=0 ////// Excuse me, what the problem is about ?

Bestzi avatar Feb 06 '24 16:02 Bestzi

error 2 dice

How about this one. Both images are from my camera and camera resolution is 2448x2048. You Thank you in advance.

Bestzi avatar Feb 06 '24 17:02 Bestzi

For the first case above, it's hard to say what's going wrong since I can't see all the parameters you have selected on the right panel. One possibility is that there is that the SSSIG threshold is too high. Have you tried setting that to zero to see if it works? There might not be enough contrast in the top image to satisfy the SSSIG criteria. Also, if you could attach the input.xml file that got generated in the working directory I could help you more.

For the bottom case, the problem is that you selected "calibrate results" but you did not provide the calibration parameters in the "load cal file" input box. Did you calibrate the camera using the perform calibration tool? If not you won't be able to calibrate the resutls.

dicengine avatar Feb 07 '24 00:02 dicengine

Thank you for your help for a last problem. There's another problem that I quiet not understand about it. error 3 dice

Thank you in advance.

Bestzi avatar Feb 12 '24 04:02 Bestzi

If you chose to install DICe in a folder that is not the default location suggested by the install dialogue you have to select the folder where the dice.exe executable exists. The reason you get an error about DICe_OpenCVServer.exe is because that is the first executable that DICe looks for when you open the GUI. You can either reinstall DICe in the default location or re-install it and when you get the first error above about the executable path not existing, select the folder where you have dice.exe installed in the dialog box.

dicengine avatar Feb 12 '24 15:02 dicengine

Well, I can run properly now thank you a lot for your information. However, I have my own calibration code, but I'm wondering what is in the .xml file. What does it look like inside the file? How can I see what is written in the .xml file?

Thank you in advance.

Bestzi avatar Feb 18 '24 07:02 Bestzi

I have to tell you that I can't calibrate like in your example clip. I don't understand why but I really just want to know what's inside the .xml file and what does it looks like.

Bestzi avatar Feb 18 '24 07:02 Bestzi

Here's an example of the DICe xml file: https://github.com/dicengine/dice/blob/master/tests/regression/stereo_rectified/cal.xml

dicengine avatar Feb 18 '24 13:02 dicengine

If I have key point value which could I insert the value to let the program calibrate ? How to be same as your file the cal.xml like how to change the value inside the file ?

thank you in advance.

Bestzi avatar Feb 20 '24 03:02 Bestzi

We don't have the ability in DICe to read in the keypoint locations and then calibrate, but you could use OpenCV to write a small python script that does that. Once you calibrate using OpenCV you can just copy and paste the intrinsic and extrinsic parameters to a DICe formated cal.xml file or have the python script output the cal.xml file.

dicengine avatar Feb 20 '24 14:02 dicengine

Thank you, could you tell the problem about this right picture I've tried to use another picture, but it still didn't work? Or it occurs because of the brightness? image

Bestzi avatar Feb 22 '24 06:02 Bestzi

We don't have the ability in DICe to read in the keypoint locations and then calibrate, but you could use OpenCV to write a small python script that does that. Once you calibrate using OpenCV you can just copy and paste the intrinsic and extrinsic parameters to a DICe formated cal.xml file or have the python script output the cal.xml file.

Sorry but I'm quiet not understand so I would like to show this is my intrinsic parameters from python code. image by [ cx cy fx fs fy k1 k2 k3] and I want to use my parameter instead of DICe but I have to use your form of cal.xml so could you give me and illustrate some of examples and how? Or I just change the value in the cal,xml file ? many thank you from me.

Bestzi avatar Feb 22 '24 07:02 Bestzi

That's right, you can simply change the values in your cal.xml file if you have a template from DICe to work from.

dicengine avatar Feb 22 '24 12:02 dicengine

The problem you are seeing when you try to run the DICe calibration on the images is probably due to the brightness changes across your calibration target. It makes setting the segmentation threshold hard to get right. It just so happens that we recently updated the calibration routine to handle this better, but haven't pushed the changes yet. These updates will be available in a new version of DICe in a few weeks.

dicengine avatar Feb 22 '24 12:02 dicengine

Thank you, about the previous question. Could you explain about these parameter ? image

And also about the Euler angles. image

Regards, Best

Bestzi avatar Feb 23 '24 06:02 Bestzi

All of this is covered here: https://github.com/dicengine/dice/blob/master/doc/reports/Triangulation.pdf and here: https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html Note that under the hood, the DICe calibration tool uses the OpenCV calibration routines.

dicengine avatar Feb 23 '24 15:02 dicengine

Thank you, but I have to bother you again so how do you calculated the Euler angles? I just wonder how the process looks like.

Bestzi avatar Feb 26 '24 17:02 Bestzi

Here's a link that might be helpful: https://learnopencv.com/rotation-matrix-to-euler-angles/

dicengine avatar Feb 26 '24 19:02 dicengine

Thank you for always helping me. I'm a student who doesn't understand much when reading. It might be asking too much. Anyway, thank you. Firstly, I still have a question about skew parameters (fs) because I don't see them in the cal.xml file: My camera has fs value so I want to input it but how do I do it and if I input will there be any problems?

Secondly, I would like to know where the openCV calibration file is and I want to add my keypoints to the process.

And the extrinsic parameters. Is it CAL_EXTRINSICS ? So it already evaluate between camera1 and 2 ? and about the Euler angles it doesn't need for evaluation because we already had a rotation matrix. Am I correct ? IMG_2919

Regards, Best

Bezutoz avatar Feb 27 '24 07:02 Bezutoz

For the skew parameter, just add another parameter to the cal.xml file:

<Parameter name="FS" type="double" value="1.0" />

For the calibration, DICe doesn't interface with OpenCV through files, but by using it as a library. To see how this is done, look at lines 303 or 313 in this source code file to see how it's done https://github.com/dicengine/dice/blob/master/src/opencv/DICe_Calibration.cpp

If you have the rotation matrix instead of the euler angles, you can use the rotation matrix directly in the cal.xml file:

<ParameterList name="rotation_3x3_matrix">
<Parameter name="ROW 0" type="string" value="{ 1.000000000000e+00, 0.000000000000e+00, 0.000000000000e+00 }" />
<!-- R11 R12 R13 -->
<Parameter name="ROW 1" type="string" value="{ 0.000000000000e+00, 1.000000000000e+00, 0.000000000000e+00 }" />
<!-- R21 R22 R23 -->
<Parameter name="ROW 2" type="string" value="{ 0.000000000000e+00, 0.000000000000e+00, 1.000000000000e+00 }" />
<!-- R31 R32 R33 -->
</ParameterList>

You still need to define TX, TY, and TZ in cal.xml. When you have defined TX, TY, TZ and the rotation matrix you have define all the CAL_EXTRINSICS.

dicengine avatar Feb 27 '24 12:02 dicengine

I'm sorry, I meant that the rotation matrix value in the cal.xml file must be for camera 0 and camera 1, but for camera 0 it is a constant value. Does that mean that for Camera 1 it was calculated as what I highlighted? 4 meeting

Bestzi avatar Mar 04 '24 06:03 Bestzi

Yes, that's correct.

dicengine avatar Mar 04 '24 14:03 dicengine

Thank you, from your previous file Calibration.cpp you also have the .exe file to call the function of .cpp or where do you call and use the function ?

Regards,

Bezutoz avatar Mar 05 '24 03:03 Bezutoz

How can I output the function 'intersection_points' because I want to compare with my data and also change it to my data?

Regards,

Bezutoz avatar Mar 05 '24 04:03 Bezutoz

At this point, you might need to consult some sources on C++ code development. There are a lot of good resources out there.

dicengine avatar Mar 05 '24 13:03 dicengine

I actually want to know about "TrilinosConfig.cmake" file and how can I find this file?

Regards,

Bestzi avatar Mar 28 '24 09:03 Bestzi