alejocb / dpptam

DPPTAM: Dense Piecewise Planar Tracking and Mapping from a Monocular Sequence
GNU General Public License v3.0
219 stars 82 forks source link

OpenCV Error - persistence.cpp - cvGetFileNodeByName #5

Closed weiweikong closed 8 years ago

weiweikong commented 8 years ago

@alejocb @amiltonwong After successfully catkin_make the package, I run

rosrun dpptam dpptam

then, got

OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp, line 740
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp:740: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName

I tried to uncomment

chdir("/home/alejo/catkin_ws");

and changed it to my path, but it was still failed to run.

amiltonwong commented 8 years ago

@weiweikong , It seems the issue from opencv-2.4.8, which points to /build/buildd/opencv-2.4.8+dfsg1 I guess you had installed another standalone opencv-2.4.8 (besides ros) in your system.
How about remove that opencv linking and use the one provided by ROS?

weiweikong commented 8 years ago

@amiltonwong Thank you for your reply! It was solved by completely removing OpenCV 2.4.8 and reinstall ROS indigo as usual.

amiltonwong commented 8 years ago

Great!

TengFeiHan0 commented 6 years ago

@weiweikong could you tell me the detailed steps about removing OpenCV and reinstall ROS indigo? I have tried it but didn't solve the problem.