From 8af42ee597eaa8fbde3a044d21ea8316ba261866 Mon Sep 17 00:00:00 2001 From: TinyO Date: Tue, 3 Sep 2019 16:30:19 +0800 Subject: [PATCH 01/16] fix(*): d local params fix. --- src/mynteye/api/camera_models/equidistant_camera.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mynteye/api/camera_models/equidistant_camera.cc b/src/mynteye/api/camera_models/equidistant_camera.cc index 57eb3c1..406df61 100644 --- a/src/mynteye/api/camera_models/equidistant_camera.cc +++ b/src/mynteye/api/camera_models/equidistant_camera.cc @@ -282,6 +282,7 @@ void EquidistantCamera::estimateIntrinsics( std::vector center(boardSize.height); int arrayLength = boardSize.height; double *radius = new double[arrayLength]; + memset(radius, 0, sizeof(double) * arrayLength); for (int r = 0; r < boardSize.height; ++r) { std::vector circle; for (int c = 0; c < boardSize.width; ++c) { From 950ee00920ba465e2a9dabb832709dd55605f831 Mon Sep 17 00:00:00 2001 From: Messier Date: Fri, 6 Sep 2019 11:11:28 +0800 Subject: [PATCH 02/16] docs(*): add code tree --- docs/mynt-eye-s-sdk.tree | 550 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 550 insertions(+) create mode 100644 docs/mynt-eye-s-sdk.tree diff --git a/docs/mynt-eye-s-sdk.tree b/docs/mynt-eye-s-sdk.tree new file mode 100644 index 0000000..d5b7dae --- /dev/null +++ b/docs/mynt-eye-s-sdk.tree @@ -0,0 +1,550 @@ +mynt-eye-s-sdk +├── 3rdparty +│   └── eigen3 +├── cmake +│   ├── Common.cmake +│   ├── DetectCXX11.cmake +│   ├── DetectOpenCV.cmake +│   ├── FindCUDA +│   │   ├── make2cmake.cmake +│   │   ├── parse_cubin.cmake +│   │   └── run_nvcc.cmake +│   ├── FindCUDA.cmake +│   ├── IncludeGuard.cmake +│   ├── Option.cmake +│   ├── TargetArch.cmake +│   ├── templates +│   └── Utils.cmake +├── CMakeLists.txt +├── docs +│   ├── api +│   ├── conf.py +│   ├── files +│   ├── images +│   │   ├── firmware +│   │   ├── product +│   │   ├── project +│   │   │   └── vs2017 +│   │   ├── sdk +│   │   │   └── tools +│   │   └── tools +│   ├── Makefile +│   └── src +│   ├── firmware +│   ├── log +│   ├── product +│   ├── sdk +│   │   ├── control +│   │   ├── data +│   │   └── project +│   ├── slam +│   ├── support +│   └── wrapper +├── include +│   ├── deprecated +│   │   └── mynteye +│   │   ├── api.h +│   │   ├── callbacks.h +│   │   ├── context.h +│   │   ├── device.h +│   │   ├── files.h +│   │   ├── glog_init.h +│   │   ├── object.h +│   │   ├── plugin.h +│   │   ├── strings.h +│   │   ├── times.h +│   │   └── utils.h +│   └── mynteye +│   ├── api +│   │   ├── api.h +│   │   ├── object.h +│   │   └── plugin.h +│   ├── device +│   │   ├── callbacks.h +│   │   ├── context.h +│   │   ├── device.h +│   │   ├── types.h +│   │   └── utils.h +│   ├── global.h +│   ├── logger.h +│   ├── miniglog.h +│   ├── types.h +│   └── util +│   ├── files.h +│   ├── strings.h +│   └── times.h +├── Makefile +├── samples +│   ├── camera_with_junior_device_api.cc +│   ├── camera_with_senior_api.cc +│   ├── CMakeLists.txt +│   ├── config +│   │   ├── S1030 +│   │   │   └── deprecated +│   │   └── S210A +│   │   └── deprecated +│   ├── ctrl_auto_exposure.cc +│   ├── ctrl_framerate.cc +│   ├── ctrl_iic_address.cc +│   ├── ctrl_imu_low_pass_filter.cc +│   ├── ctrl_imu_range.cc +│   ├── ctrl_infrared.cc +│   ├── ctrl_manual_exposure.cc +│   ├── ctrl_sync_timestamp.cc +│   ├── dataset.cc +│   ├── dataset.h +│   ├── device_writer.cc +│   ├── device_writer.h +│   ├── get_data_without_select.cc +│   ├── get_depth_and_points.cc +│   ├── get_depth.cc +│   ├── get_depth_with_region.cc +│   ├── get_device_info.cc +│   ├── get_disparity.cc +│   ├── get_from_callbacks.cc +│   ├── get_img_params.cc +│   ├── get_imu.cc +│   ├── get_imu_correspondence.cc +│   ├── get_imu_params.cc +│   ├── get_stereo_rectified.cc +│   ├── get_with_plugin.cc +│   ├── record.cc +│   ├── save_all_infos.cc +│   ├── save_single_image.cc +│   ├── simple_demo +│   │   ├── project_cmake +│   │   │   ├── CMakeLists.txt +│   │   │   └── mynteye_demo.cc +│   │   └── project_vs2017 +│   │   ├── images +│   │   └── mynteyes_demo +│   │   └── mynteyes_demo +│   │   ├── stdafx.h +│   │   └── targetver.h +│   ├── util_cv.cc +│   ├── util_cv.h +│   ├── util_pcl.cc +│   ├── util_pcl.h +│   ├── uvc_camera.cc +│   ├── write_device_info.cc +│   ├── write_img_params.cc +│   └── write_imu_params.cc +├── scripts +│   ├── common +│   └── win +│   ├── cmake +│   │   ├── mynteye-targets.cmake +│   │   └── mynteye-targets-release.cmake +│   └── nsis +│   └── Include +├── src +│   ├── main.cc +│   └── mynteye +│   ├── api +│   │   ├── api.cc +│   │   ├── camera_models +│   │   │   ├── camera.cc +│   │   │   ├── camera.h +│   │   │   ├── equidistant_camera.cc +│   │   │   ├── equidistant_camera.h +│   │   │   ├── gpl.cc +│   │   │   └── gpl.h +│   │   ├── correspondence.cc +│   │   ├── correspondence.h +│   │   ├── data_tools.cc +│   │   ├── data_tools.h +│   │   ├── dl.cc +│   │   ├── dl.h +│   │   ├── processor +│   │   │   ├── depth_processor.cc +│   │   │   ├── depth_processor.h +│   │   │   ├── depth_processor_ocv.cc +│   │   │   ├── depth_processor_ocv.h +│   │   │   ├── disparity_normalized_processor.cc +│   │   │   ├── disparity_normalized_processor.h +│   │   │   ├── disparity_processor.cc +│   │   │   ├── disparity_processor.h +│   │   │   ├── points_processor.cc +│   │   │   ├── points_processor.h +│   │   │   ├── points_processor_ocv.cc +│   │   │   ├── points_processor_ocv.h +│   │   │   ├── rectify_processor.cc +│   │   │   ├── rectify_processor.h +│   │   │   ├── rectify_processor_ocv.cc +│   │   │   ├── rectify_processor_ocv.h +│   │   │   ├── root_camera_processor.cc +│   │   │   └── root_camera_processor.h +│   │   ├── processor.cc +│   │   ├── processor.h +│   │   ├── synthetic.cc +│   │   ├── synthetic.h +│   │   ├── version_checker.cc +│   │   └── version_checker.h +│   ├── device +│   │   ├── async_callback.h +│   │   ├── async_callback_impl.h +│   │   ├── channel +│   │   │   ├── bytes.cc +│   │   │   ├── bytes.h +│   │   │   ├── channels.cc +│   │   │   ├── channels.h +│   │   │   ├── def.h +│   │   │   ├── file_channel.cc +│   │   │   └── file_channel.h +│   │   ├── config.cc +│   │   ├── config.h +│   │   ├── context.cc +│   │   ├── device.cc +│   │   ├── motions.cc +│   │   ├── motions.h +│   │   ├── standard +│   │   │   ├── channels_adapter_s.cc +│   │   │   ├── channels_adapter_s.h +│   │   │   ├── device_s.cc +│   │   │   ├── device_s.h +│   │   │   ├── streams_adapter_s.cc +│   │   │   └── streams_adapter_s.h +│   │   ├── standard2 +│   │   │   ├── channels_adapter_s2.cc +│   │   │   ├── channels_adapter_s2.h +│   │   │   ├── device_s2.cc +│   │   │   ├── device_s2.h +│   │   │   ├── streams_adapter_s2.cc +│   │   │   └── streams_adapter_s2.h +│   │   ├── streams.cc +│   │   ├── streams.h +│   │   ├── types.cc +│   │   └── utils.cc +│   ├── miniglog.cc +│   ├── types.cc +│   ├── util +│   │   ├── files.cc +│   │   └── strings.cc +│   └── uvc +│   ├── linux +│   │   └── uvc-v4l2.cc +│   ├── macosx +│   │   ├── AVfoundationCamera.h +│   │   ├── CameraEngine.h +│   │   ├── USBBusProber +│   │   │   ├── BusProbeClass.h +│   │   │   ├── BusProbeDevice.h +│   │   │   ├── BusProber.h +│   │   │   ├── BusProberSharedFunctions.h +│   │   │   ├── DecodeAudioInterfaceDescriptor.h +│   │   │   ├── DecodeBOSDescriptor.h +│   │   │   ├── DecodeCommClassDescriptor.h +│   │   │   ├── DecodeConfigurationDescriptor.h +│   │   │   ├── DecodeDeviceDescriptor.h +│   │   │   ├── DecodeDeviceQualifierDescriptor.h +│   │   │   ├── DecodeEndpointDescriptor.h +│   │   │   ├── DecodeHIDDescriptor.h +│   │   │   ├── DecodeHubDescriptor.h +│   │   │   ├── DecodeInterfaceDescriptor.h +│   │   │   ├── DecodeVideoInterfaceDescriptor.h +│   │   │   ├── DescriptorDecoder.h +│   │   │   ├── en.lproj +│   │   │   ├── ExtensionSelector.h +│   │   │   ├── OutlineViewAdditions.h +│   │   │   ├── OutlineViewNode.h +│   │   │   ├── TableViewWithCopying.h +│   │   │   └── USBBusProber.h +│   │   ├── USBBusProber.framework +│   │   │   └── Versions +│   │   │   └── A +│   │   │   ├── Headers +│   │   │   │   ├── BusProbeClass.h +│   │   │   │   ├── BusProbeDevice.h +│   │   │   │   ├── BusProber.h +│   │   │   │   ├── BusProberSharedFunctions.h +│   │   │   │   ├── DecodeAudioInterfaceDescriptor.h +│   │   │   │   ├── DecodeBOSDescriptor.h +│   │   │   │   ├── DecodeCommClassDescriptor.h +│   │   │   │   ├── DecodeConfigurationDescriptor.h +│   │   │   │   ├── DecodeDeviceDescriptor.h +│   │   │   │   ├── DecodeDeviceQualifierDescriptor.h +│   │   │   │   ├── DecodeEndpointDescriptor.h +│   │   │   │   ├── DecodeHIDDescriptor.h +│   │   │   │   ├── DecodeHubDescriptor.h +│   │   │   │   ├── DecodeInterfaceDescriptor.h +│   │   │   │   ├── DecodeVideoInterfaceDescriptor.h +│   │   │   │   ├── DescriptorDecoder.h +│   │   │   │   ├── ExtensionSelector.h +│   │   │   │   ├── OutlineViewAdditions.h +│   │   │   │   ├── OutlineViewNode.h +│   │   │   │   ├── TableViewWithCopying.h +│   │   │   │   └── USBBusProber.h +│   │   │   └── Resources +│   │   │   └── en.lproj +│   │   ├── UVC Test App +│   │   │   ├── AppDelegate.h +│   │   │   ├── AVCaptureVideoSource.h +│   │   │   ├── CVGLView.h +│   │   │   └── en.lproj +│   │   ├── uvc-vvuvckit.cc +│   │   ├── UVCXcodeProject.xcodeproj +│   │   │   ├── project.xcworkspace +│   │   │   │   └── xcuserdata +│   │   │   │   └── tiny.xcuserdatad +│   │   │   ├── xcshareddata +│   │   │   │   └── xcschemes +│   │   │   └── xcuserdata +│   │   │   └── tiny.xcuserdatad +│   │   │   └── xcschemes +│   │   ├── VVUVCKit +│   │   │   ├── en.lproj +│   │   │   ├── VVUVCController.h +│   │   │   ├── VVUVCKit.h +│   │   │   ├── VVUVCKitStringAdditions.h +│   │   │   ├── VVUVCUIController.h +│   │   │   └── VVUVCUIElement.h +│   │   └── VVUVCKit.framework +│   │   └── Versions +│   │   └── A +│   │   ├── Headers +│   │   │   ├── VVUVCController.h +│   │   │   ├── VVUVCKit.h +│   │   │   ├── VVUVCKitStringAdditions.h +│   │   │   ├── VVUVCUIController.h +│   │   │   └── VVUVCUIElement.h +│   │   └── Resources +│   │   └── en.lproj +│   ├── uvc.h +│   └── win +│   └── uvc-wmf.cc +├── tools +│   ├── _build +│   │   ├── CMakeCache.txt +│   │   ├── CMakeFiles +│   │   │   ├── 3.5.1 +│   │   │   │   ├── CMakeCCompiler.cmake +│   │   │   │   ├── CMakeCXXCompiler.cmake +│   │   │   │   ├── CMakeDetermineCompilerABI_C.bin +│   │   │   │   ├── CMakeDetermineCompilerABI_CXX.bin +│   │   │   │   ├── CMakeSystem.cmake +│   │   │   │   ├── CompilerIdC +│   │   │   │   │   └── CMakeCCompilerId.c +│   │   │   │   └── CompilerIdCXX +│   │   │   │   └── CMakeCXXCompilerId.cpp +│   │   │   ├── CMakeDirectoryInformation.cmake +│   │   │   ├── CMakeOutput.log +│   │   │   ├── CMakeTmp +│   │   │   ├── Makefile2 +│   │   │   └── Makefile.cmake +│   │   ├── cmake_install.cmake +│   │   ├── dataset +│   │   │   ├── CMakeFiles +│   │   │   │   ├── CMakeDirectoryInformation.cmake +│   │   │   │   └── record2.dir +│   │   │   │   ├── cmake_clean.cmake +│   │   │   │   └── DependInfo.cmake +│   │   │   ├── cmake_install.cmake +│   │   │   └── Makefile +│   │   ├── Makefile +│   │   └── writer +│   │   ├── CMakeFiles +│   │   │   ├── CMakeDirectoryInformation.cmake +│   │   │   ├── device_info_writer.dir +│   │   │   │   ├── cmake_clean.cmake +│   │   │   │   └── DependInfo.cmake +│   │   │   ├── device_writer.dir +│   │   │   │   ├── cmake_clean.cmake +│   │   │   │   ├── cmake_clean_target.cmake +│   │   │   │   └── DependInfo.cmake +│   │   │   ├── img_params_writer.dir +│   │   │   │   ├── cmake_clean.cmake +│   │   │   │   └── DependInfo.cmake +│   │   │   ├── imu_params_writer.dir +│   │   │   │   ├── cmake_clean.cmake +│   │   │   │   └── DependInfo.cmake +│   │   │   └── save_all_infos.dir +│   │   │   ├── cmake_clean.cmake +│   │   │   └── DependInfo.cmake +│   │   ├── cmake_install.cmake +│   │   └── Makefile +│   ├── linter +│   └── _output +│   ├── bin +│   │   ├── dataset +│   │   └── writer +│   └── lib +│   └── writer +└── wrappers + ├── android + │   └── mynteye + │   ├── app + │   │   └── src + │   │   ├── androidTest + │   │   │   └── java + │   │   │   └── com + │   │   │   └── slightech + │   │   │   └── mynteye + │   │   │   └── demo + │   │   ├── main + │   │   │   ├── java + │   │   │   │   └── com + │   │   │   │   └── slightech + │   │   │   │   └── mynteye + │   │   │   │   └── demo + │   │   │   │   ├── camera + │   │   │   │   ├── ui + │   │   │   │   └── util + │   │   │   └── res + │   │   │   ├── layout + │   │   │   ├── menu + │   │   │   └── values + │   │   └── test + │   │   └── java + │   │   └── com + │   │   └── slightech + │   │   └── mynteye + │   │   └── demo + │   ├── gradle + │   │   └── wrapper + │   ├── libmynteye + │   │   ├── CMakeLists.txt + │   │   └── src + │   │   ├── androidTest + │   │   │   └── java + │   │   │   └── com + │   │   │   └── slightech + │   │   │   └── mynteye + │   │   ├── main + │   │   │   ├── cpp + │   │   │   │   └── mynteye + │   │   │   │   ├── cpp + │   │   │   │   │   ├── addon.hpp + │   │   │   │   │   ├── calibration_model.hpp + │   │   │   │   │   ├── capability.hpp + │   │   │   │   │   ├── device.hpp + │   │   │   │   │   ├── device_usb_info.hpp + │   │   │   │   │   ├── extrinsics.hpp + │   │   │   │   │   ├── format.hpp + │   │   │   │   │   ├── frame.hpp + │   │   │   │   │   ├── img_data.hpp + │   │   │   │   │   ├── imu_data.hpp + │   │   │   │   │   ├── imu_intrinsics.hpp + │   │   │   │   │   ├── info.hpp + │   │   │   │   │   ├── intrinsics.hpp + │   │   │   │   │   ├── model.hpp + │   │   │   │   │   ├── motion_data.hpp + │   │   │   │   │   ├── motion_intrinsics.hpp + │   │   │   │   │   ├── option.hpp + │   │   │   │   │   ├── option_info.hpp + │   │   │   │   │   ├── source.hpp + │   │   │   │   │   ├── stream_data.hpp + │   │   │   │   │   ├── stream.hpp + │   │   │   │   │   └── stream_request.hpp + │   │   │   │   ├── impl + │   │   │   │   │   ├── device_impl.hpp + │   │   │   │   │   ├── frame_impl.hpp + │   │   │   │   │   ├── internal + │   │   │   │   │   │   ├── usb_info.h + │   │   │   │   │   │   └── uvc_device.h + │   │   │   │   │   ├── motion_data_impl.hpp + │   │   │   │   │   ├── stream_data_impl.hpp + │   │   │   │   │   ├── type_conversion.hpp + │   │   │   │   │   └── util + │   │   │   │   └── jni + │   │   │   │   ├── NativeAddon.hpp + │   │   │   │   ├── NativeCalibrationModel.hpp + │   │   │   │   ├── NativeCapability.hpp + │   │   │   │   ├── NativeDevice.hpp + │   │   │   │   ├── NativeDeviceUsbInfo.hpp + │   │   │   │   ├── NativeExtrinsics.hpp + │   │   │   │   ├── NativeFormat.hpp + │   │   │   │   ├── NativeFrame.hpp + │   │   │   │   ├── NativeImgData.hpp + │   │   │   │   ├── NativeImuData.hpp + │   │   │   │   ├── NativeImuIntrinsics.hpp + │   │   │   │   ├── NativeInfo.hpp + │   │   │   │   ├── NativeIntrinsics.hpp + │   │   │   │   ├── NativeModel.hpp + │   │   │   │   ├── NativeMotionData.hpp + │   │   │   │   ├── NativeMotionIntrinsics.hpp + │   │   │   │   ├── NativeOption.hpp + │   │   │   │   ├── NativeOptionInfo.hpp + │   │   │   │   ├── NativeSource.hpp + │   │   │   │   ├── NativeStreamData.hpp + │   │   │   │   ├── NativeStream.hpp + │   │   │   │   └── NativeStreamRequest.hpp + │   │   │   ├── java + │   │   │   │   └── com + │   │   │   │   └── slightech + │   │   │   │   └── mynteye + │   │   │   │   ├── usb + │   │   │   │   └── util + │   │   │   ├── jniLibs + │   │   │   │   ├── arm64-v8a + │   │   │   │   └── armeabi-v7a + │   │   │   └── res + │   │   │   ├── layout + │   │   │   ├── values + │   │   │   └── xml + │   │   └── test + │   │   └── java + │   │   └── com + │   │   └── slightech + │   │   └── mynteye + │   ├── libshell + │   │   └── src + │   │   └── main + │   │   └── java + │   │   └── com + │   │   └── stericson + │   │   └── RootShell + │   │   ├── containers + │   │   ├── exceptions + │   │   └── execution + │   ├── scripts + │   └── third_party + │   └── djinni + │   └── support-lib + │   ├── djinni_common.hpp + │   ├── jni + │   │   ├── djinni_support.hpp + │   │   └── Marshal.hpp + │   ├── proxy_cache_impl.hpp + │   └── proxy_cache_interface.hpp + ├── python + │   ├── CMakeLists.txt + │   ├── samples + │   │   ├── mynteye.py + │   │   └── util + │   │   ├── cv_painter.py + │   │   └── __init__.py + │   ├── src + │   │   └── mynteye_py.cc + │   └── third_party + │   └── array + │   ├── array_indexing_suite.hpp + │   └── array_ref.hpp + └── ros + └── src + └── mynt_eye_ros_wrapper + ├── CMakeLists.txt + ├── config + │   ├── device + │   ├── laserscan + │   ├── process + │   ├── slam + │   └── sub + │   ├── device_1 + │   ├── device_2 + │   ├── process_1 + │   └── process_2 + ├── launch + │   ├── laserscan + │   ├── slam + │   └── sub + ├── mesh + ├── rviz + ├── scripts + │   └── get_device_info.py + ├── src + │   ├── configuru.hpp + │   ├── wrapper_node.cc + │   └── wrapper_nodelet.cc + └── srv + + From 5dad76a682d331b0873b10919c2d8ab4ff10e354 Mon Sep 17 00:00:00 2001 From: TinyO Date: Fri, 6 Sep 2019 14:55:02 +0800 Subject: [PATCH 03/16] refactor(git): remove git submodule things. --- .gitmodules | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 3a8bfae..0000000 --- a/.gitmodules +++ /dev/null @@ -1,7 +0,0 @@ -[submodule "test/gtest"] - path = test/gtest - url = https://github.com/google/googletest.git -[submodule "tools/linter"] - path = tools/linter - url = https://github.com/slightech/linter.git - branch = slightech From 74a0a1eb85d2b8e38da312f07da349e7c49169ad Mon Sep 17 00:00:00 2001 From: TinyO Date: Fri, 6 Sep 2019 17:11:51 +0800 Subject: [PATCH 04/16] fix(*): win pack.sh --- scripts/win/winpack.sh | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index e081ac9..36bb2a4 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -95,23 +95,6 @@ _rm "$ROOT_DIR/samples/_build" _rm "$ROOT_DIR/samples/_output" mv "$ROOT_DIR/samples" "$ROOT_DIR/_install/samples" -# tools -mv "$ROOT_DIR/tools/_output/bin" "$ROOT_DIR/_install/bin/tools" -mv "$ROOT_DIR/tools/_output/lib" "$ROOT_DIR/_install/lib/tools" -_rm "$ROOT_DIR/tools/_build" -_rm "$ROOT_DIR/tools/_output" -mv "$ROOT_DIR/tools/linter" "$ROOT_DIR/3rdparty/linter" -mv "$ROOT_DIR/tools" "$ROOT_DIR/_install/tools" - -# platforms/win -mv "$ROOT_DIR/platforms/win/README.txt" "$ROOT_DIR/_install" - -_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/.vs" -_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/x64" -_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/mynteyes_demo/x64" -_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/mynteyes_demo/mynteyes_demo.vcxproj.user" -mv "$ROOT_DIR/platforms/projects" "$ROOT_DIR/_install/projects" - ################################################################################ # copy to _install @@ -119,7 +102,6 @@ cp -f "$ROOT_DIR/scripts/win/cmake/mynteye-targets.cmake" "$ROOT_DIR/_install/li cp -f "$ROOT_DIR/scripts/win/cmake/mynteye-targets-release.cmake" "$ROOT_DIR/_install/lib/cmake/mynteye/" cp -f "$ROOT_DIR/scripts/win/generate.bat" "$ROOT_DIR/_install/samples/" -cp -f "$ROOT_DIR/scripts/win/generate.bat" "$ROOT_DIR/_install/tools/" ################################################################################ # archive exe @@ -160,15 +142,6 @@ mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake" # samples mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples" -# tools -mv "$ROOT_DIR/_install/tools" "$ROOT_DIR/tools" -mv "$ROOT_DIR/3rdparty/linter" "$ROOT_DIR/tools/linter" - -# platforms/win -mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/platforms/win" - -mv "$ROOT_DIR/_install/projects" "$ROOT_DIR/platforms/projects" - ################################################################################ # clean build From 2a8a2e77136d00f0cc72fad073449937a98a71c5 Mon Sep 17 00:00:00 2001 From: Messier Date: Fri, 6 Sep 2019 17:20:45 +0800 Subject: [PATCH 05/16] docs(*): add code tree comments --- docs/mynt-eye-s-sdk.tree | 165 ++++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 82 deletions(-) diff --git a/docs/mynt-eye-s-sdk.tree b/docs/mynt-eye-s-sdk.tree index d5b7dae..ed97f01 100644 --- a/docs/mynt-eye-s-sdk.tree +++ b/docs/mynt-eye-s-sdk.tree @@ -1,8 +1,8 @@ mynt-eye-s-sdk ├── 3rdparty -│   └── eigen3 +│   └── eigen3 matrix 3rd lib ├── cmake -│   ├── Common.cmake +│   ├── Common.cmake cmake common macro │   ├── DetectCXX11.cmake │   ├── DetectOpenCV.cmake │   ├── FindCUDA @@ -11,14 +11,14 @@ mynt-eye-s-sdk │   │   └── run_nvcc.cmake │   ├── FindCUDA.cmake │   ├── IncludeGuard.cmake -│   ├── Option.cmake +│   ├── Option.cmake include(DetectOpenCV.cmake) │   ├── TargetArch.cmake │   ├── templates -│   └── Utils.cmake +│   └── Utils.cmake include(Common.cmake) ├── CMakeLists.txt ├── docs │   ├── api -│   ├── conf.py +│   ├── conf.py sdkHtml config │   ├── files │   ├── images │   │   ├── firmware @@ -28,7 +28,7 @@ mynt-eye-s-sdk │   │   ├── sdk │   │   │   └── tools │   │   └── tools -│   ├── Makefile +│   ├── Makefile sdkHtml Makefile │   └── src │   ├── firmware │   ├── log @@ -43,52 +43,53 @@ mynt-eye-s-sdk ├── include │   ├── deprecated │   │   └── mynteye -│   │   ├── api.h -│   │   ├── callbacks.h -│   │   ├── context.h -│   │   ├── device.h -│   │   ├── files.h -│   │   ├── glog_init.h -│   │   ├── object.h -│   │   ├── plugin.h -│   │   ├── strings.h -│   │   ├── times.h -│   │   └── utils.h +│   │   ├── api.h x +│   │   ├── callbacks.h x +│   │   ├── context.h x +│   │   ├── device.h x +│   │   ├── files.h x +│   │   ├── glog_init.h x +│   │   ├── object.h x +│   │   ├── plugin.h x +│   │   ├── strings.h x +│   │   ├── times.h x +│   │   └── utils.h x │   └── mynteye │   ├── api -│   │   ├── api.h -│   │   ├── object.h -│   │   └── plugin.h +│   │   ├── api.h user api(mynteye.h types.h opencv2*) +│   │   ├── object.h img formats transform(mynteye.h opencv2*) +│   │   └── plugin.h plugin process in&out(mynteye.h opencv2*) │   ├── device -│   │   ├── callbacks.h -│   │   ├── context.h -│   │   ├── device.h -│   │   ├── types.h -│   │   └── utils.h -│   ├── global.h -│   ├── logger.h -│   ├── miniglog.h -│   ├── types.h +│   │   ├── callbacks.h processor data callback(mynteye.h mynteye/types.h) +│   │   ├── context.h detect uvc device(mynteye.h) +│   │   ├── device.h imu-->motions & camera-->streams(mynteye.h callbacks.h device/types.h) +│   │   ├── types.h img & imu_data types(mynteye.h mynteye/types.h) +│   │   └── utils.h user help(mynteye.h mynteye/types.h) +│   ├── global.h os adapter +│   ├── logger.h message output +│   ├── miniglog.h google miniglog +│ ├── mynteye.h.in api version(global.h) +│   ├── types.h all types(mynteye.h) │   └── util -│   ├── files.h -│   ├── strings.h -│   └── times.h +│   ├── files.h (mynteye.h) +│   ├── strings.h (mynteye.h) +│   └── times.h (mynteye.h) ├── Makefile ├── samples -│   ├── camera_with_junior_device_api.cc -│   ├── camera_with_senior_api.cc -│   ├── CMakeLists.txt +│   ├── camera_with_junior_device_api.cc (device.h utils.h times.h) +│   ├── camera_with_senior_api.cc (api.h times.h) +│   ├── CMakeLists.txt samples build │   ├── config │   │   ├── S1030 │   │   │   └── deprecated │   │   └── S210A │   │   └── deprecated -│   ├── ctrl_auto_exposure.cc -│   ├── ctrl_framerate.cc -│   ├── ctrl_iic_address.cc -│   ├── ctrl_imu_low_pass_filter.cc -│   ├── ctrl_imu_range.cc -│   ├── ctrl_infrared.cc +│   ├── ctrl_auto_exposure.cc (api.h) +│   ├── ctrl_framerate.cc (api.h times.h) +│   ├── ctrl_iic_address.cc (api.h) +│   ├── ctrl_imu_low_pass_filter.cc (api.h times.h) +│   ├── ctrl_imu_range.cc (api.h times.h) +│   ├── ctrl_infrared.cc │   ├── ctrl_manual_exposure.cc │   ├── ctrl_sync_timestamp.cc │   ├── dataset.cc @@ -111,20 +112,20 @@ mynt-eye-s-sdk │   ├── record.cc │   ├── save_all_infos.cc │   ├── save_single_image.cc -│   ├── simple_demo +│   ├── simple_demo independent demo │   │   ├── project_cmake -│   │   │   ├── CMakeLists.txt +│   │   │   ├── CMakeLists.txt linux build │   │   │   └── mynteye_demo.cc -│   │   └── project_vs2017 +│   │   └── project_vs2017 windows vs │   │   ├── images -│   │   └── mynteyes_demo +│   │   └── mynteyes_demo │   │   └── mynteyes_demo │   │   ├── stdafx.h │   │   └── targetver.h -│   ├── util_cv.cc -│   ├── util_cv.h -│   ├── util_pcl.cc -│   ├── util_pcl.h +│   ├── util_cv.cc (util_cv.h device/utils.h) +│   ├── util_cv.h cv painter(mynteye/types.h) +│   ├── util_pcl.cc (util_pcl.h) +│   ├── util_pcl.h pcl cloud points viewer │   ├── uvc_camera.cc │   ├── write_device_info.cc │   ├── write_img_params.cc @@ -141,44 +142,44 @@ mynt-eye-s-sdk │   ├── main.cc │   └── mynteye │   ├── api -│   │   ├── api.cc +│   │   ├── api.cc (correspondence.h dl.h plugin.h ...) │   │   ├── camera_models -│   │   │   ├── camera.cc -│   │   │   ├── camera.h -│   │   │   ├── equidistant_camera.cc -│   │   │   ├── equidistant_camera.h +│   │   │   ├── camera.cc (camera.h) +│   │   │   ├── camera.h camera base(eigen3* opencv2* mynteye.h) +│   │   │   ├── equidistant_camera.cc (equidistant_camera.h) +│   │   │   ├── equidistant_camera.h KB projection model(opencv2* camera.h) │   │   │   ├── gpl.cc │   │   │   └── gpl.h -│   │   ├── correspondence.cc -│   │   ├── correspondence.h -│   │   ├── data_tools.cc -│   │   ├── data_tools.h -│   │   ├── dl.cc -│   │   ├── dl.h -│   │   ├── processor -│   │   │   ├── depth_processor.cc -│   │   │   ├── depth_processor.h -│   │   │   ├── depth_processor_ocv.cc -│   │   │   ├── depth_processor_ocv.h -│   │   │   ├── disparity_normalized_processor.cc -│   │   │   ├── disparity_normalized_processor.h -│   │   │   ├── disparity_processor.cc -│   │   │   ├── disparity_processor.h -│   │   │   ├── points_processor.cc -│   │   │   ├── points_processor.h -│   │   │   ├── points_processor_ocv.cc +│   │   ├── correspondence.cc (correspondence.h device.h) +│   │   ├── correspondence.h stream control(api.h callbacks.h) +│   │   ├── data_tools.cc (data_tools.h) +│   │   ├── data_tools.h api<--data<-->obj(object.h api.h device.h) +│   │   ├── dl.cc (dl.h) +│   │   ├── dl.h dynamic loading(mynteye.h) +│   │   ├── processor root-->rectify-->disparity(norm)-->depth-->points +│   │   │   ├── depth_processor.cc (depth_Processor.h) +│   │   │   ├── depth_processor.h (processor.h types.h rectify_processor.h) +│   │   │   ├── depth_processor_ocv.cc (depth_processor_ocv.h) +│   │   │   ├── depth_processor_ocv.h output cv::Mat(processor.h) +│   │   │   ├── disparity_normalized_processor.cc (opencv2* disparity_normalized_processor.h) +│   │   │   ├── disparity_normalized_processor.h (processor.h) +│   │   │   ├── disparity_processor.cc (opencv2* disparity_processor.h) +│   │   │   ├── disparity_processor.h (mynteye/types.h processor.h) +│   │   │   ├── points_processor.cc (opencv2* points_processor.h) +│   │   │   ├── points_processor.h (mynteye/types.h processor.h) +│   │   │   ├── points_processor_ocv.cc │   │   │   ├── points_processor_ocv.h -│   │   │   ├── rectify_processor.cc -│   │   │   ├── rectify_processor.h -│   │   │   ├── rectify_processor_ocv.cc +│   │   │   ├── rectify_processor.cc (opencv2* rectify_processor.h) +│   │   │   ├── rectify_processor.h (equidistant_camera.h ...) +│   │   │   ├── rectify_processor_ocv.cc │   │   │   ├── rectify_processor_ocv.h -│   │   │   ├── root_camera_processor.cc -│   │   │   └── root_camera_processor.h -│   │   ├── processor.cc -│   │   ├── processor.h -│   │   ├── synthetic.cc -│   │   ├── synthetic.h -│   │   ├── version_checker.cc +│   │   │   ├── root_camera_processor.cc (opencv2* synthetic.h device.h data_tools.h) +│   │   │   └── root_camera_processor.h (opencv2* processor.h) +│   │   ├── processor.cc (strings.h times.h data_tools.h) +│   │   ├── processor.h processor base(synthetic.h mynteye.h object.h) +│   │   ├── synthetic.cc (*processor.h object.h plugin.h device.h data_tools.h) +│   │   ├── synthetic.h synthetic pipeline(api.h) +│   │   ├── version_checker.cc │   │   └── version_checker.h │   ├── device │   │   ├── async_callback.h From 7071864eb70ab93c77b5632af4f70483f2ac6d1f Mon Sep 17 00:00:00 2001 From: TinyO Date: Mon, 9 Sep 2019 10:23:36 +0800 Subject: [PATCH 06/16] fix(*): win pack.sh lost readme things --- scripts/win/winpack.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index 36bb2a4..9c17e5f 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -95,6 +95,9 @@ _rm "$ROOT_DIR/samples/_build" _rm "$ROOT_DIR/samples/_output" mv "$ROOT_DIR/samples" "$ROOT_DIR/_install/samples" +# platforms/win +mv "$ROOT_DIR/samples/simple_demo/README.txt" "$ROOT_DIR/_install" + ################################################################################ # copy to _install @@ -139,6 +142,9 @@ mv "$ROOT_DIR/_install/3rdparty/opencv" "$ROOT_DIR/3rdparty/opencv" # cmake mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake" +# platforms/win +mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/samples/simple_demo" + # samples mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples" From 68e06e4335b51ec988b6d084c88baf3042d801da Mon Sep 17 00:00:00 2001 From: TinyO Date: Mon, 9 Sep 2019 11:00:01 +0800 Subject: [PATCH 07/16] fix(*): win pack.sh complie. --- scripts/win/winpack.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index 9c17e5f..51a9ddc 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -142,9 +142,6 @@ mv "$ROOT_DIR/_install/3rdparty/opencv" "$ROOT_DIR/3rdparty/opencv" # cmake mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake" -# platforms/win -mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/samples/simple_demo" - # samples mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples" From 97eb323bf3b67a00e9a759aeb7dfb286abe640b1 Mon Sep 17 00:00:00 2001 From: TinyO Date: Mon, 9 Sep 2019 11:46:38 +0800 Subject: [PATCH 08/16] fix(*): win pack.sh complie new. --- scripts/win/winpack.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index 51a9ddc..2c29a11 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -142,6 +142,10 @@ mv "$ROOT_DIR/_install/3rdparty/opencv" "$ROOT_DIR/3rdparty/opencv" # cmake mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake" +# platforms/win +mkdir "$ROOT_DIR/platforms" +mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/platforms/win" + # samples mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples" From 9eb52c1f4429111b6adcd14759baf631078424aa Mon Sep 17 00:00:00 2001 From: Messier Date: Mon, 9 Sep 2019 13:25:15 +0800 Subject: [PATCH 09/16] docs(*) : add code tree comments --- docs/mynt-eye-s-sdk.tree | 266 ++++----------------------------------- 1 file changed, 21 insertions(+), 245 deletions(-) diff --git a/docs/mynt-eye-s-sdk.tree b/docs/mynt-eye-s-sdk.tree index ed97f01..679fd44 100644 --- a/docs/mynt-eye-s-sdk.tree +++ b/docs/mynt-eye-s-sdk.tree @@ -182,137 +182,47 @@ mynt-eye-s-sdk │   │   ├── version_checker.cc │   │   └── version_checker.h │   ├── device -│   │   ├── async_callback.h -│   │   ├── async_callback_impl.h +│   │   ├── async_callback.h asynchronous data translate +│   │   ├── async_callback_impl.h derived │   │   ├── channel │   │   │   ├── bytes.cc -│   │   │   ├── bytes.h +│   │   │   ├── bytes.h <--uint8_t data--> │   │   │   ├── channels.cc -│   │   │   ├── channels.h -│   │   │   ├── def.h +│   │   │   ├── channels.h channels control api +│   │   │   ├── def.h data packet │   │   │   ├── file_channel.cc -│   │   │   └── file_channel.h +│   │   │   └── file_channel.h data parser │   │   ├── config.cc -│   │   ├── config.h -│   │   ├── context.cc -│   │   ├── device.cc -│   │   ├── motions.cc -│   │   ├── motions.h -│   │   ├── standard +│   │   ├── config.h config lists +│   │   ├── context.cc create context +│   │   ├── device.cc device class +│   │   ├── motions.cc +│   │   ├── motions.h imu motions +│   │   ├── standard standard device s │   │   │   ├── channels_adapter_s.cc │   │   │   ├── channels_adapter_s.h │   │   │   ├── device_s.cc │   │   │   ├── device_s.h │   │   │   ├── streams_adapter_s.cc │   │   │   └── streams_adapter_s.h -│   │   ├── standard2 +│   │   ├── standard2 standard device s2 │   │   │   ├── channels_adapter_s2.cc │   │   │   ├── channels_adapter_s2.h │   │   │   ├── device_s2.cc │   │   │   ├── device_s2.h │   │   │   ├── streams_adapter_s2.cc │   │   │   └── streams_adapter_s2.h -│   │   ├── streams.cc -│   │   ├── streams.h -│   │   ├── types.cc -│   │   └── utils.cc -│   ├── miniglog.cc -│   ├── types.cc +│   │   ├── streams.cc +│   │   ├── streams.h camera streams +│   │   ├── types.cc to string +│   │   └── utils.cc user helper +│   ├── miniglog.cc +│   ├── types.cc device,streams,option...types str │   ├── util │   │   ├── files.cc │   │   └── strings.cc │   └── uvc -│   ├── linux -│   │   └── uvc-v4l2.cc -│   ├── macosx -│   │   ├── AVfoundationCamera.h -│   │   ├── CameraEngine.h -│   │   ├── USBBusProber -│   │   │   ├── BusProbeClass.h -│   │   │   ├── BusProbeDevice.h -│   │   │   ├── BusProber.h -│   │   │   ├── BusProberSharedFunctions.h -│   │   │   ├── DecodeAudioInterfaceDescriptor.h -│   │   │   ├── DecodeBOSDescriptor.h -│   │   │   ├── DecodeCommClassDescriptor.h -│   │   │   ├── DecodeConfigurationDescriptor.h -│   │   │   ├── DecodeDeviceDescriptor.h -│   │   │   ├── DecodeDeviceQualifierDescriptor.h -│   │   │   ├── DecodeEndpointDescriptor.h -│   │   │   ├── DecodeHIDDescriptor.h -│   │   │   ├── DecodeHubDescriptor.h -│   │   │   ├── DecodeInterfaceDescriptor.h -│   │   │   ├── DecodeVideoInterfaceDescriptor.h -│   │   │   ├── DescriptorDecoder.h -│   │   │   ├── en.lproj -│   │   │   ├── ExtensionSelector.h -│   │   │   ├── OutlineViewAdditions.h -│   │   │   ├── OutlineViewNode.h -│   │   │   ├── TableViewWithCopying.h -│   │   │   └── USBBusProber.h -│   │   ├── USBBusProber.framework -│   │   │   └── Versions -│   │   │   └── A -│   │   │   ├── Headers -│   │   │   │   ├── BusProbeClass.h -│   │   │   │   ├── BusProbeDevice.h -│   │   │   │   ├── BusProber.h -│   │   │   │   ├── BusProberSharedFunctions.h -│   │   │   │   ├── DecodeAudioInterfaceDescriptor.h -│   │   │   │   ├── DecodeBOSDescriptor.h -│   │   │   │   ├── DecodeCommClassDescriptor.h -│   │   │   │   ├── DecodeConfigurationDescriptor.h -│   │   │   │   ├── DecodeDeviceDescriptor.h -│   │   │   │   ├── DecodeDeviceQualifierDescriptor.h -│   │   │   │   ├── DecodeEndpointDescriptor.h -│   │   │   │   ├── DecodeHIDDescriptor.h -│   │   │   │   ├── DecodeHubDescriptor.h -│   │   │   │   ├── DecodeInterfaceDescriptor.h -│   │   │   │   ├── DecodeVideoInterfaceDescriptor.h -│   │   │   │   ├── DescriptorDecoder.h -│   │   │   │   ├── ExtensionSelector.h -│   │   │   │   ├── OutlineViewAdditions.h -│   │   │   │   ├── OutlineViewNode.h -│   │   │   │   ├── TableViewWithCopying.h -│   │   │   │   └── USBBusProber.h -│   │   │   └── Resources -│   │   │   └── en.lproj -│   │   ├── UVC Test App -│   │   │   ├── AppDelegate.h -│   │   │   ├── AVCaptureVideoSource.h -│   │   │   ├── CVGLView.h -│   │   │   └── en.lproj -│   │   ├── uvc-vvuvckit.cc -│   │   ├── UVCXcodeProject.xcodeproj -│   │   │   ├── project.xcworkspace -│   │   │   │   └── xcuserdata -│   │   │   │   └── tiny.xcuserdatad -│   │   │   ├── xcshareddata -│   │   │   │   └── xcschemes -│   │   │   └── xcuserdata -│   │   │   └── tiny.xcuserdatad -│   │   │   └── xcschemes -│   │   ├── VVUVCKit -│   │   │   ├── en.lproj -│   │   │   ├── VVUVCController.h -│   │   │   ├── VVUVCKit.h -│   │   │   ├── VVUVCKitStringAdditions.h -│   │   │   ├── VVUVCUIController.h -│   │   │   └── VVUVCUIElement.h -│   │   └── VVUVCKit.framework -│   │   └── Versions -│   │   └── A -│   │   ├── Headers -│   │   │   ├── VVUVCController.h -│   │   │   ├── VVUVCKit.h -│   │   │   ├── VVUVCKitStringAdditions.h -│   │   │   ├── VVUVCUIController.h -│   │   │   └── VVUVCUIElement.h -│   │   └── Resources -│   │   └── en.lproj -│   ├── uvc.h -│   └── win -│   └── uvc-wmf.cc +│  ├── tools │   ├── _build │   │   ├── CMakeCache.txt @@ -372,141 +282,7 @@ mynt-eye-s-sdk │   └── writer └── wrappers ├── android - │   └── mynteye - │   ├── app - │   │   └── src - │   │   ├── androidTest - │   │   │   └── java - │   │   │   └── com - │   │   │   └── slightech - │   │   │   └── mynteye - │   │   │   └── demo - │   │   ├── main - │   │   │   ├── java - │   │   │   │   └── com - │   │   │   │   └── slightech - │   │   │   │   └── mynteye - │   │   │   │   └── demo - │   │   │   │   ├── camera - │   │   │   │   ├── ui - │   │   │   │   └── util - │   │   │   └── res - │   │   │   ├── layout - │   │   │   ├── menu - │   │   │   └── values - │   │   └── test - │   │   └── java - │   │   └── com - │   │   └── slightech - │   │   └── mynteye - │   │   └── demo - │   ├── gradle - │   │   └── wrapper - │   ├── libmynteye - │   │   ├── CMakeLists.txt - │   │   └── src - │   │   ├── androidTest - │   │   │   └── java - │   │   │   └── com - │   │   │   └── slightech - │   │   │   └── mynteye - │   │   ├── main - │   │   │   ├── cpp - │   │   │   │   └── mynteye - │   │   │   │   ├── cpp - │   │   │   │   │   ├── addon.hpp - │   │   │   │   │   ├── calibration_model.hpp - │   │   │   │   │   ├── capability.hpp - │   │   │   │   │   ├── device.hpp - │   │   │   │   │   ├── device_usb_info.hpp - │   │   │   │   │   ├── extrinsics.hpp - │   │   │   │   │   ├── format.hpp - │   │   │   │   │   ├── frame.hpp - │   │   │   │   │   ├── img_data.hpp - │   │   │   │   │   ├── imu_data.hpp - │   │   │   │   │   ├── imu_intrinsics.hpp - │   │   │   │   │   ├── info.hpp - │   │   │   │   │   ├── intrinsics.hpp - │   │   │   │   │   ├── model.hpp - │   │   │   │   │   ├── motion_data.hpp - │   │   │   │   │   ├── motion_intrinsics.hpp - │   │   │   │   │   ├── option.hpp - │   │   │   │   │   ├── option_info.hpp - │   │   │   │   │   ├── source.hpp - │   │   │   │   │   ├── stream_data.hpp - │   │   │   │   │   ├── stream.hpp - │   │   │   │   │   └── stream_request.hpp - │   │   │   │   ├── impl - │   │   │   │   │   ├── device_impl.hpp - │   │   │   │   │   ├── frame_impl.hpp - │   │   │   │   │   ├── internal - │   │   │   │   │   │   ├── usb_info.h - │   │   │   │   │   │   └── uvc_device.h - │   │   │   │   │   ├── motion_data_impl.hpp - │   │   │   │   │   ├── stream_data_impl.hpp - │   │   │   │   │   ├── type_conversion.hpp - │   │   │   │   │   └── util - │   │   │   │   └── jni - │   │   │   │   ├── NativeAddon.hpp - │   │   │   │   ├── NativeCalibrationModel.hpp - │   │   │   │   ├── NativeCapability.hpp - │   │   │   │   ├── NativeDevice.hpp - │   │   │   │   ├── NativeDeviceUsbInfo.hpp - │   │   │   │   ├── NativeExtrinsics.hpp - │   │   │   │   ├── NativeFormat.hpp - │   │   │   │   ├── NativeFrame.hpp - │   │   │   │   ├── NativeImgData.hpp - │   │   │   │   ├── NativeImuData.hpp - │   │   │   │   ├── NativeImuIntrinsics.hpp - │   │   │   │   ├── NativeInfo.hpp - │   │   │   │   ├── NativeIntrinsics.hpp - │   │   │   │   ├── NativeModel.hpp - │   │   │   │   ├── NativeMotionData.hpp - │   │   │   │   ├── NativeMotionIntrinsics.hpp - │   │   │   │   ├── NativeOption.hpp - │   │   │   │   ├── NativeOptionInfo.hpp - │   │   │   │   ├── NativeSource.hpp - │   │   │   │   ├── NativeStreamData.hpp - │   │   │   │   ├── NativeStream.hpp - │   │   │   │   └── NativeStreamRequest.hpp - │   │   │   ├── java - │   │   │   │   └── com - │   │   │   │   └── slightech - │   │   │   │   └── mynteye - │   │   │   │   ├── usb - │   │   │   │   └── util - │   │   │   ├── jniLibs - │   │   │   │   ├── arm64-v8a - │   │   │   │   └── armeabi-v7a - │   │   │   └── res - │   │   │   ├── layout - │   │   │   ├── values - │   │   │   └── xml - │   │   └── test - │   │   └── java - │   │   └── com - │   │   └── slightech - │   │   └── mynteye - │   ├── libshell - │   │   └── src - │   │   └── main - │   │   └── java - │   │   └── com - │   │   └── stericson - │   │   └── RootShell - │   │   ├── containers - │   │   ├── exceptions - │   │   └── execution - │   ├── scripts - │   └── third_party - │   └── djinni - │   └── support-lib - │   ├── djinni_common.hpp - │   ├── jni - │   │   ├── djinni_support.hpp - │   │   └── Marshal.hpp - │   ├── proxy_cache_impl.hpp - │   └── proxy_cache_interface.hpp + │   ├── python │   ├── CMakeLists.txt │   ├── samples From 5c782dcb6d61407603f9a77455033f30fd9e7756 Mon Sep 17 00:00:00 2001 From: Osenberg Date: Mon, 9 Sep 2019 15:12:40 +0800 Subject: [PATCH 10/16] feat(samples): saved depth image for save_single_image --- samples/save_single_image.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/samples/save_single_image.cc b/samples/save_single_image.cc index 85c5bae..cab1dba 100644 --- a/samples/save_single_image.cc +++ b/samples/save_single_image.cc @@ -14,9 +14,12 @@ int main(int argc, char *argv[]) { if (!ok) return 1; api->ConfigStreamRequest(request); + api->EnableStreamData(Stream::DEPTH); + api->Start(Source::VIDEO_STREAMING); cv::namedWindow("frame"); + cv::namedWindow("depth_real"); std::int32_t count = 0; std::cout << "Press 'Space' 's' 'S' to save image." << std::endl; @@ -31,21 +34,31 @@ int main(int argc, char *argv[]) { cv::imshow("frame", img); } + auto &&depth_data = api->GetStreamData(Stream::DEPTH); + if (!depth_data.frame.empty()) { + cv::imshow("depth_real", depth_data.frame); // CV_16UC1 + } + char key = static_cast(cv::waitKey(1)); if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q break; } else if (key == 32 || key == 's' || key == 'S') { - if (!left_data.frame.empty() && !right_data.frame.empty()) { + if (!left_data.frame.empty() + && !right_data.frame.empty() + && !depth_data.frame.empty()) { char l_name[20]; char r_name[20]; + char d_name[20]; ++count; snprintf(l_name, sizeof(l_name), "left_%d.jpg", count); snprintf(r_name, sizeof(r_name), "right_%d.jpg", count); + snprintf(d_name, sizeof(d_name), "depth_%d.jpg", count); cv::imwrite(l_name, left_data.frame); cv::imwrite(r_name, right_data.frame); + cv::imwrite(d_name, depth_data.frame); - std::cout << "Saved " << l_name << " " << r_name << " to current directory" << std::endl; + std::cout << "Saved " << l_name << " " << r_name << " " << d_name << " to current directory" << std::endl; } } } From 1744826e8f7ef0de534f592cc2800591f102490f Mon Sep 17 00:00:00 2001 From: TinyO Date: Mon, 9 Sep 2019 15:12:49 +0800 Subject: [PATCH 11/16] doc(*): update firmware things. --- docs/src/firmware/applicable.rst | 3 ++- docs/src/firmware/fw_changelog.rst | 7 +++++++ docs/src/firmware/update_main_chip.rst | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/src/firmware/applicable.rst b/docs/src/firmware/applicable.rst index d30271f..8bf010e 100644 --- a/docs/src/firmware/applicable.rst +++ b/docs/src/firmware/applicable.rst @@ -22,7 +22,8 @@ MYNTEYE_S_2.0.0_alpha0.img 2.0.0-alpha0 ============================ =========================== S2100 Firmwares SDK Version ============================ =========================== -MYNTEYE-S2100-1.3.2.img 2.4.0(2.4.0 ~ latest) +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.2.img 2.3.5(2.3.5 ~ 2.3.9) MYNTEYE_S2100_1.1.img 2.3.4 ============================ =========================== diff --git a/docs/src/firmware/fw_changelog.rst b/docs/src/firmware/fw_changelog.rst index a0f6743..67d9ece 100644 --- a/docs/src/firmware/fw_changelog.rst +++ b/docs/src/firmware/fw_changelog.rst @@ -4,6 +4,13 @@ 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 ------------------- diff --git a/docs/src/firmware/update_main_chip.rst b/docs/src/firmware/update_main_chip.rst index a783a04..701f7ce 100644 --- a/docs/src/firmware/update_main_chip.rst +++ b/docs/src/firmware/update_main_chip.rst @@ -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-S2100-1.3.2.img # S2100 firmware + ├─MYNTEYE-S21x0-1.4.0.img # S21X0 firmware ├─... └─mynt-eye-tool-setup.zip # MYNT EYE TOOL zip From 67078d69c5c903934d4a073a556abaf2c506b6fc Mon Sep 17 00:00:00 2001 From: John Zhao Date: Mon, 9 Sep 2019 16:19:10 +0800 Subject: [PATCH 12/16] fix(*): win pack.sh readme --- .../simple_demo => scripts/win/nsis}/README.txt | 0 scripts/win/winpack.sh | 14 ++++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) rename {samples/simple_demo => scripts/win/nsis}/README.txt (100%) diff --git a/samples/simple_demo/README.txt b/scripts/win/nsis/README.txt similarity index 100% rename from samples/simple_demo/README.txt rename to scripts/win/nsis/README.txt diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index 2c29a11..4f7cc46 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -66,7 +66,7 @@ _mv_subs() { ################################################################################ # build release -make samples tools +make samples ################################################################################ # build debug @@ -95,8 +95,8 @@ _rm "$ROOT_DIR/samples/_build" _rm "$ROOT_DIR/samples/_output" mv "$ROOT_DIR/samples" "$ROOT_DIR/_install/samples" -# platforms/win -mv "$ROOT_DIR/samples/simple_demo/README.txt" "$ROOT_DIR/_install" +# readme +mv "$BASE_DIR/nsis/README.txt" "$ROOT_DIR/_install" ################################################################################ # copy to _install @@ -142,18 +142,16 @@ mv "$ROOT_DIR/_install/3rdparty/opencv" "$ROOT_DIR/3rdparty/opencv" # cmake mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake" -# platforms/win -mkdir "$ROOT_DIR/platforms" -mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/platforms/win" - # samples mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples" +# readme +mv "$ROOT_DIR/_install/README.txt" "$BASE_DIR/nsis" + ################################################################################ # clean build _rm "$ROOT_DIR/_build" _rm "$ROOT_DIR/_output" - _echo_d "Win pack success" From d9615a95d3cfb9553fe7b63273b58b294660406d Mon Sep 17 00:00:00 2001 From: Messier Date: Mon, 9 Sep 2019 17:20:16 +0800 Subject: [PATCH 13/16] feature(get_depth_with_region) : add camera coordinate calc --- samples/get_depth_with_region.cc | 62 ++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/samples/get_depth_with_region.cc b/samples/get_depth_with_region.cc index 9dee888..e2d57c8 100644 --- a/samples/get_depth_with_region.cc +++ b/samples/get_depth_with_region.cc @@ -18,6 +18,8 @@ namespace { +static cv::Mat cv_in_left, cv_in_left_inv; + class DepthRegion { public: explicit DepthRegion(std::uint32_t n) @@ -60,10 +62,10 @@ class DepthRegion { void ShowElems( const cv::Mat &depth, std::function elem2string, - int elem_space = 40, + int elem_space = 60, std::function - getinfo = nullptr) { + const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n, + double X, double Y, double Z)>getinfo = nullptr) { if (!show_) return; @@ -74,6 +76,17 @@ class DepthRegion { int x, y; std::string str; int baseline = 0; + + // calculate (X, Y, Z) in left camera coordinate + cv::Mat mouse_left_cor(3, 1, CV_64FC1), mouse_img_cor(3, 1, CV_64FC1); + mouse_img_cor.at(0, 0) = static_cast(point_.x); + mouse_img_cor.at(0, 1) = static_cast(point_.y); + mouse_img_cor.at(0, 2) = 1.0; + double Z = depth.at(point_.y, point_.x); + mouse_left_cor = cv_in_left_inv *Z * mouse_img_cor; + // std::cout << std::endl << "Mouse Left Cor:" << std::endl + // << mouse_left_cor << std::endl; + for (int i = -n_; i <= n; ++i) { x = point_.x + i; if (x < 0 || x >= depth.cols) @@ -101,7 +114,11 @@ class DepthRegion { } if (getinfo) { - std::string info = getinfo(depth, point_, n_); + double x, y, z; + x = mouse_left_cor.at(0, 0); + y = mouse_left_cor.at(1, 0); + z = mouse_left_cor.at(2, 0); + std::string info = getinfo(depth, point_, n_, x, y, z); if (!info.empty()) { cv::Size sz = cv::getTextSize(info, cv::FONT_HERSHEY_PLAIN, 1, 1, &baseline); @@ -158,17 +175,48 @@ int main(int argc, char *argv[]) { api->Start(Source::VIDEO_STREAMING); + // get left camera Intrinsics + auto in_left = api->GetIntrinsicsBase(Stream::LEFT); + cv_in_left = cv::Mat::eye(3, 3, CV_64F); + if (in_left->calib_model() == CalibrationModel::PINHOLE) { + std::shared_ptr in; + in = std::static_pointer_cast(in_left); + in -> ResizeIntrinsics(); + cv_in_left.at(0, 0) = in->fx; + cv_in_left.at(1, 1) = in->fy; + cv_in_left.at(0, 2) = in->cx; + cv_in_left.at(1, 2) = in->cy; + } else if (in_left->calib_model() == CalibrationModel::KANNALA_BRANDT) { + in_left = std::dynamic_pointer_cast(in_left); + std::shared_ptr in; + in = std::static_pointer_cast(in_left); + in -> ResizeIntrinsics(); + cv_in_left.at(0, 0) = in->coeffs[4]; + cv_in_left.at(1, 1) = in->coeffs[5]; + cv_in_left.at(0, 2) = in->coeffs[6]; + cv_in_left.at(1, 2) = in->coeffs[7]; + } else { + std::cout << "UNKNOW CALIB MODEL."; + return 0; + } + + std::cout << std::endl << "Left Camera Intrinsics:" << std::endl + << cv_in_left << std::endl; + cv_in_left_inv = cv_in_left.inv(); cv::namedWindow("frame"); cv::namedWindow("depth"); cv::namedWindow("region"); DepthRegion depth_region(3); auto depth_info = []( - const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n) { + const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n, + double X, double Y, double Z) { MYNTEYE_UNUSED(depth) std::ostringstream os; os << "depth pos: [" << point.y << ", " << point.x << "]" - << "±" << n << ", unit: mm"; + << " camera pos: [" << X << ", " << Y + << ", " << Z << "]" << ", unit: mm"; + return os.str(); }; @@ -215,7 +263,7 @@ int main(int argc, char *argv[]) { } return std::to_string(elem); }, - 80, depth_info); + 90, depth_info); } char key = static_cast(cv::waitKey(1)); From da399e2a3fee36fb2fabffa7a9b48271f3cc28f6 Mon Sep 17 00:00:00 2001 From: Messier Date: Mon, 9 Sep 2019 17:43:54 +0800 Subject: [PATCH 14/16] style(get_depth_with_region) : output n --- samples/get_depth_with_region.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/get_depth_with_region.cc b/samples/get_depth_with_region.cc index e2d57c8..f728d45 100644 --- a/samples/get_depth_with_region.cc +++ b/samples/get_depth_with_region.cc @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) { double X, double Y, double Z) { MYNTEYE_UNUSED(depth) std::ostringstream os; - os << "depth pos: [" << point.y << ", " << point.x << "]" + os << "depth pos(" << n << "): [" << point.y << ", " << point.x << "]" << " camera pos: [" << X << ", " << Y << ", " << Z << "]" << ", unit: mm"; From 072afff27d70ac7470bd40c9877de35b1756184c Mon Sep 17 00:00:00 2001 From: TinyO Date: Tue, 10 Sep 2019 10:52:33 +0800 Subject: [PATCH 15/16] chore(*): update doc things. --- docs/src/sdk/sdk_changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/sdk/sdk_changelog.rst b/docs/src/sdk/sdk_changelog.rst index 7f047e9..5adff68 100644 --- a/docs/src/sdk/sdk_changelog.rst +++ b/docs/src/sdk/sdk_changelog.rst @@ -2,7 +2,7 @@ Change Log ========== -2019-08-27(v2.4.2) +2019-09-4(v2.4.2) ------------------- 1. Part of the sample examples were sorted out, and useless tools and engineering code were removed. From ecdc817a114c7fe44334975395f056d327b3d39d Mon Sep 17 00:00:00 2001 From: TinyO Date: Wed, 11 Sep 2019 12:42:27 +0800 Subject: [PATCH 16/16] fix(*): S200B support. --- .../src/wrapper_nodelet.cc | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc b/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc index 29e4283..1650a3b 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc @@ -307,6 +307,21 @@ class ROSWrapperNodelet : public nodelet::Nodelet { {Option::GYROSCOPE_RANGE, "standard/gyro_range"}}; } + // device options of standard200b + if (model_ == Model::STANDARD200B) { + option_names_ = { + {Option::BRIGHTNESS, "standard200b/brightness"}, + {Option::EXPOSURE_MODE, "standard200b/exposure_mode"}, + {Option::MAX_GAIN, "standard200b/max_gain"}, + {Option::MAX_EXPOSURE_TIME, "standard200b/max_exposure_time"}, + {Option::DESIRED_BRIGHTNESS, "standard200b/desired_brightness"}, + {Option::MIN_EXPOSURE_TIME, "standard200b/min_exposure_time"}, + {Option::ACCELEROMETER_RANGE, "standard200b/accel_range"}, + {Option::GYROSCOPE_RANGE, "standard200b/gyro_range"}, + {Option::ACCELEROMETER_LOW_PASS_FILTER, "standard200b/accel_low_filter"}, + {Option::GYROSCOPE_LOW_PASS_FILTER, "standard200b/gyro_low_filter"}}; + } + for (auto &&it = option_names_.begin(); it != option_names_.end(); ++it) { if (!api_->Supports(it->first)) continue; @@ -333,8 +348,9 @@ class ROSWrapperNodelet : public nodelet::Nodelet { NODELET_INFO_STREAM("Advertized on topic " << topic); } - // Only STANDARD2/STANDARD210A need publish mono_topics - if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) { + // Only STANDARD2/STANDARD210A/STANDARD200B need publish mono_topics + if (model_ == Model::STANDARD2 || + model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) { for (auto &&it = mono_topics.begin(); it != mono_topics.end(); ++it) { auto &&topic = mono_topics[it->first]; if (it->first == Stream::LEFT || @@ -349,7 +365,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet { int depth_type = 0; private_nh_.getParamCached("depth_type", depth_type); - if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) { + if (model_ == Model::STANDARD2 || + model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) { camera_encodings_ = {{Stream::LEFT, enc::BGR8}, {Stream::RIGHT, enc::BGR8}, {Stream::LEFT_RECTIFIED, enc::BGR8}, @@ -1100,7 +1117,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet { int request_index = 0; model_ = api_->GetModel(); - if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) { + if (model_ == Model::STANDARD2 || + model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) { private_nh_.getParamCached("standard2/request_index", request_index); switch (request_index) { case 0: @@ -1127,7 +1145,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet { std::int32_t process_mode = 0; if (model_ == Model::STANDARD2 || - model_ == Model::STANDARD210A) { + model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) { private_nh_.getParamCached("standard2/imu_process_mode", process_mode); api_->EnableProcessMode(process_mode); }