GithubHelp home page GithubHelp logo

slightech / mynt-eye-d-sdk Goto Github PK

View Code? Open in Web Editor NEW
98.0 18.0 87.0 39.33 MB

MYNT EYE D SDK (MYNT® EYE Depth Camera)

Home Page: http://www.myntai.com/mynteye/depth

License: Other

CMake 5.83% Makefile 2.00% Shell 3.86% C++ 86.34% C 0.37% Batchfile 0.05% NSIS 1.52% JavaScript 0.04%
mynteye

mynt-eye-d-sdk's Introduction

MYNT® EYE D SDK

MYNT® EYE D SDK is a library for MYNT® EYE Depth cameras.

Support platforms

  • Linux x64 & aarch64
    • Tested on PC and TX2, with Ubuntu 16.04 (GCC 5).
  • Windows x64
    • Tested on PC with Windows 10 and Visual Studio 2017.

Documentations

API reference and the guide documentations.

  • en:
  • zh-Hans:

Quick Start Guide

Mirrors

国内镜像:码云

License

This project is licensed under the Apache License, Version 2.0. Copyright 2018 Slightech Co., Ltd.

mynt-eye-d-sdk's People

Contributors

bxwllzz avatar flinnna avatar harjeb avatar jimmylee05 avatar joinaero avatar messier202 avatar molinadavid avatar osenberg-q avatar osenberg-x avatar tinyslik avatar yangruixuan 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

Watchers

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

mynt-eye-d-sdk's Issues

External Trigger or Sync?

Hello!

I'm curious if the new Mynt Eye D camera has the feature for depth images to be captured on a trigger from an external signal? Or is it possible to synchronize the internal clock with an external signal similar to the Intel Realsense D435 camera? If not, are there any plans to add these features in the future?

Thank you

No data when two devices are connected to the same computer

Hello,

when I connect two devices to the same computer, I can only get data from the second one plugged in. The first one opens, but does not provide data.

If I only plug in one of the two devices, no matter which one, and leave the other one unplugged, data come.

Hypothesis: Could it be related to the fact that hid_device::open (in hid_linux.cc) opens the first available device with the right idVendor and idProduct and ignores device index set in OpenParams? Couldn't this lead to CameraPrivate::device_ and CameraPrivate::channels_ accessing different devices? Or some other problem in similar spirit?

Note: The second device also replaces /dev/mynteye-d1000 symbolic link created by the first device with a new one, creating another possible point of contention.

compilation error

run "make all“ then get the error.

