Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DICe execution failed #315

Open
Bestzi opened this issue Feb 6, 2024 · 25 comments
Open

DICe execution failed #315

Bestzi opened this issue Feb 6, 2024 · 25 comments

Comments

@Bestzi
Copy link

Bestzi commented Feb 6, 2024

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
Copy link
Author

Bestzi commented Feb 6, 2024

error 2 dice

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

@dicengine
Copy link
Owner

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.

@Bestzi Bestzi closed this as completed Feb 12, 2024
@Bestzi Bestzi reopened this Feb 12, 2024
@Bestzi
Copy link
Author

Bestzi commented Feb 12, 2024

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.

@dicengine
Copy link
Owner

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.

@Bestzi
Copy link
Author

Bestzi commented Feb 18, 2024

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
Copy link
Author

Bestzi commented Feb 18, 2024

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.

@dicengine
Copy link
Owner

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

@Bestzi
Copy link
Author

Bestzi commented Feb 20, 2024

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.

@dicengine
Copy link
Owner

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.

@Bestzi
Copy link
Author

Bestzi commented Feb 22, 2024

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
Copy link
Author

Bestzi commented Feb 22, 2024

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.

@dicengine
Copy link
Owner

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
Copy link
Owner

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.

@Bestzi
Copy link
Author

Bestzi commented Feb 23, 2024

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

And also about the Euler angles.
image

Regards,
Best

@dicengine
Copy link
Owner

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.

@Bestzi
Copy link
Author

Bestzi commented Feb 26, 2024

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.

@dicengine
Copy link
Owner

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

@Bezutoz
Copy link

Bezutoz commented Feb 27, 2024

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

@dicengine
Copy link
Owner

dicengine commented Feb 27, 2024

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.

@Bestzi
Copy link
Author

Bestzi commented Mar 4, 2024

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

@dicengine
Copy link
Owner

Yes, that's correct.

@Bezutoz
Copy link

Bezutoz commented Mar 5, 2024

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
Copy link

Bezutoz commented Mar 5, 2024

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

Regards,

@dicengine
Copy link
Owner

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

@Bestzi
Copy link
Author

Bestzi commented Mar 28, 2024

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

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants