1 Commits

Author SHA1 Message Date
Tini Oh
fde0b17c0b fix: 3.4.19 opencv complie. 2023-01-06 14:45:31 +08:00
172 changed files with 12755 additions and 679 deletions

7
3rdparty/easyloggingpp/.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
build-*
*.pro.user
.DS_Store
release.info
bin/*
logs/*
experiments/*

0
3rdparty/easyloggingpp/CMakeLists.txt vendored Normal file
View File

25
3rdparty/easyloggingpp/LICENSE vendored Normal file
View File

@@ -0,0 +1,25 @@
The MIT License (MIT)
Copyright (c) 2012-2018 Zuhd Web Services
Copyright (c) 2012-2018 @abumusamq
https://github.com/zuhd-org/
https://zuhd.org
https://muflihun.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1539
3rdparty/easyloggingpp/README.md vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4569
3rdparty/easyloggingpp/src/easylogging++.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
cmake_minimum_required(VERSION 3.0)
project(mynteye VERSION 2.4.2 LANGUAGES C CXX)
project(mynteye VERSION 2.4.1 LANGUAGES C CXX)
include(cmake/Common.cmake)

34
Jenkinsfile vendored
View File

@@ -16,10 +16,7 @@ pipeline {
steps {
echo "WORKSPACE: ${env.WORKSPACE}"
echo 'apt-get ..'
sh '''
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
apt-get update
'''
sh 'apt-get update'
}
}
stage('Init') {
@@ -42,7 +39,12 @@ pipeline {
sh '. /opt/ros/kinetic/setup.sh; make install SUDO='
}
}
stage('Test') {
steps {
echo 'make test ..'
sh '. /opt/ros/kinetic/setup.sh; make test SUDO='
}
}
stage('Samples') {
steps {
echo 'make samples ..'
@@ -80,36 +82,22 @@ pipeline {
post {
always {
echo 'This will always run'
/*
dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://icon-park.com/imagefiles/loading7_gray.gif',
message: '开始构建',
jenkinsUrl: "${JENKINS_URL}"
*/
}
success {
echo 'This will run only if successful'
/*
dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://icons.iconarchive.com/icons/paomedia/small-n-flat/1024/sign-check-icon.png',
message: '构建成功',
jenkinsUrl: "${JENKINS_URL}"
*/
}
failure {
echo 'This will run only if failed'
dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://www.iconsdb.com/icons/preview/soylent-red/x-mark-3-xxl.png',
message: '构建失败',
jenkinsUrl: "${JENKINS_URL}"
mail to: 'mynteye-ci@slightech.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
unstable {
echo 'This will run only if the run was marked as unstable'
}
changed {
echo 'This will run only if the state of the Pipeline has changed'
echo 'For example, if the Pipeline was previously failing but is now successful11'
echo 'For example, if the Pipeline was previously failing but is now successful'
}
}
}

View File

@@ -43,6 +43,7 @@ help:
@echo " make install install project"
@echo " make test build test and run"
@echo " make samples build samples"
@echo " make tools build tools"
@echo " make pkg package sdk"
@echo " make ros build ros wrapper"
@echo " make py build python wrapper"
@@ -50,7 +51,7 @@ help:
.PHONY: help
all: init samples ros
all: init samples tools ros
.PHONY: all
@@ -158,6 +159,20 @@ samples: install
.PHONY: samples
# tools
tools: install
@$(call echo,Make $@)
ifeq ($(HOST_OS),Mac)
$(error "Can't make tools on $(HOST_OS)")
else
@$(call cmake_build,./tools/_build)
endif
.PHONY: tools
# pkg
pkg: clean
@@ -247,6 +262,8 @@ clean:
@$(call rm,./_install/)
@$(call rm,./samples/_build/)
@$(call rm,./samples/_output/)
@$(call rm,./tools/_build/)
@$(call rm,./tools/_output/)
@$(call rm,./test/_build/)
@$(call rm,./test/_output/)
@$(MAKE) cleanlog

View File

