MYNTAI MYNT EYE D-Series Documentation

Depth cameras

Advertisement

MYNT EYE D SDK Documentation
Release 1.8.0
MYNTAI
Nov 07, 2019

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MYNT EYE D-Series and is the answer not in the manual?

Questions and answers

Summary of Contents for MYNTAI MYNT EYE D-Series

  • Page 1 MYNT EYE D SDK Documentation Release 1.8.0 MYNTAI Nov 07, 2019...
  • Page 3: Table Of Contents

    CONTENTS 1 PRODUCT Product Description ......... . . Product Surface .
  • Page 4 Utils ........... 8 Android API DOCS USBMonitor .
  • Page 5: Product

    CHAPTER PRODUCT 1.1 Product Description The MYNT Depth utilizes the camera and the motion sensor to provide visually accurate SLAM results with higher precision, lower cost, simpler layout, along with the ability to achieve face and object recognition. The concept of combining binocular and IMU is the leading-edge technology in the current SLAM industry.The depth version of the product has a built-in depth calculation chip that can output depth images without the host computer.
  • Page 6: Product Surface

    MYNT EYE D SDK Documentation, Release 1.8.0 1.2 Product Surface Shell(mm) PCBA board(mm) 165x31.5x29.6 149x24 A. Camera:please pay attention to protect the camera sensor lenses, to avoid imaging quality degradation. B. Infrared structured-light transmitter and outlet: the infrared structured-light can effectively solve the problem as- sociated with the visual positioning calculations of white wall non-textured object(For non-IR version, the outlet is reserved but there is no internal structured-light emitter).
  • Page 7 200Hz Output data format YUYV/MJPG Data transfer Interface USB2.0/3.0 Weight 184g UVC MODE Software Support system Windows 10Ubuntu 16.04/18.04ROS kinetic/melodicAndroid 5.x ~ Android 8.x http://www.myntai.com/dev/mynteye_depth Support ORB_SLAM2OKVISVins-MonoVins-FusionVIORB Environment Operating Temperature -10°C~55°C Storage Temperature -15°C~70°C Humidity 10% to 80% non-condensing Package...
  • Page 8 200Hz Output data format YUYV/MJPG Data transfer Interface USB2.0/3.0 Weight 152g UVC MODE Software Support system Windows 10Ubuntu 16.04/18.04ROS kinetic/melodicAndroid 5.x ~ Android 8.x http://www.myntai.com/dev/mynteye_depth Support ORB_SLAM2OKVISVins-MonoVins-FusionVIORB Environment Operating Temperature -10°C~60°C Storage Temperature -20°C~70°C Humidity 10% to 80% non-condensing Package...
  • Page 9 MYNT EYE D SDK Documentation, Release 1.8.0 Warranty Warranty 12 Months Limited Manufacturer’s Warranty Precision Depth accuracy The error doesn’t exceed 2% 1.3.3 D1200 Specification Product parameters Model D1200 Size 75.5x34.5x12.9mm Frame Rate Up to 30fps Resolution 2560*720;1280*480 Depth Resolution 1280*720;...
  • Page 10: Support Resolutions

    MYNT EYE D SDK Documentation, Release 1.8.0 Package Content MYNT EYE x1 USB Cable Warranty Warranty 12 Months Limited Manufacturer’s Warranty Precision Depth accuracy The error doesn’t exceed 1% 1.4 Support Resolutions mode interface color resolution color fps depth resolution depth fps L’+D USB3.0...
  • Page 11: Imu Coordinata System

    MYNT EYE D SDK Documentation, Release 1.8.0 In IR Depth Only mode, framerate only support 15fps and 30fps. 1.5 IMU Coordinata System IMU coordinate system is right-handed,the axis directions are as follows: 1.5. IMU Coordinata System...
  • Page 12 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 1. PRODUCT...
  • Page 13: Sdk

    CHAPTER 2.1 SDK Description 2.1.1 Supported Platforms SDK is built on CMake and can be used cross multiple platforms such as Linux, WIndows,etc.We provide two instal- lation modes:Download pack file and install, Compile and install from source code. These are the platforms that can be used: Windows Ubuntu 18.04/16.04...
  • Page 14 MYNT EYE D SDK Documentation, Release 1.8.0 1.1.1.1 Install OpenCV with apt (Recommend) sudo apt-get install libopencv-dev 1.1.1.2 Install OpenCV by Compile To build and install Opencv, please refer to Installation in Linux Tip: If you need to install ros, you can skip this step and use opencv in ros. Alternatively, refer to the command below: [compiler] sudo apt-get install build-essential...
  • Page 15 MYNT EYE D SDK Documentation, Release 1.8.0 1.3 Link libGL.so for TX1/TX2 compile bug (Optional) sudo ln -sf /usr/lib/aarch64-linux-gnu/tegra/libGL.so /usr/lib/aarch64-linux-gnu/ libGL.so 2. Build SDK git clone https://github.com/slightech/MYNT-EYE-D-SDK.git MYNT-EYE-D-SDK 2.1 Init SDK Note: Because of the problem of device permissions, you must reinsert the camera device after the command is executed and on the same computer, this operation only needs to be done once.
  • Page 16 MYNT EYE D SDK Documentation, Release 1.8.0 6) get_img_params show camera intrinsics and save in file ./samples/_output/bin/get_img_params 7) get_imu_params show imu intrinsics and save in file ./samples/_output/bin/get_imu_params 8) get_from_callbacks show image and imu data by callback ./samples/_output/bin/get_from_callbacks 9) get_all_with_options open device with different options ./samples/_output/bin/get_all_with_options 10) get_depth_with_filter display filtered depth image ./samples/_output/bin/get_depth_with_filter...
  • Page 17 MYNT EYE D SDK Documentation, Release 1.8.0 2.2.2 Windows Source Installation The following steps are how to install from source codes. If you wanna using prebuilt DLL, please see Windows EXE Installation 1. Install Build Tools 1.1 Install Visual Studio Download Visual Studio 2017 from https://visualstudio.microsoft.com/zh-hans/vs/older-downloads/ and install, select...
  • Page 18 MYNT EYE D SDK Documentation, Release 1.8.0 >make --version GNU Make 4.2.1 2. Install SDK dependencies 2.1 Install OpenCV 2.1.1 Install OpenCV with Pre-built Libraries (Recommend) *For more details you can reference OpenCV offical document 1) Go to OpenCV Sourceforge page http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ 2) Choose a build you want to use and download it.
  • Page 19 MYNT EYE D SDK Documentation, Release 1.8.0 3. Build SDK Open “x64 Native Tools Command Prompt for VS 2017”(suggested for Visual Studio 2017 - 64 bit Windows) com- mand shell git clone https://github.com/slightech/MYNT-EYE-D-SDK.git MYNT-EYE-D-SDK make all Tip: Visual Studio Command Prompt can be opened from the Start menu, You can also open it from the Visual Studio Tools menu.
  • Page 20 MYNT EYE D SDK Documentation, Release 1.8.0 Field Value Title Visual Studio Command Prompt Command C:\Windows\System32\cmd.exe Arguments /k "C:\Program Files (x86)\Microsoft Visual Studio 14. 0\Common7\Tools\VsDevCmd.bat" Initial Direc- $(SolutionDir) tory 4. Run Samples Note: Open the rectified image by default (Run vio need to raw image, run depth or points cloud need to rectified image.) 1) get_image shows the left camera image and colorful depthmap (compatible with USB2.0) .\samples\_output\bin\get_image.bat...
  • Page 21 MYNT EYE D SDK Documentation, Release 1.8.0 .\samples\_output\bin\get_points_with_filter 5. Clean <sdk> # local path of SDK make cleanall 2.2.3 Windows EXE Installation Download here: mynteye-d-x.x.x-win-x64-opencv-3.4.3.exe Google Drive, Baidu Pan After you install the win pack of SDK, there will be a shortcut to the SDK root directory on your desktop. First, you should plug the MYNT®...
  • Page 22 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) -- C_FLAGS: /DWIN32 /D_WINDOWS /W3 -Wall -O3 -- CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc -Wall -O3 -- Found mynteye: 1.3.6 -- OpenCV ARCH: x64 -- OpenCV RUNTIME: vc15 -- OpenCV STATIC: OFF -- Found OpenCV: C:/Users/John/AppData/Roaming/Slightech/MYNTEYED/SDK/1.3.6/3rdparty/ opencv/build (found version "3.4.3") -- Found OpenCV 3.4.3 in C:/Users/John/AppData/Roaming/Slightech/MYNTEYED/SDK/1.3.6/...
  • Page 23 MYNT EYE D SDK Documentation, Release 1.8.0 ROS Kinetic (Ubuntu 16.04) sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > / etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt-get update sudo apt-get install ros-kinetic-desktop-full sudo rosdep init rosdep update echo "source /opt/ros/kinetic/setup.bash"...
  • Page 24 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) /mynteye/left/image_color/compressed rostopic hz <topic> checks the data: subscribed to [/mynteye/imu/data_raw] average rate: 202.806 min: 0.000s max: 0.021s std dev: 0.00819s window: average rate: 201.167 min: 0.000s max: 0.021s std dev: 0.00819s window: average rate: 200.599 min: 0.000s max: 0.021s std dev: 0.00819s window: average rate: 200.461...
  • Page 25: Sdk Samples

    MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) <!-- Device mode device_color: left_color right_color ? depth x device_depth: left_color x right_color x depth device_all: left_color right_color ? depth Note: : available, x: unavailable, ?: depends on #stream_mode -->...
  • Page 26 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) (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); Complete code samplessee get_stereo_image.cc 2.3.2 Get Camera Image(Compatible With USB2.0) Compatible with USB2.0 ,change to the resolution and frame rate for USB 2.0 automatically.Using function API, color...
  • Page 27 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) cv::setMouseCallback("depth", OnDepthMouseCallback, &depth_region); // Note: DrawRect will change some depth values to show the rect. depth_region.DrawRect(depth); cv::imshow("depth", depth); depth_region.ShowElems<ushort>(depth, [](const ushort& elem) { std::to_string(elem); return }, 80, depth_info); The above code uses OpenCV to display the image. When the display window is selected, pressing ESC/Q will end the program.
  • Page 28 MYNT EYE D SDK Documentation, Release 1.8.0 Sample code snippet: auto motion_datas cam.GetMotionDatas(); (motion_datas.size() > 0) { std::cout << "Imu count: " << motion_datas.size() << std::endl; for (auto data : motion_datas) { (data.imu) { (data.imu->flag MYNTEYE_IMU_ACCEL) { counter.IncrAccelCount(); std::cout << "[accel] stamp: "...
  • Page 29 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) // Set motion data callback cam.SetMotionCallback([](const MotionData& data) { (data.imu->flag MYNTEYE_IMU_ACCEL) { std::cout << "[accel] stamp: " << data.imu->timestamp << ", x: " << data.imu->accel[0] << ", y: " <<...
  • Page 30 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) 1: DEPTH_GRAY 2: DEPTH_COLORFUL --sm=MODE Stream mode of color & depth, default (STREAM_1280x720) 0: STREAM_640x480, 480p, vga, left 1: STREAM_1280x480, 480p, vga, left+right 2: STREAM_1280x720, 720p, hd, left 3: STREAM_2560x720, 720p, hd, left+right --csf=MODE Stream format of color, default...
  • Page 31 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) VGA Intrinsics right: {width: [640], height: [480], fx: [360.13885498046875000], fy: [360.89624023437500000], cx: [325.11029052734375000], cy: [251. 46371459960937500]coeffs: [-0.30667877197265625, 0.08611679077148438, -0. 00030136108398438, 0.00155639648437500, 0.00000000000000000]} VGA Extrinsics left to right: {rotation: [0.99996054172515869, 0.00149095058441162, 0. 00875246524810791, -0.00148832798004150, 0.99999880790710449, -0.00030362606048584, -0.00875294208526611, 0.00029063224792480, 0.99996161460876465], translation: [-120.
  • Page 32 MYNT EYE D SDK Documentation, Release 1.8.0 Set the resolution of image Using the params.stream_mode parameter, you can set the resolution of the image. Attention: Now image resolution supports 4 types: 640X480,1280x720 for single camera. 1280x480, 2560x720 for left and right camera. Reference code snippet: // Stream mode: left color only // params.stream_mode = StreamMode::STREAM_640x480;...
  • Page 33 MYNT EYE D SDK Documentation, Release 1.8.0 Enable auto exposure and auto white balance Set params.state_ae and params.state_awb to true , you can enable auto exposure and auto white bal- ance. By default auto exposure and auto white balance are enabledif you want to disableyou can set parameters to false . Reference code snippet: // Auto-exposure: true(default), false // params.state_ae = false;...
  • Page 34 MYNT EYE D SDK Documentation, Release 1.8.0 Enable IR Depth Only Using the params.ir_depth_only parameteryou can set IR Depth Only function. This is disabled by default. After turning this function on, IR only works on depth images. IR pattern will not show in color images. Note: This feature is only available for [2560x720 30fps] and [1280x720,1280x480,640x480 60fps] After turning this function on, frame rate will be divided equally.
  • Page 35 MYNT EYE D SDK Documentation, Release 1.8.0 make samples to make the set parameters take effect. Complete code samplessee get_image.cc 2.3.11 Camera Control Parameters API Open or close auto exposure / ** Auto-exposure enabled or not default enabled * / bool AutoExposureControl(bool enable);...
  • Page 36: Sdk Tools

    MYNT EYE D SDK Documentation, Release 1.8.0 cam.Open(params); cam.AutoExposureControl(false); cam.SetGlobalGain(1); cam.SetExposureTime(0.3); Note: After changing the parameters, you need to run in the sdk directory make samples to make the set parameters take effect. 2.3.12 User filter to filter deep data Filter type is inherited from BaseFilter .
  • Page 37 MYNT EYE D SDK Documentation, Release 1.8.0 Note: You need to use record tool in tools or rosbag to record dataset first. IMU analysis tool support python 2.7 . Before run the script, you need to pip install -r requirements.txt . Reference to run commands on Linux: $ python tools/analytics/imu_analytics.py -i dataset -c tools/config/mynteye/mynteye_ config.yaml -al=-1.2,1.2...
  • Page 38 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 2. SDK...
  • Page 39 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) input: dataset outdir: dataset open dataset ... save to binary files ... binimg: dataset/stamp_analytics_img.bin binimu: dataset/stamp_analytics_imu.bin img: 1007, imu: 20040 rate (Hz) img: 25, imu: sample period img: 0.04, imu: 0.002 diff count imgs: 1007, imus: 20040...
  • Page 40 MYNT EYE D SDK Documentation, Release 1.8.0 Reference run command on Linux: ./tools/_output/bin/dataset/record Reference run command on Windows: .\tools\_output\bin\dataset\record.bat Reference run results on Linux: $ ./tools/_output/bin/dataset/record Saved 1007 imgs, 20040 imus to ./dataset I0513 21:29:38.608772 11487 record.cc:118] Time beg: 2018-05-13 21:28:58.255395, end: 2018-05-13 21:29:38.578696, cost: 40323.3ms I0513 21:29:38.608853 11487...
  • Page 41: Sdk Project Demos

    MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) hardware_version: 2.0 spec_version: 1.0 lens_type: 0000 imu_type: 0000 nominal_baseline: Result save into <workdir>/config by default. You can also add parameters to select other directory for save. Saved contents: <workdir>/ config/ SN0610243700090720/ device.info...
  • Page 42 MYNT EYE D SDK Documentation, Release 1.8.0 Create Project Open Visual Studio 2017, then File > New > Project, Select “Windows Console Application”, set the project’s name and location, click “OK”, Finally, you will see the new project like this, Chapter 2.
  • Page 43 MYNT EYE D SDK Documentation, Release 1.8.0 Config Properties Right click the project, and open its “Properties” window, 2.5. SDK Project Demos...
  • Page 44 MYNT EYE D SDK Documentation, Release 1.8.0 Change “Configuration” to “All Configurations”, then add the following paths to “Additional Include Directories”, $(MYNTEYED_SDK_ROOT)\include $(MYNTEYED_SDK_ROOT)\3rdparty\opencv\build\include Chapter 2. SDK...
  • Page 45 MYNT EYE D SDK Documentation, Release 1.8.0 Add the following definitions to “Preprocessor Definitions”, WITH_OPENCV WITH_OPENCV3 Add the following paths to “Additional Library Directories”, $(MYNTEYED_SDK_ROOT)\lib $(MYNTEYED_SDK_ROOT)\3rdparty\opencv\build\x64\vc15\lib Add the following libs to “Additional Dependencies”, 2.5. SDK Project Demos...
  • Page 46 MYNT EYE D SDK Documentation, Release 1.8.0 mynteye_depth.lib opencv_world343.lib Start using SDK Include the headers of SDK and start using its APIs, Select “Release x64” to run the project. 2.5.2 How to use SDK with Qt Creator This tutorial will create a Qt project with Qt Creator to start using SDK. You could find the project demo in <sdk>/platforms/projects/qtcreator directory.
  • Page 47 MYNT EYE D SDK Documentation, Release 1.8.0 Choose Qt Widgets Application, Set project location and its name, 2.5. SDK Project Demos...
  • Page 48 MYNT EYE D SDK Documentation, Release 1.8.0 Select the build kits, Then, it will generate the skeleton source files, Chapter 2. SDK...
  • Page 49 MYNT EYE D SDK Documentation, Release 1.8.0 Finally, you will see the new project like this, 2.5. SDK Project Demos...
  • Page 50 MYNT EYE D SDK Documentation, Release 1.8.0 Config Project Edit mynteyed_demo.pro to add INCLUDEPATH and LIBS. win32 SDK_ROOT "$$(MYNTEYED_SDK_ROOT)" isEmpty(SDK_ROOT) { error( "MYNTEYED_SDK_ROOT not found, please install SDK firstly" message("SDK_ROOT: $$SDK_ROOT") INCLUDEPATH "$$SDK_ROOT/include" LIBS "$$SDK_ROOT/lib/mynteye_depth.lib" unix INCLUDEPATH /usr/local/include LIBS -L/usr/local/lib -lmynteye_depth Start using SDK Include the headers of SDK and start using its APIs, could see the project demo.
  • Page 51 MYNT EYE D SDK Documentation, Release 1.8.0 Windows Should select “Release” to run the project. Then you will see the main window, 2.5. SDK Project Demos...
  • Page 52 MYNT EYE D SDK Documentation, Release 1.8.0 Linux Run the project and you will see the main window, Chapter 2. SDK...
  • Page 53 MYNT EYE D SDK Documentation, Release 1.8.0 2.5.3 How to use SDK with CMake This tutorial will create a project with CMake to start using SDK. You could find the project demo in <sdk>/platforms/projects/cmake directory. Preparation • Windows: install the win pack of SDK •...
  • Page 54 MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -march=native") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -march=native") ## mynteyed_demo add_executable(mynteyed_demo mynteyed_demo.cc) Config Project Add mynteyed and OpenCV packages to CMakeLists.txt, # packages if(MSVC) set(SDK_ROOT...
  • Page 55: Change Log

    MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) ${OpenCV_INCLUDE_DIRS} ## mynteyed_demo add_executable(mynteyed_demo mynteyed_demo.cc) target_link_libraries(mynteyed_demo mynteye_depth ${OpenCV_LIBS}) Start using SDK Include the headers of SDK and start using its APIs, could see the project demo. Windows Windows Source Installation to “Install Build Tools”.
  • Page 56 MYNT EYE D SDK Documentation, Release 1.8.0 2.6.2 2019-07-09 v1.7.9 1. Fix publish timestamp is inconsistent if no camera information. 2. Fix timestamp errors caused by incorrect ROS timestamp data types. 3. Fix long running ROS timestamp problem. (need update auxiliary chip firmware to 1.3) 4.
  • Page 57 MYNT EYE D SDK Documentation, Release 1.8.0 4. Fix the problem that the frame rate of camera info released by left and right eyes under ROS is twice the normal value. 5. Document optimization. 2.6. Change Log...
  • Page 58 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 2. SDK...
  • Page 59: Android Sdk

    CHAPTER THREE ANDROID SDK 3.1 SDK Explain 3.1.1 Supported Platform Android 5.x ~ Android 8.x 3.2 SDK Download zip formatapk, aar, demo, doc • Baidu Netdiskhttps://pan.baidu.com/s/1aMCPwtUkQPZ7I5nemSUAsA • Google Drive: https://drive.google.com/open?id=1wVp4xqqgjidPQyzzW1Tmibbw4yY5p4sv 3.3 SDK Install 1. Get sdk resource SDK Download 2. New android project(example: Android Studio) 3.
  • Page 60 MYNT EYE D SDK Documentation, Release 1.8.0 SDK compile version MYNTCamera.getSDKVersion(); SDK compile time MYNTCamera.getSDKBuildTime(); 3.4.2 Listener USB Initialize USB Monitor mUSBMonitor = USBMonitor(mContext, object : USBMonitor.IUSBMonitorListener { override fun didAttach(camera: MYNTCamera) { // Insert equipment override fun didDettach(camera: MYNTCamera) { // Pull out equipment override fun didConnectedCamera(camera: MYNTCamera) { // Connection successful...
  • Page 61 MYNT EYE D SDK Documentation, Release 1.8.0 3.4.3 Open camera Set the Camera connection callback mCamera?.setCameraListener(object : MYNTCamera.ICameraListener { override fun didConnectedCamera(camera: MYNTCamera?) { override fun didDisconnectedCamera(camera: MYNTCamera?) { Connect the camera (the permission dialog box will pop up) mCamera?.connect() After the connection is successful, the data is retrieved //Open equipment mCamera?.open()
  • Page 62: Update Log

    MYNT EYE D SDK Documentation, Release 1.8.0 3.4.4 Get image data Set image information callback mCamera?.setFrameCallback { data -> (data.flag == FrameData.DEPTH) { // depth image (data.flag == FrameData.COLOR) { // color image 3.4.5 Get imu data Set IMU data callback (camera with IMU model) mCamera?.setImuCallback { data ->...
  • Page 63 MYNT EYE D SDK Documentation, Release 1.8.0 3.5.2 v1.3.2 - 2019-10-11 • Supports D-1000 (imu, usb 2.0/3.0) • Improve pointcloud register • Support get right frame • Add interface to get depth array converted from framedata • Improve preview frame •...
  • Page 64 MYNT EYE D SDK Documentation, Release 1.8.0 3.5.8 v1.2.0 - 2019-02-26 • Compatible with D-1200 devices • Image compatible with D-1000 device (IMU | IR function temporarily unavailable) Chapter 3. Android SDK...
  • Page 65: Firmware

    CHAPTER FOUR FIRMWARE 4.1 Firmware Update 4.1.1 Update Main Chip Firmware Note: This tool does not support beta device upgrade. Get Main Chip Firmware Latest firmware: MYNTEYE-D-1.0.6.bin Google Drive, Baidu Pan Get Update Tool Latest tool: eSPWriter_1.0.6.zip Google Drive, Baidu Pan Update Firmware Note: Please follow the steps to upgrade firmware.(Otherwise, the camera calibration parameters will be lost.) 1, Select camera device.
  • Page 66: Change Log

    MYNT EYE D SDK Documentation, Release 1.8.0 Compile SDK Tools <sdk> # local path of SDK make tools Update Firmware ./tools/_output/bin/writer/auxiliary_firmware_update <firmware-file-path> 4.2 Change Log 4.2.1 Auxiliary Chip Firmware 2019-08-26 v1.4.2 MYNTEYE-D-auxiliary-chip-1.4.2.bin 1. Optimize the synchronization of image and imu 2019-07-09 v1.3.0 MYNTEYE-D-auxiliary-chip-1.3.0.bin 1.
  • Page 67: Tools Support

    CHAPTER FIVE TOOLS SUPPORT 5.1 Calibration Tool Manual 5.1.1 Get Calibration Tool Latest tool: mynteye-d-calibrator_1.0.zip Google Drive, Baidu Pan 5.1.2 Prerequisites(Update config file) • You can find Depth 50°’s config file in D1000-50 , Depth 120°’s config file in D1000-120 •...
  • Page 68 MYNT EYE D SDK Documentation, Release 1.8.0 5.1.4 Parameters of eSPCalibrator 1.Open eDepthK.prj 2.Note that ‘Col1’ ‘Row1’ ‘Size1’ must match your chess board 5.1.5 Calibration Procedure 1 (Yoffset) • If you are calibrating VGA modeplease skip this procedure. • Calibration Process 1 need 1 picture. •...
  • Page 69 MYNT EYE D SDK Documentation, Release 1.8.0 • Press ‘c’ or ‘C’ to take the snap shot of the properly positioned chess board. If calibrator can not detect all the intersections on the chess board, you will get “Not Found” result. 5.1.8 Operation guide 5.1.9 Calibration Result •...
  • Page 70 MYNT EYE D SDK Documentation, Release 1.8.0 5.1.11 Appendix 5.1.12 Error_Message : Yoffset Error Message Possible root cause Yoffset Not support format. 1. FW issue, check page.14 2. eDepthK.prj setting error No Device 1. USB unstable Yoffset Cannot Preview Resolution 1.
  • Page 71 MYNT EYE D SDK Documentation, Release 1.8.0 5.1.13 Error_Message : Calibration Error Message Possible root cause Calibration Not support format. 1. FW issue, check page.14 2. eDepthK.prj setting error No Device 1. USB unstable Calibration Cannot Preview Resolution 1. FW issue, check page.14 2. eDepthK.prj setting error Calibration fail : Calib_Line_Buffer_Err 1.
  • Page 72 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 5. TOOLS SUPPORT...
  • Page 73: Open Source Support

    CHAPTER OPEN SOURCE SUPPORT 6.1 How To Use In VINS-Mono 6.1.1 If you wanna run VINS-Mono with MYNT EYE camera, please follow the steps: 1. Download MYNT-EYE-D-SDK ROS Wrapper Installation 2. Follow the normal procedure to install VINS-Mono. 3. Run mynteye_wrapper_d and VINS-Mono. 6.1.2 Install ROS Kinetic conveniently (if already installed, please ignore) wget https://raw.githubusercontent.com/oroca/oroca-ros-pkg/master/ros_install.sh &&...
  • Page 74: How To Use In Orb_Slam2

    MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io Tip: add your account to docker group by sudo usermod -aG docker $YOUR_USER_NAME . Relaunch the terminal or logout and re-login if you get Permission denied error. Install MYNT-EYE-VINS-Samples git clone -b docker_feat https://github.com/slightech/MYNT-EYE-VINS-Sample.git cd MYNT-EYE-VINS-Sample/docker...
  • Page 75: How To Use In Okvis

    MYNT EYE D SDK Documentation, Release 1.8.0 6.2.3 Building the nodes for stereo (ROS) • Add the path including Examples/ROS/ORB_SLAM2 to the ROS_PACKAGE_PATH environment variable. Open .bashrc file and add at the end the following line. Replace PATH by the folder where you cloned ORB_SLAM2: export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS...
  • Page 76: How To Use In Viorb

    MYNT EYE D SDK Documentation, Release 1.8.0 (continued from previous page) mkdir build && build cmake .. make 6.3.3 Get camera calibration parameters Through the GetIntrinsics() and GetExtrinsics() function of the MYNT-EYE-D-SDK API, you can get the camera calibration parameters of the currently open device, follow the steps: MYNT-EYE-D-SDK ./samples/_output/bin/get_img_params After running the above type, pinhole’s distortion_parameters and camera parameters is obtained, and...
  • Page 77: How To Use In Vins-Fusion

    MYNT EYE D SDK Documentation, Release 1.8.0 4. Run mynteye_wrapper_d and VIORB. 6.4.2 Install MYNT-EYE-VIORB-Sample. git clone -b mynteye https://github.com/slightech/MYNT-EYE-VIORB-Sample.git MYNT-EYE-VIORB-Sample ROS_PACKAGE_PATH environment variable. Open .bashrc file and add at the end the following line. Replace PATH by the folder where you cloned MYNT-EYE-VIORB-Sample: export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/Examples/ROS/ORB_VIO Execute:...
  • Page 78 MYNT EYE D SDK Documentation, Release 1.8.0 6.5.2 Install ROS Kinetic conveniently (if already installed, please ignore) wget https://raw.githubusercontent.com/oroca/oroca-ros-pkg/master/ros_install.sh && chmod ./ros_install.sh && bash ./ros_install.sh catkin_ws kinetic 6.5.3 Run VINS-FUSION with docker Note: To complie with docker,we recommend that you should use more than 16G RAM, or ensure that the RAM and virtual memory space is greater than 16G.
  • Page 79 MYNT EYE D SDK Documentation, Release 1.8.0 MYNT-EYE-VINS-FUSION-Sample/docker (local path of MYNT-EYE-VINS-FUSION-Sample) ./run.sh mynteye-d/mynt_mono_config.yaml # mono+imu fusion # ./run.sh mynteye-d/mynt_stereo_config.yaml # Stereo fusion # ./run.sh mynteye-d/mynt_stereo_imu_config.yaml # Stereo+imu fusion 6.5. How To Use In VINS-Fusion...
  • Page 80 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 6. OPEN SOURCE SUPPORT...
  • Page 81: Api Docs

    CHAPTER SEVEN API DOCS 7.1 Camera class Camera Public Functions std::vector<DeviceInfo> GetDeviceInfos() const Get all device infos. void GetDeviceInfos(std::vector<DeviceInfo> *dev_infos) const Get all device infos. void GetStreamInfos(const std::int32_t &dev_index, std::vector<StreamInfo> *color_infos, std::vector<StreamInfo> *depth_infos) const Get all stream infos. ErrorCode Open() Open camera.
  • Page 82 MYNT EYE D SDK Documentation, Release 1.8.0 StreamExtrinsics GetStreamExtrinsics(const StreamMode &stream_mode, bool *ok) const Get the extrinsics of camera. bool WriteCameraCalibrationBinFile(const std::string &filename) Write camera calibration bin file. MotionIntrinsics GetMotionIntrinsics() const Get the intrinsics of motion. MotionIntrinsics GetMotionIntrinsics(bool *ok) const Get the intrinsics of motion.
  • Page 83 MYNT EYE D SDK Documentation, Release 1.8.0 StreamData ImageType &type) GetStreamData(const Get latest stream data. std::vector<StreamData> GetStreamDatas(const ImageType &type) Get cached stream datas. bool IsMotionDatasSupported() const Whethor motion datas supported or not. void EnableMotionDatas(std::size_t max_size = std::numeric_limits<std::size_t>::max()) Enable motion datas. If max_size <= 0, indicates only can get datas from callback.
  • Page 84 MYNT EYE D SDK Documentation, Release 1.8.0 bool IsLocationDatasSupported() const Whethor location datas supported or not. void EnableLocationDatas(std::size_t max_size = std::numeric_limits<std::size_t>::max()) Enable location datas. If max_size <= 0, indicates only can get datas from callback. If max_size > 0, indicates can get datas from callback or using GetLocationDatas().
  • Page 85: Device

    MYNT EYE D SDK Documentation, Release 1.8.0 7.2 Device 7.2.1 DeviceInfo struct DeviceInfo Device information. Public Members std::int32_t index The device index. std::string name The device name. std::uint16_t type The device type. std::uint16_t pid The product id. std::uint16_t vid The vendor id. std::uint16_t chip_id The chip id.
  • Page 86 MYNT EYE D SDK Documentation, Release 1.8.0 Public Members std::int32_t dev_index Device index. std::int32_t framerate Framerate, range [0,60], [0,30](STREAM_2560x720), default 10. DeviceMode dev_mode Device mode, default DEVICE_ALL. • DEVICE_COLOR: IMAGE_LEFT_COLOR y IMAGE_RIGHT_COLOR - IMAGE_DEPTH n • DEVICE_DEPTH: IMAGE_LEFT_COLOR n IMAGE_RIGHT_COLOR n IMAGE_DEPTH y •...
  • Page 87: Enums

    MYNT EYE D SDK Documentation, Release 1.8.0 Public Members std::int32_t index The stream index. std::int32_t width The stream width. std::int32_t height The stream height. StreamFormat format The stream format. 7.3 Enums 7.3.1 ErrorCode enum mynteyed::ErrorCode List error codes. Values: SUCCESS = 0 Standard code for successful behavior.
  • Page 88 MYNT EYE D SDK Documentation, Release 1.8.0 DEVICE_NAME Device name. SERIAL_NUMBER Serial number. FIRMWARE_VERSION Firmware version. HARDWARE_VERSION Hardware version. SPEC_VERSION Spec version. LENS_TYPE Lens type. IMU_TYPE IMU type. NOMINAL_BASELINE Nominal baseline. DESC_LAST Last guard. 7.3.3 ProcessMode enum mynteyed::ProcessMode Process modes. Values: PROC_NONE = 0 PROC_IMU_ASSEMBLY = 1...
  • Page 89 MYNT EYE D SDK Documentation, Release 1.8.0 7.3.5 ColorMode enum mynteyed::ColorMode List color modes. Values: COLOR_RAW = 0 color raw COLOR_RECTIFIED = 1 color rectified COLOR_MODE_LAST 7.3.6 DepthMode enum mynteyed::DepthMode List depth modes. Values: DEPTH_RAW = 0 ImageFormat::DEPTH_RAW. DEPTH_GRAY = 1 ImageFormat::DEPTH_GRAY_24.
  • Page 90 MYNT EYE D SDK Documentation, Release 1.8.0 Values: STREAM_MJPG = 0 STREAM_YUYV = 1 STREAM_FORMAT_LAST 7.3.9 ImageType enum mynteyed::ImageType List image types. Values: IMAGE_LEFT_COLOR LEFT Color. IMAGE_RIGHT_COLOR RIGHT Color. IMAGE_DEPTH Depth. IMAGE_ALL All. 7.3.10 ImageFormat enum mynteyed::ImageFormat List image formats. Values: IMAGE_BGR_24 8UC3...
  • Page 91: Types

    MYNT EYE D SDK Documentation, Release 1.8.0 DEPTH_GRAY = IMAGE_GRAY_8 DEPTH_GRAY_24 = IMAGE_GRAY_24 DEPTH_BGR = IMAGE_BGR_24 DEPTH_RGB = IMAGE_RGB_24 IMAGE_FORMAT_LAST Last guard. 7.3.11 SensorType enum mynteyed::SensorType SensorType types. Values: SENSOR_TYPE_H22 = 0 SENSOR_TYPE_OV7740 SENSOR_TYPE_AR0134 SENSOR_TYPE_AR0135 SENSOR_TYPE_OV9714 7.3.12 SensorMode enum mynteyed::SensorMode SensorMode modes.
  • Page 92 MYNT EYE D SDK Documentation, Release 1.8.0 std::uint16_t exposure_time Image exposure time. ImuData struct ImuData Imu data. Public Members std::uint8_t flag Data type MYNTEYE_IMU_ACCEL: accelerometer MYNTEYE_IMU_GYRO: gyroscope. std::uint64_t timestamp Imu gyroscope or accelerometer or frame timestamp. double temperature temperature double accel[3] Imu accelerometer data for 3-axis: X, Y, X.
  • Page 93 MYNT EYE D SDK Documentation, Release 1.8.0 7.4.2 Calib CameraIntrinsics struct CameraIntrinsics Camera intrinsics: size, coeffs and camera matrix. Public Members std::uint16_t width The width of the image in pixels. std::uint16_t height The height of the image in pixels. double fx The focal length of the image plane, as a multiple of pixel width.
  • Page 94 MYNT EYE D SDK Documentation, Release 1.8.0 double assembly[3][3] Assembly error [3][3]. double noise[3] Noise density variances. double bias[3] Random walk variances. double x[2] Temperature drift. Constant value Slope MotionIntrinsics struct MotionIntrinsics Motion intrinsics, including accelerometer and gyroscope. Public Members ImuIntrinsics accel Accelerometer intrinsics.
  • Page 95: Utils

    MYNT EYE D SDK Documentation, Release 1.8.0 7.5 Utils 7.5.1 select bool mynteyed::util::select(const Camera &cam, DeviceInfo *info) 7.5.2 print_stream_infos void mynteyed::util::print_stream_infos(const Camera &cam, std::int32_t const &dev_index) 7.5.3 is_right_color_supported bool mynteyed::util::is_right_color_supported(const StreamMode &mode) 7.5. Utils...
  • Page 96 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 7. API DOCS...
  • Page 97: Android Api Docs

    CHAPTER EIGHT ANDROID API DOCS 8.1 USBMonitor 8.1.1 Register listener public void register() 8.1.2 Logout listener public void unregister() 8.1.3 Release listener public void destroy() 8.2 MYNTCamera 8.2.1 Whethor camera is connected or not. public boolean isConnected() 8.2.2 Whether preview function is started or not . public boolean isStart()
  • Page 98 MYNT EYE D SDK Documentation, Release 1.8.0 8.2.4 Whether the version of phone device’s USB interface is UBS 3.0 or not. public boolean getIsUSB3() 8.2.5 Whether IMU is supported or not. public boolean isIMUSupported() 8.2.6 Get device’s serial number . public String getSerialNumber()
  • Page 99 MYNT EYE D SDK Documentation, Release 1.8.0 public open() 8.2.14 Close camera public void close() 8.2.15 Start to previewIMU / VIDEO / ALL public boolean start(Source source, Frame frame) 8.2.16 Release camera public void destroy() 8.2.17 Set the depth of camera 8bit / 11bit public void setDepthType(short depthType)
  • Page 100 MYNT EYE D SDK Documentation, Release 1.8.0 8.2.23 Get UVC FPS public double getUVCFPS(Frame frame) 8.2.24 Get preview FPS public double getPreviewFPS(Frame frame) 8.2.25 Get internal parameters of the camera public RectifyLogData getRectifyLogData() 8.2.26 Whether IR is supported or not . public boolean isIRSupported()
  • Page 101 MYNT EYE D SDK Documentation, Release 1.8.0 public getIRMinValue() 8.2.33 Get max value which IR support. public getIRMaxValue() 8.2.34 Convert the subscript corresponding to pixel points into distance informa- tion (unit mm) public int getDistanceValue(int index) 8.2.35 Whether AE is enable or not. public boolean getAEStatusEnabled()
  • Page 102: Imudata Device With Imu

    MYNT EYE D SDK Documentation, Release 1.8.0 8.2.42 Sava point cloud data within the distance. public void savePointCloud(final FrameData colorFrameData, final FrameData depthFrameData, final String filePath, Boolean hasColor, distance) 8.3 ImuData Device with Imu 8.3.1 Data Type / ** * Data type * 1: accelerometer * 2: gyroscope * * /...
  • Page 103 MYNT EYE D SDK Documentation, Release 1.8.0 / ** * FrameData.COLOR * FrameData.DEPTH * * / public flag; 8.4.2 TimeStamp public frameId; 8.4.3 Image width width; public 8.4.4 Image height public height; 8.4.5 Color frame typeLeft / Left && Right public ColorFrame colorMode;...
  • Page 104 MYNT EYE D SDK Documentation, Release 1.8.0 8.4.8 Get bitmap public Bitmap convert2Bitmap(byte[] bytes, width, height) 8.4.9 Get data from left camera public byte[] getLeftBytes() 8.4.10 Get data from right camera public byte[] getRightBytes() 8.4.11 Get distance arrayonly the flag is “DEPTH” public int[] getDistanceInts() 8.4.12 Get distance arrayonly the flag is “DEPTH”...
  • Page 105 MYNT EYE D SDK Documentation, Release 1.8.0 8.4.15 Get distance arrayonly the flag is “DEPTH” / ** * get distance tableint * @param max Max(mm), if more than max, go to be 0. * * / public byte[] getDistanceShorts(int max) 8.4.16 Get distance arrayonly the flag is “DEPTH”...
  • Page 106 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 8. Android API DOCS...
  • Page 107: Technical Support

    CHAPTER NINE TECHNICAL SUPPORT 9.1 FAQ If you have problems using MYNT EYE, please first check the following docs. http://support.myntai.com/hc/ 9.2 Contact Us If you continue to encounter problems, please contact customer service. http://support.myntai.com/hc/request/new/...
  • Page 108 MYNT EYE D SDK Documentation, Release 1.8.0 Chapter 9. TECHNICAL SUPPORT...
  • Page 109: Index

    INDEX mynteyed::Camera::GetLocationDatas (C++ function), mynteyed::ALL (C++ enumerator), (C++ mynteyed::Camera::GetMotionDatas mynteyed::Camera (C++ class), function), mynteyed::Camera::AutoExposureControl mynteyed::Camera::GetMotionExtrinsics (C++ function), (C++ function), mynteyed::Camera::AutoWhiteBalanceControl mynteyed::Camera::GetMotionIntrinsics (C++ function), (C++ function), mynteyed::Camera::AuxiliaryChipFirmwareUpdate (C++ mynteyed::Camera::GetOpenParams (C++ function), function), mynteyed::Camera::Close (C++ function), (C++ mynteyed::Camera::GetStreamData mynteyed::Camera::ControlReconnectStatus function), (C++ function), (C++ mynteyed::Camera::GetStreamDatas mynteyed::Camera::DisableDistanceDatas...
  • Page 110 MYNT EYE D SDK Documentation, Release 1.8.0 mynteyed::DEPTH_BGR (C++ enumerator), mynteyed::Camera::IsStreamDataEnabled (C++ function), mynteyed::DEPTH_COLORFUL (C++ enumerator), mynteyed::Camera::IsWriteDeviceSupported (C++ function), mynteyed::DEPTH_GRAY (C++ enumerator), 85, mynteyed::Camera::Open (C++ function), mynteyed::DEPTH_GRAY_24 (C++ enumerator), mynteyed::Camera::SetDistanceCallback (C++ function), mynteyed::DEPTH_MODE_LAST (C++ enumerator), mynteyed::Camera::SetExposureTime (C++ function), mynteyed::DEPTH_RAW (C++ enumerator), 85, (C++ mynteyed::DEPTH_RGB (C++ enumerator), mynteyed::Camera::SetGlobalGain...
  • Page 111 MYNT EYE D SDK Documentation, Release 1.8.0 mynteyed::Extrinsics::rotation (C++ mem- ber), mynteyed::LEFT (C++ enumerator), mynteyed::Extrinsics::translation (C++ mynteyed::LENS_TYPE (C++ enumerator), mynteyed::MotionData (C++ class), member), mynteyed::FIRMWARE_VERSION (C++ enumera- mynteyed::MotionData::imu (C++ member), tor), mynteyed::MotionIntrinsics (C++ class), mynteyed::HARDWARE_VERSION (C++ enumera- mynteyed::MotionIntrinsics::accel (C++ tor), member), mynteyed::Image (C++ class), (C++ mynteyed::MotionIntrinsics::gyro...
  • Page 112 MYNT EYE D SDK Documentation, Release 1.8.0 ator), mynteyed::SENSOR_TYPE_H22 (C++ enumerator), mynteyed::SENSOR_TYPE_OV7740 (C++ enumer- ator), mynteyed::SENSOR_TYPE_OV9714 (C++ enumer- ator), mynteyed::SensorMode (C++ enum), mynteyed::SensorType (C++ enum), mynteyed::SERIAL_NUMBER (C++ enumerator), mynteyed::SPEC_VERSION (C++ enumerator), mynteyed::STREAM_1280x480 (C++ enumerator), mynteyed::STREAM_1280x720 (C++ enumerator), mynteyed::STREAM_2560x720 (C++ enumerator), mynteyed::STREAM_640x480 (C++ enumerator), mynteyed::STREAM_FORMAT_LAST (C++ enumer- ator),...

Table of Contents