Coder Social home page Coder Social logo

stereolabs / zed-opencv Goto Github PK

View Code? Open in Web Editor NEW
137.0 137.0 78.0 57 KB

ZED SDK interface sample for OpenCV

Home Page: https://www.stereolabs.com/docs/opencv/

License: MIT License

CMake 7.46% C++ 63.43% Python 29.12%
opencv stereo-vision zed-camera

zed-opencv's People

Contributors

adujardin avatar alassagne-sl avatar myzhar avatar nesnes avatar obraun-sl avatar p-yver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zed-opencv's Issues

Cmake cannot link pthread properly

My application require using std::thread from C++11 , when i add the library to the linker in the Cmake file by this way :

TARGET_LINK_LIBRARIES( ${execName}
-pthread
${ZED_LIBRARIES}
${OpenCV_LIBRARIES}
${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY} ${CUDA_npp_LIBRARY}
)

the compilation is succeed but when i execute the program , i got

terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted

which is a famous error on the internet and i tried almost all the methods to get a rid of it but noway .
i noticed when i did this only , it works

TARGET_LINK_LIBRARIES( ${execName} -pthread )
Sure i didn't link any ZED /CUDA libs in this case.

how to solve this issue ?

Example of recording rectified stereo footage?

I have seen that the function grab() returns rectified images from the ZED camera. Is there any example of saving these images into a video file? The ZED Explorer is saving a lot of auxiliary data in the SVO file, which I don't need in this particular application, so I am looking for a way to get a lighter and more stable recording (720p at 60fps), than with the ZED Explorer. Is the opencv-wrapper the place to start? Will it have less frame drops than the ZED Explorer?

Gathering Depth(Meter) from ZED SDK and real-time operation

I have sucessfully run zed-opencv programm on NVIDIA TK1 board.

First question

However, I want to find the exact depth information of specific pixel.

when I click the location of pixel while running zed-opencv programm,
It seems to me that it produce the depth(meter) of pixel that I click

The related function is as follows:

static void onMouseCallback(int32_t event, int32_t x, int32_t y, int32_t flag, void * param) 

float* ptr_image_num = (float*) ((int8_t*) data->data + y_int * data->step); 
float dist = ptr_image_num[x_int] / 1000.f; 

I don't understand why the variable "dist" in this functions is the depth information(METER) of pixel?

In summary, How Can I extract the specific depth information of specific pixel?

Another question

In README file, it states as follows:

Warning :
•  GPU->CPU readback is time-consuming
•  This sample is not designed to operate in real time

It seems to me that this programm is not designed to operate in real time

Then, How can I make the programm operate in real time?

Is there any example for me to follow?

ZED Explorer not working without WiFi/Networking enabled

Hi,
I am using SDK version 1.2.0, and I've been having a strange issue with ZED explorer. If WiFi/Networking is not enabled, ZED Explorer fails to start and I get the following error:

** Checking if FW and SDK can be updated...**
QIODevice::read (QDisabledNetworkReply): device not open

I assume the Qt application is unable to check for over-the-air updates for FW/SDK and throws an error. Is there any way to fix this, because data collection becomes troublesome. I can get it to work if I start ZED explorer whilst I have access to WiFi and then don't shut it down during data collection, when WiFi access isn't available.

Thanks for your help!

Function symbol conflict in libsl_core.so and libopencv_core.so

I'm use both ZED SDK 2.1.2 and OpenCV 3.2.

My code is as follow :

void saveMat(const string& filePath, const Mat& mat) {
  cv::FileStorage fs(filePath, cv::FileStorage::WRITE);
  bool isOk = myfs.isOpened();
  std::cout << "isOpened: " << isOk << std::endl;
  ...
}

I've found some strange behavior:
The bool variable isOk's value is not 0 or 1, it's a random number less than 255.

Debug use gdb, I found:
cv::FileStorage use cvOpenFileStorage() function internal, but this function both exists in libsl_core.so and libopencv_core.so, and last call libsl_core.so's cvOpenFileStorage() function, I don't know what's happend in libsl_core.so's cvOpenFileStorage() that the return bool's value is not 1 or 0.

The ld linker searches and processes libraries and object files in the order they are specified.

Use nm command :
nm -D --defined-only /usr/local/zed/lib/libsl_core.so
I've find many OpenCV's function, why?

000000000034f140 T cvMulTransposed
00000000001eaae0 T cvNextGraphItem
0000000000224660 T cvNextNArraySlice
00000000001eb770 T cvNextTreeNode
000000000031eb10 T cvNorm
00000000001c5890 T cvNormalize
00000000005da940 T cvNormalizeHist
0000000000210b70 T cvNot
00000000002a3620 T cvNulDevReport
00000000002bd2b0 T cvOpenFileStorage
0000000000211690 T cvOr
0000000000212ce0 T cvOrS
000000000034e580 T cvPerspectiveTransform
000000000047e580 T cvPointPolygonTest
0000000000572b80 T cvPointSeqFromMat
00000000002cc790 T cvPolarToCart
00000000006556f0 T cvPolyLine
00000000000b5dd0 T cvPOSIT
00000000002cdbc0 T cvPow

debug1

debug2

ZED Depth Viewer doesn't work - Linux

New install as of 2017-06-24 following ZED SDK instructions including forcing git check-out of opencv 3.1 (as it is now on 3.2 and the tools are linked to 3.1). Okay, so ZED explorer works but not the Depth Viewer. Something is screwy with the links:

/usr/local/zed/tools $ ldd ZED\ Depth\ Viewer | grep opencv
libopencv_core.so.3.1 => not found
libopencv_imgcodecs.so.3.1 => not found
libopencv_calib3d.so.3.1 => /usr/local/lib/libopencv_calib3d.so.3.1 (0x00007f7ab9559000)
libopencv_videoio.so.3.1 => /usr/local/lib/libopencv_videoio.so.3.1 (0x00007f7ab84c6000)
libopencv_imgcodecs.so.3.1 => /usr/local/lib/libopencv_imgcodecs.so.3.1 (0x00007f7ab7f1c000)
libopencv_imgproc.so.3.1 => /usr/local/lib/libopencv_imgproc.so.3.1 (0x00007f7ab64d9000)
libopencv_core.so.3.1 => /usr/local/lib/libopencv_core.so.3.1 (0x00007f7ab57aa000)
libopencv_video.so.3.1 => /usr/local/lib/libopencv_video.so.3.1 (0x00007f7ab235b000)
libopencv_features2d.so.3.1 => /usr/local/lib/libopencv_features2d.so.3.1 (0x00007f7aafa21000)
libopencv_flann.so.3.1 => /usr/local/lib/libopencv_flann.so.3.1 (0x00007f7aaf7c7000)

/usr/local/zed/tools $ ldd ZED\ Explorer | grep opencv
libopencv_core.so.3.1 => /usr/local/lib/libopencv_core.so.3.1 (0x00007f2e6b240000)

Explorer is fine. DV is wonky with imgcodecs not found then found ?

Can it support opencv 3.2?

Recently I try ros with opencv 3.2 ,but it seems that it only can use with 3.1 . Can the SDK support with 3.2 since there are not many difference between 3.1 and 3.2?

Installing_OpenCV on Jetson TK1 error

I tried to install opencv on Jetson TK1
as described in http://elinux.org/Jetson/Installing_OpenCV

When I type sudo make -j4 install, error is as followings:

CUDA 6.5 is installed correctly as we can find it in the following results:

there are some similar errors :
http://ubuntuforums.org/showthread.php?t=2244063
http://www.btday.com/cmake-error-while-configuring-cuda-with-opencv/

http://code.opencv.org/issues/3814
http://code.opencv.org/issues/3938

ubuntu@tegra-ubuntu:~/opencv-2.4.9/build$ sudo make -j4 install

-- Detected version of GNU GCC: 48 (408)
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
-- checking for module 'gstreamer-base-0.10'
--   package 'gstreamer-base-0.10' not found
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
-- checking for module 'libdc1394'
--   package 'libdc1394' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- CUDA detected: 6.5
-- CUDA NVCC target flags: -gencode;arch=compute_32,code=sm_32
-- Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY     JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
-- Assume that non-module dependency is available: cudart (for module opencv_core)
-- Assume that non-module dependency is available: nppc (for module opencv_core)
-- Assume that non-module dependency is available: nppi (for module opencv_core)
-- Assume that non-module dependency is available: npps (for module opencv_core)
-- 
-- General configuration for OpenCV 2.4.9 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 3.10.40-gdacac96 armv7l
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.4)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address     -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef     -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor     -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG      -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address     -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef     -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor     -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g  -O0 -DDEBUG     -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address     -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-    prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing     -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG          -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address     -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-    prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing     -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g  -O0 -DDEBUG     -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy     objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera dynamicuda java viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.24.23)
--     GThread :                    YES (ver 2.40.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.8)
--     JPEG:                        /usr/lib/arm-linux-gnueabihf/libjpeg.so (ver )
--     PNG:                         /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.50)
--     TIFF:                        /usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       codec:                     YES (ver 54.35.0)
--       format:                    YES (ver 54.20.4)
--       util:                      YES (ver 52.3.0)
--       swscale:                   YES (ver 2.1.1)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.1)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     NO
--     Use Eigen:                   YES (ver 3.2.0)
--     Use TBB:                     NO
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 6.5)
--     Use OpenCL:                  YES
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             32
--     NVIDIA PTX archs:
--     Use fast math:               NO
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/ubuntu/opencv-2.4.9/3rdparty/include/opencl/1.2
--     Use AMD FFT:                 NO
--     Use AMD BLAS:                NO
-- 
--   Python:
--     Interpreter:                 /usr/bin/python2 (ver 2.7.6)
--     Libraries:                   /usr/lib/arm-linux-gnueabihf/libpython2.7.so (ver 2.7.6)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           NO
-- 
--   Tests and samples:
--     Tests:                       NO
--     Performance tests:           NO
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/ubuntu/opencv-2.4.9/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/opencv-2.4.9/build
[  0%] Built target opencv_core_pch_dephelp
[  5%] [  5%] Built target libjasper
Built target opencv_flann_pch_dephelp
[  5%] Built target opencv_imgproc_pch_dephelp
[  5%] [  5%] Built target opencv_features2d_pch_dephelp
Built target opencv_highgui_pch_dephelp
[ 15%] Built target IlmImf
[ 16%] Built target opencv_calib3d_pch_dephelp
[ 17%] Built target opencv_video_pch_dephelp
[ 17%] Built target opencv_ml_pch_dephelp
[ 18%] Built target opencv_objdetect_pch_dephelp
[ 18%] [ 18%] Built target opencv_legacy_pch_dephelp
Built target opencv_photo_pch_dephelp
[ 18%] Built target opencv_ts_pch_dephelp
[ 19%] [ 19%] Built target opencv_gpu_pch_dephelp
[ 19%] Built target opencv_nonfree_pch_dephelp
Built target opencv_ocl_pch_dephelp
[ 19%] [ 19%] Built target opencv_videostab_pch_dephelp
Built target opencv_contrib_pch_dephelp
[ 19%] [ 20%] Built target opencv_stitching_pch_dephelp
Built target opencv_superres_pch_dephelp
[ 20%] Built target pch_Generate_opencv_core
[ 21%] Built target pch_Generate_opencv_flann
[ 21%] Built target pch_Generate_opencv_imgproc
[ 21%] Built target pch_Generate_opencv_highgui
[ 21%] [ 21%] Built target pch_Generate_opencv_features2d
Built target pch_Generate_opencv_ml
[ 21%] [ 22%] Built target pch_Generate_opencv_video
Built target pch_Generate_opencv_calib3d
[ 23%] Built target pch_Generate_opencv_objdetect
[ 24%] Built target pch_Generate_opencv_legacy
[ 24%] Built target pch_Generate_opencv_photo
[ 24%] Built target pch_Generate_opencv_gpu
[ 24%] Built target pch_Generate_opencv_ts
[ 24%] Built target pch_Generate_opencv_ocl
[ 24%] [ 24%] Built target pch_Generate_opencv_nonfree
Built target pch_Generate_opencv_contrib
[ 24%] Built target pch_Generate_opencv_stitching
[ 25%] Built target pch_Generate_opencv_superres
[ 26%] Built target pch_Generate_opencv_videostab
Linking CXX shared library ../../lib/libopencv_core.so
[ 30%] Built target opencv_core
Linking CXX shared library ../../lib/libopencv_flann.so
Linking CXX shared library ../../lib/libopencv_ml.so
Linking CXX shared library ../../lib/libopencv_imgproc.so
[ 31%] Built target opencv_flann
[ 34%] Built target opencv_ml
[ 40%] Built target opencv_imgproc
Linking CXX shared library ../../lib/libopencv_photo.so
Linking CXX shared library ../../lib/libopencv_video.so
Linking CXX shared library ../../lib/libopencv_highgui.so
[ 41%] Built target opencv_photo
[ 42%] Built target opencv_video
[ 45%] Built target opencv_highgui
Linking CXX shared library ../../lib/libopencv_features2d.so
Linking CXX shared library ../../lib/libopencv_objdetect.so
[ 47%] Built target opencv_objdetect
[ 49%] Built target opencv_features2d
[ 50%] Built target opencv_ts
Linking CXX shared library ../../lib/libopencv_calib3d.so
[ 52%] Built target opencv_calib3d
Linking CXX shared library ../../lib/libopencv_ocl.so
Linking CXX shared library ../../lib/libopencv_legacy.so
[ 58%] Built target opencv_ocl
[ 70%] Built target opencv_legacy
[ 70%] Built target opencv_haartraining_engine
Linking CXX executable ../../bin/opencv_haartraining
Linking CXX executable ../../bin/opencv_createsamples
Linking CXX executable ../../bin/opencv_performance
[ 70%] Building NVCC (Device) object modules/gpu/CMakeFiles/cuda_compile.dir/src/nvidia/core/.    /cuda_compile_generated_NCVPyramid.cu.o
[ 71%] Built target opencv_createsamples
[ 71%] Built target opencv_haartraining
[ 71%] Built target opencv_performance
Linking CXX executable ../../bin/opencv_traincascade
[ 72%] Built target opencv_traincascade


