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

when i run "rosrun dpptam dpptam",error occured #43

Open
SU1997 opened this issue Jul 28, 2022 · 2 comments
Open

when i run "rosrun dpptam dpptam",error occured #43

SU1997 opened this issue Jul 28, 2022 · 2 comments

Comments

@SU1997
Copy link

SU1997 commented Jul 28, 2022

*** DPPTAM is working ***

*** Launch the example sequences or use your own sequence / live camera and update the file 'data.yml' with the corresponding camera_path and calibration parameters ***
frames_processed -> 100 %
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.2.0) ../modules/core/src/matrix_expressions.cpp:23: error: (-5:Bad argument) Matrix operand is an empty matrix. in function 'checkOperandsExist'

and i don't know how to fix it

@SU1997
Copy link
Author

SU1997 commented Jul 28, 2022

i have update the file 'data.yml' correctly

@mississippia
Copy link

mississippia commented Nov 1, 2022

I got the same problem and I fixed it.
change around line 285 in file /src/SemiDenseMapping.cpp
semidense_mapper->points_ref_im_sd = points_ref_im_sd_init.clone();
semidense_mapper-> image_points_byFocal_sd = image_points_byFocal_sd_init.clone();
semidense_mapper->do_init_semi=0;
cv::Mat& dm = semidense_mapper->depth_map;
dm = cv::Mat::zeros(dm.rows,dm.cols,dm.type());

             //       semidense_mapper->depth_map = semidense_mapper->depth_map*0;
                    
                    cv::Mat inv_depths_borrar = semidense_mapper-> inv_depths.clone();
                    cv::Mat depth_map_points_tracked = cv::Mat::zeros(dm.rows,dm.cols,dm.type());
                    cv::Mat variance_points_tracked = cv::Mat::zeros(dm.rows,dm.cols,dm.type());
                    cv::Mat points3D_tracked = semidense_mapper->points3D_tracked.clone();
                    cv::Mat points_aux(0,points3D_tracked.cols,CV_32FC1);

problem comes from "= semidense_mapper->depth_map*0;"
there are a lot of places(more than the place i just typed) that has "cv::Mat/*0", all considered wrong.
replace them with cv::Mat::zeros() function, then the project will work.
2022-11-01_11-03
that's my testing scene.

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

2 participants