@@ -1,6 +1,6 @@
# MYNT® EYE S SDK
[![](https://img.shields.io/badge/MYNT%20EYE%20S%20SDK-2.4.2-brightgreen.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK)
[![](https://img.shields.io/badge/MYNT%20EYE%20S%20SDK-2.4.1-brightgreen.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK)
## Overview
@@ -53,7 +53,7 @@ Init project, build samples and run someone.
```bash
make init
make samples
./samples/_output/bin/camera_with_junior_device_api
./samples/_output/bin/device/camera_d
```
## Mirrors

View File

@@ -0,0 +1,75 @@
%YAML:1.0
---
SGBM:
# must define for opencv check
name: StereoMatcher.SGBM
# Margin in percentage by which the best (minimum) computed cost function value should "win" the second best value to consider the found match correct.
# Normally, a value within the 5-15 range is good enough.
uniquenessRatio: 10
# Maximum size of smooth disparity regions to consider their noise speckles and invalidate.
# Set it to 0 to disable speckle filtering.
# Otherwise, set it somewhere in the 50-200 range.
speckleWindowSize: 100
# Maximum disparity variation within each connected component.
# If you do speckle filtering, set the parameter to a positive value, it will be implicitly multiplied by 16.
# Normally, 1 or 2 is good enough.
speckleRange: 32
# Minimum possible disparity value.
# Normally, it is zero but sometimes rectification algorithms
# can shift images, so this parameter needs to be adjusted accordingly.
minDisparity: 0
# Maximum allowed difference (in integer pixel units) in the left-right disparity check.
# Set it to a non-positive value to disable the check.
disp12MaxDiff: 1
# Truncation value for the prefiltered image pixels.
# The algorithm first computes x-derivative at each pixel and clips its value by [-preFilterCap, preFilterCap] interval.
# The result values are passed to the Birchfield-Tomasi pixel cost function.
preFilterCap: 63
# Maximum disparity minus minimum disparity.
# The value is always greater than zero.
# In the current implementation, this parameter must be divisible by 16.
numDisparities: 64
# Matched block size. It must be an odd number >=1 .
# Normally, it should be somewhere in the 3..11 range.
blockSize: 3
# The first parameter controlling the disparity smoothness. See below.
P1: 72
# The second parameter controlling the disparity smoothness.
# The larger the values are, the smoother the disparity is.
# P1 is the penalty on the disparity change by plus or minus 1 between neighbor pixels.
# P2 is the penalty on the disparity change by more than 1 between neighbor pixels.
# The algorithm requires P2 > P1 .
P2: 188
BM:
# must define for opencv check
name: StereoMatcher.BM
uniquenessRatio: 60
speckleWindowSize: 100
speckleRange: 4
minDisparity: 0
disp12MaxDiff: 1
preFilterCap: 31
# the disparity search range.
# For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities.
# The search range can then be shifted by changing the minimum disparity.
numDisparities: 64
# the linear size of the blocks compared by the algorithm.
# The size should be odd (as the block is centered at the current pixel).
# Larger block size implies smoother, though less accurate disparity map.
# Smaller block size gives more detailed disparity map,
# but there is higher chance for algorithm to find a wrong correspondence.
blockSize: 15
preFilterSize: 9
textureThreshold: 10

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = "MYNT EYE S SDK"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 2.4.2
PROJECT_NUMBER = 2.4.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@@ -24,7 +24,7 @@ copyright = '2019, MYNTAI'
author = 'MYNTAI'
# The short X.Y version
version = '2.4.2'
version = '2.4.1'
# The full version, including alpha/beta/rc tags
release = version

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 KiB

View File

@@ -22,8 +22,7 @@ MYNTEYE_S_2.0.0_alpha0.img 2.0.0-alpha0
============================ ===========================
S2100 Firmwares SDK Version
============================ ===========================
MYNTEYE-S21X0-1.4.0.img 2.4.2(2.4.2 ~ latest)
MYNTEYE-S2100-1.3.2.img 2.4.0(2.4.0 ~ 2.4.1)
MYNTEYE-S2100-1.3.2.img 2.4.0(2.4.0 ~ latest)
MYNTEYE_S2100_1.2.img 2.3.5(2.3.5 ~ 2.3.9)
MYNTEYE_S2100_1.1.img 2.3.4
============================ ===========================

View File

@@ -4,13 +4,6 @@ Change Log
.. toctree::
:maxdepth: 2
2019-09-09
-------------------
S21X0 Main Chip Firmware: MYNTEYE-S21X0-1.4.0.img
1. Support 2110 device.
2019-08-09
-------------------

View File

@@ -3,7 +3,7 @@
Update Auxiliary Chip Firmware
==================================
Update auxiliary chip (Only Support S21XX)
Update auxiliary chip (Only Support S2100/S210A)
------------------------------------------------
* Plug in the MYNT® EYE camera into a USB3.0 port

View File

@@ -12,7 +12,7 @@ You can download the firmware and MYNT EYE TOOL installation package in the ``Fi
Firmwares/
├─Checksum.txt # File checksum
├─MYNTEYE-S1030-2.5.0.img # S1030 firmware
├─MYNTEYE-S21x0-1.4.0.img # S21X0 firmware
├─MYNTEYE-S2100-1.3.2.img # S2100 firmware
├─...
└─mynt-eye-tool-setup.zip # MYNT EYE TOOL zip

View File

@@ -8,4 +8,3 @@ IMU Coordinate System
imu_coord_s1030
imu_coord_s2100
imu_coord_s2110

View File

@@ -1,8 +0,0 @@
.. _product_imu_coord_s2110:
S2110 Coordinate System
====================================
IMU coordinate system is right-handed,the axis directions are as follows:
.. image:: ../../images/product/mynteye_s2110_imu_coord.jpg

View File

@@ -9,4 +9,3 @@ Product Specification
spec_s1030
spec_s1030_ir
spec_s2100
spec_s2110

View File

@@ -8,4 +8,3 @@ Product Surface
surface_s1030
surface_s2100
surface_s2110

View File

@@ -41,7 +41,7 @@ Product Specification
Synchronization Precision <1ms (up to 0.02ms)
-------------------------- -----------------------------------------------------
IMU Frequency 200Hz
-------------------------- -----------------------------------------------------
-------------------------- ---------------------------------------
Output data format YUYV
-------------------------- -----------------------------------------------------
Data transfer Interface USB3.0
@@ -64,7 +64,7 @@ Software
SDK http://www.myntai.com/dev/mynteye
---------------- ---------------------------------------------------------------------------------
Support ORB_SLAM2、OKVIS、Vins-Mono、Vins-Fusion、VIORB
================ =================================================================================
================ ==================================================================================

View File

@@ -1,105 +0,0 @@
.. _mynteye_spec_s2110:
S2110-95/Color Product Specification
========================================
Product Specification
-----------------------
========================== =====================================================
Model S2110-95/Color
-------------------------- -----------------------------------------------------
Size PCB dimension:17.74x100mm
Total dimension:125x47x26.6mm
-------------------------- -----------------------------------------------------
Frame Rate 1280x400\@10/20/30/60fps 2560x800\@10/20/30fps
-------------------------- -----------------------------------------------------
Resolution 1280x400; 2560x800
-------------------------- -----------------------------------------------------
Depth Resolution Based on CPU/GPU Up to 1280*400\@60FPS
-------------------------- -----------------------------------------------------
Pixel Size 3.0*3.0μm
-------------------------- -----------------------------------------------------
Baseline 80.0mm
-------------------------- -----------------------------------------------------
Visual Angle D:112° H:95° V:50°
-------------------------- -----------------------------------------------------
Focal Length 2.63mm
-------------------------- -----------------------------------------------------
IR Support No
-------------------------- -----------------------------------------------------
Color Mode Color
-------------------------- -----------------------------------------------------
Depth Working Distance 0.60-7m+
-------------------------- -----------------------------------------------------
Scanning Mode Global Shutter
-------------------------- -----------------------------------------------------
Power 1.1W\@5V DC from USB
-------------------------- -----------------------------------------------------
Synchronization Precision <1ms (up to 0.02ms)
-------------------------- -----------------------------------------------------
IMU Frequency 200Hz
-------------------------- -----------------------------------------------------
Output data format YUYV
-------------------------- -----------------------------------------------------
Data transfer Interface USB3.0
-------------------------- -----------------------------------------------------
Time Sync interface DF50A
-------------------------- -----------------------------------------------------
Weight 100.8g
-------------------------- -----------------------------------------------------
UVC MODE Yes
========================== =====================================================
Software
--------
================ =================================================================================
Support system Windows 10、Ubuntu 14.04/16.04/18.04、ROS indigo/kinetic/melodic、Android 7.0+
---------------- ---------------------------------------------------------------------------------
SDK http://www.myntai.com/dev/mynteye
---------------- ---------------------------------------------------------------------------------
Support ORB_SLAM2、OKVIS、Vins-Mono、Vins-Fusion、VIORB
================ =================================================================================
Work Environment
-----------------
========================= ==============================
Operating Temperature -15°C~55°C
------------------------- ------------------------------
Storage Temperature -20°C~75°C
------------------------- ------------------------------
Humidity 0% to 95% non-condensing
========================= ==============================
Package
---------
=================== =======================================
Package Contents MYNT EYE x1 USB Micro-B Cable x1
=================== =======================================
Warranty
----------
==================== ============================================
Product Warranty 12 Months Limited Manufacturer's Warranty
==================== ============================================
Accuracy
---------
============================ ============================================
Depth Distance Deviation Less than 4%
============================ ============================================

View File

@@ -1,15 +0,0 @@
.. _mynteye_surface_s2110:
S2110 Size and Structure
================================
============= ==============
Shell(mm) PCBA board(mm)
============= ==============
125x47x40 100x15
============= ==============
.. image:: ../../images/product/mynteye_s2_surface_zh-Hans.jpg
A. Camera:please pay attention to protect the camera sensor lenses, to avoid imaging quality degradation.
B. USB Micro-B interface and set screw holes: during usage, plug in the USB Micro-B cable and secure it by fastening the set screws to avoid damage to the interface and to ensure stability in connection.

View File

@@ -8,5 +8,6 @@ SDK
sdk_install
data/contents
control/contents
tools/contents
project/contents
sdk_changelog

View File

@@ -13,7 +13,7 @@ For mynteye s1030, the settings available for adjustment during auto exposure ar
* ``Option::MAX_EXPOSURE_TIME`` Maximum exposure time.
* ``Option::DESIRED_BRIGHTNESS`` Expected brightness.
For mynteye s21XX, the settings available for adjustment during auto exposure are:
For mynteye s2100/s210a, the settings available for adjustment during auto exposure are:
* ``Option::MAX_GAIN`` Maximum gain.
* ``Option::MAX_EXPOSURE_TIME`` Maximum exposure time.
@@ -45,7 +45,7 @@ s1030
LOG(INFO) << "Set DESIRED_BRIGHTNESS to "
<< api->GetOptionValue(Option::DESIRED_BRIGHTNESS);
s21XX
s2100/s210a
.. code-block:: c++
@@ -86,7 +86,7 @@ s1030
.. code-block:: bash
$ ./samples/_output/bin/ctrl_auto_exposure
$ ./samples/_output/bin/tutorials/ctrl_auto_exposure
I0513 14:07:57.963943 31845 utils.cc:26] Detecting MYNT EYE devices
I0513 14:07:58.457536 31845 utils.cc:33] MYNT EYE devices:
I0513 14:07:58.457563 31845 utils.cc:37] index: 0, name: MYNT-EYE-S1000
@@ -97,11 +97,11 @@ s1030
I0513 14:07:58.521375 31845 auto_exposure.cc:41] Set DESIRED_BRIGHTNESS to 192
s21XX
s2100/s210a
.. code-block:: bash
$ ./samples/_output/bin/ctrl_auto_exposure
$ ./samples/_output/bin/tutorials/ctrl_auto_exposure
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -126,4 +126,4 @@ s21XX
The sample program displays an image with a real exposure time in the upper left corner, in milliseconds.
Complete code examples, see `ctrl_auto_exposure.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_auto_exposure.cc>`_ .
Complete code examples, see `auto_exposure.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/auto_exposure.cc>`_ .

View File

@@ -12,7 +12,7 @@ For mynteye s1030, to set the image frame rate and IMU frequency, set ``Option::
* The effective fps of the image: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60.
* The effective frequency of IMU: 100, 200, 250, 333, 500.
For mynteye s21XX, the image frame rate should be selected when running the sample, and the frame rate and resolution are combined as follows:
For mynteye s2100/s210a, the image frame rate should be selected when running the sample, and the frame rate and resolution are combined as follows:
.. code-block:: bash
@@ -45,7 +45,7 @@ s1030
LOG(INFO) << "Set IMU_FREQUENCY to "
<< api->GetOptionValue(Option::IMU_FREQUENCY);
s21XX
s2100/s210a
.. code-block:: c++
@@ -67,7 +67,7 @@ s1030
.. code-block:: bash
$ ./samples/_output/bin/ctrl_framerate
$ ./samples/_output/bin/tutorials/ctrl_framerate
I0513 14:05:57.218222 31813 utils.cc:26] Detecting MYNT EYE devices
I0513 14:05:57.899404 31813 utils.cc:33] MYNT EYE devices:
I0513 14:05:57.899430 31813 utils.cc:37] index: 0, name: MYNT-EYE-S1000
@@ -78,11 +78,11 @@ s1030
I0513 14:06:21.702388 31813 framerate.cc:85] Img count: 573, fps: 24.6122
I0513 14:06:21.702404 31813 framerate.cc:87] Imu count: 11509, hz: 494.348
s21XX
s2100/s210a
.. code-block:: bash
$ ./samples/_output/bin/ctrl_framerate
$ ./samples/_output/bin/tutorials/ctrl_framerate
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -105,4 +105,4 @@ s21XX
After the sample program finishes running with ``ESC/Q``, it will output the calculated value of the frame rate of image & IMU frequency.
Complete code samplesplease see `ctrl_framerate.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_framerate.cc>`_ .
Complete code samplesplease see `framerate.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/framerate.cc>`_ .

View File

@@ -9,11 +9,11 @@ To set the IIC address, set ``Option::IIC_ADDRESS_SETTING``.
.. Attention::
Only support S21XX
Only support S210A/2100
Reference Code:
s2XX
s210a/s2100
.. code-block:: c++
@@ -33,11 +33,11 @@ s2XX
Reference running results on Linux:
s21XX
s210a/s2100
.. code-block:: bash
$ ./samples/_output/bin/ctrl_iic_adress
$ ./samples/_output/bin/tutorials/ctrl_iic_adress
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -55,4 +55,4 @@ s21XX
I/imu_range.cc:51 Set iic address to 0x31
After the sample program finishes running with ``ESC/Q``.
Complete code samplesplease see `ctrl_iic_address.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_iic_address.cc>`_ .
Complete code samplesplease see `iic_address.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/iic_address.cc>`_ .

View File

@@ -37,7 +37,7 @@ Reference running results on Linux:
.. code-block:: bash
$ ./samples/_output/bin/ctrl_imu_low_pass_filter
$ ./samples/_output/bin/tutorials/ctrl_imu_low_pass_filter
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -60,4 +60,4 @@ Reference running results on Linux:
After the sample program finishes running with ``ESC/Q``, the low-pass filter of imu setting is complete. The ranges will be kept inside the hardware and not affected by power off.
Complete code samplesplease see `ctrl_imu_low_pass_filter.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_imu_low_pass_filter.cc>`_
Complete code samplesplease see `imu_low_pass_filter.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/imu_low_pass_filter.cc>`_

View File

@@ -13,7 +13,7 @@ To set the range of accelerometer and gyroscope, set ``Option::ACCELEROMETER_RAN
* The effective range of accelerometer(unit:g): 4, 8, 16, 32.
* Gyroscope Range Valid value (unit: DEG/S): 500, 1000, 2000, 4000.
For mynteye s21XX, the available settings are:
For mynteye s2100/s210a, the available settings are:
* The effective range of accelerometer(unit:g): 6, 12, 24, 48.
* The effective range of gyroscope(unit:deg/s): 250, 500, 1000, 2000, 4000.
@@ -38,7 +38,7 @@ s1030
LOG(INFO) << "Set GYROSCOPE_RANGE to "
<< api->GetOptionValue(Option::GYROSCOPE_RANGE);
s21XX
s2100/s210a
.. code-block:: c++
@@ -67,7 +67,7 @@ s1030
.. code-block:: bash
$ ./samples/_output/bin/ctrl_imu_range
$ ./samples/_output/bin/tutorials/ctrl_imu_range
I/utils.cc:28 Detecting MYNT EYE devices
I/utils.cc:38 MYNT EYE devices:
I/utils.cc:41 index: 0, name: MYNT-EYE-S1030, sn: 4B4C1F1100090712
@@ -78,11 +78,11 @@ s1030
I/imu_range.cc:84 Img count: 363, fps: 25.0967
I/imu_range.cc:86 Imu count: 2825, hz: 195.312
s21XX
s2100/s210a
.. code-block:: bash
$ ./samples/_output/bin/ctrl_imu_range
$ ./samples/_output/bin/tutorials/ctrl_imu_range
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -105,4 +105,4 @@ s21XX
After the sample program finishes running with ``ESC/Q``, the ranges of imu setting is complete. The ranges will be kept inside the hardware and not affected by power off.
Complete code samplesplease see `ctrl_imu_range.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_imu_range.cc>`_.
Complete code samplesplease see `imu_range.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/imu_range.cc>`_.

View File

@@ -8,7 +8,7 @@ Using the ``SetOptionValue()`` function of the API, you can set various control
Enabling IR is setting ``Option::IR_CONTROL`` greater than 0. The greater the value, the greater the IR's intensity.
.. Attention::
* mynteye s21XX doesn't support this feature.
* mynteye s2100/s210a doesn't support this feature.
Reference Code:
@@ -33,7 +33,7 @@ Reference running results on Linux:
.. code-block:: bash
$ ./samples/_output/bin/ctrl_infrared
$ ./samples/_output/bin/tutorials/ctrl_infrared
I0504 16:16:28.016624 25848 utils.cc:13] Detecting MYNT EYE devices
I0504 16:16:28.512462 25848 utils.cc:20] MYNT EYE devices:
I0504 16:16:28.512473 25848 utils.cc:24] index: 0, name: MYNT-EYE-S1000
@@ -49,6 +49,6 @@ At this point, if the image is displayed, you can see IR speckle on the image, a
.. attention::
The hardware will not record the IR value after being turned off and will reset to 0. In order to keep IR enabled, you must set the IR value after turning on the device.
The hardware will not record the IR value after being turned off. In order to keep IR enabled, you must set the IR value after turning on the device.
Complete code samplessee `ctrl_infrared.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_infrared.cc>`_ .
Complete code samplessee `infrared.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/infrared.cc>`_ .

View File

@@ -13,7 +13,7 @@ For mynteye s1030, during manual exposure, the settings available for adjustment
* ``Option::BRIGHTNESS`` Brightness (Exposure time).
* ``Option::CONTRAST`` Contrast (Black level calibration).
For mynteye s21XX, during manual exposure, the settings available for adjustment are:
For mynteye s2100/s210a, during manual exposure, the settings available for adjustment are:
* ``Option::BRIGHTNESS`` Brightness (Exposure time).
@@ -41,7 +41,7 @@ s1030
LOG(INFO) << "Set BRIGHTNESS to " << api->GetOptionValue(Option::BRIGHTNESS);
LOG(INFO) << "Set CONTRAST to " << api->GetOptionValue(Option::CONTRAST);
s21XX
s2100/s210a
.. code-block:: c++
@@ -71,7 +71,7 @@ s1030
.. code-block:: bash
$ ./samples/_output/bin/ctrl_manual_exposure
$ ./samples/_output/bin/tutorials/ctrl_manual_exposure
I0513 14:09:17.104431 31908 utils.cc:26] Detecting MYNT EYE devices
I0513 14:09:17.501519 31908 utils.cc:33] MYNT EYE devices:
I0513 14:09:17.501551 31908 utils.cc:37] index: 0, name: MYNT-EYE-S1000
@@ -81,11 +81,11 @@ s1030
I0513 14:09:17.552958 31908 manual_exposure.cc:39] Set BRIGHTNESS to 120
I0513 14:09:17.552963 31908 manual_exposure.cc:40] Set CONTRAST to 116
s21XX
s2100/s210a
.. code-block:: bash
$ ./samples/_output/bin/ctrl_manual_exposure
$ ./samples/_output/bin/tutorials/ctrl_manual_exposure
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
@@ -107,4 +107,4 @@ s21XX
The sample program displays an image with a real exposure time in the upper left corner, in milliseconds.
Complete code samplessee `ctrl_manual_exposure.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/ctrl_manual_exposure.cc>`_ .
Complete code samplessee `manual_exposure.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/manual_exposure.cc>`_ .

View File