/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(52): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(53): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(54): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(55): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(56): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(57): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(58): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(61): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(62): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(63): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(64): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(65): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(66): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(67): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(68): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(119): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(120): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(121): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(122): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(123): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(124): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(125): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(126): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(127): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(128): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(129): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(130): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(131): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(132): error: a     storage class is not allowed in an explicit specialization

/home/ubuntu/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(133): error: a     storage class is not allowed in an explicit specialization

31 errors detected in the compilation of "/tmp/tmpxft_00007bdf_00000000-6_NCVPyramid.cpp1.ii".
CMake Error at cuda_compile_generated_NCVPyramid.cu.o.cmake:264 (message):
  Error generating file
  /home/ubuntu/opencv-2.4.9/build/modules/gpu/CMakeFiles/cuda_compile.dir/src/nvidia/core/.    /cuda_compile_generated_NCVPyramid.cu.o


make[2]: *** [modules/gpu/CMakeFiles/cuda_compile.dir/src/nvidia/core/.    /cuda_compile_generated_NCVPyramid.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [modules/gpu/CMakeFiles/opencv_gpu.dir/all] Error 2
make: *** [all] Error 2

ZED Camera: Setting Resolution via Python 2.7 and OpenCV

Hello,

I was wondering if there was a way to directly adjust the ZED camera's resolution? I know we can do it through Cheese, so it should be possible to do it with other code vs only using the ZED SDK.

I have tried code such as:

cap = cv2.VideoCapture(0)

cap.set(3, 4416)
cap.set(4, 1242)

as well as code such as:

cap = cv2.VideoCapture(0)

cap.set(3, 2208)
cap.set(4, 1242)

The default resolution is still just 640x480 for each frame (or 1280x480 combined).

Has any one had to do this or had any success in changing the resolution via other means by using the ZED as just a USB camera?

Thanks in advance,

Andrew

getSDKVersion() crash

Hello guys, under windows x64 right now, using sdk version 1.1.1
the following throws a crash inside sdk lib:

std::string sdkVersion = zed->getSDKVersion();

Any hints?

Cheers,
Bruno

Using Opencv 3.1.x

Instated of OpenCV4Tegra is there any workaround for OpenCV 3.1.x for TX2.

I am getting a bunch of errors ...

/usr/bin/ld: warning: libopencv_calib3d.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_highgui.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_imgproc.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_core.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_video.so.2.4, needed by /usr/local/zed/lib/libsl_calibration.so, not found (try using -rpath or -rpath-link)
/usr/local/zed/lib/libsl_tracking.so: undefined reference to cv::write(cv::FileStorage&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&)' /usr/local/zed/lib/libsl_zed.so: undefined reference to cv::Ptr::delete_obj()'
/usr/local/zed/lib/libsl_zed.so: undefined reference to cv::FileStorage::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/local/zed/lib/libsl_zed.so: undefined reference to cv::VideoWriter::open(std::_cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, double, cv::Size, bool)'
/usr/local/zed/lib/libsl_tracking.so: undefined reference to `cv::FileNodeIterator::readRaw(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned char*, unsigned long)'

.....

Rectification of Images captured using ZED Explorer

My laptop doesn't have Cuda installed. Hence, I captured some images using the ZED explorer in Windows and saved the png files. When I run the depth estimation code on the images, I get very poor results and I think it is because the images are not rectified whereas the depth code runs on rectified images only. Should I use opencv now to rectify the images or is there a better alternative available using the ZED SDK? Thanks in advance for the help!

Example Code builds but does not display on Tx1

I build the example code and then run the executable. 2 windows pop up for VIEW and DEPTH but the windows are blank. Is this just because I am running it on a tx1 and images are being read into memory but just not displayed or is this a bigger problem and images are not even being read into the tx1 from the zed?

syntax error?

when I run cmake ..
this error happens:
sh: 1: Syntax error: end of file unexpected (expecting ")")
then when I run make
this error happens
/home/ubuntu/zed-opencv-master/src/main.cpp: In function ‘void onMouseCallback(int32_t, int32_t, int32_t, int32_t, void*)’:
/home/ubuntu/zed-opencv-master/src/main.cpp:70:90: warning: too many arguments for format [-Wformat-extra-args]
printf("\n%s is too far.\n", data->name.c_str(), dist, data->unit.c_str());
^
/home/ubuntu/zed-opencv-master/src/main.cpp:72:92: warning: too many arguments for format [-Wformat-extra-args]
printf("\n%s is too close.\n", data->name.c_str(), dist, data->unit.c_str());
^
/home/ubuntu/zed-opencv-master/src/main.cpp:74:92: warning: too many arguments for format [-Wformat-extra-args]
printf("\n%s not avaliable\n", data->name.c_str(), dist, data->unit.c_str());
^

ZED over USB extension cable on Windows 7

I keep getting ZED_NOT_AVAILABLE message when I try to use ZED over USB extension cable on Windows 7. While it works fine on Windows 10. Anyone has faced seen similar issue?

ZED application cross-compiling for ARM-Architecture

I want to cross-compile these zed-applications to use it on an ARM-Architecture (not the jetson board) because ZED SDK and CUDA is not running there. My Computer for compiling has Linux Ubuntu and all required software installed and i use the arm-gnueabi compiler. But i tried to compile by command "cmake -DCUDA_USE_STATIC_CUDA_RUNTIME=false -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0 -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 -DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabi-gcc /"

I get error messages:
-Could not find CUDA (missing: CUDA_CUDART_LIBRARY)
or

  • CUDA_nppc_LIBRARY, CUDA_nppi_LIBRARY and CUDA_npps_LIBRARY Variables are set as NOTFOUND.

What can I do to solve the problem? Thank you for your help

downloading ZED SDK and viewing Depth map

Hi,

I and facing a problem while downloading the ZED SDK, it says that the ZED is not connected to an internet. I can view the ZED explorer but the depth viewer is not appearing.
I need to view the Depth map but I am lost, how I will be able to do that?

thanks

Using OpenCV 3.1

Hi. I am using the latest SDK Version, 0.94. Although the ZED framework uses OpenCV 2.4, which I have compiled, my application was developed using OpenCV 3.1 and I cannot afford to adapt it to the previous version.

I am able to run the ZED apps such as Depth Viewer and Explorer with the 2.4 so files I've placed in the ZED libs folder. When I try to compile an application, however, using the sample CMake script it simply says that The following configuration files were considered but not accepted: /usr/local/share/OpenCV/OpenCVConfig.cmake, version: 3.1.0.

Another try was to try to link both OpenCV 2.4 and 3.1 libs and the result was

g++ -o record record.o `pkg-config --libs opencv zed cuda-7.5`
/usr/bin/ld: warning: libopencv_core.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, may conflict with libopencv_core.so.3.1
/usr/bin/ld: warning: libopencv_highgui.so.2.4, needed by /usr/local/zed/lib/libsl_zed.so, may conflict with libopencv_highgui.so.3.1
/usr/bin/ld: warning: libopencv_features2d.so.2.4, needed by /usr/local/zed/lib/libopencv_calib3d.so.2.4, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_flann.so.2.4, needed by /usr/local/zed/lib/libopencv_calib3d.so.2.4, not found (try using -rpath or -rpath-link)
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::Index::~Index()'
/usr/local/zed/lib/libsl_zed.so: undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::SimpleBlobDetector::SimpleBlobDetector(cv::SimpleBlobDetector::Params const&)'
/usr/local/zed/lib/libsl_zed.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::SimpleBlobDetector::Params::Params()'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::LinearIndexParams::LinearIndexParams()'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::Index::Index(cv::_InputArray const&, cv::flann::IndexParams const&, cvflann::flann_distance_t)'
/usr/local/zed/lib/libsl_zed.so: undefined reference to `cv::namedWindow(std::string const&, int)'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::IndexParams::~IndexParams()'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::Index::knnSearch(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, cv::flann::SearchParams const&)'
/usr/local/zed/lib/libsl_calibration.so: undefined reference to `cv::Exception::Exception(int, std::string const&, std::string const&, std::string const&, int)'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::FeatureDetector::detect(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat const&) const'
/usr/local/zed/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::flann::SearchParams::SearchParams(int, float, bool)'
collect2: error: ld returned 1 exit status
Makefile:13: recipe for target 'record' failed
make: *** [record] Error 1

PS: I've written a .pc file to make it easier to use Make, the contents can be seen here.

Alternating between grabbing frames and recording

I am writing an application which requires me to detect movement, thus grabbing frames, and if enough pixels change to start recording an svo file.

Following the documentation I saw that to call the initRecording method one must not have used init before. So, what I am currently doing is to create zed::Camera, and initiating it the usual way, grab frames. After I have detected movement I delete this instance and create a new one. However, my created file has size 0, no matter what. In addition to that, if instead of using init I use initRecording from the first time (remove the two lines below), it works as expected.

Here's a script that can clarify the issue.

sl::zed::Camera* zed;
sl::zed::SENSING_MODE dm_type = sl::zed::RAW;

//Omit these three lines and it will work.
zed = new sl::zed::Camera(sl::zed::ZEDResolution_mode::VGA);
sl::zed::ERRCODE err = zed->init(sl::zed::MODE::PERFORMANCE, -1, true, false, true);
delete zed;

zed = new sl::zed::Camera(sl::zed::ZEDResolution_mode::VGA);
zed->initRecording(getDateTimeStr()+".svo");

while (true)
{
  zed->record();
  if (elapsedTimeSinceRef() >= 60*recordingDuration)
  {
     zed->stopRecording();
     break;
  }
}

It seems that deleting the object is not detaching the camera properly. Can you please give me some advice?

ntdll.dll error using ZED sample code

Hi,

I am developing a system to track some colored points on a user using Zed camera. I tried the sample SVOPlayback first, but I always get an error in ntdll.dll library during runtime. My system configuration is:
Win 10 64-bit (vs 2013 redistributable installed)
Visual Studio 2013
When I open it, a pop-up window shows:
ZED SVO Playback.exe has triggered a breakpoint.

And this is the call stack:
ntdll.dll!00007ffad53073e2() Unknown
ntdll.dll!00007ffad5307d7a() Unknown
ntdll.dll!00007ffad52b492a() Unknown
ntdll.dll!00007ffad52cca51() Unknown
ntdll.dll!00007ffad524c1b8() Unknown
msvcr120.dll!00007ffac03169d8() Unknown
sl_zed64.dll!00007ffac67d2a24() Unknown

ZED SVO Playback.exe!main(int argc, char * * argv) Line 57 C++
[External Code]

I've spent much time on this desperately. So I really really appreciate if you can help me figure out this problem.

Best regards,
Vu

ZED camera has access violation error

I used ZED camera to capture 3-D images.
At the api grab(), I have access violation error.
I can run the sample exe file for depth viewer, just that interfacing from my code has issue. That happened at my industrial PC.
The same code I used at my development PC and no issue.
What could be wrong?
Thanks

Are the images undistorted and sznchronized?

Hello,
It is clear from the API documentation that the function zed->retrieveImage() returns the rectified images.
Are these synchronized and un-distorted as well?
I need to use synchronized, rectified un-distorted images for my work.

Camera works bad with USB 3.0 conection

Hi everyone!

I have an issue with my ZED camera, when I plug it on a 3.0 USB device the image looks like a "collage" (See figure on the above). I tried with OpenCV on C++ and python, Cheese, gucview and the result is the same, if the camera is plugged on a 2.0 USB device the camera looks fine but with limited fps and resolution. When I try the camera on another devices with USB 3.0 it works fine, and other cameras works fine on my 3.0 USB port.

I am working in Ubuntu 16.04 LTS.

How can I fix this problem?,

Thanks a lot for your answers!

Figure:
issue2

ZED Depth Viewer doesn't work

I'm running Depth Viewer in Ubuntu 14.04 desktop
When I install ZED SDK, there are two opencvs(2.4 and 3.1) in desktop
After install SDK, I remove opencv 2.4
When I run ZED Depth Viewer, there is error about missing opencv 2.4
Here is ldd of ZED Depth Viewer

ldd ZED\ Depth\ Viewer | grep opencv
libopencv_imgproc.so.2.4 => not found
libopencv_calib3d.so.2.4 => not found
libopencv_highgui.so.2.4 => not found
libopencv_core.so.2.4 => not found
libopencv_core.so.3.1 => /usr/local/lib/libopencv_core.so.3.1 (0x00007fb2fa3bb000)
libopencv_highgui.so.3.1 => /usr/local/lib/libopencv_highgui.so.3.1 (0x00007fb2fa1af000)
libopencv_imgproc.so.3.1 => /usr/local/lib/libopencv_imgproc.so.3.1 (0x00007fb2f877c000)
libopencv_calib3d.so.3.1 => /usr/local/lib/libopencv_calib3d.so.3.1 (0x00007fb2f83f1000)
libopencv_videoio.so.3.1 => /usr/local/lib/libopencv_videoio.so.3.1 (0x00007fb2f755c000)
libopencv_imgcodecs.so.3.1 => /usr/local/lib/libopencv_imgcodecs.so.3.1 (0x00007fb2f72c1000)
libopencv_video.so.3.1 => /usr/local/lib/libopencv_video.so.3.1 (0x00007fb2f1d4d000)
libopencv_flann.so.3.1 => /usr/local/lib/libopencv_flann.so.3.1 (0x00007fb2e6f4a000)

SDK 1.2 support on TX1 (jetpack 2.3.1)

Trying to build opencv example on Jetson TX1 running jetpack 2.3.1, simply pulling the github repo (which works on my Tegra TK1, running Jetpack 2.3.1 fails on TX1 (running same jetpack) with missing opencv lib). This is a vanilla machine, just flashed with jetpack, no other modifications. Any ideas?

ubuntu@tegra-ubuntu:$ git clone https://github.com/stereolabs/zed-opencv.git
Cloning into 'zed-opencv'...
remote: Counting objects: 47, done.
remote: Total 47 (delta 0), reused 0 (delta 0), pack-reused 47
Unpacking objects: 100% (47/47), done.
Checking connectivity... done.
ubuntu@tegra-ubuntu:
$ cd zed-opencv/
ubuntu@tegra-ubuntu:/zed-opencv$ ls
CMakeLists.txt LICENSE README.md src
ubuntu@tegra-ubuntu:
/zed-opencv$ mkdir build
ubuntu@tegra-ubuntu:/zed-opencv$ cd build/
ubuntu@tegra-ubuntu:
/zed-opencv/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-8.0 (found suitable exact version "8.0")
-- Found CUDA: /usr/local/cuda-8.0 (found version "8.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/zed-opencv/build
ubuntu@tegra-ubuntu:~/zed-opencv/build$ make
Scanning dependencies of target ZED_with_OpenCV
[ 50%] Building CXX object CMakeFiles/ZED_with_OpenCV.dir/src/main.o
[100%] Linking CXX executable "ZED with OpenCV"
/usr/bin/ld: cannot find -lopencv_dep_cudart
collect2: error: ld returned 1 exit status
CMakeFiles/ZED_with_OpenCV.dir/build.make:134: recipe for target 'ZED with OpenCV' failed
make[2]: *** [ZED with OpenCV] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_with_OpenCV.dir/all' failed
make[1]: *** [CMakeFiles/ZED_with_OpenCV.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Using ZED camera for object with glossy surface at outdoor

I use ZED camera to measure object dimension for length x width x height.
The camera is on TOP at about 1.6m height and the object is below.
The issue is at outdoor, bright light like sunlight makes problem for objects with glossy surface.
Can't reconstruct complete 3D shape for the whole object. Sometimes at the middle has black hole and the whole object is not reconstructed in 3D shape.
Like that environment, are there any parameters to fine tune? Say I can detect that the whole 3D shape is not reconstructed then tune that parameters and make better reconstructions.
What are the parameters need to look at for (1) 3D reconstruction is not complete for the whole object (2) what parameters to be tuned so that I have better quality of reconstruction?
Thanks

CUDA dependency

Are there any plans to release an SDK without the CUDA dependency? I'm not using the disparity maps from the SDK, so I don't think there's a need to use the GPU at all for my use case. Could you make it an optional argument in your CMake build.

Multiple main files after cmake operation

Hey i ran cmake on your cloned github project. When i build the project after changing the build mode to release. i get the following error code.
Error 2 error LNK1169: one or more multiply defined symbols found D:\zed-opencv-master\src\Release\ZED with OpenCV.exe ZED_with_OpenCV
Error 1 error LNK2005: main already defined in CMakeCXXCompilerId.obj D:\zed-opencv-master\src\main.obj ZED_with_OpenCV
there seems to be some error in cmake that i am not able to locate.

libsl_zed.so error on TX1 and OpenCV 3.1

Hello,

I'm trying to build the opencv example on a JETSON TX1, running R24 (release), REVISION: 1.0, GCID: 7164062, BOARD: t210ref, EABI: aarch64, DATE: Tue May 17 23:37:30 UTC 2016. The board has the GNU 4.8.4 compiler, CUDA 7.0 and is running OpenCV 3.1.

Is the ZED_SDK_Linux_JTX1_v1.0.0b compatible with the above configurations?

When I try to build the code I get the following error:
/usr/local/zed/lib/libsl_zed.so: error adding symbols: File in wrong format

I also get the following warnings
Scanning dependencies of target ZED_with_OpenCV [100%] Building CXX object CMakeFiles/ZED_with_OpenCV.dir/src/main.o /media/ubuntu/f79d711d-0cef-4d5b-ac43-e01e1684fa56/code/zed-opencv/src/main.cpp: In function ‘void onMouseCallback(int32_t, int32_t, int32_t, int32_t, void*)’: /media/ubuntu/f79d711d-0cef-4d5b-ac43-e01e1684fa56/code/zed-opencv/src/main.cpp:70:90: warning: too many arguments for format [-Wformat-extra-args] printf("\n%s is too far.\n", data->name.c_str(), dist, data->unit.c_str()); ^ /media/ubuntu/f79d711d-0cef-4d5b-ac43-e01e1684fa56/code/zed-opencv/src/main.cpp:72:92: warning: too many arguments for format [-Wformat-extra-args] printf("\n%s is too close.\n", data->name.c_str(), dist, data->unit.c_str()); ^ /media/ubuntu/f79d711d-0cef-4d5b-ac43-e01e1684fa56/code/zed-opencv/src/main.cpp:74:92: warning: too many arguments for format [-Wformat-extra-args] printf("\n%s not avaliable\n", data->name.c_str(), dist, data->unit.c_str()); ^ Linking CXX executable "ZED with OpenCV" /usr/local/zed/lib/libsl_zed.so: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status make[2]: *** [ZED with OpenCV] Error 1 make[1]: *** [CMakeFiles/ZED_with_OpenCV.dir/all] Error 2 make: *** [all] Error 2

Thanks in advance.

SVO File

Hi guys,we are trying to load a recorded session on a SVO file on our application, but we are facing an error on camera initialization:
Relevant bit of our code:

_sl::zed::Camera* zed;
if ( input == "LIVE" )
zed = new sl::zed::Camera ( mode, static_cast ( fps ) );
else
zed = new sl::zed::Camera ( input );

unsigned int firmware = zed->getZEDFirmware();
unsigned int serial = zed->getZEDSerial();
std::string sdkVersion = zed->getSDKVersion();
std::cout << "Found ZED camera.\n\tserial: " << std::to_string(serial) << "\n\tfirmware: " << std::to_string(firmware) << "\n\tsdk version: " << sdkVersion << std::endl;

sl::zed::InitParams params;
params.mode = sl::zed::PERFORMANCE;
params.verbose = true;

sl::zed::ERRCODE err = zed->init ( params );
if ( err != sl::zed::SUCCESS )
{
    cout << "Error:" << err << endl;
    delete zed;
    return -1;
}_ 

Where input points to the filepath of this SVO file. We get the following error message on zed->init call:

Found ZED camera.
serial: 1825
firmware: 700478992
sdk version: 1.1.1
ZED SDK >> (Init) Best GPU Found : NVIDIA Tegra X1 , ID : 0
ZED SDK >> (Init) Disparity mode has been set to PERFORMANCE
ZED SDK >> (Init) Creating ZED GPU mem...
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /mnt/usbdev/opencv/modules/core/src/matrix.cpp, line 1879
terminate called after throwing an instance of 'cv::Exception'
what(): /mnt/usbdev/opencv/modules/core/src/matrix.cpp:1879: error: (-213) Unknown/unsupported array type in function type

Further gdb callstack shows:

#0 0x0000007fb621a4e8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x0000007fb621b9a0 in __GI_abort () at abort.c:89
#2 0x0000007fb63e06a8 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#3 0x0000007fb63de424 in ?? () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#4 0x0000007fb63de470 in std::terminate() () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#5 0x0000007fb63de6f4 in __cxa_throw () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#6 0x0000007fb65683bc in cv::error(cv::Exception const&) () from /usr/local/lib/libopencv_core.so.3.1
#7 0x0000007fb6568574 in cv::error(int, cv::String const&, char const*, char const*, int) () from /usr/local/lib/libopencv_core.so.3.1
#8 0x0000007fb667aff0 in cv::_InputArray::type(int) const () from /usr/local/lib/libopencv_core.so.3.1
#9 0x0000007fb66d05ac in cv::Mat::copyTo(cv::_OutputArray const&) const () from /usr/local/lib/libopencv_core.so.3.1
#10 0x0000007f9e3d3930 in sl::svorw::jBQbf7SIyH::tMuEG75G5o() () from /usr/local/zed/lib/libsl_svorw.so
#11 0x0000007f9e3d1ff0 in sl::svorw::rWAL8fCthR::L4XpGGCBa(bool, unsigned char**) () from /usr/local/zed/lib/libsl_svorw.so
#12 0x0000007fb6e6dc88 in sl::zed::Camera::nextImage(bool) () from /usr/local/zed/lib/libsl_zed.so
#13 0x0000007fb6e6dda0 in sl::zed::Camera::initRectifier() () from /usr/local/zed/lib/libsl_zed.so
#14 0x0000007fb6e74a84 in sl::zed::Camera::init(sl::zed::InitParams&) () from /usr/local/zed/lib/libsl_zed.so
#15 0x0000000000422be4 in main (argc=8, argv=0x7fffffede8) at /media/ubuntu/Disk/evotegra/SignsFramework/JetsonSignRecognition_ZED/src/JetsonSignRecognition.cpp:304

Is this problem related to having OpenCV 3.1 instead of 2.4.x ?

Any hints?
Thank you for your time

Zed not available Error

I was using this as a guide to create a c# wrapper for zed camera in Windows.

When I'm running the code directly from the visual C++ application, it's able to connect and by using (float*)depthMat.buffer I am able to get the depth in float array.
Now when I am trying to call it from C#, it never gets passed the zed->init(params),
throwing the error Zed_Not_Available.

Any ideas ?

Thanks for your time.

How to read svo files without CUDA?

Since ZED SDK depends on CUDA, it is difficult to process *.svo files on PC without an Nvidia GPU, even just to read images. Is there any example code to do this? What is the format of *.svo files?

SDK backward compatibility with old SVOs

I have a couple of SVO files recorded with the SDK version 0.9.4 which I need to open. I cannot use that same version because it does not support my current GPU (GTX 1060). When trying to use a newer version that supports my GPU I get the following error:

ERROR : Since the version 1.0.0 of the SDK the VGA resolution is 672*376, it seems you try to open an old SVO or you do not have update your firmware. Unable to init the ZED:ZED_WRONG_FIRMWARE

I have already reported this issue and have not had a response from anyone in more than a month, I honestly expected you to have more consideration for your costumers.

Zed opencv issues with 'init' function and 'Eigen/Core' C++

I am trying to apply a simple color matching algorithm to the frames coming out of Zed, in C++. I tried the code with image input and it worked fine. Then I changed the source file to a frame from zed using the code:

VideoCapture cap(0);
	if(!cap.isOpened())
	{
		cout <<" Cannot obtain video"<< endl;
		return -1;
	}
	
	Mat src; 
	cap.read(src);
	imshow("Source", src);

The terminal threw the following output:

VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument

The source frame was completely green. I tried changing cap(0) to cap(-1) and cap (1). It didn't work. Then I decided to look into this. I decided to try the hello world program first.
While running make , it gave me an error:

In file included from /home/ubuntu/opencv_ws/zed_test/src/zed_hello.cpp:4:0:
/usr/local/zed/include/zed/Camera.hpp:73:22: fatal error: Eigen/Core: No such file or directory
 #include <Eigen/Core>
                      ^
compilation terminated.
make[2]: *** [CMakeFiles/ZED_PROJECT.dir/src/zed_hello.o] Error 1
make[1]: *** [CMakeFiles/ZED_PROJECT.dir/all] Error 2
make: *** [all] Error 2

Then I edited the Camera.hpp with the following lines:

#include <eigen3/Eigen/Core>
#include <eigen3/Eigen/Eigen>

Also, I changed its file permissions. Now the error says:

In file included from /home/ubuntu/opencv_ws/zed_test/src/zed_hello.cpp:4:0:
/usr/local/zed/include/zed/Camera.hpp:174:21: note: sl::zed::ERRCODE sl::zed::Camera::init(sl::zed::InitParams&)
             ERRCODE init(InitParams &parameters);
                     ^
/usr/local/zed/include/zed/Camera.hpp:174:21: note:   candidate expects 1 argument, 3 provided
make[2]: *** [CMakeFiles/ZED_PROJECT.dir/src/zed_hello.o] Error 1
make[1]: *** [CMakeFiles/ZED_PROJECT.dir/all] Error 2
make: *** [all] Error 2

I tried changing the init statement in multiple ways: zed->init(sl::zed::MODE::QUALITY, 0,true);
But it didn't fix the issue. Kindly help. Thanks in advance.

Problem only in Desktop folder(ZED SDK >> Resolution not yet available)

I have successfully run zed-opencv example in /usr/local/zed/sample/Y/cpu folder

but when I copy the same folder(zed-opencv) in Desktop folder,

it always results in following error:

ZED SDK >> Resolution not yet available

, which means that ZED is not available.

But, zed-opencv example in /usr/local/zed/sample/Y/cpu folder always work correctly.

I don't know why.

It seems to me that this problem might be related to authority problem?

Calculating Depth Map not using ZED SDK

I would like to calculate the disparity map and depth map not using ZED SDK.
( I have some experiences in stereo calibration, and rectification)

And also, I would like to compare the result of the depth map between using ZED SDK and own Code.

zed->normalizeMeasure(sl::zed::MEASURE::DEPTH)).

In order to do that,

I need intrinsic parameter and extrinsic parameter of left and right camera of ZED.

My questions is as follows:

  1. How can I develop the code to calculate the disparity map and depth map not using ZED SDK?

First of all, I will definitely need intrinsic parameter and extrinsic parameter of left and right camera of ZED.

  1. would any one of you open to the public about ZED SDK(e.g., zed->normalizeMeasure(sl::zed::MEASURE::DEPTH)))?

setup the fps to a lower value than 15

Hi,
I was wondering if the the fps can be setup to a value lower than 15. If I setup it to 2, for example, it seems the fps is still 15.
Thanks for your help

Retrieve pointcloud at different confidence thresholds

Hi,
I would like to be able to retrieve two pointclouds after calling zed->grab. For one pointcloud, I would like to set the depth confidence threshold at 100%, including all points, and then retrieve a second pointcloud for the same data at a confidence threshold of 80%. My rough script with pseudocode is:

while(1){
zed->setConfidenceThreshold(100);
zed->grab;
cv::Mat pointcloud_1, pointcloud_2;
// I have written it here, but I convert from sl::Mat to cv::Mat in the retrieve process.
zed->retrieveMeasure(sl::zed::POINTCLOUD).copyTo(pointcloud_1);
zed->setConfidenceThreshold(80);
zed->retrieveMeasure(sl::zed::POINTCLOUD).copyTo(pointcloud_2);
}

However, the pointcloud data seems to only be affected by the second confidence threshold.
I dug around some of the include files by stereolabs and I think one of the comments mentioned
having to clear the cpu buffer for multiple retrieveMeasures? Could you please clarify this and
perhaps provide a bit of example code which I could use to solve my problem. Thanks!

The delay problem of the opencv sample

Hi, I use the opencv sample to get the captured image and depth image. But I found the image stream has a little delay about 100ms while using the sample. If I use the zed tool "ZED Depth Viewer" to show the captured image and depth image, there is almost no delay. Can anybody tell me the reason and how to fix it? Thanks.

ZED Core dumped

I have installed ZED SDK v1.1.1 (for my app code compability) on a Ubuntu 16.04 Docker container having CUDA 8.0. All dependency are handled but when I try to open ZED Explorer or ZED Depth Viewer I simply get

QXcbConnection: Could not connect to display
Aborted (core dumped)

The ZED diagnostic log is as follows:


*** OS Version ***
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

Linux 5f17203f722d 4.10.0-30-generic #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


*** Hardware ***


*** USB Connection List ***
Detected USB3.0 component : 0
Detected ZED with PID/VID : 0
USB :



*** ZED Capabilities***
ERROR /dev/videoX : didn't find suitable videodevice -1
ZED Serial Number : -1
ZED Firmware Number : -1


*** CUDA Capabilities***

*** CUDA Check ***
(SMI) : Driver Version : 384.59
(SMI) : Driver Model
(SMI) : Performance State : P8
cuDeviceGetCount : OK : found 1 NVIDIA Graphic card. Taking dev 0
cuDeviceGetName : OK : GeForce GTX 1060 6GB
cuDeviceComputeCapability : Compute Cap : 6 1 -- must be between 2.0 and 5.3
cuDriverGetVersion : CUDA Driver version : 9000 . Must be >=7500 for CUDA 7.5 toolkit.
cuDeviceTotalMem: CUDA Memory 4096 MBytes (4294967295 bytes)

I suppose the core dumped error may have been caused by the compute capability not being between 2.0 and 5.3 but stereolabs/zed-ros-wrapper#84 suggests that it should work with CUDA 8.0 (which happens to be the version I am using).

I would also like to note that I do not have the camera connected, I just wish to playback some SVO files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.