DLR-RM / 3DObjectTracking

Algorithms and Publications on 3D Object Tracking
MIT License
637 stars 122 forks source link

Unable to overlay objects through run_on_recorded_sequence.cpp and Missing metadata & model files #11

Closed rohanscryenx closed 2 years ago

rohanscryenx commented 2 years ago

I compiled the code using cmake and making the option (USE_AZURE_KINECT "Use azure kinect" FALSE) as False in CMakeLists.txt. Then I ran run_on_recorded sequence.cpp 's executable file after changing the paths of directories. I'm facing some errors like -

Output -

Could not open file 3DObjectTracking/RBGT/TEST/Sequence/color_camera_meta_data.txt Camera is not initialized Could not open file stream "3DObjectTracking/RBGT/TEST/Models/body_1.txt" Generate body1 template view 1 of 2562 Generate body1 template view 642 of 2562 Generate body1 template view 1923 of 2562 Generate body1 template view 1283 of 2562 No valid contour in image No valid contour in image No valid contour in image No valid contour in image Model was not initialized Could not open file stream "3DObjectTracking/RBGT/TEST/Models/body_2.txt" Model was not initialized Camera is not initialized Initialize renderer first

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.3-dev) /home/rohang1411/opencv_build/opencv/modules/highgui/src/window.cpp:1014: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'

Aborted (core dumped)

In the above lines TEST folder wasn't part of the repo, I created it and put the model.obj file and frames inside it. I have tried using the full directory paths too. Can anybody please explain or provide how to get the following missing -

  1. color_camera_meta_data.txt
  2. body_1.txt
  3. body_2.txt

And please provide what should be the input files or sequence for run_on_recorded _sequence file. And the directory it should be present in. I am unable to overlay the objects as shown in the video provided in the repo. I tried putting a .mp4 video file as well as frames from the dataset in the sequence folder, but still unable to move forward. Please help, Thanks in advance.

manuel-stoiber commented 2 years ago

In our new publication ICG, we provide better documentation and significantly improved functionality. Please check out the new code.

TrinhNC commented 1 year ago

I ran into the same problem No valid contour in image when trying ICG and SRT3D. Any suggestions for this issue?

manuel-stoiber commented 1 year ago

The most likely issue is that the parameter geometry_unit_in_meter is not defined correctly. If you provide an .obj file for which vertices are given in millimeter you would have to define geometry_unit_in_meter: 0.001. Otherwise, values are interpreted in meters. Together with a default sphere_radius of 0.8m, this would result in the camera being inside the object.

TrinhNC commented 1 year ago

I also found out today about the sphere_radius. Changing it to a bigger value makes it work. Thanks!