@@ -17,7 +17,4 @@ SDK Data Samples
get_imu_correspondence
get_from_callbacks
get_with_plugin
save_params
save_single_image
write_img_params
write_imu_params

View File

@@ -47,8 +47,8 @@ Reference code snippet:
The above code uses OpenCV to display the image. When the display window is selected, pressing ``ESC/Q`` will end the program.
Complete code examples, see `get_depth.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_depth.cc>`_ .
Complete code examples, see `get_depth.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_depth.cc>`_ .
.. tip::
Preview the value of a region of the depth image, see `get_depth_with_region.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_depth_with_region.cc>`_ .
Preview the value of a region of the depth image, see `get_depth_with_region.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/api/get_depth_with_region.cc>`_ .

View File

@@ -24,7 +24,7 @@ Reference result on Linux:
.. code-block:: bash
$ ./samples/_output/bin/get_device_info
$ ./samples/_output/bin/tutorials/get_device_info
I0503 16:40:21.109391 32106 utils.cc:13] Detecting MYNT EYE devices
I0503 16:40:21.604116 32106 utils.cc:20] MYNT EYE devices:
I0503 16:40:21.604127 32106 utils.cc:24] index: 0, name: MYNT-EYE-S1000
@@ -38,4 +38,4 @@ Reference result on Linux:
I0503 16:40:21.615164 32106 get_device_info.cc:16] IMU type: 0000
I0503 16:40:21.615171 32106 get_device_info.cc:17] Nominal baseline: 120
Complete code examples, see `get_device_info.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_device_info.cc>`_ .
Complete code examples, see `get_device_info.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_device_info.cc>`_ .

View File

@@ -59,4 +59,4 @@ Reference code snippet:
The above code uses OpenCV to display the image. Select the display window, press ``ESC/Q`` to exit in the program.
Complete code examples, see `get_disparity.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_disparity.cc>`_ .
Complete code examples, see `get_disparity.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_disparity.cc>`_ .

View File

@@ -116,4 +116,4 @@ Reference code snippet:
OpenCV is used to display images and data above. When the window is selected, pressing ``ESC/Q`` will exit program.
Complete code examples, see `get_from_callbacks.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_from_callbacks.cc>`_ .
Complete code examples, see `get_from_callbacks.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_from_callbacks.cc>`_ .

View File

@@ -7,13 +7,9 @@ Use ``GetIntrinsics()`` & ``GetExtrinsics()`` to get image calibration parameter
.. tip::
The detailed meaning of parameters can reference the files in ``tools/writer/config`` , of these
the image calibration parameters of S21XX are in ``tools/writer/config/S21XX``
the image calibration parameters of S2100/S210A are in ``tools/writer/config/S210A``
the image calibration parameters of S1030 are in ``tools/writer/config/S1030``
Note
Camera Intrinsics/Extrinsics, please ref to: ros `CameraInfo <http://docs.ros.org/melodic/api/sensor_msgs/html/msg/CameraInfo.html>`_.
Reference code snippet:
.. code-block:: c++
@@ -31,7 +27,7 @@ Reference result on Linux:
.. code-block:: bash
$ ./samples/_output/bin/get_img_params
$ ./samples/_output/bin/tutorials/get_img_params
I0510 15:00:22.643263 6980 utils.cc:26] Detecting MYNT EYE devices
I0510 15:00:23.138811 6980 utils.cc:33] MYNT EYE devices:
I0510 15:00:23.138849 6980 utils.cc:37] index: 0, name: MYNT-EYE-S1000
@@ -40,4 +36,4 @@ Reference result on Linux:
I0510 15:00:23.210551 6980 get_img_params.cc:24] Intrinsics right: {width: 752, height: 480, fx: 736.38305001095545776, fy: 723.50066150722432212, cx: 456.68367112303980093, cy: 250.70083335536796199, model: 0, coeffs: [-0.51012886039889305, 0.38764476500996770, 0.00000000000000000, 0.00000000000000000, 0.00000000000000000]}
I0510 15:00:23.210577 6980 get_img_params.cc:26] Extrinsics left to right: {rotation: [0.99701893306553813, -0.00095378124886237, -0.07715139279485062, 0.00144939967628305, 0.99997867219985104, 0.00636823256494144, 0.07714367342455503, -0.00646107164115277, 0.99699905125522237], translation: [-118.88991734400046596, -0.04560580387053091, -3.95313736911933855]}
Complete code examples, see `get_img_params.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_img_params.cc>`_ .
Complete code examples, see `get_img_params.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_img_params.cc>`_ .

View File