CD: ./_build
-- 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
-- HOST_ARCH: x86_64
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using flag -std=c++11
-- C_FLAGS: -Wall -O3
-- CXX_FLAGS: -Wall -O3 -std=c++11
-- Found components for eSPDI
-- eSPDI_INCLUDE_DIRS: /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/include
-- eSPDI_LIBS: /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so
-- Generating shared library mynteye_depth
-- Copy eSPDI_LIBS to /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_output/lib/3rdparty
--   Copy /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so
--   Copy /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so.3.0.21
-- 
-- Platform:
--   HOST_OS: Linux
--   HOST_NAME: Ubuntu
--   HOST_ARCH: x86_64
--   HOST_COMPILER: GNU
--     COMPILER_VERSION: 5.4.0
-- 
-- OpenCV: YES
--   OpenCV_VERSION: 3.3.1
--   OpenCV_WORLD: NO
-- 
-- JPEG: YES
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build
make[1]: Entering directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
make[2]: Entering directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
make[3]: Entering directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
Scanning dependencies of target mynteye_depth
make[3]: Leaving directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
make[3]: Entering directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
[  4%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/data/channels.cc.o
[  8%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/convertor.cc.o
[ 13%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/data_caches.cc.o
[ 17%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/device_info.cc.o
[ 21%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/device.cc.o
[ 26%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/device_linux.cc.o
[ 30%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/device_win.cc.o
[ 34%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/image.cc.o
[ 39%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/open_params.cc.o
[ 43%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/stream_info.cc.o
[ 47%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/device/types.cc.o
[ 52%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/stubs/types_calib.cc.o
[ 56%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/util/rate.cc.o
[ 60%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/util/strings.cc.o
[ 65%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/camera.cc.o
[ 69%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/types_data.cc.o
[ 73%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/utils.cc.o
[ 78%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/internal/camera_p.cc.o
[ 82%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/internal/image_utils.cc.o
[ 86%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/internal/motions.cc.o
[ 91%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/internal/streams.cc.o
[ 95%] Building CXX object CMakeFiles/mynteye_depth.dir/src/mynteye/data/hid/hid_linux.cc.o
[100%] Linking CXX shared library ../_output/lib/libmynteye_depth.so
/usr/bin/ld:/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so: file format not recognized; treating as linker script
/usr/bin/ld:/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so:1: syntax error
collect2: error: ld returned 1 exit status
CMakeFiles/mynteye_depth.dir/build.make:687: recipe for target '../_output/lib/libmynteye_depth.so.1.5.1' failed
make[3]: *** [../_output/lib/libmynteye_depth.so.1.5.1] Error 1
make[3]: Leaving directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mynteye_depth.dir/all' failed
make[2]: *** [CMakeFiles/mynteye_depth.dir/all] Error 2
make[2]: Leaving directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/_build'
Makefile:58: recipe for target 'build' failed
make: *** [build] Error 2

I think the problem is here.
/usr/bin/ld:/home/shen/rtabmap_ws/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so: file format not recognized; treating as linker script
but I don't know how to resolve it.

fatal error: mynteye_wrapper_d/GetParams.h: No such file or directory

[ 5%] Building CXX object mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/src/mynteye_listener.cc.o
/home/jario/Documents/MYNT-EYE-D-SDK/wrappers/ros/src/mynteye_wrapper_d/src/mynteye_listener.cc:21:41: fatal error: mynteye_wrapper_d/GetParams.h: No such file or directory
#include <mynteye_wrapper_d/GetParams.h>
^
compilation terminated.
mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/build.make:62: recipe for target 'mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/src/mynteye_listener.cc.o' failed
make[3]: *** [mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/src/mynteye_listener.cc.o] Error 1
make[3]: Leaving directory '/home/jario/Documents/MYNT-EYE-D-SDK/wrappers/ros/build'
CMakeFiles/Makefile2:503: recipe for target 'mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/all' failed
make[2]: *** [mynteye_wrapper_d/CMakeFiles/mynteye_listener_d.dir/all] Error 2
make[2]: Leaving directory '/home/jario/Documents/MYNT-EYE-D-SDK/wrappers/ros/build'
Makefile:140: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/jario/Documents/MYNT-EYE-D-SDK/wrappers/ros/build'
Invoking "make -j12 -l12" failed
Makefile:121: recipe for target 'ros' failed
make: *** [ros] Error 1

os: ubuntu 18.04
cuda: 10.0
gcc: 6.4.0

It cannot work well in ubuntu18.04

➜ MYNT-EYE-D-SDK git:(master) ./samples/_output/bin/get_image

I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
  name: MYNT-EYE-D1000
  serial_number: 20373347344D5003004C002B
  firmware_version: 1.2
  hardware_version: 2.0
  spec_version: 1.0
  lens_type: 0000
  imu_type: 0000
  nominal_baseline: 120

--------------------------------------------------------------------------------
Index | Device Information
--------------------------------------------------------------------------------
    0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B12-B0135P-016-006-Beta4-ISO_Plugout2M(Interleave), serial_number: 
--------------------------------------------------------------------------------
Auto select a device to open, index: 0
--------------------------------------------------------------------------------
Index | Color Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
    2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
    3 | index: 3, width: 640, height: 480, format: STREAM_YUYV
    4 | index: 4, width: 1280, height: 480, format: STREAM_YUYV
    5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
    6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
    7 | index: 7, width: 1280, height: 480, format: STREAM_MJPG
    8 | index: 8, width: 640, height: 480, format: STREAM_MJPG
--------------------------------------------------------------------------------
Index | Depth Stream Information
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Open device: 0, /dev/video0

D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
Error: Depth Mode width[1280] height[720] format[YUYV] not support. Please check the resolution list.
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 0x0 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=3D/eSPDI_API: SetPropertyValue control=7 value=4
-- IR intensity: 4
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
EtronDI_GetRectifyMatLogData,
W/eSPDI_API:  read error, offset is 0
Open device success

Press ESC/Q on Windows to terminate
[1]    10624 segmentation fault (core dumped)  ./samples/_output/bin/get_image

Run with GDB

Press ESC/Q on Windows to terminate

Thread 8 "get_image" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd5a3a700 (LWP 10710)]
0x00007ffff27cee9c in EtronDI_GetDepthImage(void*, tagDEVSEL*, unsigned char*, unsigned long*, int*, int) () from /usr/local/lib/3rdparty/libeSPDI.so
(gdb) Exception ignored in: <gdb.GdbOutputFile object at 0x7f68615c1ef0>

5.0.0-23-generic #24~18.04.1-Ubuntu SMP Mon Jul 29 16:12:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Install issues

2 issues:
0. I have cmake 3.5.1 but the install complains that I don't have >=3.0. Something is wrong with the version comparison method.

  1. Can you please support CUDA 9.0, 9.1, 9.2, and 10.0? Practically nobody uses CUDA 8 anymore.
    screenshot from 2019-02-26 21-48-23

Also, I do have cuda 8 in /usr/local/cuda-8.0 on my system. But /usr/local/cuda must be linked to a more recent version for everything else on my system to function.

Multiple Cameras usbfs: process () did not claim interface 0 before use

When running multiple cameras simultaneous on the same machine the usb driver reports:
usb 1-2.1: usbfs: process <PID> did not claim interface 0 before use.

This happens every time upon reading an image. The read succeeds but this message causes significant unnecessary load on the syslog process and fills the disk eventually.

The problem appears to be in the Etron code. Any help would be appreciated. It is currently making the cameras unusable for our application.

Segmentation fault and Depth Mode Resolution Error on Linux 18.04

Every time I plug my MYNT-EYE-D and try to run ./samples/_output/bin/get_image or any other executable from samples, I get the following error:

I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
  name: MYNT-EYE-D1000
  serial_number: 2038375335485012003D0020
  firmware_version: 1.1
  hardware_version: 2.0
  spec_version: 1.0
  lens_type: 0000
  imu_type: 0000
  nominal_baseline: 120

--------------------------------------------------------------------------------
Index | Device Information
--------------------------------------------------------------------------------
    0 | index: 0, name: /dev/video2, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, serial_number: 
--------------------------------------------------------------------------------
Auto select a device to open, index: 0
--------------------------------------------------------------------------------
Index | Color Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
    2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
    3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV
    4 | index: 4, width: 640, height: 480, format: STREAM_YUYV
    5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
    6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
    7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG
--------------------------------------------------------------------------------
Index | Depth Stream Information
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Open device: 0, /dev/video2

D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
**Error: Depth Mode width[1280] height[720] format[YUYV] not support. Please check the resolution list.**
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 0x0 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=3D/eSPDI_API: SetPropertyValue control=7 value=4
-- IR intensity: 4
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
EtronDI_GetRectifyMatLogData,
EtronDI_GetRectifyMatLogData,

Open device success

Press ESC/Q on Windows to terminate
**Segmentation fault (core dumped)**

Following is my system specification:
**Linux 4.18.0-24-generic #25~18.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux**

I tried running the same with GNU debugger and I got following output:

GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./samples/_output/bin/get_image...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/seegrid.local/srane/MYNT-EYE-D-SDK/samples/_output/bin/get_image 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
  name: MYNT-EYE-D1000
  serial_number: 2038375335485012003D0020
  firmware_version: 1.1
  hardware_version: 2.0
  spec_version: 1.0
  lens_type: 0000
  imu_type: 0000
  nominal_baseline: 120

--------------------------------------------------------------------------------
Index | Device Information
--------------------------------------------------------------------------------
    0 | index: 0, name: /dev/video2, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B01-B0135P-BL60U-016-003-EnDepthPostProcess-ISO_Plugout2M, serial_number: 
--------------------------------------------------------------------------------
Auto select a device to open, index: 0
--------------------------------------------------------------------------------
Index | Color Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
    2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
    3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV
    4 | index: 4, width: 640, height: 480, format: STREAM_YUYV
    5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
    6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
    7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG
--------------------------------------------------------------------------------
Index | Depth Stream Information
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Open device: 0, /dev/video2

D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
Error: Depth Mode width[1280] height[720] format[YUYV] not support. Please check the resolution list.
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 0x0 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=3D/eSPDI_API: SetPropertyValue control=7 value=4
-- IR intensity: 4
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
EtronDI_GetRectifyMatLogData,
EtronDI_GetRectifyMatLogData,
[New Thread 0x7fffd7a06700 (LWP 14731)]
[New Thread 0x7fffd7205700 (LWP 14732)]
[New Thread 0x7fffd6a04700 (LWP 14733)]

Open device success

Press ESC/Q on Windows to terminate

Thread 3 "get_image" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd7205700 (LWP 14732)]
0x00007ffff63e0e9c in EtronDI_GetDepthImage(void*, tagDEVSEL*, unsigned char*, unsigned long*, int*, int) () from /usr/local/lib/3rdparty/libeSPDI.so
(gdb) bt
#0  0x00007ffff63e0e9c in EtronDI_GetDepthImage(void*, tagDEVSEL*, unsigned char*, unsigned long*, int*, int) () at /usr/local/lib/3rdparty/libeSPDI.so
#1  0x00007ffff7bc0b47 in mynteyed::Device::GetImageDepth() () at /usr/local/lib/libmynteye_depth.so.1
#2  0x00007ffff7bac0be in mynteyed::Streams::CaptureStreamDepth() () at /usr/local/lib/libmynteye_depth.so.1
#3  0x00007ffff7bae16e in std::thread::_State_impl<std::thread::_Invoker<std::tuple<mynteyed::Streams::StartStreamCapturing()::{lambda()#1}> > >::_M_run() () at /usr/local/lib/libmynteye_depth.so.1
#4  0x00007ffff6cf766f in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff40b86db in start_thread (arg=0x7fffd7205700) at pthread_create.c:463
#6  0x00007ffff675288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) 

What is the recommended way to obtain data(images) without any post-processing?

I used your sdk and tried to see the quality of the image at highest resolution and 30fps(in Ubuntu 16.04). Images looked a bit washed-out or post-processed. I also tried using the ROS way and still find the images of similar quality. Could you recommend the best way to receive the raw-unprocessed data from the camera?

Weird depth result

Hi,
I just got a new MYNTEYE camera and tried to get depth images, but it shows so weird depth map. tested on ubuntu 16.04 desktop PC & TX2 and got the same result.
I attached the depth image I got. I use the SDK's samples/get_image binary (tried with get_depth but nothing better). Is this something wrong with my device? or SDK? Please let me know if there is anything I could do to solve this problem. Thanks.

mynteye_d

Windows 10 get_imu_params problem

When I run the get_imu_params on windows 10, it gives me the following error
"E:\Mynt Eye\MYNT-EYE-D-SDK\src\mynteyed\data\channels.cc 564:: Error reading, device went offline."

but it continue to open the device and then gives the following error:
"Error: Motion intrinsics not found
This device not supported to get motion intrinsics."

please advice.

Edit: I use Mynt Eye D with the latest SDK on master branch, and it gives me the same error with SDK 1.7.5, but on linux it works fine with sudo permission.

MYNT-EYE-D-SDK Fails to Compile on Ubuntu 18.04

So in Ubuntu 18.04, MYNT-EYE-D-SDK is missing math libraries in the MYNT-EYE-D-SDK/mynteyed/internal/location.cc, in which it causes compilation to fail. Here's the output when running make all:

mynteye_d_sdk_fail_ubuntu_18

It's missing this header:

#include <cmath>

Inconsistency between StreamInfo and StreamMode

From GetDeviceInfos(), I as one of the options I get resolution of 2560 by 960. But it doesn't seem to be possible to set it through the StreamMode which does not offer such a resolution. Is this the intended behavior?

Thanks in advance.

I/eSPDI_API: eSPDI: EtronDI_Init Error: Device not found

I have a simple test application (derived from samples) that works fine on an ubuntu 16.04 x86-64 with SDKv1.7.8 but the same application (cross compiled for a custom Linux distribution x86-64) leads to this same issue #5 :

root@CTX18000000M:~# ./testMyntEyeD
Pas d'arguments. mode stream uniquement
I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
name: MYNT-EYE-D1000
serial_number: 2038375335485017002A0041
firmware_version: 1.0
hardware_version: 2.0
spec_version: 1.0
lens_type: 0000
imu_type: 0000
nominal_baseline: 120
INFO : Select device

I/eSPDI_API: eSPDI: EtronDI_Init

I/eSPDI_API: eSPDI: EtronDI_Init

Error: Device not found
Error: Select failed

root@CTX18000000M:~#

Kernel version for this custom yocto distribution is : # uname -a
Linux CTX18000000M 4.12.21-yocto-standard #1 SMP PREEMPT Wed Nov 21 14:39:41 UTC 2018 x86_64 GNU/Linux

It seems to be an error related to eSPDI API... Could you please advise ?
Lamine22

Originally posted by @Lamine22 in #5 (comment)

获取的图像有畸变

通过Sample获取的例程有明显畸变,尤其是RGB图,目前深度图是否有畸变暂时未发现;
后通过void | SetImageMode (const ImageMode &mode)该函数配置后依旧没有效果

get_imu_params print 10 values of 3x3 matrix

Open device success

Motion Intrinsics: {accel: {scale: [1.00116999824541697, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00574000000000008, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00368999999999997], assembly: [1.00000000000000000, -0.00085117100000000, -0.00167800000000000, 0.00000000000000000, 1.00000000000000000, -0.00092446900000000, -0.00000000000000000, 0.00000000000000000, 1.00000000000000000, 1.00000000000000000], drift: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], noise: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], bias: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], x: [0.00721885660000000, -0.00002738025600000], y: [0.00851315170000000, 0.00010687025000000], z: [-0.00813580470000000, 0.00005845499900000]}, gyro: {scale: [1.00130999999999992, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00093999999999994, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000, 1.00435000000000008], assembly: [1.00000000000000000, 0.00057769300000000, -0.00030928800000000, -0.00011987300000000, 1.00000000000000000, 0.00199108000000000, 0.00033164000000000, -0.00228316000000000, 1.00000000000000000, 1.00000000000000000], drift: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], noise: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], bias: [0.00000000000000000, 0.00000000000000000, 0.00000000000000000], x: [0.23946206002000001, -0.00103628300000000], y: [0.12068726130000000, -0.00450523140000000], z: [0.10734478983000000, -0.00182436730000000]}}
Motion Extrinsics left to imu: {rotation: [0.99996651999999997, 0.00430873000000000, 0.00695718000000000, 0.00434878000000000, -0.99997400999999997, -0.00575128000000000, 0.00693222000000000, 0.00578135000000000, -0.99995926000000002], translation: [-47.77362000000000108, -2.23730999999999991, -1.60071000000000008]}

Imu params saved to imu_params.params in current folder.

assembly (3x3 matrix) has 10 values.

std::ostream &operator<<(std::ostream &os, const ImuIntrinsics &in) {
  ...
  os << ", assembly: [";
  for (int i = 0; i <= 2; i++)
    os << in.assembly[0][i] << ", ";
  for (int i = 0; i <= 2; i++)
    os << in.assembly[1][i] << ", ";
  for (int i = 0; i <= 2; i++)
    os << in.assembly[2][i] << ", ";
  os << in.assembly[2][2] << "]";
  ...

Could not find eSPDI!

When compiling MYNT-EYE-D-SDK I'm getting following error:

-- Unable to find eSPDI header files!
-- Unable to find eSPDI library files!
CMake Error at cmake/FindeSPDI.cmake:91 (message):
  Could not find eSPDI!
Call Stack (most recent call first):
  CMakeLists.txt:79 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/vedanshu/MYNT-EYE-D-SDK/_build/CMakeFiles/CMakeOutput.log".
make: *** [build] Error 1

In trying to compile it on MAC.

JetsonNano USB3.0 Hub Recognized as USB2.0

Essentially, the topic is the issue.

I have used JetsonNano and official Linux4Tegra image to run MYNTEYE-D. Compilation is going fine, however, the USB3.0 hub present on the board is not recognized as USB3.0 but rather falls back to the USB2.0 speed disabling most of the available features for the camera.

The hub is definitely 3.0 since Intel Realsense camera performs at required speeds, so the issue is somewhere in the SDK.

libeSPDI and UVC header streams bug (Linux)

Since Linux kernel version 4.16-rc1 there have been some changes to uvcvideo driver which seem to break libeSPDI. This commit adds UVC video header streams as separate /dev/videoX nodes for each UVC device. It means that previously MYNT EYE D device mapping looked like this:

  • /dev/video0 - color stream
  • /dev/video1 - depth stream

Now, from kernel 4.16+, it looks like this:

  • /dev/video0 - color stream
  • /dev/video1 - UVC headers for color stream
  • /dev/video2 - depth stream
  • /dev/video3 - UVC headers for depth stream

This confuses libeSPDI which can only find color stream and no depth stream.

Would it be possible for you to submit this bug to Etron? Eventually new kernels will become available on Ubuntu and other platforms so it becomes necessary to deal with this sooner or later.

Multiple cameras failing

I have two mynteye P cameras connected to the same computer
When I run the get_points2 sample program with either camera, alone, it succeeds.
Attempting to run get_points2 with the second camera while the first instance of get_points2 is still running results in the second invocation exiting with output that ends with the following:

Open device: 1, /dev/video3

D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 >value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 >value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=2-- Color Stream: 1280x720 YUYV
-- Depth Stream: 1280x720 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 >value=3D/eSPDI_API: SetPropertyValue control=7 value=4
-- IR intensity: 4
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
start_capturing() failed .
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
start_capturing() failed .

Error: Open camera failed

The second invocation of get_points2 fails without affecting the first invocation, regardless of whether it is device 0 or device 1 that is opened first.

This appears to be different behavior from that reported in issue #30
I cannot determine if this has the same cause as issue #44

Thanks for your help.

How can I get timestamp without using API

Hello,

How can I get timestamp of streaming image without using API of MYNT EYE?
I am developing a program which relies on MYNTEYE SDK 1.7.7 (I could not find API in this SDK). See the sample code for how to get timestamp by using API.

_while (flag) {
api->WaitForStreams();
auto left_data = api->GetStreamData(Stream::LEFT_RECTIFIED);
auto right_data = api->GetStreamData(Stream::RIGHT_RECTIFIED);
if (left_data.frame.empty() || right_data.frame.empty()) {
continue;
}
cv::Mat left_img, right_img;
if (left_data.frame.channels() == 1) {
// s1
left_img = left_data.frame;
right_img = right_data.frame;
} else if (left_data.frame.channels() >= 3) {
// s2
cv::cvtColor(left_data.frame, left_img, cv::COLOR_RGB2GRAY);
cv::cvtColor(right_data.frame, right_img, cv::COLOR_RGB2GRAY);
}

igb.GrabStereo(left_img, right_img, left_data.img->timestamp*0.00001f);

}

Hope to see your reply soon!!

ROS的wrapper没有输出

ROS的wrapper设置1280x480有输出,2560x720用rostopic查看有IMU输出,没有图像输出

此时读取还会报错
MYNT-EYE-D-SDK/src/mynteyed/data/channels.cc, 318:: Error Reading, device went offline !

使用的参数如下

 * /mynteye/left/image_color/disable_pub_plugins: ['image_transport...
 * /mynteye/left/image_mono/disable_pub_plugins: ['image_transport...
 * /mynteye/right/image_color/disable_pub_plugins: ['image_transport...
 * /mynteye/right/image_mono/disable_pub_plugins: ['image_transport...
 * /mynteye_wrapper_d_node/base_frame: mynteye_link_frame
 * /mynteye_wrapper_d_node/color_mode: 1
 * /mynteye_wrapper_d_node/color_stream_format: 1
 * /mynteye_wrapper_d_node/depth_frame: mynteye_depth_frame
 * /mynteye_wrapper_d_node/depth_mode: 2
 * /mynteye_wrapper_d_node/depth_stream_format: 1
 * /mynteye_wrapper_d_node/depth_topic: mynteye/depth/ima...
 * /mynteye_wrapper_d_node/depth_type: 0
 * /mynteye_wrapper_d_node/dev_index: 0
 * /mynteye_wrapper_d_node/dev_mode: 2
 * /mynteye_wrapper_d_node/framerate: 20
 * /mynteye_wrapper_d_node/gravity: 9.8
 * /mynteye_wrapper_d_node/imu_frame: mynteye_imu_frame
 * /mynteye_wrapper_d_node/imu_frame_processed: mynteye_imu_frame...
 * /mynteye_wrapper_d_node/imu_processed_topic: mynteye/imu/data_...
 * /mynteye_wrapper_d_node/imu_timestamp_align: False
 * /mynteye_wrapper_d_node/imu_topic: mynteye/imu/data_raw
 * /mynteye_wrapper_d_node/ir_depth_only: False
 * /mynteye_wrapper_d_node/ir_intensity: 0
 * /mynteye_wrapper_d_node/left_color_frame: mynteye_left_colo...
 * /mynteye_wrapper_d_node/left_color_topic: mynteye/left/imag...
 * /mynteye_wrapper_d_node/left_mono_frame: mynteye_left_mono...
 * /mynteye_wrapper_d_node/left_mono_topic: mynteye/left/imag...
 * /mynteye_wrapper_d_node/mesh_file: D-0315.obj
 * /mynteye_wrapper_d_node/points_factor: 1000.0
 * /mynteye_wrapper_d_node/points_frame: mynteye_points_frame
 * /mynteye_wrapper_d_node/points_frequency: 10
 * /mynteye_wrapper_d_node/points_topic: mynteye/points/da...
 * /mynteye_wrapper_d_node/right_color_frame: mynteye_right_col...
 * /mynteye_wrapper_d_node/right_color_topic: mynteye/right/ima...
 * /mynteye_wrapper_d_node/right_mono_frame: mynteye_right_mon...
 * /mynteye_wrapper_d_node/right_mono_topic: mynteye/right/ima...
 * /mynteye_wrapper_d_node/state_ae: True
 * /mynteye_wrapper_d_node/state_awb: True
 * /mynteye_wrapper_d_node/stream_mode: 3
 * /mynteye_wrapper_d_node/temp_frame: mynteye_temp_frame
 * /mynteye_wrapper_d_node/temp_topic: mynteye/temp/data...
 * /rosdistro: melodic
 * /rosversion: 1.14.3

Cannot read depth data

Hello,

sample-like code to read data fails to open() the camera:

mynteye.cc:

#include <iostream>
#include <mynteyed/camera.h>

int main(int argc, char** argv) {
  mynteyed::Camera camera;
  const auto device_infos = camera.GetDeviceInfos();
  if (device_infos.empty()) {
    std::cerr << "No device found." << std::endl;
    return -1;
  }
  std::cerr << "Found " << device_infos.size() << " device(s)." << std::endl;
  const mynteyed::DeviceInfo& device_info = device_infos[0];

  mynteyed::OpenParams camera_params(device_info.index);
  camera_params.dev_mode = mynteyed::DeviceMode::DEVICE_DEPTH;
  camera_params.stream_mode = mynteyed::StreamMode::STREAM_1280x720;
  camera_params.depth_mode = mynteyed::DepthMode::DEPTH_RAW;
  const mynteyed::ErrorCode err = camera.Open(camera_params);
  if (err != mynteyed::ErrorCode::SUCCESS) {
    std::cerr << "Failed to open camera: " << static_cast<int>(err) << std::endl;
    return -1;
  }
}
$ g++ --std=c++11 -Wall --pedantic -g mynteye.cc -o mynteye -lmynteye_depth
$ ./mynteye
$ ./mynteye 
I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
  name: MYNT-EYE-D1000
  serial_number: 20383753354850170038004F
  firmware_version: 1.2
  hardware_version: 2.0
  spec_version: 1.0
  lens_type: 0000
  imu_type: 0000
  nominal_baseline: 120
Found 1 device(s).
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
Error: Depth Mode width[1280] height[720] format[YUYV] not support. Please check the resolution list.
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 0x0 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0
-- IR intensity: 0
Failed to open camera: 1

I also tried other device modes, stream modes and depth modes in all combinations with the same result.

$ uname -a
Linux my_host 4.19.0-4-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.28-2 (2019-03-15) x86_64 GNU/Linux
$ g++ --version
g++ (Debian 8.3.0-5) 8.3.0
$ git rev-list --count HEAD
734
$ git rev-parse HEAD
8c148db47ca7d96b71a3593bf8999e817063fbe4

It could either be related to #13, a result of one of invalid reads and writes in libeSPDI or something else:

$ valgrind --undef-value-errors=no ./mynteye                                           
==26358== Memcheck, a memory error detector
==26358== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26358== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==26358== Command: ./mynteye
==26358== 
I/eSPDI_API: eSPDI: EtronDI_Init==26358== Invalid write of size 1
==26358==    at 0x4838DD7: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25839: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid write of size 1
==26358==    at 0x4838DD7: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25A0A: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358==  Address 0x27c5f62b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E259C0: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Warning: invalid file descriptor -1 in syscall close()
==26358== Warning: invalid file descriptor -1 in syscall close()
==26358== Warning: invalid file descriptor -1 in syscall close()
...
==26358== Warning: invalid file descriptor -1 in syscall close()
==26358== Warning: invalid file descriptor -1 in syscall close()
==26358== Warning: invalid file descriptor -1 in syscall close()
==26358== Invalid read of size 1
==26358==    at 0x4838DCB: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E2AAD0: CVideoDevice::CVideoDevice(char*, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D660: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid read of size 1
==26358==    at 0x4838DCB: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E2AAD0: CVideoDevice::CVideoDevice(char*, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D6CA: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358==  Address 0x27c5f62b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E259C0: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
/home/jirka/Downloaded/mynteye/mynteye_d/20190409/MYNT-EYE-D-SDK/src/mynteyed/data/channels.cc 577:: Require imu instrinsics failed.
/home/jirka/Downloaded/mynteye/mynteye_d/20190409/MYNT-EYE-D-SDK/src/mynteyed/data/channels.cc 628:: GetFiles failed.
/home/jirka/Downloaded/mynteye/mynteye_d/20190409/MYNT-EYE-D-SDK/src/mynteyed/internal/camera_p.cc 395:: Read device descriptors failed.
==26358== Invalid read of size 1
==26358==    at 0x4838C74: strlen (vg_replace_strmem.c:460)
==26358==    by 0x4E25B67: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1DE33: EtronDI_GetDeviceInfo(void*, tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41A5: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid read of size 1
==26358==    at 0x4838DCB: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25B9F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1DE33: EtronDI_GetDeviceInfo(void*, tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41A5: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid write of size 1
==26358==    at 0x4838DD7: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25B9F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1DE33: EtronDI_GetDeviceInfo(void*, tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41A5: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358==  Address 0x1e77dbeb is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E25B6F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1DE33: EtronDI_GetDeviceInfo(void*, tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41A5: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358== 
==26358== Invalid write of size 4
==26358==    at 0x4E2C434: CVideoDevice::GetFwVersion(char*, int, int*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1E5DE: EtronDI_GetFwVersion(void*, tagDEVSEL*, char*, int, int*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41C8: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358==  Address 0x26bb0c54 is 196 bytes inside a block of size 197 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E2C38D: CVideoDevice::GetFwVersion(char*, int, int*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1E5DE: EtronDI_GetFwVersion(void*, tagDEVSEL*, char*, int, int*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41C8: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358== 
==26358== Invalid read of size 1
==26358==    at 0x4838C74: strlen (vg_replace_strmem.c:460)
==26358==    by 0x48E4214: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358==  Address 0x1e77dbeb is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E25B6F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1DE33: EtronDI_GetDeviceInfo(void*, tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E41A5: mynteyed::Device::GetDeviceInfos(std::vector<mynteyed::DeviceInfo, std::allocator<mynteyed::DeviceInfo> >*) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EAA32: mynteyed::Camera::GetDeviceInfos() const (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109243: main (mynteye.cc:6)
==26358== 
Found 1 device(s).
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
Error: Depth Mode width[1280] height[720] format[YUYV] not support. Please check the resolution list.
-- Framerate: 10
==26358== Invalid read of size 1
==26358==    at 0x4838C74: strlen (vg_replace_strmem.c:460)
==26358==    by 0x4E25B67: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1FC65: EtronDI_SetDepthDataType(void*, tagDEVSEL*, unsigned short) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E4D0C: mynteyed::Device::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EED52: mynteyed::CameraPrivate::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109326: main (mynteye.cc:18)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid read of size 1
==26358==    at 0x4838DCB: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25B9F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1FC65: EtronDI_SetDepthDataType(void*, tagDEVSEL*, unsigned short) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E4D0C: mynteyed::Device::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EED52: mynteyed::CameraPrivate::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109326: main (mynteye.cc:18)
==26358==  Address 0x27c4383b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E257FD: CEtronDI::FindDevice() (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1D602: EtronDI_Init(void**, bool) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E0D9A: mynteyed::Device::Init() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48E33E3: mynteyed::Device::Device() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EFE9A: mynteyed::CameraPrivate::CameraPrivate() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EA44D: mynteyed::Camera::Camera() (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109230: main (mynteye.cc:5)
==26358== 
==26358== Invalid write of size 1
==26358==    at 0x4838DD7: strcpy (vg_replace_strmem.c:512)
==26358==    by 0x4E25B9F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1FC65: EtronDI_SetDepthDataType(void*, tagDEVSEL*, unsigned short) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E4D0C: mynteyed::Device::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EED52: mynteyed::CameraPrivate::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109326: main (mynteye.cc:18)
==26358==  Address 0x1e77de4b is 0 bytes after a block of size 11 alloc'd
==26358==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==26358==    by 0x4E25B6F: CEtronDI::GetDeviceInfo(tagDEVSEL*, tagDEVINFORMATION*) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x4E1FC65: EtronDI_SetDepthDataType(void*, tagDEVSEL*, unsigned short) (in /usr/local/lib/3rdparty/libeSPDI.so.3.0.24.05)
==26358==    by 0x48E4D0C: mynteyed::Device::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x48EED52: mynteyed::CameraPrivate::Open(mynteyed::OpenParams const&) (in /usr/local/lib/libmynteye_depth.so.1.7.4)
==26358==    by 0x109326: main (mynteye.cc:18)
==26358== 
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 0x0 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0
-- IR intensity: 0
Failed to open camera: 1
==26358== 
==26358== HEAP SUMMARY:
==26358==     in use at exit: 762,788 bytes in 4,542 blocks
==26358==   total heap usage: 179,530 allocs, 174,988 frees, 32,719,898 bytes allocated
==26358== 
==26358== LEAK SUMMARY:
==26358==    definitely lost: 182 bytes in 5 blocks
==26358==    indirectly lost: 161,626 bytes in 39 blocks
==26358==      possibly lost: 1,352 bytes in 18 blocks
==26358==    still reachable: 599,628 bytes in 4,480 blocks
==26358==                       of which reachable via heuristic:
==26358==                         newarray           : 1,536 bytes in 16 blocks
==26358==         suppressed: 0 bytes in 0 blocks
==26358== Rerun with --leak-check=full to see details of leaked memory
==26358== 
==26358== For counts of detected and suppressed errors, rerun with: -v
==26358== ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)

The device itself seems OK. When I run $ guvcview -d /dev/video4, it shows some green misinterpretation of what appears to be depth data.

Bad quality depth map.

Hi, I am having trouble getting a usable depth map with my camera. The color image is:

image

but the depth map looks like this:

image

I am using very slightly adjusted sample code:


int main(int argc, char const* argv[]) {

  Camera cam;
  DeviceInfo dev_info;
  if (!util::select(cam, &dev_info)) {
    return 1;
  }
  util::print_stream_infos(cam, dev_info.index);
  
  OpenParams params(dev_info.index);
  {
    // Framerate: 30(default), [0,60], [30](STREAM_2560x720)
    params.framerate = 30;

       params.dev_mode = DeviceMode::DEVICE_ALL;

    // Color mode: raw(default), rectified
    // params.color_mode = ColorMode::COLOR_RECTIFIED;

    // Depth mode: colorful(default), gray, raw
     params.depth_mode = DepthMode::DEPTH_GRAY;

   
    // Infrared intensity: 0(default), [0,10]
    params.ir_intensity = 10;

    // Colour depth image, default 1000. [0, 16384]
    params.colour_depth_value = 5000;
  }

  // Enable what process logics
  // cam.EnableProcessMode(ProcessMode::PROC_IMU_ALL);

  // Enable image infos
  cam.EnableImageInfo(true);

  cam.Open(params);

  std::cout << std::endl;
  if (!cam.IsOpened()) {
    std::cerr << "Error: Open camera failed" << std::endl;
    return 1;
  }
  std::cout << "Open device success" << std::endl << std::endl;

  std::cout << "Press ESC/Q on Windows to terminate" << std::endl;

  bool is_left_ok = cam.IsStreamDataEnabled(ImageType::IMAGE_LEFT_COLOR);
  bool is_right_ok = cam.IsStreamDataEnabled(ImageType::IMAGE_RIGHT_COLOR);
  bool is_depth_ok = cam.IsStreamDataEnabled(ImageType::IMAGE_DEPTH);

  if (is_left_ok) cv::namedWindow("left color");
  if (is_right_ok) cv::namedWindow("right color");
  if (is_depth_ok) cv::namedWindow("depth");

  CVPainter painter;
  util::Counter counter;
  for (;;) {
    counter.Update();

    if (is_left_ok) {
      auto left_color = cam.GetStreamData(ImageType::IMAGE_LEFT_COLOR);
      if (left_color.img) {
        cv::Mat left = left_color.img->To(ImageFormat::COLOR_BGR)->ToMat();
        painter.DrawSize(left, CVPainter::TOP_LEFT);
        painter.DrawStreamData(left, left_color, CVPainter::TOP_RIGHT);
        painter.DrawInformation(left, util::to_string(counter.fps()),
            CVPainter::BOTTOM_RIGHT);
        cv::imshow("left color", left);
      }
    }

    if (is_right_ok) {
      auto right_color = cam.GetStreamData(ImageType::IMAGE_RIGHT_COLOR);
      if (right_color.img) {
        cv::Mat right = right_color.img->To(ImageFormat::COLOR_BGR)->ToMat();
        painter.DrawSize(right, CVPainter::TOP_LEFT);
        painter.DrawStreamData(right, right_color, CVPainter::TOP_RIGHT);
        cv::imshow("right color", right);
      }
    }

    if (is_depth_ok) {
      auto image_depth = cam.GetStreamData(ImageType::IMAGE_DEPTH);
      if (image_depth.img) {
        cv::Mat depth;
        if (params.depth_mode == DepthMode::DEPTH_COLORFUL) {
          depth = image_depth.img->To(ImageFormat::DEPTH_BGR)->ToMat();
        } else {
          depth = image_depth.img->ToMat();
        }
        painter.DrawSize(depth, CVPainter::TOP_LEFT);
        painter.DrawStreamData(depth, image_depth, CVPainter::TOP_RIGHT);
        cv::imshow("depth", depth);
      }
    }

    char key = static_cast<char>(cv::waitKey(1));
    if (key == 27 || key == 'q' || key == 'Q') {  // ESC/Q
      break;
    }
  }

  cam.Close();
  cv::destroyAllWindows();
  return 0;
}

How can i get a nice depth map?
Thanks!

Camera stops publishing after 3-4 hours

We're experiencing an issue with our Mynteye D camera (using the ROS node), where it stops publishing after running for a long period of time (3-4 hours?). Nothing crashes - the ROS node just stops publishing images and camera info messages.

Killing the node and restarting it seems to fix the problem, but we'd like to avoid that.

Is this an issue that others have experienced? Has anyone left the camera running for long periods of time without lockups?

Query serial number of device

DeviceInfo returned by GetDeviceInfos contains a field sn (serial number), however it is always empty. Could you please fill this field? Thank you in advance

我在使用C++ SDK的时候出现了问题

环境: ubuntu16.04
编译器 :qtcreator
问题:

/home/jing/qtcode/mynt_camera/main.cpp:106: error: ‘class mynteyed::Image’ has no member named ‘ToMat’
         cv::Mat left = left_color.img->To(ImageFormat::COLOR_BGR)->ToMat();
                                                                    ^

pro文件

TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp \
    util/cam_utils.cc \
    util/cv_painter.cc \
    util/pc_viewer.cc

INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib -lmynteye_depth

LIBS += -L/usr/local/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab  -lrt -lpthread -lm -ldl

HEADERS += \
    util/cam_utils.h \
    util/counter.h \
    util/cv_painter.h \
    util/optparse.h \
    util/pc_viewer.h

main文件是复制的getstereo.cpp
求解答。非常感谢!

Need fedora support

Fedora don't have apt,so 'make init' failed:

-- DETECT: apt-get not found, but required

Any help?

自动曝光失效

11542587584_ pic
深度版相机的自动曝光 state_ae,设为true,仍然无法打开自动曝光。

Impossible to disable right camera stream

If camera was open first time with resolution 2560x720, then closed, and then opened again with resolution 1280x720, there is an error saying

"If wanna get right color, must use one of these stream mode:

  • STREAM_1280x480
  • STREAM_2560x720
    Or cancel EnableStreamData(ImageType::IMAGE_RIGHT_COLOR)"

According to the code in CameraPrivate::Open, it should automatically enable appropriate to the mode stream data, and it does. However, it does not disable the stream (as it should disable IMAGE_RIGHT_COLOR for resolution 1280x720). At the same time, I cannot disable it myself because Camera::DisableStreamData is depricated. I could not find any other available from the API way to solve this problem.

raspberrypi 编译错误

-- Build files have been written to: /home/pi/temp/MYNT-EYE-D-SDK/_build
make[1]: Entering directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
make[2]: Entering directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
make[3]: Entering directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
make[3]: Leaving directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
make[3]: Entering directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
[ 4%] Linking CXX shared library ../_output/lib/libmynteye_depth.so
/home/pi/temp/MYNT-EYE-D-SDK/3rdparty/eSPDI/linux/x64/libeSPDI.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
CMakeFiles/mynteye_depth.dir/build.make:660: recipe for target '../_output/lib/libmynteye_depth.so.1.6.0' failed
make[3]: *** [../_output/lib/libmynteye_depth.so.1.6.0] Error 1
make[3]: Leaving directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mynteye_depth.dir/all' failed
make[2]: *** [CMakeFiles/mynteye_depth.dir/all] Error 2
make[2]: Leaving directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/temp/MYNT-EYE-D-SDK/_build'
Makefile:60: recipe for target 'build' failed
make: *** [build] Error 2

采集视频时跳帧

21542588665_ pic

设置:1280x720,30fps,会有跳帧现象。
主机什么都不做(不存图像,不显示图像等),只循环接收左右图像,也不能避免跳帧。

No serial number is ROS wrapper

I am trying to read the serial number of a D-1000-120 camera from the ROS wrapper.
I have an Ubuntu 18.04 with ROS Melodic

When I execute roslaunch mynteye_wrapper_d mynteye.launch I can see that the serial is read:

Device descriptors:
  name: MYNT-EYE-D1000
  serial_number: 20373347344D500400570045
  firmware_version: 1.4
  hardware_version: 2.0
  spec_version: 1.0
  lens_type: 0000
  imu_type: 0000
  nominal_baseline: 120

But in ROS wrapper the information that arrives has the serial number empty:

------------------------------ 
Device Information
------------------------------
 0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B12-B0135P-016-006-Beta4-ISO_Plugout2M(Interleave), serial_number: 

I have been looking in the code of the SDK and I have seen that the serial number is not asked:
https://github.com/slightech/MYNT-EYE-D-SDK/blob/master/src/mynteyed/device/device.cc#L170

It asks the firmware version, but not the serial number.
I have tried to add the call to the function EtronDI_GetSerialNumber
https://github.com/slightech/MYNT-EYE-D-SDK/blob/master/3rdparty/eSPDI/linux/include/eSPDI.h#L49

But this returns: 2,\0,0,\0,3,\0....
That is the correct serial number but with \0 between each character.

Could you please update the library so it doesn't add this '\0' between characters.

Also, it could be nice if you add the call to get the serial number in device.cc

Thank you

params.ir_depth_only = true crashes

I am trying to use my MYNT EYE D with the command params.ir_depth_only = true;, but the application crashes as it tries to open the camera. Without this command, it works fine.
What am i doing wrong?

this is my code:

void MYNTEYE::InitCamera() {
	Camera cam;
	DeviceInfo dev_info;
	if (!util::select(cam, &dev_info)) {
		
	}
	util::print_stream_infos(cam, dev_info.index);

	std::cout << "Open device: " << dev_info.index << ", "
		<< dev_info.name << std::endl << std::endl;

	OpenParams params(dev_info.index);
	{
		// Framerate: 10(default), [0,60], [0,30](STREAM_2560x720)
		params.framerate = 60;
	
		 params.dev_mode = DeviceMode::DEVICE_ALL;

		// Color mode: raw(default), rectified
		 params.color_mode = ColorMode::COLOR_RECTIFIED;

		// Depth mode: colorful(default), gray, raw
		 params.depth_mode = DepthMode::DEPTH_RAW;
	
		 params.stream_mode = StreamMode::STREAM_1280x480;  // vga	
		params.ir_depth_only = true;
		params.ir_intensity = 4;
	}



	// Enable image infos
	cam.EnableImageInfo(true);

	// Enable motion datas
	cam.EnableMotionDatas(1);

	
	cam.Open(params); //CRASH HERE


Tried compiling samples using cmake, but it failed...

Tried compiling samples using cmake, but it failed...

'D:\MYNTEYED\SDK\1.7.2\projects\cmake>cmake .
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- MYNTEYED_SDK_ROOT: D:\MYNTEYED\SDK\1.7.2
CMake Error at CMakeLists.txt:30 (find_package):
Could not find a configuration file for package "mynteyed" that is
compatible with requested version "".

The following configuration files were considered but not accepted:

D:/MYNTEYED/SDK/1.7.2/lib/cmake/mynteyed/mynteyed-config.cmake, version: 1.7.2 (64bit)

-- Configuring incomplete, errors occurred!
See also "D:/MYNTEYED/SDK/1.7.2/projects/cmake/CMakeFiles/CMakeOutput.log".

IMU Coordinate system is wrong in SDK Document.

I am not sure, which is right, but the coordinate system mentioned in the document is completely different from the one in the ros wrapper. Please find the below for details:

The image from ROS Wrapper

Coordinate system from the Docs
https://buildmedia.readthedocs.org/media/pdf/mynt-eye-d-sdk/latest/mynt-eye-d-sdk.pdf

I believe the ROS one is appropriate as the one in the docs seems to have the left handed one, but is mentioned as right handed.

Can someone please confirm which is right?

@yangruixuan @joinAero @harjeb any idea on this?

Multiple mynt eye d's dont work on one usbhub

HI, I am trying to open 3 cameras using acroname usb hub and it doesn't work. It detects only two cameras in that scenario. The third one does show up in device descriptors but says "Open camera failed". Is it due to the data rate? I am using 3.0 usb hub though which should run at 5gbps. And I am running all cameras at 30fps. When I check dmesg the third myntd gets detected and the "lsusb -t" also shows 3 devices at 5000Mbps. So any help would be appreciated. Thank you!

Error: Device not found

你好,sdk编译很正常,但是在运行sample的时候却说没有找到设备,这是怎么回事呢,USB接的是3.0的。是固件的问题吗?
I/eSPDI_API: eSPDI: EtronDI_Init
Device descriptors:
name: MYNT-EYE-D1000
serial_number: 2038375335485017002A0056
firmware_version: 1.0
hardware_version: 2.0
spec_version: 1.0
lens_type: 0000
imu_type: 0000
nominal_baseline: 120

Error: Device not found

How pointcloud generated? only from left & depth?

Hi guys,
When I trying to match pixel coordinates and pointcloud coordinates, I found that the pointcloud generated through depth and left color image from sdk samples and some launch files, therefore I want to know whether the pointcloud data really get RGB images only from left? or stereo(both right and left)?
Thanks

The following is the screenshot from sdk samples/get points images
Screenshot from 2019-10-07 17-03-15

The pointcloud result of box is NOT good, how to fix ?

Hi guys,
The following pictures are the pointcloud results from a box on table, they are the front view, top-down view and original rgb(left eye) from Rviz images respectively. I found that the pointcloud of box surface is not a line but multiple lines from the top-down view. I have tried to fix it through adjusting light and setting IR in launch files but the result is still not good. Do u guys have any suggestions to get a better pointcloud effect through adjusting other camera parameters to fix the multiple lines problems( I want it to be one line) pointcloud result as shown in the last images ?

  1. front view:
    IMG_9083

  2. top-down view:
    IMG_9082

  3. original rgb(ps: cropped some background in this image)
    IMG_9084

  4. mutiple lines for a box surface which should be a line from top-down view
    mul

Ros wrapper camera_info

Greetings,

I am trying to integrate the camera with my current project but I'm encountering some issues, the first one I am looking into is that the camera_info message lacks the frame_id information.

Please see the follow sample of the message

header: 
  seq: 61
  stamp: 
    secs: 1562921949
    nsecs:  24430000
  frame_id: ''
height: 720
width: 1280
distortion_model: "plumb_bob"
D: [-0.2985420227050781, 0.0778045654296875, 4.1961669921875e-05, 0.000720977783203125, 0.0]
K: [703.8890991210938, 0.0, 630.2998657226562, 0.0, 704.2886352539062, 363.5127258300781, 0.0, 0.0, 1.0]
R: [0.9999951124191284, -0.001852273941040039, 0.0025098323822021484, 0.0018535852432250977, 0.9999980926513672, -0.0005115270614624023, -0.002508878707885742, 0.0005161762237548828, 0.9999966621398926]
P: [698.4000244140625, 0.0, 630.0023193359375, 0.0, 0.0, 698.4000244140625, 363.9010009765625, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False

Best regards,
David

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.