Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I debug an cv::imencode error ?

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, compressed.data, 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

How can I debug an cv::imencode error ?

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, compressed.data, 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 )