@@ -47,13 +47,8 @@ Sample code snippet:
*/
painter.DrawImgData(img, *left_data.img);
static std::vector<api::MotionData> motion_datas_s = motion_datas;
if (!motion_datas.empty() && motion_datas.size() > 0) {
motion_datas_s = motion_datas;
}
if (!motion_datas_s.empty() && motion_datas_s.size() > 0) {
painter.DrawImuData(img, *motion_datas_s[0].imu);
if (!motion_datas.empty()) {
painter.DrawImuData(img, *motion_datas[0].imu);
}
cv::imshow("frame", img);
@@ -68,4 +63,4 @@ Sample code snippet:
OpenCV is used to display image and data. When window is selected, press ``ESC/Q`` to exit program.
Complete code examples, see `get_imu.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_imu.cc>`_ .
Complete code examples, see `get_imu.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_imu.cc>`_ .

View File

@@ -58,7 +58,7 @@ Reference result on Linux:
.. code-block:: bash
$ ./samples/_output/bin/get_imu_correspondence
$ ./samples/_output/bin/tutorials/get_imu_correspondence
I/utils.cc:30 Detecting MYNT EYE devices
I/utils.cc:40 MYNT EYE devices:
I/utils.cc:43 index: 0, name: MYNT-EYE-S1030, sn: 0281351000090807
@@ -106,4 +106,4 @@ Reference result on Linux:
I/get_imu_correspondence.cc:61 Imu timestamp: 171419650, diff_prev=2020, diff_img=16608
I/get_imu_correspondence.cc:61 Imu timestamp: 171421660, diff_prev=2010, diff_img=18624
Complete code examples, see `get_imu_correspondence.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_imu_correspondence.cc>`_ .
Complete code examples, see `get_imu_correspondence.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_imu_correspondence.cc>`_ .

View File

@@ -15,4 +15,4 @@ Reference commands:
LOG(INFO) << "Motion extrinsics left to imu: {"
<< api->GetMotionExtrinsics(Stream::LEFT) << "}";
Complete code examples, see `get_imu_params.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_imu_params.cc>`_ .
Complete code examples, see `get_imu_params.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_imu_params.cc>`_ .

View File

@@ -7,6 +7,7 @@ Point images belongs to upper layer of synthetic data. To get this kind of data
For detail process description, please see :ref:`get_stereo` :ref:`get_stereo_rectified` .
It is recommended to use plugin to calculate depth: the depth map will be better with a higher frame rate. Please see :ref:`get_with_plugin` for detail.
Sample code snippet:
@@ -49,7 +50,7 @@ Sample code snippet:
`PCL <https://github.com/PointCloudLibrary/pcl>`_ is used to display point images above. Program will close when point image window is closed.
Complete code examples, see `get_depth_and_points.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_depth_and_points.cc>`_ .
Complete code examples, see `get_points.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_points.cc>`_ .
.. attention::

View File

@@ -37,4 +37,4 @@ Reference commands:
The above code uses OpenCV to display the image. When the display window is selected, pressing ``ESC/Q`` will end the program.
Complete code examples, see `get_stereo.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_stereo.cc>`_ .
Complete code examples, see `get_stereo.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_stereo.cc>`_ .

View File

@@ -48,4 +48,4 @@ Reference code snippet:
OpenCV is used to display the image above. Select the display window, press ``ESC/Q`` to exit the program.
Complete code examples, see `get_stereo_rectified.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_stereo_rectified.cc>`_ .
Complete code examples, see `get_stereo_rectified.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_stereo_rectified.cc>`_ .

View File

@@ -83,7 +83,7 @@ In addition, the following command can be executed to check whether the dependen
If the plugin's dependent library is not found, it will report an error \"Open plugin failed\" when loading.
Complete code sample, see `get_with_plugin.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_with_plugin.cc>`_ .
Complete code sample, see `get_with_plugin.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/get_with_plugin.cc>`_ .
.. tip::

View File

@@ -3,22 +3,22 @@
Save Device Infomation And Parameters
=====================================
The SDK provides a tool ``save_all_infos`` for save information and parameters.
The SDK provides a tool ``save_all_infos`` for save information and parameters. For more information, please read `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
Reference commands:
.. code-block:: bash
./samples/_output/bin/save_all_infos
./tools/_output/bin/writer/save_all_infos
# Windows
.\samples\_output\bin\save_all_infos.bat
.\tools\_output\bin\writer\save_all_infos.bat
Reference result on Linux:
.. code-block:: bash
$ ./samples/_output/bin/save_all_infos
$ ./tools/_output/bin/writer/save_all_infos
I0512 21:40:08.687088 4092 utils.cc:26] Detecting MYNT EYE devices
I0512 21:40:09.366693 4092 utils.cc:33] MYNT EYE devices:
I0512 21:40:09.366734 4092 utils.cc:37] index: 0, name: MYNT-EYE-S1000

View File

@@ -49,4 +49,4 @@ Reference commands:
The above code uses OpenCV to display the image. When the display window is selected, pressing ``ESC/Q`` will end the program.
Complete code examples, see `save_single_image.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/save_single_image.cc>`_ .
Complete code examples, see `save_single_image.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/data/save_single_image.cc>`_ .

View File

@@ -3,7 +3,7 @@
Write Image Parameters
=======================
The SDK provides a tool ``write_img_params`` for writing image parameters.
The SDK provides a tool ``img_params_writer`` for writing image parameters. For details, read `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
For getting image parameters, please read :ref:`get_img_params`. This is used to calculate the deviation.
@@ -11,21 +11,21 @@ Reference commands:
.. code-block:: bash
./samples/_output/bin/write_img_params samples/config/img.params
./tools/_output/bin/writer/img_params_writer tools/writer/config/img.params
# Windows
.\samples\_output\bin\write_img_params.bat samples\config\img.params
.\tools\_output\bin\writer\img_params_writer.bat tools\writer\config\img.params
.. warning::
Please don't override parameters, you can use ``save_all_infos`` to backup parameters.
And, `samples/config/S1030/img.params.pinhole <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/config/S1030/img.params.pinhole>`_ is the path of S1030 pihole parameters file. If you calibrated parameters yourself, you can edit it and run previous commands to write them into the devices.
And, `tools/writer/config/S1030/img.params.pinhole <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/tools/writer/config/S1030/img.params.pinhole>`_ is the path of S1030 pihole parameters file. If you calibrated parameters yourself, you can edit it and run previous commands to write them into the devices.
.. tip::
The image calibration parameters of S21XX are in ``samples/config/S21XX``
The image calibration parameters of S1030 are in ``samples/config/S1030``
The image calibration parameters of S2100/S210A are in ``tools/writer/config/S210A``
The image calibration parameters of S1030 are in ``tools/writer/config/S1030``
.. tip::

View File

@@ -3,7 +3,7 @@
Write IMU Parameters
=====================
SDK provides the tool ``write_imu_params`` to write IMU parameters.
SDK provides the tool ``imu_params_writer`` to write IMU parameters. For deltail, please read `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
Information about how to get IMU parameters, please read :ref:`get_imu_params` .
@@ -11,12 +11,12 @@ Reference commands:
.. code-block:: bash
./samples/_output/bin/write_imu_params samples/config/imu.params
./tools/_output/bin/writer/imu_params_writer tools/writer/config/imu.params
# Windows
.\samples\_output\bin\write_imu_params.bat samples\config\imu.params
.\tools\_output\bin\writer\imu_params_writer.bat tools\writer\config\imu.params
The path of parameters folder can be found in `samples/config/imu.params <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/config>`_ . If you calibrated the parameters yourself, you can edit the file and run above commands to write them into the device.
The path of parameters file can be found in `tools/writer/config/img.params <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/tools/writer/config/img.params>`_ . If you calibrated the parameters yourself, you can edit the file and run above commands to write them into the device.
.. warning::

View File

@@ -5,7 +5,7 @@ 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>/samples/simple_demo/project_cmake directory`` .
You could find the project demo in ``<sdk>/platforms/projects/cmake directory`` .
Preparation
-----------

View File

@@ -5,7 +5,7 @@ How to use SDK with Visual Studio 2017
This tutorial will create a project with Visual Studio 2017 to start using SDK.
You could find the project demo in ``<sdk>/samples/simple_demo/project_vs2017`` directory.
You could find the project demo in ``<sdk>/platforms/projects/vs2017`` directory.
Preparation
------------

View File

@@ -2,13 +2,6 @@
Change Log
==========
2019-08-27(v2.4.2)
-------------------
1. Part of the sample examples were sorted out, and useless tools and engineering code were removed.
2. Optimize disparity calculation.
3. Improving the logic of model display.
4. Fix some bugs.
2019-08-17(v2.4.1)
-------------------

View File

@@ -0,0 +1,58 @@
.. _analytics_dataset:
Recording Data Sets
====================
The SDK provides the tool ``record`` for recording data sets. Tool details can be seen in `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
Reference run command:
.. code-block:: bash
./tools/_output/bin/dataset/record2
# Windows
.\tools\_output\bin\dataset\record2.bat
Reference run results on Linux:
.. code-block:: bash
$ ./tools/_output/bin/dataset/record
I0513 21:28:57.128947 11487 utils.cc:26] Detecting MYNT EYE devices
I0513 21:28:57.807116 11487 utils.cc:33] MYNT EYE devices:
I0513 21:28:57.807155 11487 utils.cc:37] index: 0, name: MYNT-EYE-S1000
I0513 21:28:57.807163 11487 utils.cc:43] Only one MYNT EYE device, select index: 0
I0513 21:28:57.808437 11487 channels.cc:114] Option::GAIN: min=0, max=48, def=24, cur=24
I0513 21:28:57.809999 11487 channels.cc:114] Option::BRIGHTNESS: min=0, max=240, def=120, cur=120
I0513 21:28:57.818678 11487 channels.cc:114] Option::CONTRAST: min=0, max=255, def=127, cur=127
I0513 21:28:57.831529 11487 channels.cc:114] Option::FRAME_RATE: min=10, max=60, def=25, cur=25
I0513 21:28:57.848914 11487 channels.cc:114] Option::IMU_FREQUENCY: min=100, max=500, def=200, cur=500
I0513 21:28:57.865185 11487 channels.cc:114] Option::EXPOSURE_MODE: min=0, max=1, def=0, cur=0
I0513 21:28:57.881434 11487 channels.cc:114] Option::MAX_GAIN: min=0, max=48, def=48, cur=48
I0513 21:28:57.897598 11487 channels.cc:114] Option::MAX_EXPOSURE_TIME: min=0, max=240, def=240, cur=240
I0513 21:28:57.913918 11487 channels.cc:114] Option::DESIRED_BRIGHTNESS: min=0, max=255, def=192, cur=192
I0513 21:28:57.930177 11487 channels.cc:114] Option::IR_CONTROL: min=0, max=160, def=0, cur=0
I0513 21:28:57.946341 11487 channels.cc:114] Option::HDR_MODE: min=0, max=1, def=0, cur=0
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 record.cc:121] Img count: 1007, fps: 24.9732
I0513 21:29:38.608873 11487 record.cc:123] Imu count: 20040, hz: 496.983
Results save into ``<workdir>/dataset`` by default. You can also add parameter, select other directory to save.
Record contents:
.. code-block:: none
<workdir>/
└─dataset/
├─left/
│ ├─stream.txt # Image infomation
│ ├─000000.png # Imageindex 0
│ └─...
├─right/
│ ├─stream.txt # Image information
│ ├─000000.png # Imageindex 0
│ └─...
└─motion.txt # IMU information

View File

