How can I debug an cv::imencode error ?

asked 2017-06-23 05:15:28 -0600

el_cid gravatar image

updated 2017-06-23 05:15:51 -0600

I'm using a ZED Stereo Camera together with ROS on a Jetson TX1 (which uses a precompiled optimized OpenCV 2.4 ) I would like to use the compressed image transport functionality of ROS. But when I try to access such a compressed image, my programm fails. Debugging with comments reveiled, that the program crashes when calling this OpenCV function:

cv::imencode(".jpg", cv_ptr->image,, params)

at this location.

Running the program in debug mode shows the following error:

Thread 19 "zed_wrapper_nod" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f87bac190 (LWP 4167)]
strlen () at ../sysdeps/aarch64/strlen.S:92
92  ../sysdeps/aarch64/strlen.S: No such file or directory.

Because on the Jetson I use precompiled OpenCV libraries, I first would like to refrain from starting to put debugging comments into OpenCV code. Can I maybe control the input arguments, if they are right? What would be typical faulty inputs?

(if you are interest to know more about the ROS side of this, see also my issue on github here )

edit retag flag offensive close merge delete