@@ -0,0 +1,38 @@
.. _analytics_imu:
Analyzing IMU
==============
The SDK provides the script ``imu_analytics.py`` for IMU analysis. The tool details can be seen in `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
Refer to run commands and results on Linux:
.. code-block:: bash
$ python tools/analytics/imu_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml -al=-1.2,1.2 -gl= -gdu=d -gsu=d -kl=
imu analytics ...
input: dataset
outdir: dataset
gyro_limits: None
accel_limits: [(-1.2, 1.2), (-1.2, 1.2), (-1.2, 1.2), (-1.2, 1.2)]
time_unit: None
time_limits: None
auto: False
gyro_show_unit: d
gyro_data_unit: d
temp_limits: None
open dataset ...
imu: 20040, temp: 20040
timebeg: 4.384450, timeend: 44.615550, duration: 40.231100
save figure to:
dataset/imu_analytics.png
imu analytics done
The analysis result graph will be saved in the data set directory, as follows:
.. image:: ../../../images/sdk/tools/imu_analytics.png
In addition, the script specific options can be executed ``-h``:
.. code-block:: bash
$ python tools/analytics/imu_analytics.py -h

View File

@@ -0,0 +1,55 @@
.. _analytics_stamp:
Analyze Time Stamps
====================
SDK provides a script for timestamp analysis ``stamp_analytics.py`` . Tool details are visible in `tools/README.md <https://github.com/slightech/MYNT-EYE-S-SDK/tree/master/tools>`_ .
Reference run commands and results on Linux:
.. code-block:: bash
$ python tools/analytics/stamp_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml
stamp analytics ...
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: 500
sample period (s)
img: 0.04, imu: 0.002
diff count
imgs: 1007, imus: 20040
imgs_t_diff: 1006, imus_t_diff: 20039
diff where (factor=0.1)
imgs where diff > 0.04*1.1 (0)
imgs where diff < 0.04*0.9 (0)
imus where diff > 0.002*1.1 (0)
imus where diff < 0.002*0.9 (0)
image timestamp duplicates: 0
save figure to:
dataset/stamp_analytics.png
stamp analytics done
The analysis result graph will be saved in the dataset directory, as follows:
.. image:: ../../../images/sdk/tools/stamp_analytics.png
In addition, the script specific options can be executed ``-h`` to understand:
.. code-block:: bash
$ python tools/analytics/stamp_analytics.py -h
.. tip::
Suggestions when recording data sets ``record.cc`` annotation display image inside ``cv::imshow()``, ``dataset.cc`` annotation display image inside ``cv::imwrite()`` . Because these operations are time-consuming, they can cause images to be discarded. In other words, consumption can't keep up with production, so some images are discarded. ``GetStreamDatas()`` used in ``record.cc`` only caches the latest 4 images.

View File

@@ -0,0 +1,9 @@
SDK Tools
==================
.. toctree::
:maxdepth: 2
analytics_dataset
analytics_imu
analytics_stamp

View File

@@ -0,0 +1,269 @@
.. _calibration_tool:
Calibration Tool Manual
=======================
Introduction
--------
1.1 Support Platform
--------
Currently the calibration tool only supports Ubuntu 16.04 LTS, but support the official, ROS multiple version of OpenCV dependencies.
==================== ==================== ======================
Platform Architecture Different dependence
==================== ==================== ======================
Ubuntu 16.04 LTS x64(amd64) libopencv-dev
Ubuntu 16.04 LTS x64(amd64) ros-kinetic-opencv3
==================== ==================== ======================
1.2 Tools description
--------
Deb/ppa installation package is available on Ubuntu. The architecture, dependencies, and versions will be distinguished from the name:
* mynteye-s-calibrator-opencv-official-1.0.0_amd64.deb
* mynteye-s-calibrator-opencv-ros-kinetic-1.0.0_amd64.deb
======================= ==================== ============================================================
Dependency identifier Dependency package Detailed description
======================= ==================== ============================================================
opencv-official libopencv-dev https://packages.ubuntu.com/xenial/libopencv-dev
opencv-ros-kinetic ros-kinetic-opencv3 http://wiki.ros.org/opencv3
======================= ==================== ============================================================
1.3 Deb Toolkit Get
--------
==================== ========================================================================
Method of Obtaining Get address
==================== ========================================================================
Baidu Cloud https://pan.baidu.com/s/19rW0fPKUlQj6eldZpZFoAA Extraction code: a6ps
Google Drive https://drive.google.com/open?id=1RsV2WEKAsfxbn-Z5nGjk5g3ml1UDEsDc
==================== ========================================================================
Installation
--------
2.1 Installation Preparation
--------
* Ubuntu 16.04 LTS environment, x64 architecture
* Deb package for the calibration tool, select OpenCV dependencies as needed
(this step is not required for PPA installation)
2.2 Install ppa Package
--------
.. code-block:: bash
$ sudo add-apt-repository ppa:slightech/mynt-eye-s-sdk
$ sudo apt-get update
$ sudo apt-get install mynteye-s-calibrator
$ sudo ln -sf /opt/myntai/mynteye-s-calibrator/mynteye-s-calibrator /usr/local/bin/ mynteye-s-calibrator
2.3 Install deb Package
--------
Install the deb package with udo dpkg -i:
.. code-block:: bash
$ sudo dpkg -i mynteye-s-calibrator-opencv-official-1.0.0_amd64.deb
...
(Reading database ... 359020 files and directories currently installed.)
Preparing to unpack mynteye-s-calibrator-opencv-official-1.0.0_amd64.deb ...
Unpacking mynteye-s-calibrator (1.0.0) over (1.0.0) ...
Setting up mynteye-s-calibrator (1.0.0) ...
If you encounter an error that the dependency package is not installed, for example:
.. code-block:: bash
$ sudo dpkg -i mynteye-s-calibrator-opencv-official-1.0.0_amd64.deb
Selecting previously unselected package mynteye-s-calibrator.
(Reading database ... 358987 files and directories currently installed.)
Preparing to unpack mynteye-s-calibrator-opencv-official-1.0.0_amd64.deb ...
Unpacking mynteye-s-calibrator (1.0.0) ...
dpkg: dependency problems prevent configuration of mynteye-s-calibrator:
mynteye-s-calibrator depends on libatlas-base-dev; however:
Package libatlas-base-dev is not installed.
dpkg: error processing package mynteye-s-calibrator (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mynteye-s-calibrator
You can continue use sudo apt-get -f install to finished install
.. code-block:: bash
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libatlas-base-dev
Suggested packages:
libblas-doc liblapack-doc
The following NEW packages will be installed:
libatlas-base-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 3,596 kB of archives.
After this operation, 30.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 libatlas-base-dev amd64 3.10.2-9 [3,596 kB]
Fetched 3,596 kB in 3s (1,013 kB/s)
Selecting previously unselected package libatlas-base-dev.
(Reading database ... 358993 files and directories currently installed.)
Preparing to unpack .../libatlas-base-dev_3.10.2-9_amd64.deb ...
Unpacking libatlas-base-dev (3.10.2-9) ...
Setting up libatlas-base-dev (3.10.2-9) ...
update-alternatives: using /usr/lib/atlas-base/atlas/libblas.so to provide /usr/lib/libblas.so (libblas.so) in auto mode
update-alternatives: using /usr/lib/atlas-base/atlas/liblapack.so to provide /usr/lib/liblapack.so (liblapack.so) in auto mode
Setting up mynteye-s-calibrator (1.0.0) ...
How To Use
--------
3.1 Preparation For Use
--------
* MYNT EYE S Camera
* Checkerboard
* Evenly illuminated scene
3.2 Use Command
--------
* After installing the calibration tool, you can run the `mynteye-s-calibrator` command directly on the terminal to calibrate. -h can see its options:
.. code-block:: bash
$ mynteye-s-calibrator -h
Usage: mynteye-s-calibrator [options]
help: mynteye-s-calibrator -h
calibrate: mynteye-s-calibrator -x 11 -y 7 -s 0.036
Calibrate MYNT EYE S device.
Options:
-h, --help show this help message and exit
-x WIDTH, --width=WIDTH The chessboard width, default: 11
-y HEIGHT, --height=HEIGHT The chessboard height, default: 7
-s METERS, --square=METERS The chessboard square size in meters, default: 0.036
-n NUMBER, --number=NUMBER The number of imagestools to use for calibration, default: 11
-p PATH, --path=PATH The path to save the result, default: folder name using device's SN
* -x -y -s Used to set the width, height, and grid size of the calibration plate. Width and height refer to the number of black and white intersections in the horizontal and vertical directions of the checkerboard. Square size in meters.
3.3 Steps For Usage
--------
* First, connect the MYNT EYE S camera.
* Then, run the mynteye-s-calibrator <calibration board parameter> command in the terminal.
.. image:: ../../images/tools/calibration001.png
:width: 60%
* Follow the prompts to select an index for the camera's resolution, perform image calibration at this resolution
* The S1030 camera only need calibrate 752*480 resolution. The S2100 camera need calibrate 2560*800 and 1280*400 resolutions.
* As far as possible, let the calibration plate cover the left and right eye images of the camera,
and take care of the surroundings (maximum distortion). The calibration tool will automatically
evaluate the qualified image for the calibration calculation and will indicate on the terminal how many have been selected.
Reference acquisition image, as follows:
.. image:: ../../images/tools/calibration002.png
:width: 60%
.. image:: ../../images/tools/calibration003.png
:width: 60%
.. image:: ../../images/tools/calibration004.png
:width: 60%
.. image:: ../../images/tools/calibration005.png
:width: 60%
.. image:: ../../images/tools/calibration006.png
:width: 60%
* Note: p_x, p_y, size, skew respectively indicate the scale of the calibration plate on the x-axis, y-axis,
zoom, and tilt when the image is acquired. Make a point for reference.
* Once the number of images acquired by the calibration needs is reached,
the calibration calculation will be performed. The output is as follows:
.. image:: ../../images/tools/calibration007.png
:width: 60%
* 1. The terminal will print out the left and right purpose calibration results.
* 2. The calibration results will be written into the files in <SN number> directory.
a) camera_left.yaml: Left eye parameter
b) camera_right.yaml: Right eye parameter
c) extrinsics.yaml: Binocular external parameter
d) img.params.equidistant: Camera parameters, which can be used for S SDK writing
e) stereo_reprojection_error.yaml: Reprojection error
* Finally, you will also be asked if you want to write to the camera device. Enter or `y` to confirm
.. image:: ../../images/tools/calibration008.png
:width: 60%
* After writing to the device, you will be prompted with "Write to device done".
3.4 Calibration result
--------
Calibration result, It is desirable to have a reprojection error of 0.2 or less. If exceeds 1, it needs to be recalibrated.
Reprojection error, visible output after calibration completion "Final reprojection error: 0.201
Pixels", or see the calibration result file "stereo_reprojection_error.yaml".

View File

@@ -0,0 +1,8 @@
.. _tools:
TOOLS SUPPORT
==============
.. toctree::
calibration_tool

View File

@@ -54,7 +54,7 @@ The ROS file is structured like follows:
│ ├─config/
│ │ ├─device/
│ │ ├─standard.yaml # S1030
│ │ └─standard2.yaml # S21XX
│ │ └─standard2.yaml # S2100/S210A
│ │ ├─laserscan/
│ │ ├─process/
│ │ └─...
@@ -72,14 +72,14 @@ The ROS file is structured like follows:
│ └─package.xml
└─README.md
In ``mynteye.launch``, you can configure the topics and frame_ids, decide which data to enable, ``standard.yaml`` (standard2.yaml is S21XX config file) can set parameters for device. Please set ``gravity`` to the local gravity acceleration.
In ``mynteye.launch``, you can configure the topics and frame_ids, decide which data to enable, ``standard.yaml`` (standard2.yaml is S2100/S210A config file) can set parameters for device. Please set ``gravity`` to the local gravity acceleration.
standard.yaml/standard2.yaml:
.. code-block:: xml
# s21XX modify frame/resolution
# s2100/s210a modify frame/resolution
standard2/request_index: 2
# s1030 modify frame/imu hz

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -59,231 +59,28 @@ endif()
#LIST(APPEND CMAKE_MODULE_PATH ${PRO_DIR}/cmake)
# targets
set(OUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/_output")
include_directories(
${PRO_DIR}/src
)
set_outdir(
"${OUT_DIR}/lib"
"${OUT_DIR}/lib"
"${OUT_DIR}/bin"
)
if(OS_MAC)
# samples above uvc layer
make_executable(camera_u
SRCS uvc_camera.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
add_subdirectory(uvc)
else()
# samples above device layer
make_executable(camera_with_junior_device_api
SRCS camera_with_junior_device_api.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
add_subdirectory(device)
# tutorials
if(WITH_API)
add_subdirectory(tutorials)
endif()
# samples above api layer
if(WITH_API)
## camera_a
make_executable(camera_with_senior_api
SRCS camera_with_senior_api.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## get_depth_with_region
make_executable(get_depth_with_region
SRCS get_depth_with_region.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
add_subdirectory(api)
endif()
endif()
# targets
include_directories(
${OpenCV_INCLUDE_DIRS}
)
# tutorials
if(WITH_API)
# make_executable2(NAME
# [SRCS src1 src2 ...]
# [WITH_OPENCV]
# [WITH_PCL])
macro(make_executable2 NAME)
set(options WITH_OPENCV WITH_PCL)
set(oneValueArgs)
set(multiValueArgs SRCS)
cmake_parse_arguments(THIS "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
set(__link_libs mynteye)
set(__dll_search_paths ${PRO_DIR}/_install/bin)
if(THIS_WITH_OPENCV)
list(APPEND __link_libs ${OpenCV_LIBS})
list(APPEND __dll_search_paths ${OpenCV_LIB_SEARCH_PATH})
endif()
if(THIS_WITH_PCL)
list(APPEND __link_libs ${PCL_LIBRARIES})
#list(APPEND __link_libs pcl::pcl)
list(APPEND __dll_search_paths ${PCL_LIB_SEARCH_PATH})
endif()
add_executable(${NAME} ${THIS_SRCS})
target_link_libraries(${NAME} ${__link_libs})
target_create_scripts(${NAME} DLL_SEARCH_PATHS ${__dll_search_paths})
if(THIS_WITH_PCL)
target_include_directories(${NAME} PRIVATE ${PCL_INCLUDE_DIRS})
#target_compile_definitions(${NAME} PRIVATE ${PCL_DEFINITIONS})
#target_compile_options(${NAME} PRIVATE ${PCL_COMPILE_OPTIONS})
endif()
if(OS_WIN)
target_compile_definitions(${NAME}
PUBLIC GLOG_NO_ABBREVIATED_SEVERITIES
)
endif()
endmacro()
# packages
# If you install PCL to different directory, please set CMAKE_PREFIX_PATH to find it.
#LIST(APPEND CMAKE_PREFIX_PATH /usr/local/share)
find_package(PCL)
if(PCL_FOUND)
message(STATUS "Found PCL: ${PCL_VERSION}")
#message(STATUS "PCL_LIBRARIES: ${PCL_LIBRARIES}")
#message(STATUS "PCL_INCLUDE_DIRS: ${PCL_INCLUDE_DIRS}")
#message(STATUS "PCL_LIBRARY_DIRS: ${PCL_LIBRARY_DIRS}")
#message(STATUS "PCL_DEFINITIONS: ${PCL_DEFINITIONS}")
#message(STATUS "PCL_COMPILE_OPTIONS: ${PCL_COMPILE_OPTIONS}")
if(OS_WIN)
get_filename_component(PCL_LIB_SEARCH_PATH "${PCL_LIBRARY_DIRS}/../bin" ABSOLUTE)
else()
set(PCL_LIB_SEARCH_PATH "${PCL_LIBRARY_DIRS}")
endif()
else()
message(WARNING "PCL not found :(")
endif()
# beginner level
## data
make_executable2(get_device_info SRCS get_device_info.cc WITH_OPENCV)
make_executable2(get_img_params SRCS get_img_params.cc WITH_OPENCV)
make_executable2(get_imu_params SRCS get_imu_params.cc WITH_OPENCV)
make_executable2(get_stereo_rectified SRCS get_stereo_rectified.cc WITH_OPENCV)
make_executable2(get_disparity SRCS get_disparity.cc WITH_OPENCV)
make_executable2(get_depth SRCS get_depth.cc WITH_OPENCV)
make_executable2(get_data_without_select SRCS get_data_without_select.cc WITH_OPENCV)
make_executable2(get_imu_correspondence
SRCS get_imu_correspondence.cc util_cv.cc
WITH_OPENCV
)
make_executable2(get_imu SRCS get_imu.cc util_cv.cc WITH_OPENCV)
make_executable2(save_single_image SRCS save_single_image.cc WITH_OPENCV)
make_executable2(get_from_callbacks
SRCS get_from_callbacks.cc util_cv.cc
WITH_OPENCV
)
make_executable2(get_with_plugin SRCS get_with_plugin.cc WITH_OPENCV)
## control
make_executable2(ctrl_framerate SRCS ctrl_framerate.cc WITH_OPENCV)
make_executable2(ctrl_imu_low_pass_filter SRCS ctrl_imu_low_pass_filter.cc WITH_OPENCV)
make_executable2(ctrl_imu_range SRCS ctrl_imu_range.cc WITH_OPENCV)
make_executable2(ctrl_infrared SRCS ctrl_infrared.cc WITH_OPENCV)
make_executable2(ctrl_iic_address SRCS ctrl_iic_address.cc WITH_OPENCV)
make_executable2(ctrl_sync_timestamp SRCS ctrl_sync_timestamp.cc WITH_OPENCV)
make_executable2(ctrl_auto_exposure
SRCS ctrl_auto_exposure.cc util_cv.cc
WITH_OPENCV
)
make_executable2(ctrl_manual_exposure
SRCS ctrl_manual_exposure.cc util_cv.cc
WITH_OPENCV
)
if(PCL_FOUND)
make_executable2(get_depth_and_points
SRCS get_depth_and_points.cc util_cv.cc util_pcl.cc
WITH_OPENCV WITH_PCL
)
endif()
endif()
## device_writer
add_library(device_writer STATIC device_writer.cc)
target_link_libraries(device_writer mynteye ${OpenCV_LIBS})
## device_info_writer
make_executable(write_device_info
SRCS write_device_info.cc
LINK_LIBS device_writer
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## img_params_writer
make_executable(write_img_params
SRCS write_img_params.cc
LINK_LIBS device_writer
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## imu_params_writer
make_executable(write_imu_params
SRCS write_imu_params.cc
LINK_LIBS device_writer
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## save_all_infos
make_executable(save_all_infos
SRCS save_all_infos.cc
LINK_LIBS device_writer
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## record
make_executable(record
SRCS record.cc dataset.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)

View File

@@ -0,0 +1,37 @@
# Copyright 2018 Slightech Co., Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
get_filename_component(DIR_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
set_outdir(
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/bin/${DIR_NAME}"
)
## camera_a
make_executable(camera_a
SRCS camera.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)
## get_depth_with_region
make_executable(get_depth_with_region
SRCS get_depth_with_region.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)

View File

@@ -0,0 +1,33 @@
# Copyright 2018 Slightech Co., Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
get_filename_component(DIR_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
include_directories(
${PRO_DIR}/src
)
set_outdir(
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/bin/${DIR_NAME}"
)
## camera_d
make_executable(camera_d
SRCS camera.cc
LINK_LIBS mynteye ${OpenCV_LIBS}
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
)

View File

@@ -0,0 +1,148 @@
# Copyright 2018 Slightech Co., Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
get_filename_component(DIR_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${PRO_DIR}/src
)
set_outdir(
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/lib/${DIR_NAME}"
"${OUT_DIR}/bin/${DIR_NAME}"
)
# make_executable2(NAME
# [SRCS src1 src2 ...]
# [WITH_OPENCV]
# [WITH_PCL])
macro(make_executable2 NAME)
set(options WITH_OPENCV WITH_PCL)
set(oneValueArgs)
set(multiValueArgs SRCS)
cmake_parse_arguments(THIS "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
set(__link_libs mynteye)
set(__dll_search_paths ${PRO_DIR}/_install/bin)
if(THIS_WITH_OPENCV)
list(APPEND __link_libs ${OpenCV_LIBS})
list(APPEND __dll_search_paths ${OpenCV_LIB_SEARCH_PATH})
endif()
if(THIS_WITH_PCL)
list(APPEND __link_libs ${PCL_LIBRARIES})
#list(APPEND __link_libs pcl::pcl)
list(APPEND __dll_search_paths ${PCL_LIB_SEARCH_PATH})
endif()
add_executable(${NAME} ${THIS_SRCS})
target_link_libraries(${NAME} ${__link_libs})
target_create_scripts(${NAME} DLL_SEARCH_PATHS ${__dll_search_paths})
if(THIS_WITH_PCL)
target_include_directories(${NAME} PRIVATE ${PCL_INCLUDE_DIRS})
#target_compile_definitions(${NAME} PRIVATE ${PCL_DEFINITIONS})
#target_compile_options(${NAME} PRIVATE ${PCL_COMPILE_OPTIONS})
endif()
if(OS_WIN)
target_compile_definitions(${NAME}
PUBLIC GLOG_NO_ABBREVIATED_SEVERITIES
)
endif()
endmacro()
# packages
# If you install PCL to different directory, please set CMAKE_PREFIX_PATH to find it.
#LIST(APPEND CMAKE_PREFIX_PATH /usr/local/share)
find_package(PCL)
if(PCL_FOUND)
message(STATUS "Found PCL: ${PCL_VERSION}")
#message(STATUS "PCL_LIBRARIES: ${PCL_LIBRARIES}")
#message(STATUS "PCL_INCLUDE_DIRS: ${PCL_INCLUDE_DIRS}")
#message(STATUS "PCL_LIBRARY_DIRS: ${PCL_LIBRARY_DIRS}")
#message(STATUS "PCL_DEFINITIONS: ${PCL_DEFINITIONS}")
#message(STATUS "PCL_COMPILE_OPTIONS: ${PCL_COMPILE_OPTIONS}")
if(OS_WIN)
get_filename_component(PCL_LIB_SEARCH_PATH "${PCL_LIBRARY_DIRS}/../bin" ABSOLUTE)
else()
set(PCL_LIB_SEARCH_PATH "${PCL_LIBRARY_DIRS}")
endif()
else()
message(WARNING "PCL not found :(")
endif()
# beginner level
## data
make_executable2(get_device_info SRCS data/get_device_info.cc WITH_OPENCV)
make_executable2(get_img_params SRCS data/get_img_params.cc WITH_OPENCV)
make_executable2(get_imu_params SRCS data/get_imu_params.cc WITH_OPENCV)
make_executable2(get_stereo SRCS data/get_stereo.cc WITH_OPENCV)
make_executable2(get_stereo_rectified SRCS data/get_stereo_rectified.cc WITH_OPENCV)
make_executable2(get_disparity SRCS data/get_disparity.cc WITH_OPENCV)
make_executable2(get_depth SRCS data/get_depth.cc WITH_OPENCV)
make_executable2(get_data_without_select SRCS data/get_data_without_select.cc WITH_OPENCV)
if(PCL_FOUND)
make_executable2(get_points
SRCS data/get_points.cc util/pc_viewer.cc
WITH_OPENCV WITH_PCL
)
endif()
make_executable2(get_imu_correspondence
SRCS data/get_imu_correspondence.cc util/cv_painter.cc
WITH_OPENCV
)
make_executable2(get_imu SRCS data/get_imu.cc util/cv_painter.cc WITH_OPENCV)
make_executable2(save_single_image SRCS data/save_single_image.cc WITH_OPENCV)
make_executable2(get_from_callbacks
SRCS data/get_from_callbacks.cc util/cv_painter.cc
WITH_OPENCV
)
make_executable2(get_with_plugin SRCS data/get_with_plugin.cc WITH_OPENCV)
## control
make_executable2(ctrl_framerate SRCS control/framerate.cc WITH_OPENCV)
make_executable2(ctrl_imu_low_pass_filter SRCS control/imu_low_pass_filter.cc WITH_OPENCV)
make_executable2(ctrl_imu_range SRCS control/imu_range.cc WITH_OPENCV)
make_executable2(ctrl_infrared SRCS control/infrared.cc WITH_OPENCV)
make_executable2(ctrl_iic_adress SRCS control/iic_address.cc WITH_OPENCV)
make_executable2(ctrl_sync_timestamp SRCS control/sync_timestamp.cc WITH_OPENCV)
make_executable2(ctrl_auto_exposure
SRCS control/auto_exposure.cc util/cv_painter.cc
WITH_OPENCV
)
make_executable2(ctrl_manual_exposure
SRCS control/manual_exposure.cc util/cv_painter.cc
WITH_OPENCV
)
if(PCL_FOUND)
make_executable2(get_depth_and_points
SRCS intermediate/get_depth_and_points.cc util/cv_painter.cc util/pc_viewer.cc
WITH_OPENCV WITH_PCL
)
endif()
# advanced level

View File

@@ -16,7 +16,7 @@
#include "mynteye/logger.h"
#include "mynteye/api/api.h"
#include "util_cv.h"
#include "util/cv_painter.h"
MYNTEYE_USE_NAMESPACE

View File

@@ -16,7 +16,7 @@
#include "mynteye/logger.h"
#include "mynteye/api/api.h"
#include "util_cv.h"
#include "util/cv_painter.h"
MYNTEYE_USE_NAMESPACE

Some files were not shown because too many files have changed in this diff Show More