├── .clang-format ├── .clangformatignore ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── apps ├── CMakeLists.txt ├── daemon │ ├── CMakeLists.txt │ ├── dragonboad_definitions.h │ ├── gpios.c │ ├── gpios.h │ ├── leds.c │ ├── leds.h │ ├── main.c │ ├── readme.md │ └── tof-programming.service ├── readme.md ├── server │ ├── CMakeLists.txt │ ├── README.md │ ├── buffer.proto │ ├── server.cpp │ └── server.h └── uvc-app │ ├── .gitignore │ ├── CMakeLists.txt │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── Readme.md │ ├── config_pipe.sh │ ├── doc │ ├── Readme.md │ ├── configfs_start.txt │ ├── gadget-testing.txt │ └── gadget_configfs.txt │ ├── uvc-gadget.cpp │ └── uvc.h ├── azure-pipelines.yml ├── bindings ├── matlab │ ├── CMakeLists.txt │ ├── README.md │ ├── adaptor.cpp │ ├── aditof_imaq.m │ ├── aditofimaq.h │ ├── colormap.txt │ ├── device_format.cpp │ ├── device_format.h │ ├── prop_listener.cpp │ ├── prop_listener.h │ ├── source_adaptor.cpp │ ├── source_adaptor.h │ ├── source_listener.cpp │ ├── source_listener.h │ ├── temperature_get_fcn.cpp │ └── temperature_get_fcn.h ├── open3D │ ├── CMakeLists.txt │ ├── aditof_open3d.h │ ├── readme.md │ └── showPointCloud │ │ ├── CMakeLists.txt │ │ ├── colormap.txt │ │ ├── main.cpp │ │ └── readme.md ├── opencv │ ├── CMakeLists.txt │ ├── aditof_opencv.h │ ├── dnn │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── readme.md │ ├── imshow │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── readme.md │ ├── maskrcnn │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── mscoco_labels.names │ │ └── readme.md │ └── readme.md ├── python │ ├── CMakeLists.txt │ ├── aditofpython.cpp │ ├── cmake │ │ ├── FindPythonLibsNew.cmake │ │ ├── pybind11Config.cmake │ │ ├── pybind11ConfigVersion.cmake │ │ ├── pybind11Targets.cmake │ │ └── pybind11Tools.cmake │ ├── examples │ │ ├── dnn │ │ │ ├── CMakeLists.txt │ │ │ ├── dnn.py │ │ │ ├── install_deps_3d_smart_cam.sh │ │ │ └── readme.md │ │ ├── first_frame │ │ │ ├── first_frame.py │ │ │ └── readme.md │ │ ├── first_frame_network │ │ │ ├── first_frame_network.py │ │ │ └── readme.md │ │ ├── low_level_example │ │ │ ├── low_level_example.py │ │ │ └── readme.md │ │ ├── maskr_cnn │ │ │ ├── maskr_cnn.py │ │ │ ├── object_detection_classes_coco.txt │ │ │ └── readme.md │ │ ├── readme.md │ │ └── showPointCloud │ │ │ ├── readme.md │ │ │ └── showPointCloud.py │ ├── pybind11 │ │ ├── attr.h │ │ ├── buffer_info.h │ │ ├── cast.h │ │ ├── chrono.h │ │ ├── common.h │ │ ├── complex.h │ │ ├── detail │ │ │ ├── class.h │ │ │ ├── common.h │ │ │ ├── descr.h │ │ │ ├── init.h │ │ │ ├── internals.h │ │ │ ├── type_caster_base.h │ │ │ └── typeid.h │ │ ├── eigen.h │ │ ├── embed.h │ │ ├── eval.h │ │ ├── functional.h │ │ ├── gil.h │ │ ├── iostream.h │ │ ├── numpy.h │ │ ├── operators.h │ │ ├── options.h │ │ ├── pybind11.h │ │ ├── pytypes.h │ │ ├── stl.h │ │ ├── stl │ │ │ └── filesystem.h │ │ └── stl_bind.h │ └── readme.md └── ros │ ├── CMakeLists.txt │ ├── README.md │ ├── aditof_roscpp │ ├── CMakeLists.txt │ ├── cfg │ │ └── Aditof_roscpp.cfg │ ├── include │ │ └── aditof_roscpp │ │ │ ├── aditof_sensor_msg.h │ │ │ ├── aditof_utils.h │ │ │ ├── cameraInfo_msg.h │ │ │ ├── depthImage_msg.h │ │ │ ├── irImage_msg.h │ │ │ ├── message_factory.h │ │ │ ├── pointcloud2_msg.h │ │ │ └── rgbImage_msg.h │ ├── launch │ │ ├── camera_node.launch │ │ └── rviz_publisher.launch │ ├── package.xml │ ├── rviz │ │ └── pointcloud.rviz │ └── src │ │ ├── aditof_utils.cpp │ │ ├── cameraInfo_msg.cpp │ │ ├── camera_node.cpp │ │ ├── depthImage_msg.cpp │ │ ├── examples │ │ └── rviz_pointcloud.cpp │ │ ├── irImage_msg.cpp │ │ ├── message_factory.cpp │ │ ├── pointcloud2_msg.cpp │ │ └── rgbImage_msg.cpp │ └── ros_setup.bash ├── ci └── azure │ ├── build_docker_image.sh │ ├── deps.sh │ ├── dragonboard-docker │ └── Dockerfile │ ├── inside_docker.sh │ ├── lib.sh │ ├── nvidia-docker │ └── Dockerfile │ ├── raspberrypi3-docker │ └── Dockerfile │ ├── ros_install.sh │ ├── run_build.sh │ ├── setup_docker.sh │ ├── setup_paths.sh │ ├── toybrick-docker │ └── Dockerfile │ └── windows-build │ ├── build_sdk.ps1 │ └── install_deps.ps1 ├── cmake ├── FindMatlabWithImageAcquisitionToolbox.cmake ├── aditof-config.cmake.in ├── aditof-setup.iss.cmakein ├── raspberrypi-revision-config.cmake ├── readme.md ├── setup.py.cmakein ├── udev-rules-install.cmake └── version.h.cmakein ├── doc ├── 3dsmartcam1 │ └── build_instructions.md ├── CMakeLists.txt ├── ad-96tof1-ebz │ └── eeprom_register_map.md ├── dragonboard410c │ └── build_instructions.md ├── img │ ├── AquisitionParameters.PNG │ ├── AquisitionParametersFrameTypes.PNG │ ├── ad-96tof1-ebz_eeprom_regmap.png │ ├── aditof_demo.png │ ├── build_VS.PNG │ ├── configuration_VS.PNG │ ├── db410c_standalone.JPG │ ├── db410c_usb.JPG │ ├── dnn.png │ ├── dnn_python.PNG │ ├── hardwareBrowser.PNG │ ├── imshow.png │ ├── linux_db410c_usb.JPG │ ├── maskrcnn_cpp.png │ ├── maskrcnn_python.png │ ├── pointcloud_cpp.png │ ├── pointcloud_python.png │ ├── ros_rqt_reconfigure.png │ ├── rpi_standalone.jpg │ ├── rpi_standalone_revc.jpg │ ├── run_VS.PNG │ ├── sdk_acquire_frame_sequence_diagram.png │ ├── sdk_class_diagram.png │ ├── sdk_initialization_sequence_diagram.png │ ├── sdk_software_stack.png │ ├── sdk_top_level_diagram.png │ ├── startup_VS.PNG │ └── windows_db410c_usb.JPG ├── jetson │ └── build_instructions.md ├── linux │ └── build_instructions.md ├── macos │ └── build_instructions.md ├── mainpage.dox ├── raspberrypi3 │ ├── build_instructions.md │ └── raspberrypi_firmware_build.md ├── readme.md ├── sdcard_burn.md ├── sdk.doxy.in ├── windows │ └── build_instructions.md ├── xavier-agx │ └── build_instructions.md └── xavier-nx │ └── build_instructions.md ├── examples ├── CMakeLists.txt ├── aditof-demo-imgui │ ├── CMakeLists.txt │ ├── aditofdemocontroller.cpp │ ├── aditofdemocontroller.h │ ├── aditofdemorecorder.cpp │ ├── aditofdemorecorder.h │ ├── main.cpp │ ├── safequeue.h │ ├── view.cpp │ └── view.h ├── aditof-demo │ ├── CMakeLists.txt │ ├── aditofdemocontroller.cpp │ ├── aditofdemocontroller.h │ ├── aditofdemorecorder.cpp │ ├── aditofdemorecorder.h │ ├── aditofdemoview.cpp │ ├── aditofdemoview.h │ ├── config_pipe.sh │ ├── cvui.h │ ├── main.cpp │ ├── readme.md │ └── safequeue.h ├── deps │ └── imgui │ │ ├── CMakeLists.txt │ │ └── src │ │ ├── .editorconfig │ │ ├── .gitattributes │ │ ├── .github │ │ ├── issue_template.md │ │ ├── pull_request_template.md │ │ └── workflows │ │ │ └── build.yml │ │ ├── LICENSE.txt │ │ ├── docs │ │ ├── CHANGELOG.txt │ │ ├── FAQ.md │ │ ├── FONTS.txt │ │ ├── README.md │ │ └── TODO.txt │ │ ├── examples │ │ ├── .gitignore │ │ ├── README.txt │ │ ├── example_allegro5 │ │ │ ├── README.md │ │ │ ├── example_allegro5.vcxproj │ │ │ ├── example_allegro5.vcxproj.filters │ │ │ ├── imconfig_allegro5.h │ │ │ └── main.cpp │ │ ├── example_apple_metal │ │ │ ├── README.md │ │ │ ├── Shared │ │ │ │ ├── AppDelegate.h │ │ │ │ ├── AppDelegate.m │ │ │ │ ├── Renderer.h │ │ │ │ ├── Renderer.mm │ │ │ │ ├── ViewController.h │ │ │ │ ├── ViewController.mm │ │ │ │ └── main.m │ │ │ ├── example_apple_metal.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ ├── iOS │ │ │ │ ├── Base.lproj │ │ │ │ │ └── Main.storyboard │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Info-iOS.plist │ │ │ │ └── Launch Screen.storyboard │ │ │ └── macOS │ │ │ │ ├── Base.lproj │ │ │ │ └── Main.storyboard │ │ │ │ └── Info-macOS.plist │ │ ├── example_apple_opengl2 │ │ │ ├── example_apple_opengl2.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ └── main.mm │ │ ├── example_emscripten │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── main.cpp │ │ │ └── shell_minimal.html │ │ ├── example_glfw_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_glfw_opengl2 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl2.vcxproj │ │ │ ├── example_glfw_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_opengl3 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl3.vcxproj │ │ │ ├── example_glfw_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_vulkan │ │ │ ├── CMakeLists.txt │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_glfw_vulkan.vcxproj │ │ │ ├── example_glfw_vulkan.vcxproj.filters │ │ │ ├── gen_spv.sh │ │ │ ├── glsl_shader.frag │ │ │ ├── glsl_shader.vert │ │ │ └── main.cpp │ │ ├── example_glut_opengl2 │ │ │ ├── Makefile │ │ │ ├── example_glut_opengl2.vcxproj │ │ │ ├── example_glut_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_marmalade │ │ │ ├── data │ │ │ │ └── app.icf │ │ │ ├── main.cpp │ │ │ └── marmalade_example.mkb │ │ ├── example_null │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ └── main.cpp │ │ ├── example_sdl_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_directx11.vcxproj │ │ │ ├── example_sdl_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_sdl_opengl2 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_opengl2.vcxproj │ │ │ ├── example_sdl_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_opengl3 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_opengl3.vcxproj │ │ │ ├── example_sdl_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_vulkan │ │ │ ├── example_sdl_vulkan.vcxproj │ │ │ ├── example_sdl_vulkan.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx10 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx10.vcxproj │ │ │ ├── example_win32_directx10.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx11.vcxproj │ │ │ ├── example_win32_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx12 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx12.vcxproj │ │ │ ├── example_win32_directx12.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx9 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx9.vcxproj │ │ │ ├── example_win32_directx9.vcxproj.filters │ │ │ └── main.cpp │ │ ├── imgui_examples.sln │ │ ├── imgui_impl_allegro5.cpp │ │ ├── imgui_impl_allegro5.h │ │ ├── imgui_impl_dx10.cpp │ │ ├── imgui_impl_dx10.h │ │ ├── imgui_impl_dx11.cpp │ │ ├── imgui_impl_dx11.h │ │ ├── imgui_impl_dx12.cpp │ │ ├── imgui_impl_dx12.h │ │ ├── imgui_impl_dx9.cpp │ │ ├── imgui_impl_dx9.h │ │ ├── imgui_impl_glfw.cpp │ │ ├── imgui_impl_glfw.h │ │ ├── imgui_impl_glut.cpp │ │ ├── imgui_impl_glut.h │ │ ├── imgui_impl_marmalade.cpp │ │ ├── imgui_impl_marmalade.h │ │ ├── imgui_impl_metal.h │ │ ├── imgui_impl_metal.mm │ │ ├── imgui_impl_opengl2.cpp │ │ ├── imgui_impl_opengl2.h │ │ ├── imgui_impl_opengl3.cpp │ │ ├── imgui_impl_opengl3.h │ │ ├── imgui_impl_osx.h │ │ ├── imgui_impl_osx.mm │ │ ├── imgui_impl_sdl.cpp │ │ ├── imgui_impl_sdl.h │ │ ├── imgui_impl_vulkan.cpp │ │ ├── imgui_impl_vulkan.h │ │ ├── imgui_impl_win32.cpp │ │ ├── imgui_impl_win32.h │ │ └── libs │ │ │ ├── gl3w │ │ │ └── GL │ │ │ │ ├── gl3w.c │ │ │ │ ├── gl3w.h │ │ │ │ └── glcorearb.h │ │ │ ├── glfw │ │ │ ├── COPYING.txt │ │ │ ├── include │ │ │ │ └── GLFW │ │ │ │ │ ├── glfw3.h │ │ │ │ │ └── glfw3native.h │ │ │ ├── lib-vc2010-32 │ │ │ │ └── glfw3.lib │ │ │ └── lib-vc2010-64 │ │ │ │ └── glfw3.lib │ │ │ └── usynergy │ │ │ ├── README.txt │ │ │ ├── uSynergy.c │ │ │ └── uSynergy.h │ │ ├── imconfig.h │ │ ├── imgui.cpp │ │ ├── imgui.h │ │ ├── imgui_demo.cpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_internal.h │ │ ├── imgui_widgets.cpp │ │ ├── imstb_rectpack.h │ │ ├── imstb_textedit.h │ │ ├── imstb_truetype.h │ │ └── misc │ │ ├── README.txt │ │ ├── cpp │ │ ├── README.txt │ │ ├── imgui_stdlib.cpp │ │ └── imgui_stdlib.h │ │ ├── fonts │ │ ├── Cousine-Regular.ttf │ │ ├── DroidSans.ttf │ │ ├── Karla-Regular.ttf │ │ ├── ProggyClean.ttf │ │ ├── ProggyTiny.ttf │ │ ├── Roboto-Medium.ttf │ │ └── binary_to_compressed_c.cpp │ │ ├── freetype │ │ ├── README.md │ │ ├── imgui_freetype.cpp │ │ └── imgui_freetype.h │ │ ├── natvis │ │ ├── README.txt │ │ └── imgui.natvis │ │ └── single_file │ │ └── imgui_single_file.h ├── first-frame-network │ ├── CMakeLists.txt │ ├── main.cpp │ └── readme.md ├── first-frame │ ├── CMakeLists.txt │ ├── main.cpp │ └── readme.md ├── imshow-xavier │ ├── CMakeLists.txt │ ├── main.cpp │ └── readme.md └── readme.md ├── misc ├── ad-96tof1-ebz │ └── ad96tof1_eeprom.bin └── nvidia │ ├── jetson │ └── kernel_src │ │ ├── hardware │ │ └── nvidia │ │ │ └── platform │ │ │ └── t210 │ │ │ └── porg │ │ │ └── kernel-dts │ │ │ ├── porg-platforms │ │ │ ├── tegra210-camera-adi-tof.dtsi │ │ │ └── tegra210-porg-camera-adi-tof.dtsi │ │ │ └── tegra210-porg-p3448-common.dtsi │ │ └── kernel │ │ └── kernel-4.9 │ │ ├── drivers │ │ └── media │ │ │ └── i2c │ │ │ ├── Kconfig │ │ │ ├── Makefile │ │ │ ├── addi9036.c │ │ │ └── addi9036_mode_tbls.h │ │ └── include │ │ └── uapi │ │ └── linux │ │ └── v4l2-controls.h │ ├── xavier │ └── kernel_src │ │ └── hardware │ │ └── nvidia │ │ └── platform │ │ └── t19x │ │ ├── common │ │ └── kernel-dts │ │ │ └── t19x-common-modules │ │ │ └── tegra194-camera-addi9036.dtsi │ │ └── galen │ │ └── kernel-dts │ │ └── tegra194-p2888-0001-p2822-0000.dts │ └── xaviernx │ └── kernel_src │ └── hardware │ └── nvidia │ └── platform │ └── t19x │ ├── common │ └── kernel-dts │ │ └── t19x-common-modules │ │ └── tegra194-camera-addi9036.dtsi │ └── jakku │ └── kernel-dts │ └── common │ └── tegra194-p3509-0000-a00.dtsi ├── scripts ├── 3dsmartcam1 │ ├── aditof-demo.sh │ ├── apps_update.sh │ ├── readme.md │ ├── sdk_update.sh │ └── vnc_install.sh ├── dragonboard410c │ ├── db410c_sdk_deps.sh │ └── setup.sh ├── format.sh ├── jetson │ ├── rebuild_for_camera.sh │ └── setup.sh ├── linux │ ├── rebuild_for_camera.sh │ └── setup.sh ├── raspberrypi3 │ ├── opencv.patch │ ├── rebuild_for_camera.sh │ ├── rpi3_sdk_deps.sh │ └── setup.sh ├── readme.md ├── windows │ ├── readme.md │ └── setup_project.bat ├── xavier-agx │ ├── debug_enable.sh │ ├── rebuild_for_camera.sh │ └── xavier_setup.sh └── xavier-nx │ ├── debug_enable.sh │ └── rebuild_for_camera.sh ├── sdcard-images-utils ├── README.md └── dragonboard410c │ ├── README.md │ ├── linux-patches │ ├── README.md │ ├── kernel_4_14_96 │ │ ├── 0001-Added-the-4.14-initial-implementation.patch │ │ ├── 0002-enable-eeprom-driver.patch │ │ ├── 0003-fix-v4l-address.patch │ │ ├── 0004-arch-arm64-boot-dts-qcom-Use-node-references.-No-fun.patch │ │ ├── 0005-DWC3-enable-driver-and-add-fixes.patch │ │ ├── 0006-webcam-Enable-module-and-make-Tof-changes.patch │ │ ├── 0007-Try-to-enable-the-2-buttons-for-mezzanine-board.patch │ │ ├── 0008-Fix-uvc_video.c-1-not-needed.patch │ │ ├── 0008-UVC-gadget-Add-controls-for-eeprom-write-status.patch │ │ └── 0009-devicetree-Disable-gps-and-watchdog.patch │ └── kernel_4_9_27 │ │ ├── 0001-dragonboard-changes.patch │ │ ├── 0002-usb-gadget-changes.patch │ │ ├── 0003-reset-fixes.patch │ │ ├── 0004-dwc3-changes.patch │ │ ├── 0005-aditof-devicetree-changes.patch │ │ ├── 0006-dts-Disable-spi0-and-disable-pull-ups.patch │ │ ├── 0007-arch-arm64-boot-dts-qcom-Enable-pin-MPP4-as-input-to.patch │ │ └── 0008-UVC-gadget-Add-controls-for-eeprom-write-status.patch │ └── utils │ ├── README.md │ ├── chroot.sh │ └── image.sh ├── sdk ├── CMakeLists.txt ├── include │ └── aditof │ │ ├── aditof.h │ │ ├── camera.h │ │ ├── camera_definitions.h │ │ ├── connections.h │ │ ├── depth_sensor_interface.h │ │ ├── frame.h │ │ ├── frame_definitions.h │ │ ├── frame_operations.h │ │ ├── log_cout.h │ │ ├── sdk_exports.h │ │ ├── sensor_definitions.h │ │ ├── sensor_enumerator_factory.h │ │ ├── sensor_enumerator_interface.h │ │ ├── status_definitions.h │ │ ├── storage_interface.h │ │ ├── system.h │ │ ├── target_sdk_definitions.h │ │ └── temperature_sensor_interface.h ├── readme.md └── src │ ├── cameras │ ├── 3d-smart-camera │ │ ├── basecode.h │ │ ├── calibration_3d_smart.cpp │ │ ├── calibration_3d_smart.h │ │ ├── camera_3d_smart.cpp │ │ ├── camera_3d_smart.h │ │ ├── jetson │ │ │ ├── sensor_enumerator_jetson.cpp │ │ │ └── target_definitions.h │ │ └── sensor_names.h │ ├── ad-96tof1-ebz │ │ ├── calibration_96tof1.cpp │ │ ├── calibration_96tof1.h │ │ ├── camera_96tof1.cpp │ │ ├── camera_96tof1.h │ │ ├── dragonboard │ │ │ ├── sensor_enumerator_dragonboard.cpp │ │ │ └── target_definitions.h │ │ ├── jetson │ │ │ ├── sensor_enumerator_jetson.cpp │ │ │ └── target_definitions.h │ │ ├── raspberrypi │ │ │ ├── sensor_enumerator_raspberrypi.cpp │ │ │ └── target_definitions.h │ │ ├── sensor_names.h │ │ ├── xavier_agx │ │ │ ├── sensor_enumerator_xavier.cpp │ │ │ └── target_definitions.h │ │ └── xavier_nx │ │ │ ├── sensor_enumerator_xaviernx.cpp │ │ │ └── target_definitions.h │ ├── ad-fxtof1-ebz │ │ ├── basecode.h │ │ ├── calibration_fxtof1.cpp │ │ ├── calibration_fxtof1.h │ │ ├── camera_fxtof1.cpp │ │ ├── camera_fxtof1.h │ │ ├── jetson │ │ │ ├── sensor_enumerator_jetson.cpp │ │ │ └── target_definitions.h │ │ ├── raspberrypi │ │ │ ├── sensor_enumerator_raspberrypi.cpp │ │ │ └── target_definitions.h │ │ ├── sensor_names.h │ │ ├── toybrick │ │ │ ├── sensor_enumerator_toybrick.cpp │ │ │ └── target_definitions.h │ │ ├── xavier_agx │ │ │ ├── sensor_enumerator_xavier.cpp │ │ │ └── target_definitions.h │ │ └── xavier_nx │ │ │ ├── sensor_enumerator_xaviernx.cpp │ │ │ └── target_definitions.h │ └── readme.md │ ├── connections │ ├── network │ │ ├── buffer.proto │ │ ├── network.cpp │ │ ├── network.h │ │ ├── network_depth_sensor.cpp │ │ ├── network_depth_sensor.h │ │ ├── network_sensor_enumerator.cpp │ │ ├── network_sensor_enumerator.h │ │ ├── network_storage.cpp │ │ ├── network_storage.h │ │ ├── network_temperature_sensor.cpp │ │ └── network_temperature_sensor.h │ ├── network_javascript │ │ ├── README.md │ │ ├── buffer.proto │ │ ├── example.html │ │ ├── network │ │ │ ├── network.js │ │ │ ├── network_depth_sensor.js │ │ │ ├── network_sensor_enumerator.js │ │ │ ├── network_storage.js │ │ │ └── network_temperature_sensor.js │ │ ├── package-lock.json │ │ ├── package.json │ │ └── script.sh │ ├── target │ │ ├── addi9036_sensor.cpp │ │ ├── addi9036_sensor.h │ │ ├── adt7410_sensor.cpp │ │ ├── adt7410_sensor.h │ │ ├── eeprom.cpp │ │ ├── eeprom.h │ │ ├── i2c_common.h │ │ ├── rgb_sensor.cpp │ │ ├── rgb_sensor.h │ │ ├── rgbd_sensor.cpp │ │ ├── rgbd_sensor.h │ │ ├── target_sensor_enumerator.cpp │ │ ├── target_sensor_enumerator.h │ │ ├── tmp10x_sensor.cpp │ │ ├── tmp10x_sensor.h │ │ └── v4l_buffer_access_interface.h │ ├── usb │ │ ├── linux │ │ │ ├── usb_depth_sensor_linux.cpp │ │ │ ├── usb_linux_utils.cpp │ │ │ ├── usb_linux_utils.h │ │ │ ├── usb_sensor_enumerator.cpp │ │ │ ├── usb_storage_linux.cpp │ │ │ └── usb_temperature_sensor_linux.cpp │ │ ├── macos │ │ │ ├── usb_depth_sensor_macos.cpp │ │ │ ├── usb_sensor_enumerator.cpp │ │ │ ├── usb_storage_macos.cpp │ │ │ └── usb_temperature_sensor_macos.cpp │ │ ├── usb_depth_sensor.h │ │ ├── usb_sensor_enumerator.h │ │ ├── usb_storage.h │ │ ├── usb_temperature_sensor.h │ │ ├── usb_utils.cpp │ │ ├── usb_utils.h │ │ └── windows │ │ │ ├── usb_depth_sensor_windows.cpp │ │ │ ├── usb_sensor_enumerator.cpp │ │ │ ├── usb_storage_windows.cpp │ │ │ ├── usb_temperature_sensor_windows.cpp │ │ │ ├── usb_windows_utils.cpp │ │ │ └── usb_windows_utils.h │ └── utils │ │ ├── connection_validator.cpp │ │ └── connection_validator.h │ ├── device_utils.h │ ├── frame.cpp │ ├── frame_impl.cpp │ ├── frame_impl.h │ ├── frame_operations.cpp │ ├── readme.md │ ├── sensor_enumerator_factory.cpp │ ├── system.cpp │ ├── system_impl.cpp │ ├── system_impl.h │ ├── utils.cpp │ └── utils.h ├── tools ├── calibration-96tof1 │ ├── Readme.md │ ├── __init__.py │ ├── cal_eeprom │ │ ├── Readme.md │ │ ├── __init__.py │ │ ├── c++ │ │ │ ├── CMakeLists.txt │ │ │ ├── cal_eeprom.cpp │ │ │ ├── cal_eeprom.h │ │ │ ├── main.cpp │ │ │ ├── stdafx.h │ │ │ └── targetver.h │ │ ├── cal_eeprom.py │ │ ├── cal_map.py │ │ ├── cal_map_consts.py │ │ ├── cal_map_utils.py │ │ ├── calibration_map.bin │ │ ├── camera_intrinsic.json │ │ ├── firmware_gen.py │ │ └── linear_cal.json │ ├── calibrate_single_mode.py │ ├── config │ │ ├── BM_Kit │ │ │ ├── Far │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_far.json │ │ │ ├── Mid │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_mid.json │ │ │ ├── Near │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_near.json │ │ │ └── camera_intrinsic.json │ │ ├── BM_Kit_RevC │ │ │ ├── Far │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_far.json │ │ │ ├── Mid │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_mid.json │ │ │ ├── Near │ │ │ │ ├── 10_TGstartup_ADILD.lf │ │ │ │ ├── 11_XV_mux.lf │ │ │ │ ├── 12_TOF_ProcCtrl.lf │ │ │ │ ├── 13_Mode_Start.lf │ │ │ │ ├── 1_AFEstartup_silicon.lf │ │ │ │ ├── 2_LDstartup.lf │ │ │ │ ├── 3_MIPIstartup_ADDI9033_CYP.lf │ │ │ │ ├── 4_Driver_enable.lf │ │ │ │ ├── 5_mn34906bl_addi9033_HPT_data.lf │ │ │ │ ├── 6_mn34906bl_addi9033_data.lf │ │ │ │ ├── 7_mn34906bl_addi9033.lf │ │ │ │ ├── 8_LoopNumAddrList.lf │ │ │ │ ├── 9_RepeatNumAddrList.lf │ │ │ │ ├── linear_cal.json │ │ │ │ ├── r_lfs │ │ │ │ │ ├── 9_RepeatNumAddrList_0.lf │ │ │ │ │ ├── 9_RepeatNumAddrList_1.lf │ │ │ │ │ ├── 9_RepeatNumAddrList_2.lf │ │ │ │ │ └── 9_RepeatNumAddrList_3.lf │ │ │ │ ├── seqInfo.txt │ │ │ │ └── sweep_config_near.json │ │ │ └── camera_intrinsic.json │ │ ├── eeprom_replace_config.json │ │ ├── intrinsic_config.json │ │ ├── intrinsic_coordinates.json │ │ ├── ld_config.json │ │ ├── ssh_config.json │ │ └── sweep_config.json │ ├── core │ │ ├── __init__.py │ │ ├── frame.py │ │ ├── metrics_calculator.py │ │ ├── publish_results.py │ │ ├── rail.py │ │ ├── rail2.py │ │ └── report_generator.py │ ├── eeprom_replace_cal.py │ ├── environment.yml │ ├── example.py │ ├── find_pc.py │ ├── logger.json │ ├── pc_config_far.json │ ├── pc_config_mid.json │ ├── pc_config_near.json │ ├── run_pipeline.py │ ├── tests │ │ ├── conftest.py │ │ ├── test_calib.py │ │ └── test_ld.py │ └── tof_calib │ │ ├── device.py │ │ ├── gen_delays.py │ │ ├── intrinsic_calibration.py │ │ ├── regwrite_generator.py │ │ ├── run_calibration.py │ │ ├── run_intrinsics.py │ │ ├── run_pulse_sweep.py │ │ ├── save_results.py │ │ ├── sweep_calibration.py │ │ └── write_to_lf_file.py ├── deps │ └── wingetopt │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── src │ │ ├── getopt.c │ │ └── getopt.h ├── eeprom-tool │ ├── CMakeLists.txt │ ├── cam96tof1_eeprom.cpp │ ├── cam96tof1_eeprom.h │ ├── camera_eeprom_factory.cpp │ ├── camera_eeprom_factory.h │ ├── camera_eeprom_interface.h │ ├── cli_helper.cpp │ ├── cli_helper.h │ ├── eeprom_map.h │ ├── eeprom_tool.cpp │ ├── eeprom_tool.h │ ├── main.cpp │ └── tester.py ├── readme.md └── test-fxtof1 │ ├── CMakeLists.txt │ ├── aditof_opencv.h │ ├── cvui.h │ ├── main.cpp │ └── readme.md └── utils ├── dragonboard ├── 53-aditofsdkdragonboard.rules ├── config_pipe.service ├── config_pipe.sh └── readme.md ├── jetson ├── 53-aditofsdkjetson.rules └── readme.md ├── raspberrypi ├── 53-aditofsdkraspberrypi.rules ├── readme.md └── tof-server.service └── xavier ├── 53-aditofsdkxavier.rules └── readme.md /.clangformatignore: -------------------------------------------------------------------------------- 1 | bindings/python/pybind11 2 | misc/nvidia 3 | tools/deps/wingetopt/src 4 | examples/aditof-test/cvui.h 5 | examples/deps 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | sdk/include/aditof/version.h 4 | 5 | *.temp/ 6 | .vscode* 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2019, Analog Devices, Inc. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(apps) 3 | 4 | if (DRAGONBOARD) 5 | if (WITH_NETWORK) 6 | add_subdirectory(server) 7 | endif() 8 | add_subdirectory(uvc-app) 9 | add_subdirectory(daemon) 10 | endif() 11 | 12 | if (RASPBERRYPI) 13 | if (WITH_NETWORK) 14 | add_subdirectory(server) 15 | endif() 16 | endif() 17 | 18 | if (JETSON) 19 | if (WITH_NETWORK) 20 | add_definitions(-DJETSON) 21 | add_subdirectory(server) 22 | endif() 23 | endif() 24 | -------------------------------------------------------------------------------- /apps/daemon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(aditof-daemon C) 3 | 4 | add_executable(${PROJECT_NAME} main.c gpios.c leds.c) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "aditof-daemon") 7 | -------------------------------------------------------------------------------- /apps/daemon/readme.md: -------------------------------------------------------------------------------- 1 | # Tof daemon 2 | 3 | For the target to be discoverable on the USB bus of a PC host, a certain program (uvc-gadget) needs to be run on the target. This daemon allows for the uvc-gadget to be started with a push of a button on the Time of Flight board. 4 | This is done by monitoring the activity of a user hardware button on the Time of Flight mezzanine board through a GPIO driver. When the button gets pushed the daemon starts the uvc-gadget application and turns on a LED on the mezzanine. The uvc-gadget is terminated and the LED is turned off on the second push of the button. 5 | The daemon is written to be run on the Dragonboard only. 6 | 7 | To make the daemon automatically start on boot: 8 | 9 | 1. copy the service file to systemd 10 | ``` 11 | sudo cp tof-programming.service /etc/systemd/system/ 12 | ``` 13 | 2. run: 14 | ``` 15 | sudo systemctl enable tof-programming 16 | ``` 17 | 18 | If you don't want to wait until you reboot the board so the changes take effect, you can start the service right away: 19 | 1. run: 20 | ``` 21 | sudo systemctl start tof-programming 22 | ``` 23 | -------------------------------------------------------------------------------- /apps/daemon/tof-programming.service: -------------------------------------------------------------------------------- 1 | description=Time of flight board programming service 2 | StartLimitIntervalSec=10 3 | 4 | [Unit] 5 | After=config-pipe.service 6 | 7 | [Service] 8 | Type=forking 9 | Restart=always 10 | RestartSec=5 11 | User=root 12 | ExecStart=/home/linaro/workspace/github/aditof_sdk/build/apps/daemon/aditof-daemon 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /apps/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Apps 2 | 3 | This directory contains different apps that are shipped with the SDK. 4 | 5 | #### List of Examples 6 | 7 | | Name | Language | Description | 8 | | --------- | ----------- | -------------- | 9 | | daemon | C | A daemon application that is used to start the uvc-gadget from a button on the Dragonboard | 10 | | server | C++ | Network server for communication to a host machine | 11 | | uvc-app | C++ | Application that exposes the ToF system as a depth camera on USB | 12 | -------------------------------------------------------------------------------- /apps/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(aditof-server) 3 | 4 | find_package(Protobuf 3.9.0 REQUIRED) 5 | find_package(Libwebsockets REQUIRED) 6 | 7 | protobuf_generate_cpp(PROTO_SRCS PROTO_HRDS buffer.proto) 8 | 9 | get_filename_component(GENERATED_PROTO_FILES_DIR ${PROTO_HRDS} DIRECTORY) 10 | 11 | add_executable(${PROJECT_NAME} server.cpp ${PROTO_SRCS} ${PROTO_HDRS}) 12 | 13 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${Protobuf_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES}) 14 | 15 | target_include_directories(${PROJECT_NAME} PRIVATE ${Protobuf_INCLUDE_DIRS} ${GENERATED_PROTO_FILES_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS}) 16 | 17 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 18 | -------------------------------------------------------------------------------- /apps/server/README.md: -------------------------------------------------------------------------------- 1 | ## Network server 2 | 3 | With the help of this server, a remote client can have access over the network to the API of the ADI Time of Flight sensor. The server needs to run on the target where the sensor is installed. 4 | 5 | Limitations: 6 | - Only one client can be connected to the server at a time. 7 | - DragonBoard410c 8 | - For now, the aditof_sdk/examples/aditof-demo/config_pipe.sh needs to be ran before running the server (no need to run each time you re-run the server, unless you have rebooted the system). 9 | - Server can't work properly if at the same time the uvc-gadget is started and engaged with a client over USB. 10 | 11 | ## How to use 12 | 13 | To start the server on the target run the following command: 14 | 15 | ./aditof-server 16 | 17 | ## Troubleshooting 18 | 19 | ### Port error: 20 | 21 | `[2021/07/29 01:23:08:8024] NOTICE: Creating Vhost 'default' port 5000, 1 protocols, IPv6 off` 22 | 23 | `[2021/07/29 01:23:08:8027] ERR: ERROR on binding fd 6 to port 5000 (-1 98)` 24 | 25 | `[2021/07/29 01:23:08:8028] ERR: init server failed` 26 | 27 | `[2021/07/29 01:23:08:8029] ERR: Failed to create default vhost` 28 | 29 | If this error occurs please modify the port value from the following locations: 30 | * apps/server/server.cpp 31 | * sdk/src/connections/network/network.cpp 32 | -------------------------------------------------------------------------------- /apps/uvc-app/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | uvc-gadget 3 | .vscode 4 | -------------------------------------------------------------------------------- /apps/uvc-app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(uvc-gadget) 3 | 4 | add_executable(${PROJECT_NAME} uvc-gadget.cpp) 5 | 6 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof) 7 | 8 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 9 | 10 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_pipe.sh 11 | ${CMAKE_CURRENT_BINARY_DIR}/config_pipe.sh 12 | COPYONLY) 13 | -------------------------------------------------------------------------------- /apps/uvc-app/Makefile: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE ?= 2 | ARCH ?= x86 3 | KERNEL_DIR ?= /usr/src/linux 4 | 5 | CC := $(CROSS_COMPILE)gcc 6 | KERNEL_INCLUDE := -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/arch/$(ARCH)/include 7 | CFLAGS := -W -Wall -g $(KERNEL_INCLUDE) 8 | LDFLAGS := -g 9 | 10 | all: uvc-gadget 11 | 12 | uvc-gadget: uvc-gadget.o temp_sensor.o eeprom.o 13 | $(CC) $(LDFLAGS) -o $@ $^ 14 | 15 | clean: 16 | rm -f *.o 17 | rm -f uvc-gadget 18 | -------------------------------------------------------------------------------- /apps/uvc-app/config_pipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set +x 3 | 4 | sudo rmmod g_webcam 5 | 6 | sudo media-ctl -v -d /dev/media1 -l '"msm_csiphy1":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]' 7 | sudo media-ctl -v -d /dev/media1 -V '"addi903x 1-0064":0[fmt:SBGGR12/640x960 field:none],"msm_csiphy1":0[fmt:SBGGR12/640x960 field:none],"msm_csid0":0[fmt:SBGGR12/640x960 field:none],"msm_ispif0":0[fmt:SBGGR12/640x960 field:none],"msm_vfe0_rdi0":0[fmt:SBGGR12/640x960 field:none]' 8 | 9 | sudo modprobe g_webcam streaming_maxpacket=2048 10 | 11 | BASEDIR=$(dirname $0) 12 | 13 | sudo $BASEDIR/uvc-gadget -r 2 -o 1 -a -n 4 14 | -------------------------------------------------------------------------------- /apps/uvc-app/doc/Readme.md: -------------------------------------------------------------------------------- 1 | ## Documentation 2 | 3 | - [linux/Documentation/usb/gadget-testing.txt](https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget-testing.txt) 4 | 5 | - [linux/Documentation/usb/gadget_configfs.txt](https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt) 6 | 7 | - [configfs_start](http://www.spinics.net/lists/linux-usb/msg76388.html) 8 | 9 | - [usb gadget](https://github.com/torvalds/linux/tree/master/Documentation/usb) 10 | 11 | - [configfs](https://github.com/torvalds/linux/tree/master/Documentation/filesystems/configfs) -------------------------------------------------------------------------------- /bindings/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditofadapter) 4 | 5 | include(../../cmake/FindMatlabWithImageAcquisitionToolbox.cmake) 6 | 7 | file(GLOB SOURCES 8 | ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp 9 | ) 10 | 11 | add_library(${PROJECT_NAME} SHARED 12 | ${SOURCES} 13 | ) 14 | 15 | if (CMAKE_COMPILER_IS_GNUCC) 16 | target_compile_options(${PROJECT_NAME} PUBLIC 17 | -Wall 18 | -Wno-unknown-pragmas 19 | -Werror=return-type 20 | -Werror=uninitialized 21 | -Werror=init-self 22 | ) 23 | endif() 24 | 25 | if (MSVC) 26 | target_compile_options(${PROJECT_NAME} PUBLIC 27 | /EHs # enable c++ exceptions, yes with extern C functions 28 | /MD # multi-threaded DLL 29 | /GS # disable security checks 30 | /GR # enable run-time type information 31 | ) 32 | endif() 33 | 34 | # Make sure we have no prefix for our output name 35 | set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") 36 | 37 | target_include_directories(${PROJECT_NAME} 38 | PRIVATE 39 | ${Matlab_MWIMAQMEX_INCLUDES} 40 | ${CMAKE_CURRENT_SOURCE_DIR} 41 | ) 42 | 43 | target_link_libraries(${PROJECT_NAME} 44 | PRIVATE 45 | aditof 46 | $<$>:${Matlab_MX_LIBRARY}> # MX lib only needed on Linux/MacOS 47 | ${Matlab_MWIMAQMEX_LIBRARY} 48 | ) 49 | -------------------------------------------------------------------------------- /bindings/open3D/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Open3D bindings 2 | 3 | ### Overview 4 | The SDK provides bindings for Open3D through the helper methods defined in aditof_open3d.h, which provide a way to convert from the `aditof::Frame` data structure to `open3d::geometry::Image`. 5 | 6 | ### Instalation 7 | If you build open3D from source, make sure to enable option `GLIBCXX_USE_CXX11_ABI` when running cmake. 8 | For example: 9 | ``` 10 | cmake -DGLIBCXX_USE_CXX11_ABI=ON 11 | ``` 12 | 13 | To install open3D go to: [Open3D](http://www.open3d.org/docs/release/compilation.html) 14 | 15 | When building the aditof project specify the cmake option -DWITH_OPEN3D=ON. 16 | Add the path to the Open3D installation folder in the cmake variable -DCMAKE_PREFIX_PATH=. 17 | 18 | #### Directory Structure 19 | 20 | | Directory/File | Description | 21 | | --------- | ----------- | 22 | | aditof_opencv.h | Contains the helper methods to convert from aditof::Frame to open3d::geometry::Image | 23 | | showPointCloud | Contains a basic example that displays a pointcloud build with data from aditof| 24 | | CMakeLists.txt | Rules to build the bindings and the examples | 25 | -------------------------------------------------------------------------------- /bindings/open3D/showPointCloud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditof-open3d-showPointCloud) 4 | 5 | message(STATUS "Open3D ${Open3D_VERSION}") 6 | 7 | # link_directories must be before add_executable 8 | link_directories(${Open3D_LIBRARY_DIRS}) 9 | 10 | add_executable(${PROJECT_NAME} main.cpp) 11 | 12 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 13 | 14 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${Open3D_LIBRARIES}) 15 | 16 | target_include_directories(${PROJECT_NAME} PUBLIC ${Open3D_INCLUDE_DIRS}) 17 | -------------------------------------------------------------------------------- /bindings/opencv/dnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditof-opencv-dnn) 4 | 5 | # Download MobileNetSSD_deploy prototxt and caffemodel 6 | set(PROTOTEXT_FILE "MobileNetSSD_deploy.prototxt") 7 | set(PROTOTEXT_URL "https://raw.githubusercontent.com/chuanqi305/MobileNet-SSD/f5d072ccc7e3dcddaa830e9805da4bf1000b2836/MobileNetSSD_deploy.prototxt") 8 | set(PROTOTEXT_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROTOTEXT_FILE}") 9 | 10 | set(MODEL_FILE "MobileNetSSD_deploy.caffemodel") 11 | set(MODEL_URL "https://drive.google.com/uc?export=download&id=0B3gersZ2cHIxRm5PMWRoTkdHdHc") 12 | set(MODEL_PATH "${CMAKE_CURRENT_BINARY_DIR}/${MODEL_FILE}") 13 | 14 | 15 | if(NOT EXISTS "${PROTOTEXT_PATH}") 16 | message("Downloading ${PROTOTEXT_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 17 | file(DOWNLOAD "${PROTOTEXT_URL}" "${PROTOTEXT_PATH}") 18 | endif() 19 | 20 | if(NOT EXISTS "${MODEL_PATH}") 21 | message("Downloading ${MODEL_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 22 | file(DOWNLOAD "${MODEL_URL}" "${MODEL_PATH}") 23 | endif() 24 | 25 | add_definitions( -DPROTOTXT="${PROTOTEXT_PATH}" ) 26 | add_definitions( -DMODEL="${MODEL_PATH}" ) 27 | 28 | add_executable(${PROJECT_NAME} main.cpp) 29 | 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 31 | 32 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 33 | -------------------------------------------------------------------------------- /bindings/opencv/dnn/readme.md: -------------------------------------------------------------------------------- 1 | # DNN example 2 | 3 | ### Overview 4 | This example demonstrates object detection on the combination between depth and ir frames using the [SSD Mobilenet object detection example from OpenCV](https://github.com/opencv/opencv/blob/3.4.0/samples/dnn/ssd_mobilenet_object_detection.cpp) and the Aditof SDK. 5 | 6 | ![Display Image](https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/img/dnn.png) 7 | -------------------------------------------------------------------------------- /bindings/opencv/imshow/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditof-opencv-imshow) 4 | 5 | add_executable(${PROJECT_NAME} main.cpp) 6 | 7 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 8 | 9 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 10 | -------------------------------------------------------------------------------- /bindings/opencv/imshow/readme.md: -------------------------------------------------------------------------------- 1 | # Imshow example 2 | 3 | ### Overview 4 | This example demonstrates how to capture data from the TOF system and display it using OpenCV 5 | 6 | ![Display Image](https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/img/imshow.png) 7 | 8 | The following code snippet is used to convert the `aditof::Frame` into a `cv::Mat` containing the depth information 9 | ```cpp 10 | /* Convert from frame to depth mat */ 11 | cv::Mat mat; 12 | status = fromFrameToDepthMat(frame, mat); 13 | if (status != Status::OK) { 14 | LOG(ERROR) << "Could not convert from frame to mat!"; 15 | return 0; 16 | } 17 | ``` 18 | The IR information can be stored in a Mat by using the `fromFrameToIrMat` function instead of `fromFrameToDepthMat` 19 | -------------------------------------------------------------------------------- /bindings/opencv/maskrcnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditof-opencv-maskrcnn) 4 | 5 | if (RASPBERRYPI) 6 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") 7 | endif() 8 | 9 | add_executable(${PROJECT_NAME} main.cpp) 10 | 11 | file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mscoco_labels.names 12 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 13 | 14 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 15 | 16 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 17 | -------------------------------------------------------------------------------- /bindings/opencv/maskrcnn/mscoco_labels.names: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorcycle 5 | airplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | 13 | stop sign 14 | parking meter 15 | bench 16 | bird 17 | cat 18 | dog 19 | horse 20 | sheep 21 | cow 22 | elephant 23 | bear 24 | zebra 25 | giraffe 26 | 27 | backpack 28 | umbrella 29 | 30 | 31 | handbag 32 | tie 33 | suitcase 34 | frisbee 35 | skis 36 | snowboard 37 | sports ball 38 | kite 39 | baseball bat 40 | baseball glove 41 | skateboard 42 | surfboard 43 | tennis racket 44 | bottle 45 | 46 | wine glass 47 | cup 48 | fork 49 | knife 50 | spoon 51 | bowl 52 | banana 53 | apple 54 | sandwich 55 | orange 56 | broccoli 57 | carrot 58 | hot dog 59 | pizza 60 | donut 61 | cake 62 | chair 63 | couch 64 | potted plant 65 | bed 66 | 67 | dining table 68 | 69 | 70 | toilet 71 | 72 | tv 73 | laptop 74 | mouse 75 | remote 76 | keyboard 77 | cell phone 78 | microwave 79 | oven 80 | toaster 81 | sink 82 | refrigerator 83 | 84 | book 85 | clock 86 | vase 87 | scissors 88 | teddy bear 89 | hair drier 90 | toothbrush 91 | -------------------------------------------------------------------------------- /bindings/opencv/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : OpenCV bindings 2 | 3 | ### Overview 4 | The SDK provides bindings for OpenCV through the helper methods defined in aditof_opencv.h, which provide a way to convert from the `aditof::Frame` data structure to `cv::Mat`. 5 | 6 | ### OpenCV supported version 7 | For the dnn example, the minimum opencv version required is `3.4.1`. Other examples will work with older versions. 8 | 9 | #### Directory Structure 10 | 11 | | Directory/File | Description | 12 | | --------- | ----------- | 13 | | aditof_opencv.h | Contains the helper methods to convert from aditof::Frame to cv::Mat | 14 | | dnn | Contains a simple object detection example | 15 | | imshow | Contains a basic example that displays data provided by the Aditof SDK | 16 | | CMakeLists.txt | Rules to build the bindings and the examples | 17 | -------------------------------------------------------------------------------- /bindings/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | find_package(pybind11 REQUIRED PATHS ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 4 | 5 | include_directories(../../sdk/includes) 6 | 7 | pybind11_add_module(aditofpython aditofpython.cpp) 8 | 9 | target_link_libraries(aditofpython PRIVATE aditof) 10 | 11 | get_target_property(target_prefix aditofpython PREFIX) 12 | get_target_property(target_suffix aditofpython SUFFIX) 13 | set(TARGET_OUTPUT_NAME "${target_prefix}aditofpython${target_suffix}") 14 | 15 | add_subdirectory(examples/dnn) 16 | 17 | configure_file( 18 | ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/setup.py.cmakein 19 | ${CMAKE_CURRENT_BINARY_DIR}/setup.py 20 | ) 21 | 22 | install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${CMAKE_INSTALL_PREFIX})") 23 | -------------------------------------------------------------------------------- /bindings/python/cmake/pybind11ConfigVersion.cmake: -------------------------------------------------------------------------------- 1 | # This is a basic version file for the Config-mode of find_package(). 2 | # It is used by write_basic_package_version_file() as input file for configure_file() 3 | # to create a version-file which can be installed along a config.cmake file. 4 | # 5 | # The created file sets PACKAGE_VERSION_EXACT if the current version string and 6 | # the requested version string are exactly the same and it sets 7 | # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. 8 | # The variable CVF_VERSION must be set before calling configure_file(). 9 | 10 | set(PACKAGE_VERSION "2.2.4") 11 | 12 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 13 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 14 | else() 15 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 16 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 17 | set(PACKAGE_VERSION_EXACT TRUE) 18 | endif() 19 | endif() 20 | 21 | # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: 22 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "" STREQUAL "") 23 | return() 24 | endif() 25 | 26 | # check that the installed version has the same 32/64bit-ness as the one which is currently searching: 27 | if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "") 28 | math(EXPR installedBits " * 8") 29 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") 30 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 31 | endif() 32 | -------------------------------------------------------------------------------- /bindings/python/examples/dnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(aditof-python-dnn) 4 | 5 | # Download MobileNetSSD_deploy prototxt and caffemodel 6 | set(PROTOTEXT_FILE "MobileNetSSD_deploy.prototxt") 7 | set(PROTOTEXT_URL "https://raw.githubusercontent.com/djmv/MobilNet_SSD_opencv/master/MobileNetSSD_deploy.prototxt") 8 | set(PROTOTEXT_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROTOTEXT_FILE}") 9 | 10 | set(MODEL_FILE "MobileNetSSD_deploy.caffemodel") 11 | set(MODEL_URL "https://raw.githubusercontent.com/djmv/MobilNet_SSD_opencv/master/MobileNetSSD_deploy.caffemodel") 12 | set(MODEL_PATH "${CMAKE_CURRENT_BINARY_DIR}/${MODEL_FILE}") 13 | 14 | if(NOT EXISTS "${PROTOTEXT_PATH}") 15 | message("Downloading ${PROTOTEXT_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 16 | file(DOWNLOAD "${PROTOTEXT_URL}" "${PROTOTEXT_PATH}") 17 | endif() 18 | 19 | if(NOT EXISTS "${MODEL_PATH}") 20 | message("Downloading ${MODEL_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 21 | file(DOWNLOAD "${MODEL_URL}" "${MODEL_PATH}") 22 | endif() 23 | -------------------------------------------------------------------------------- /bindings/python/examples/dnn/install_deps_3d_smart_cam.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Installing deps..." 4 | 5 | sudo apt install python3-pip 6 | sudo pip3 install --upgrade pip 7 | sudo sudo pip3 install opencv-contrib-python 8 | 9 | echo "Building SDK with Python bindings" 10 | 11 | cd ~/Workspace/aditof_sdk/bindings/python/examples/dnn 12 | cmake . 13 | 14 | echo "Copying files to desktop" 15 | cp ~/Workspace/aditof_sdk/bindings/python/examples/dnn/MobileNetSSD_deploy.prototxt ~/Desktop 16 | cp ~/Workspace/aditof_sdk/bindings/python/examples/dnn/MobileNetSSD_deploy.caffemodel ~/Desktop 17 | cp ~/Workspace/aditof_sdk/bindings/python/examples/dnn/dnn.py ~/Desktop 18 | -------------------------------------------------------------------------------- /bindings/python/examples/dnn/readme.md: -------------------------------------------------------------------------------- 1 | # DNN Example 2 | 3 | ### Overview 4 | This example demonstrates object detection on a combination between the depth frame and the IR frame using the SSD Mobilenet object detection example from OpenCV and the Aditof SDK. It also shows how to compute and display the IR frame. 5 | 6 | It works with model taken from [MobileNet-SSD](https://github.com/chuanqi305/MobileNet-SSD/). 7 | Building the project with CMake will download prototxt and caffemodel, used for object detection. 8 | 9 | After building the python bindings, the two necessary files for this script will be found in the build/bindings/python/examples/dnn/ directory. 10 | 11 | For running the python program use: 12 | ```console 13 | python dnn.py --prototxt \pathTo\MobileNetSSD_deploy.prototxt --weights \pathTo\MobileNetSSD_deploy.caffemodel 14 | ``` 15 | 16 | ![Display Image](https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/img/dnn_python.PNG) 17 | -------------------------------------------------------------------------------- /bindings/python/examples/first_frame/readme.md: -------------------------------------------------------------------------------- 1 | # First frame Example 2 | 3 | ### Overview 4 | This example shows how to capture a frame using the SDK and Python. 5 | 6 | NumPy library is needed for scientific computations. 7 | If NumPy library is not found you should install it using pip (a package manager for Python) 8 | 9 | ```python 10 | pip install numpy 11 | ``` 12 | 13 | For creating the system object 14 | ```python 15 | system = tof.System() 16 | ``` 17 | 18 | Getting a camera from the system, configuring the mode and the frame type and initializing it 19 | ```python 20 | cameras = [] 21 | status = system.getCameraList(cameras) 22 | print("system.getCameraList()", status) 23 | 24 | camera1 = cameras[0] 25 | 26 | modes = [] 27 | status = camera1.getAvailableModes(modes) 28 | print("system.getAvailableModes()", status) 29 | print(modes) 30 | 31 | types = [] 32 | status = camera1.getAvailableFrameTypes(types) 33 | print("system.getAvailableFrameTypes()", status) 34 | print(types) 35 | 36 | status = camera1.initialize() 37 | print("camera1.initialize()", status) 38 | 39 | camDetails = tof.CameraDetails() 40 | status = camera1.getDetails(camDetails) 41 | print("system.getDetails()", status) 42 | print("camera1 details:", "id:", camDetails.cameraId, "connection:", camDetails.connection) 43 | 44 | status = camera1.setFrameType(types[0]) 45 | print("camera1.setFrameType()", status) 46 | 47 | status = camera1.setMode(modes[0]) 48 | print("camera1.setMode()", status) 49 | ``` 50 | 51 | Getting a frame from the camera 52 | ```python 53 | frame = tof.Frame() 54 | status = camera1.requestFrame(frame) 55 | print("camera1.requestFrame()", status) 56 | ``` 57 | -------------------------------------------------------------------------------- /bindings/python/examples/first_frame_network/readme.md: -------------------------------------------------------------------------------- 1 | # First-frame-network python example 2 | 3 | ##Overview 4 | 5 | This is a python binding of the C++ first-frame-network example. It uses client-server communication for retrieving the first frame captured by a remote ToF camera. 6 | 7 | The main difference from first-frame example is the use of the function "system.getCameraListAtIp(cameras, ip)" which needs an ip address in order to connect with the camera. 8 | 9 | This ip address is passed as an argument for the script. For example, if the address of the target camera is `10.42.0.161`, then the script must be called like this: 10 | `python3 first_frame_network.py 10.42.0.161`. 11 | -------------------------------------------------------------------------------- /bindings/python/examples/low_level_example/readme.md: -------------------------------------------------------------------------------- 1 | # Low level API Example 2 | 3 | ### Overview 4 | This example shows how to get access to the low-level API of the camera. 5 | 6 | NumPy library is needed for scientific computations. 7 | If NumPy library is not found you should install it using pip (a package manager for Python) 8 | 9 | ```python 10 | pip install numpy 11 | ``` 12 | -------------------------------------------------------------------------------- /bindings/python/examples/maskr_cnn/object_detection_classes_coco.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorcycle 5 | airplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | street sign 13 | stop sign 14 | parking meter 15 | bench 16 | bird 17 | cat 18 | dog 19 | horse 20 | sheep 21 | cow 22 | elephant 23 | bear 24 | zebra 25 | giraffe 26 | hat 27 | backpack 28 | umbrella 29 | shoe 30 | eye glasses 31 | handbag 32 | tie 33 | suitcase 34 | frisbee 35 | skis 36 | snowboard 37 | sports ball 38 | kite 39 | baseball bat 40 | baseball glove 41 | skateboard 42 | surfboard 43 | tennis racket 44 | bottle 45 | plate 46 | wine glass 47 | cup 48 | fork 49 | knife 50 | spoon 51 | bowl 52 | banana 53 | apple 54 | sandwich 55 | orange 56 | broccoli 57 | carrot 58 | hot dog 59 | pizza 60 | donut 61 | cake 62 | chair 63 | couch 64 | potted plant 65 | bed 66 | mirror 67 | dining table 68 | window 69 | desk 70 | toilet 71 | door 72 | tv 73 | laptop 74 | mouse 75 | remote 76 | keyboard 77 | cell phone 78 | microwave 79 | oven 80 | toaster 81 | sink 82 | refrigerator 83 | blender 84 | book 85 | clock 86 | vase 87 | scissors 88 | teddy bear 89 | hair drier 90 | toothbrush 91 | -------------------------------------------------------------------------------- /bindings/python/examples/maskr_cnn/readme.md: -------------------------------------------------------------------------------- 1 | # MaskR-CNN Example 2 | 3 | ### Overview 4 | This example demonstrates object detection on a combination between the depth frame and the IR frame using the MaskR-CNN object detection example from OpenCV and the adiTOF SDK. 5 | 6 | This example needs access to 3 configuration files: COCO object class LABELS and two TENSORFLOW model configuration files, based on COCO datase. 7 | 8 | We tested the example using the following cofiguration files: **object_detection_classes_coco.txt**, **frozen_inference_graph.pb and mask_rcnn_inception_v2_coco_2018_01_28.pbtxt**. 9 | 10 | To get TENSORFLOW model configuration files (**frozen_inference_graph.pb and mask_rcnn_inception_v2_coco_2018_01_28.pbtxt**) choose between the following two methods: 11 | * use the following script: 12 | (**https://github.com/opencv/opencv_extra/blob/master/testdata/dnn/download_models.py**). 13 | * download one of the archives from the link below and get the *.pb* and *.pbtxt* files from that archive. 14 | (**https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md**) 15 | 16 | For running the python program use: 17 | ```console 18 | python maskr_cnn.py --model local_path\aditof_sdk\bindings\python\examples\maskr_cnn\frozen_inference_graph.pb --config local_path\aditof_sdk\bindings\python\examples\maskr_cnn\mask_rcnn_inception_v2_coco_2018_01_28.pbtxt --classes local_path\aditof_sdk\bindings\python\examples\maskr_cnn\object_detection_classes_coco.txt 19 | ``` 20 | 21 | ![Display Image](/doc/img/maskrcnn_python.png) 22 | -------------------------------------------------------------------------------- /bindings/python/examples/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Python examples 2 | 3 | ### Overview 4 | The examples in this directory provide sample Python applications to demonstrate how 3D TOF camera can be used. 5 | 6 | 7 | #### Directory Structure 8 | 9 | | Directory/File | Description | 10 | | --------- | ----------- | 11 | | first_frame | Python example to capture a frame | 12 | | dnn | Simple object detection example in Python | 13 | | low_level_example | Simple Python example of using low level API (Depth sensor, eeprom, temperature sensor | 14 | | showPointCloud | Simple Python example of using Open3D to create and show a pointcloud from aditof frames | 15 | -------------------------------------------------------------------------------- /bindings/python/pybind11/common.h: -------------------------------------------------------------------------------- 1 | #include "detail/common.h" 2 | #warning "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'." 3 | -------------------------------------------------------------------------------- /bindings/python/pybind11/detail/typeid.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/detail/typeid.h: Compiler-independent access to type identifiers 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #if defined(__GNUG__) 16 | #include 17 | #endif 18 | 19 | #include "common.h" 20 | 21 | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 22 | PYBIND11_NAMESPACE_BEGIN(detail) 23 | /// Erase all occurrences of a substring 24 | inline void erase_all(std::string &string, const std::string &search) { 25 | for (size_t pos = 0;;) { 26 | pos = string.find(search, pos); 27 | if (pos == std::string::npos) break; 28 | string.erase(pos, search.length()); 29 | } 30 | } 31 | 32 | PYBIND11_NOINLINE void clean_type_id(std::string &name) { 33 | #if defined(__GNUG__) 34 | int status = 0; 35 | std::unique_ptr res { 36 | abi::__cxa_demangle(name.c_str(), nullptr, nullptr, &status), std::free }; 37 | if (status == 0) 38 | name = res.get(); 39 | #else 40 | detail::erase_all(name, "class "); 41 | detail::erase_all(name, "struct "); 42 | detail::erase_all(name, "enum "); 43 | #endif 44 | detail::erase_all(name, "pybind11::"); 45 | } 46 | PYBIND11_NAMESPACE_END(detail) 47 | 48 | /// Return a string representation of a C++ type 49 | template static std::string type_id() { 50 | std::string name(typeid(T).name()); 51 | detail::clean_type_id(name); 52 | return name; 53 | } 54 | 55 | PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE) 56 | -------------------------------------------------------------------------------- /bindings/python/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Python bindings 2 | 3 | ### Overview 4 | The SDK provides bindings for Python using [pybind11](https://github.com/pybind/pybind11). 5 | 6 | ### Generating the library 7 | To generate the python library the following steps must be done: 8 | * build the sdk depending on your platform: https://github.com/analogdevicesinc/aditof_sdk#supported-host-platforms 9 | * go to the build folder and set the WITH_PYTHON flag to on: 10 | ##### LINUX 11 | ``` 12 | cmake -DWITH_PYTHON=on .. 13 | make -j4 14 | ``` 15 | 16 | ##### WINDOWS 17 | ``` 18 | cmake -DWITH_PYTHON=on .. 19 | cmake --build . --config Release (or Debug depending on the configuration) -j 4 20 | ``` 21 | 22 | * the aditof-python dll/so will be generated in build/bindings/python. You must copy the library next to the script 23 | that you want to use. 24 | 25 | ### Import the library in a script 26 | To use the bindings for a Python project, just import the library: 27 | ```python 28 | import aditofpython as tof 29 | ``` 30 | 31 | #### Directory Structure 32 | 33 | | Directory/File | Description | 34 | | --------- | ----------- | 35 | | cmake | Contains the cmake files to find pybind11 | 36 | | pybind11 | Pybind11 header only library | 37 | | CMakeLists.txt | Rules to build the Python bindings | 38 | | examples | Python examples | 39 | -------------------------------------------------------------------------------- /bindings/ros/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | 3 | if(UNIX) 4 | 5 | # set variables 6 | set(CATKIN_WS "${CMAKE_BINARY_DIR}/catkin_ws") 7 | set(ROS_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 8 | 9 | # create and run ROS setup script 10 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ros_setup.bash 11 | ${CMAKE_BINARY_DIR}/tmp/ros_setup.bash) 12 | file( 13 | COPY ${CMAKE_BINARY_DIR}/tmp/ros_setup.bash 14 | DESTINATION ${CMAKE_BINARY_DIR} 15 | FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) 16 | 17 | add_custom_target(aditof_ros_package) 18 | string(CONCAT OLD_CMAKE_INSTALL_PREFIX "\"${CMAKE_INSTALL_PREFIX}\"") 19 | string(CONCAT OLD_CMAKE_PREFIX_PATH "\"${CMAKE_PREFIX_PATH}\"") 20 | add_custom_command( 21 | TARGET aditof_ros_package 22 | COMMAND ${CMAKE_BINARY_DIR}/ros_setup.bash "${OLD_CMAKE_INSTALL_PREFIX}" 23 | "${OLD_CMAKE_PREFIX_PATH}" ${VERSION} DEPENDS aditof) 24 | endif() 25 | -------------------------------------------------------------------------------- /bindings/ros/aditof_roscpp/cfg/Aditof_roscpp.cfg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | PACKAGE = "aditof_roscpp" 3 | 4 | from dynamic_reconfigure.parameter_generator_catkin import * 5 | 6 | gen = ParameterGenerator() 7 | 8 | near_var = gen.const("near", int_t, 0, "Near mode") 9 | med_var = gen.const("medium", int_t, 1, "Medium mode") 10 | far_var = gen.const("far", int_t, 2, "Far mode") 11 | 12 | reva_var = gen.const("RevA", int_t, 0, "RevA") 13 | revb_var = gen.const("RevB", int_t, 1, "RevB") 14 | revc_var = gen.const("RevC", int_t, 2, "RevC") 15 | 16 | mono16_var = gen.const("MONO16", int_t, 0, "MONO16") 17 | rgba8_var = gen.const("RGBA8", int_t, 1, "RGBA8") 18 | 19 | mode_enum = gen.enum([near_var, med_var, far_var], "Camera mode options") 20 | rev_enum = gen.enum([reva_var, revb_var, revc_var], "Camera revision options") 21 | format_enum = gen.enum([mono16_var, rgba8_var],"Depth data format options") 22 | 23 | group_tof = gen.add_group("Camera ToF", type="hide", state=True) 24 | 25 | group_tof.add("ir_gamma", double_t, 0, "IR gamma correction", 1, 0, 1) 26 | group_tof.add("mode", int_t, 0, "Camera mode", 1, 0, 2, 27 | edit_method=mode_enum) 28 | group1a = group_tof.add_group("Noise reduction", type="hide", state = True) 29 | group1a.add("threshold", int_t, 0, "Noise reduction threshold", 0, 0, 16383) 30 | group_tof.add("revision", int_t, 0, "Camera revision", 2, 0, 1, 31 | edit_method=rev_enum) 32 | group_tof.add("depth_data_format", int_t, 0, "Depth data format", 1, 0, 1, 33 | edit_method=format_enum) 34 | 35 | exit(gen.generate(PACKAGE, "aditof_roscpp", "Aditof_roscpp")) 36 | -------------------------------------------------------------------------------- /bindings/ros/aditof_roscpp/launch/camera_node.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /bindings/ros/aditof_roscpp/launch/rviz_publisher.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /bindings/ros/aditof_roscpp/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | aditof_roscpp 4 | 0.0.0 5 | The aditof_ros package 6 | 7 | Andreea Sandulescu 8 | 9 | BSD-3-Clause 10 | 11 | https://github.com/analogdevicesinc/aditof_sdk/ 12 | 13 | Andreea Sandulescu 14 | 15 | catkin 16 | 17 | sensor_msgs 18 | roscpp 19 | dynamic_reconfigure 20 | 21 | message_generation 22 | message_runtime 23 | 24 | 25 | -------------------------------------------------------------------------------- /bindings/ros/ros_setup.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DISTRO_CODENAME=$( (lsb_release -sc || . /etc/os-release; echo ${VERSION_CODENAME} ) 2>/dev/null) 4 | 5 | #determine ROS distribution 6 | if [ $DISTRO_CODENAME = "bionic" ] 7 | then 8 | ROS_DISTRO="melodic" 9 | 10 | elif [ $DISTRO_CODENAME = "focal" ] 11 | then 12 | ROS_DISTRO="noetic" 13 | 14 | elif [ $DISTRO_CODENAME = "buster" ] 15 | then 16 | ROS_DISTRO="melodic" 17 | fi 18 | 19 | 20 | mkdir -p ${CATKIN_WS}/src 21 | cd ${CATKIN_WS}/src 22 | ln -sf ${ROS_SRC_DIR}/aditof_roscpp/ . 23 | 24 | cd ${CATKIN_WS} 25 | source /opt/ros/$ROS_DISTRO/setup.sh 26 | 27 | #we have to save the old value of CMAKE_INSTALL_PREFIX in another variable 28 | #because after running the setup.sh script, the variable will be reassigned 29 | catkin_make -DADITOF_CMAKE_INSTALL_PREFIX=$1 -DADITOF_CMAKE_PREFIX_PATH=$2 30 | -------------------------------------------------------------------------------- /ci/azure/build_docker_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the given dockerfile with the given name 4 | 5 | . ci/azure/lib.sh 6 | 7 | mkdir -p temp_deps 8 | 9 | get_deps_source_code temp_deps 10 | 11 | dockername=$1 12 | dockerfilepath=$2 13 | 14 | docker build -t ${dockername} -f ${dockerfilepath} . 15 | 16 | rm -rf temp_deps 17 | -------------------------------------------------------------------------------- /ci/azure/dragonboard-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rycus86/arm64v8-debian-qemu 2 | 3 | RUN mkdir -p aditof-deps 4 | WORKDIR aditof-deps 5 | 6 | COPY ci/azure/lib.sh /aditof-deps 7 | COPY ci/azure/setup_docker.sh /aditof-deps 8 | ADD temp_deps/ /aditof-deps 9 | 10 | RUN apt update 11 | RUN apt install -y sudo 12 | 13 | RUN sudo apt install -y build-essential cmake python-dev python3-dev \ 14 | libssl-dev git libgl1-mesa-dev libglfw3-dev 15 | 16 | RUN chmod +x ./setup_docker.sh 17 | RUN ./setup_docker.sh 18 | -------------------------------------------------------------------------------- /ci/azure/inside_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | project_dir=$1 4 | pushd ${project_dir} 5 | 6 | sudo apt update 7 | sudo apt install -y libgl1-mesa-dev libglfw3-dev 8 | 9 | GLOG_INSTALL_DIR="/aditof-deps/installed/glog" 10 | PROTOBUF_INSTALL_DIR="/aditof-deps/installed/protobuf" 11 | WEBSOCKETS_INSTALL_DIR="/aditof-deps/installed/websockets" 12 | OPENCV_INSTALL_DIR="/aditof-deps/installed/opencv" 13 | NUM_JOBS=4 14 | ARGS="$2" 15 | 16 | mkdir -p build 17 | pushd build 18 | cmake .. ${ARGS} -DCMAKE_PREFIX_PATH="${GLOG_INSTALL_DIR};${PROTOBUF_INSTALL_DIR};${WEBSOCKETS_INSTALL_DIR};${OPENCV_INSTALL_DIR}" 19 | make -j${NUM_JOBS} 20 | popd #build 21 | 22 | popd # ${project_dir} 23 | -------------------------------------------------------------------------------- /ci/azure/nvidia-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvcr.io/nvidia/l4t-base:r32.4.3 2 | # LABEL io.balena.architecture="aarch64" 3 | 4 | # LABEL io.balena.qemu.version="5.2.0+balena-aarch64" 5 | # COPY qemu-aarch64-static /usr/bin 6 | 7 | RUN mkdir -p aditof-deps 8 | WORKDIR aditof-deps 9 | 10 | COPY ci/azure/lib.sh /aditof-deps 11 | COPY ci/azure/setup_docker.sh /aditof-deps 12 | ADD temp_deps/ /aditof-deps 13 | 14 | RUN apt update 15 | RUN apt install -y sudo 16 | 17 | RUN sudo apt install -y build-essential cmake python-dev python3-dev \ 18 | libssl-dev git libgl1-mesa-dev libglfw3-dev 19 | 20 | RUN chmod +x ./setup_docker.sh 21 | RUN ./setup_docker.sh 22 | -------------------------------------------------------------------------------- /ci/azure/raspberrypi3-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM balenalib/raspberrypi3:bullseye 2 | 3 | RUN mkdir -p aditof-deps 4 | WORKDIR aditof-deps 5 | 6 | COPY ci/azure/lib.sh /aditof-deps 7 | COPY ci/azure/setup_docker.sh /aditof-deps 8 | ADD temp_deps/ /aditof-deps 9 | 10 | RUN apt update 11 | RUN apt install -y sudo 12 | 13 | RUN sudo apt install -y build-essential cmake python-dev python3-dev \ 14 | libssl-dev git libgl1-mesa-dev libglfw3-dev 15 | 16 | RUN chmod +x ./setup_docker.sh 17 | RUN ./setup_docker.sh 18 | -------------------------------------------------------------------------------- /ci/azure/ros_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu ${TRAVIS_DIST} main" > /etc/apt/sources.list.d/ros-latest.list' 3 | sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 4 | if [[ "{$ROS_DISTRO}" = "melodic" ]] 5 | then 6 | sudo apt update -qq 7 | sudo apt install -y ros-$ROS_DISTRO-ros-base ros-$ROS_DISTRO-rviz python-rosdep 8 | else 9 | sudo apt-get update -qq 10 | sudo apt-get install -y ros-$ROS_DISTRO-ros-base ros-$ROS_DISTRO-rviz python-rosdep 11 | fi 12 | sudo rosdep init 13 | rosdep update 14 | -------------------------------------------------------------------------------- /ci/azure/setup_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script will install glog, libprotobuf and libwebsockets in an aditof-deps 4 | # folder inside a docker 5 | 6 | . lib.sh 7 | 8 | GLOG_INSTALL_DIR="$PWD/installed/glog" 9 | PROTOBUF_INSTALL_DIR="$PWD/installed/protobuf" 10 | WEBSOCKETS_INSTALL_DIR="$PWD/installed/websockets" 11 | OPENCV_INSTALL_DIR="$PWD/installed/opencv" 12 | 13 | if [[ "${OPENCV}" == "" ]]; then 14 | export OPENCV="3.4.1" 15 | fi 16 | 17 | build_and_install_opencv "opencv-${OPENCV}" ${OPENCV_INSTALL_DIR} 18 | build_and_install_glog "glog" ${GLOG_INSTALL_DIR} 19 | build_and_install_protobuf "protobuf" ${PROTOBUF_INSTALL_DIR} 20 | build_and_install_websockets "libwebsockets" ${WEBSOCKETS_INSTALL_DIR} 21 | -------------------------------------------------------------------------------- /ci/azure/setup_paths.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | #we need to export all those variables from a script because of pwd 6 | setup_absolute_paths() { 7 | export WORK_DIR=$(pwd) 8 | export BUILD_DIR="${WORK_DIR}/build" 9 | export DEPS_DIR="${BUILD_DIR}/deps" 10 | } 11 | 12 | setup_absolute_paths -------------------------------------------------------------------------------- /ci/azure/toybrick-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/debian 2 | 3 | RUN mkdir -p aditof-deps 4 | WORKDIR aditof-deps 5 | 6 | COPY ci/azure/lib.sh /aditof-deps 7 | COPY ci/azure/setup_docker.sh /aditof-deps 8 | ADD temp_deps/ /aditof-deps 9 | 10 | RUN apt update 11 | RUN apt install -y sudo 12 | 13 | RUN sudo apt install -y build-essential cmake python-dev python3-dev \ 14 | libssl-dev git libgl1-mesa-dev libglfw3-dev 15 | 16 | RUN chmod +x ./setup_docker.sh 17 | RUN ./setup_docker.sh 18 | -------------------------------------------------------------------------------- /cmake/FindMatlabWithImageAcquisitionToolbox.cmake: -------------------------------------------------------------------------------- 1 | # This cmake script will try to find Matlab using the find_package command 2 | # and also set some extra variables to point to the mwimaqmex lib and the 3 | # imaqadaptors kit include directory: 4 | # Matlab_MWIMAQMEX_INCLUDES and Matlab_MWIMAQMEX_LIBRARY 5 | 6 | find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY) 7 | 8 | # find_package is able to find the mx library and set Matlab_MX_LIBRARY to point at it, 9 | # but not the mwimaqmex lib. The only difference in the path is the name of the lib 10 | # so we just replace libmx with libmwimaqmex in Matlab_MX_LIBRARY. In this way we also 11 | # preserve the suffix (.so, .dll, .dylib) and the architecture (glnxa64, maci64 ... ) w/o 12 | # hardcoding anything 13 | 14 | if(WIN32) 15 | string(REPLACE "libmx" 16 | "imaqmex" Matlab_MWIMAQMEX_LIBRARY ${Matlab_MX_LIBRARY}) 17 | string(REPLACE "extern" 18 | "toolbox/imaq/imaqadaptors/kit" Matlab_MWIMAQMEX_LIBRARY ${Matlab_MWIMAQMEX_LIBRARY}) 19 | string(REPLACE "microsoft" 20 | "release" Matlab_MWIMAQMEX_LIBRARY ${Matlab_MWIMAQMEX_LIBRARY}) 21 | 22 | else() 23 | string(REPLACE "libmx" 24 | "libmwimaqmex" Matlab_MWIMAQMEX_LIBRARY ${Matlab_MX_LIBRARY}) 25 | endif() 26 | 27 | # There is no problem when hardcoding this include dir, because it stays the same on every 28 | # platform (Windows, Mac, Linux) 29 | set(Matlab_MWIMAQMEX_INCLUDES "${Matlab_ROOT_DIR}/toolbox/imaq/imaqadaptors/kit/include") 30 | -------------------------------------------------------------------------------- /cmake/aditof-config.cmake.in: -------------------------------------------------------------------------------- 1 | get_filename_component(aditof_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 2 | 3 | set(aditof_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS@") 4 | set(WITH_NETWORK "@WITH_NETWORK@") 5 | 6 | if (NOT glog_FOUND) 7 | find_package(glog 0.3.5 REQUIRED) 8 | endif() 9 | 10 | if (WITH_NETWORK) 11 | if (NOT Protobuf_FOUND) 12 | find_package(Protobuf 3.9.0 REQUIRED) 13 | endif() 14 | if (NOT Libwebsockets_FOUND) 15 | find_package(Libwebsockets REQUIRED) 16 | endif() 17 | endif() 18 | if (NOT TARGET aditof::aditof) 19 | include("${aditof_CMAKE_DIR}/aditof-targets.cmake") 20 | endif() 21 | 22 | set(aditof_LIBRARIES aditof::aditof) 23 | -------------------------------------------------------------------------------- /cmake/raspberrypi-revision-config.cmake: -------------------------------------------------------------------------------- 1 | if(WITH_REVB) 2 | add_definitions(-DREVB) 3 | endif() 4 | -------------------------------------------------------------------------------- /cmake/setup.py.cmakein: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from distutils.core import setup, Extension 3 | 4 | import sys 5 | if sys.version_info < (3,0): 6 | sys.exit('Minimum Python is 3.0') 7 | 8 | setup (name = 'aditofpython', 9 | version = '${VERSION}', 10 | author = "Analog Devices, Inc", 11 | description = "Python bindings for the 3D ToF SDK", 12 | packages = [ '' ], 13 | package_dir = { 14 | '': '${CMAKE_CURRENT_BINARY_DIR}' 15 | }, 16 | package_data = { 17 | '': ['${TARGET_OUTPUT_NAME}'] 18 | } 19 | ) 20 | -------------------------------------------------------------------------------- /cmake/udev-rules-install.cmake: -------------------------------------------------------------------------------- 1 | set(UDEV_RULES_PATH "/etc/udev/rules.d" CACHE STRING "Target directory for udev rules installation.") 2 | if(DRAGONBOARD) 3 | set(ADITOF_UDEV_RULES "${CMAKE_SOURCE_DIR}/utils/dragonboard/53-aditofsdkdragonboard.rules") 4 | elseif(RASPBERRYPI) 5 | set(ADITOF_UDEV_RULES "${CMAKE_SOURCE_DIR}/utils/raspberrypi/53-aditofsdkraspberrypi.rules") 6 | 7 | elseif(JETSON) 8 | set(ADITOF_UDEV_RULES "${CMAKE_SOURCE_DIR}/utils/jetson/53-aditofsdkjetson.rules") 9 | elseif(XAVIER) 10 | set(ADITOF_UDEV_RULES "${CMAKE_SOURCE_DIR}/utils/xavier/53-aditofsdkxavier.rules") 11 | 12 | endif() 13 | add_custom_target(install-udev-rules 14 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ADITOF_UDEV_RULES} ${UDEV_RULES_PATH} 15 | COMMAND udevadm control --reload-rules 16 | COMMAND udevadm trigger 17 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 18 | -------------------------------------------------------------------------------- /doc/3dsmartcam1/build_instructions.md: -------------------------------------------------------------------------------- 1 | # 3D Smart Camera Build Instructions 2 | 3 | 4 | ## Building the SDK only 5 | 6 | ### SDK dependencies 7 | To build the SDK and run the included applications and example code the following dependencies must be installed in the system: 8 | - v4l-utils 9 | - libopencv-dev 10 | - cmake 11 | - glog v0.3.5 12 | - libwebsockets v3.2.3 13 | - protocol buffers v3.9.0 14 | 15 | The camera's Linux image already contains all the SDK dependencies and there's no need to install them again. To update and build the SDK just follow the steps below. 16 | 17 | ```console 18 | analog@adi-smart-camera:~/Workspace/aditof_sdk$ git pull 19 | analog@adi-smart-camera:~/Workspace/aditof_sdk$ cd build 20 | analog@adi-smart-camera:~/Workspace/aditof_sdk/build$ cmake -DUSE_3D_SMART=1 .. 21 | analog@adi-smart-camera:~/Workspace/aditof_sdk/build$ make -j4 22 | ``` 23 | [This page](https://github.com/analogdevicesinc/aditof_sdk/tree/master/cmake/) contains more details about the SDK's CMake build system and the various build options. 24 | -------------------------------------------------------------------------------- /doc/ad-96tof1-ebz/eeprom_register_map.md: -------------------------------------------------------------------------------- 1 | # The EEPROM register map 2 | 3 | ![Display Image](../img/ad-96tof1-ebz_eeprom_regmap.png) 4 | -------------------------------------------------------------------------------- /doc/dragonboard410c/build_instructions.md: -------------------------------------------------------------------------------- 1 | # DragonBoard410c Build Instructions 2 | 3 | 4 | ## Building the SDK only 5 | 6 | ### SDK dependencies 7 | To build the SDK and run the included applications and example code the following dependencies must be installed in the system: 8 | - v4l-utils 9 | - libopencv-dev 10 | - cmake 11 | - glog v0.3.5 12 | - libwebsockets v3.2.3 13 | - protocol buffers v3.9.0 14 | 15 | The SD card image already contains all the SDK dependencies and there's no need to install them again. To update and build the SDK just follow the steps below. 16 | 17 | ```console 18 | linaro@linaro-alip:~/workspace/github/aditof_sdk$ git checkout master 19 | linaro@linaro-alip:~/workspace/github/aditof_sdk$ git pull 20 | linaro@linaro-alip:~/workspace/github/aditof_sdk$ cd build 21 | linaro@linaro-alip:~/workspace/github/aditof_sdk/build$ cmake -DDRAGONBOARD=1 .. 22 | linaro@linaro-alip:~/workspace/github/aditof_sdk/build$ make 23 | ``` 24 | 25 | ## Linux Kernel 26 | A series of [Linaro kernel patches](../../sdcard-images-utils/dragonboard410c/linux-patches) are provided for the DragonBoard410c which include the V4L2 driver for the ADDI903x and other improvements to support all the ADI depth camera features. 27 | -------------------------------------------------------------------------------- /doc/img/AquisitionParameters.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/AquisitionParameters.PNG -------------------------------------------------------------------------------- /doc/img/AquisitionParametersFrameTypes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/AquisitionParametersFrameTypes.PNG -------------------------------------------------------------------------------- /doc/img/ad-96tof1-ebz_eeprom_regmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/ad-96tof1-ebz_eeprom_regmap.png -------------------------------------------------------------------------------- /doc/img/aditof_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/aditof_demo.png -------------------------------------------------------------------------------- /doc/img/build_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/build_VS.PNG -------------------------------------------------------------------------------- /doc/img/configuration_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/configuration_VS.PNG -------------------------------------------------------------------------------- /doc/img/db410c_standalone.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/db410c_standalone.JPG -------------------------------------------------------------------------------- /doc/img/db410c_usb.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/db410c_usb.JPG -------------------------------------------------------------------------------- /doc/img/dnn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/dnn.png -------------------------------------------------------------------------------- /doc/img/dnn_python.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/dnn_python.PNG -------------------------------------------------------------------------------- /doc/img/hardwareBrowser.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/hardwareBrowser.PNG -------------------------------------------------------------------------------- /doc/img/imshow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/imshow.png -------------------------------------------------------------------------------- /doc/img/linux_db410c_usb.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/linux_db410c_usb.JPG -------------------------------------------------------------------------------- /doc/img/maskrcnn_cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/maskrcnn_cpp.png -------------------------------------------------------------------------------- /doc/img/maskrcnn_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/maskrcnn_python.png -------------------------------------------------------------------------------- /doc/img/pointcloud_cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/pointcloud_cpp.png -------------------------------------------------------------------------------- /doc/img/pointcloud_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/pointcloud_python.png -------------------------------------------------------------------------------- /doc/img/ros_rqt_reconfigure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/ros_rqt_reconfigure.png -------------------------------------------------------------------------------- /doc/img/rpi_standalone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/rpi_standalone.jpg -------------------------------------------------------------------------------- /doc/img/rpi_standalone_revc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/rpi_standalone_revc.jpg -------------------------------------------------------------------------------- /doc/img/run_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/run_VS.PNG -------------------------------------------------------------------------------- /doc/img/sdk_acquire_frame_sequence_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/sdk_acquire_frame_sequence_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_class_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/sdk_class_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_initialization_sequence_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/sdk_initialization_sequence_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_software_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/sdk_software_stack.png -------------------------------------------------------------------------------- /doc/img/sdk_top_level_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/sdk_top_level_diagram.png -------------------------------------------------------------------------------- /doc/img/startup_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/startup_VS.PNG -------------------------------------------------------------------------------- /doc/img/windows_db410c_usb.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/doc/img/windows_db410c_usb.JPG -------------------------------------------------------------------------------- /doc/jetson/build_instructions.md: -------------------------------------------------------------------------------- 1 | # Jetson Nano Build Instructions 2 | 3 | 4 | ## Building the SDK only 5 | 6 | ### SDK dependencies 7 | To build the SDK and run the included applications and example code the following dependencies must be installed in the system: 8 | - v4l-utils 9 | - libopencv-dev 10 | - cmake 11 | - glog v0.3.5 12 | - libwebsockets v3.2.3 13 | - protocol buffers v3.9.0 14 | 15 | The SD card image already contains all the SDK dependencies and there's no need to install them again. To update and build the SDK just follow the steps below. 16 | 17 | ### AD-96TOF1-EBZ 18 | 19 | ```console 20 | analog@jetson:~/workspace/aditof_sdk$ git checkout master 21 | analog@jetson:~/workspace/aditof_sdk$ git pull 22 | analog@jetson:~/workspace/aditof_sdk$ cd build 23 | analog@jetson:~/workspace/aditof_sdk/build$ cmake -DJETSON=1 .. 24 | analog@jetson:~/workspace/aditof_sdk/build$ make -j4 25 | ``` 26 | 27 | ### AD-FXTOF1-EBZ 28 | 29 | ```console 30 | analog@jetson:~/workspace/aditof_sdk$ git checkout master 31 | analog@jetson:~/workspace/aditof_sdk$ git pull 32 | analog@jetson:~/workspace/aditof_sdk$ cd build 33 | analog@jetson:~/workspace/aditof_sdk/build$ cmake -DJETSON=1 -DUSE_FXTOF1=1 .. 34 | analog@jetson:~/workspace/aditof_sdk/build$ make -j4 35 | ``` 36 | 37 | ## Linux Kernel 38 | The SD card image already contains the customized Linux kernel image and required devicetree to support the ToF Camera connected to CSI connector on Jetson. 39 | If rebuilding the kernel or devicetree is needed please follow the [instructions](https://wiki.analog.com/resources/eval/user-guides/ad-96tof1-ebz/ug_jetson). 40 | -------------------------------------------------------------------------------- /doc/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : doc 2 | 3 | #### Overview 4 | This folder contains documentation specific to the various platforms supported by the SDK. 5 | -------------------------------------------------------------------------------- /doc/sdcard_burn.md: -------------------------------------------------------------------------------- 1 | # Writing the SD card image onto the SD card 2 | 3 | The size of the SD card that is going to be used to write the image to, must be equal or greater than the size of the image. 4 | Writing the image on the SD card will take about 15 to 20 minutes for a 16GB image, depending on the transfer speed of the system being used. 5 | 6 | ## Linux 7 | * Make sure that xz-utils are installed on your machine 8 | ~~~sh 9 | sudo apt-get install xz-utils 10 | ~~~ 11 | * Unpack the .tar.xz archive 12 | ~~~sh 13 | tar -xf name-of-the-image.tar.xz 14 | ~~~ 15 | * Write the image on the SD card 16 | ~~~sh 17 | dd if=name-of-the-image.img of=/dev/xxx bs=4M 18 | sync 19 | ~~~ 20 | 21 | Note 1: The following command can be used to help identifying the device that needs to be specified for the argument **of=/dev/xxx**: 22 | ~~~sh 23 | lsblk 24 | ~~~ 25 | Note 2: It is very likely that the **dd** command will have to be executed with **sudo** privileges: 26 | ~~~sh 27 | sudo dd if=name-of-the-image.img of=/dev/xxx bs=4M 28 | ~~~ 29 | 30 | 31 | ## Windows 32 | * Unpack the .tar.xz archive using [7-Zip](https://www.7-zip.org/) 33 | * Install the [balenaEtcher](https://www.balena.io/etcher/) app 34 | * Write the .img file to the SD card using the balenaEtcher app 35 | -------------------------------------------------------------------------------- /doc/xavier-agx/build_instructions.md: -------------------------------------------------------------------------------- 1 | # Xavier AGX Build Instructions 2 | 3 | 4 | ## Building the SDK only 5 | 6 | ### SDK dependencies 7 | To build the SDK and run the included applications and example code the following dependencies must be installed in the system: 8 | - v4l-utils 9 | - libopencv-dev 10 | - cmake 11 | - glog v0.3.5 12 | - libwebsockets v3.2.3 13 | - protocol buffers v3.9.0 14 | 15 | The SD card image already contains all the SDK dependencies and there's no need to install them again. To update and build the SDK just follow the steps below. 16 | 17 | ### AD-96TOF1-EBZ 18 | 19 | ```console 20 | analog@xavier:~/workspace/aditof_sdk$ git checkout master 21 | analog@xavier:~/workspace/aditof_sdk$ git pull 22 | analog@xavier:~/workspace/aditof_sdk$ cd build 23 | analog@xavier:~/workspace/aditof_sdk/build$ cmake -DXAVIER=1 .. 24 | analog@xavier:~/workspace/aditof_sdk/build$ make -j4 25 | ``` 26 | 27 | ### AD-FXTOF1-EBZ 28 | 29 | ```console 30 | analog@xavier:~/workspace/aditof_sdk$ git checkout master 31 | analog@xavier:~/workspace/aditof_sdk$ git pull 32 | analog@xavier:~/workspace/aditof_sdk$ cd build 33 | analog@xavier:~/workspace/aditof_sdk/build$ cmake -DXAVIER=1 -DUSE_FXTOF1=1 .. 34 | analog@xavier:~/workspace/aditof_sdk/build$ make -j4 35 | ``` 36 | 37 | ## Linux Kernel 38 | The SD card image already contains the customized Linux kernel image and required devicetree to support the ToF Camera connected to CSI connector on Xavier. 39 | If rebuilding the kernel or devicetree is needed please follow the [instructions](https://wiki.analog.com/resources/eval/user-guides/ad-96tof1-ebz/ug_xavier_agx). 40 | -------------------------------------------------------------------------------- /doc/xavier-nx/build_instructions.md: -------------------------------------------------------------------------------- 1 | # Xavier NX Build Instructions 2 | 3 | 4 | ## Building the SDK only 5 | 6 | ### SDK dependencies 7 | To build the SDK and run the included applications and example code the following dependencies must be installed in the system: 8 | - v4l-utils 9 | - libopencv-dev 10 | - cmake 11 | - glog v0.3.5 12 | - libwebsockets v3.2.3 13 | - protocol buffers v3.9.0 14 | 15 | The SD card image already contains all the SDK dependencies and there's no need to install them again. To update and build the SDK just follow the steps below. 16 | 17 | ### AD-96TOF1-EBZ 18 | 19 | ```console 20 | analog@xaviernx:~/workspace/aditof_sdk$ git checkout master 21 | analog@xaviernx:~/workspace/aditof_sdk$ git pull 22 | analog@xaviernx:~/workspace/aditof_sdk$ cd build 23 | analog@xaviernx:~/workspace/aditof_sdk/build$ cmake -DXAVIERNX=1 .. 24 | analog@xaviernx:~/workspace/aditof_sdk/build$ make -j4 25 | ``` 26 | 27 | ### AD-FXTOF1-EBZ 28 | 29 | ```console 30 | analog@xaviernx:~/workspace/aditof_sdk$ git checkout master 31 | analog@xaviernx:~/workspace/aditof_sdk$ git pull 32 | analog@xaviernx:~/workspace/aditof_sdk$ cd build 33 | analog@xaviernx:~/workspace/aditof_sdk/build$ cmake -DXAVIERNX=1 -DUSE_FXTOF1=1 .. 34 | analog@xaviernx:~/workspace/aditof_sdk/build$ make -j4 35 | ``` 36 | 37 | ## Linux Kernel 38 | The SD card image already contains the customized Linux kernel image and required devicetree to support the ToF Camera connected to CSI connector on Xavier. 39 | If rebuilding the kernel or devicetree is needed please follow the [instructions](https://wiki.analog.com/resources/eval/user-guides/ad-96tof1-ebz/ug_xavier_nx). 40 | -------------------------------------------------------------------------------- /examples/aditof-demo-imgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(aditof-demo-imgui) 3 | 4 | find_package(OpenGL REQUIRED) 5 | 6 | add_executable(${PROJECT_NAME} 7 | aditofdemorecorder.cpp 8 | aditofdemocontroller.cpp 9 | view.cpp 10 | main.cpp 11 | ) 12 | 13 | if( WIN32 ) 14 | target_link_libraries(${PROJECT_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/../deps/imgui/src/examples/libs/glfw/lib-vc2010-64/glfw3.lib") 15 | elseif(APPLE) 16 | target_link_libraries(${PROJECT_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/../deps/imgui/lib/macOS/glfw/lib-x86_64/libglfw3.a") 17 | elseif (UNIX) 18 | find_package(glfw3 REQUIRED) 19 | target_link_libraries(${PROJECT_NAME} PRIVATE glfw) 20 | endif() 21 | 22 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 23 | 24 | target_link_libraries(${PROJECT_NAME} PRIVATE 25 | aditof 26 | imgui::imgui 27 | ${OPENGL_gl_LIBRARY} 28 | ${CMAKE_DL_LIBS} 29 | ) 30 | 31 | target_include_directories(${PROJECT_NAME} PUBLIC 32 | "${PROJECT_SOURCE_DIR}/../deps/imgui/src/examples" 33 | "${PROJECT_SOURCE_DIR}/../deps/imgui/src" 34 | ) 35 | 36 | # Post build actions 37 | if( WIN32 ) 38 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 39 | COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/. 40 | ) 41 | endif() -------------------------------------------------------------------------------- /examples/aditof-demo/config_pipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set +x 3 | 4 | sudo media-ctl -v -d /dev/media1 -l '"msm_csiphy1":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]' 5 | sudo media-ctl -v -d /dev/media1 -V '"addi903x 1-0064":0[fmt:SBGGR12/640x960 field:none],"msm_csiphy1":0[fmt:SBGGR12/640x960 field:none],"msm_csid0":0[fmt:SBGGR12/640x960 field:none],"msm_ispif0":0[fmt:SBGGR12/640x960 field:none],"msm_vfe0_rdi0":0[fmt:SBGGR12/640x960 field:none]' 6 | -------------------------------------------------------------------------------- /examples/deps/imgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT TARGET imgui) 2 | set(imguiextern_SOURCE_DIR src) 3 | add_library(imgui STATIC 4 | ${imguiextern_SOURCE_DIR}/imgui.cpp 5 | ${imguiextern_SOURCE_DIR}/imgui_demo.cpp 6 | ${imguiextern_SOURCE_DIR}/imgui_draw.cpp 7 | ${imguiextern_SOURCE_DIR}/imgui_widgets.cpp 8 | ${imguiextern_SOURCE_DIR}/examples/imgui_impl_glfw.cpp 9 | ${imguiextern_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp 10 | ${imguiextern_SOURCE_DIR}/examples/libs/gl3w/GL/gl3w.c 11 | ) 12 | 13 | target_include_directories(imgui PUBLIC 14 | ${imguiextern_SOURCE_DIR} 15 | ${imguiextern_SOURCE_DIR}/examples 16 | ${imguiextern_SOURCE_DIR}/examples/libs/gl3w 17 | ${imguiextern_SOURCE_DIR}/examples/libs/glfw/include 18 | ) 19 | else() 20 | message(STATUS "imgui is already a target. Skipping adding it twice") 21 | endif() 22 | 23 | add_library(imgui::imgui ALIAS imgui) 24 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Default settings: 7 | # Use 4 spaces as indentation 8 | [*] 9 | indent_style = space 10 | indent_size = 4 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [imstb_*] 15 | indent_size = 3 16 | trim_trailing_whitespace = false 17 | 18 | [Makefile] 19 | indent_style = tab 20 | indent_size = 4 21 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any http URL into a clickable link) 2 | 3 | PLEASE CAREFULLY READ: 4 | https://github.com/ocornut/imgui/issues/2261 5 | 6 | (Clear this template before submitting your PR) 7 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2020 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | */Debug/* 3 | */Release/* 4 | */x64/* 5 | *.o 6 | *.obj 7 | *.exe 8 | 9 | ## Visual Studio cruft 10 | .vs/* 11 | */ipch/* 12 | *.opensdf 13 | *.log 14 | *.pdb 15 | *.ilk 16 | *.user 17 | *.sdf 18 | *.suo 19 | *.VC.db 20 | *.VC.VC.opendb 21 | 22 | ## Xcode cruft 23 | .DS_Store 24 | project.xcworkspace 25 | xcuserdata 26 | 27 | ## Emscripten output 28 | *.o.tmp 29 | *.out.js 30 | *.out.wasm 31 | example_emscripten/example_emscripten.* 32 | 33 | ## Unix executables 34 | example_glfw_opengl2/example_glfw_opengl2 35 | example_glfw_opengl3/example_glfw_opengl3 36 | example_glut_opengl2/example_glut_opengl2 37 | example_null/example_null 38 | example_sdl_opengl2/example_sdl_opengl2 39 | example_sdl_opengl3/example_sdl_opengl3 40 | 41 | ## Dear ImGui Ini files 42 | imgui.ini 43 | 44 | ## JetBrains IDEs 45 | .idea 46 | cmake-build-* 47 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_allegro5/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | 4 | Dear ImGui outputs 16-bit vertex indices by default. 5 | Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices. 6 | You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. 7 | We are providing `imconfig_allegro5.h` that enables 32-bit indices. 8 | Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. 9 | 10 | # How to Build 11 | 12 | ### On Ubuntu 14.04+ and macOS 13 | 14 | ```bash 15 | g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ../imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example 16 | ``` 17 | 18 | On macOS, install Allegro with homebrew: `brew install allegro`. 19 | 20 | ### On Windows with Visual Studio's CLI 21 | 22 | You may install Allegro using vcpkg: 23 | ``` 24 | git clone https://github.com/Microsoft/vcpkg 25 | cd vcpkg 26 | .\bootstrap-vcpkg.bat 27 | .\vcpkg install allegro5 28 | .\vcpkg integrate install ; optional, automatically register include/libs in Visual Studio 29 | ``` 30 | 31 | Build: 32 | ``` 33 | set ALLEGRODIR=path_to_your_allegro5_folder 34 | cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib 35 | ``` 36 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_allegro5/imconfig_allegro5.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE 3 | // See imconfig.h for the full template 4 | // Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | // Use 32-bit vertex indices because Allegro doesn't support 16-bit ones 10 | // This allows us to avoid converting vertices format at runtime 11 | #define ImDrawIdx int 12 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/README.md: -------------------------------------------------------------------------------- 1 | # iOS / OSX Metal example 2 | 3 | ## Introduction 4 | 5 | This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9. 6 | 7 | (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.) 8 | 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/Shared/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | 7 | @interface AppDelegate : UIResponder 8 | @property (strong, nonatomic) UIWindow *window; 9 | @end 10 | 11 | #else 12 | 13 | #import 14 | 15 | @interface AppDelegate : NSObject 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/Shared/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | @implementation AppDelegate 4 | 5 | #if TARGET_OS_OSX 6 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 7 | return YES; 8 | } 9 | #endif 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/Shared/Renderer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Renderer : NSObject 4 | 5 | -(nonnull instancetype)initWithView:(nonnull MTKView *)view; 6 | 7 | @end 8 | 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/Shared/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Renderer.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | 7 | #import 8 | 9 | @interface ViewController : UIViewController 10 | @end 11 | 12 | #else 13 | 14 | #import 15 | 16 | @interface ViewController : NSViewController 17 | @end 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/Shared/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | #import "AppDelegate.h" 7 | 8 | int main(int argc, char * argv[]) { 9 | @autoreleasepool { 10 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 11 | } 12 | } 13 | 14 | #else 15 | 16 | #import 17 | 18 | int main(int argc, const char * argv[]) { 19 | return NSApplicationMain(argc, argv); 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/examples/example_apple_metal/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_apple_metal/macOS/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | imgui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 Warren Moore. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_emscripten/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions 5 | 6 | - Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools. 7 | 8 | - Then build using `make` while in the `example_emscripten/` directory. 9 | 10 | - Note that Emscripten 1.39.0 (October 2019) obsoleted the `BINARYEN_TRAP_MODE=clamp` compilation flag which was required with version older than 1.39.0 to avoid rendering artefacts. See [#2877](https://github.com/ocornut/imgui/issues/2877) for details. If you use an older version, uncomment this line in the Makefile: 11 | 12 | `#EMS += -s BINARYEN_TRAP_MODE=clamp` 13 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need GLFW (http://www.glfw.org): 3 | # brew install glfw 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_glfw_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += -L/usr/local/lib -lglfw 17 | 18 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 19 | CXXFLAGS += -Wall -Wformat 20 | CFLAGS = $(CXXFLAGS) 21 | 22 | %.o:%.cpp 23 | $(CXX) $(CXXFLAGS) -c -o $@ $< 24 | 25 | %.o:../%.cpp 26 | $(CXX) $(CXXFLAGS) -c -o $@ $< 27 | 28 | %.o:../../%.cpp 29 | $(CXX) $(CXXFLAGS) -c -o $@ $< 30 | 31 | %.o:../%.mm 32 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 33 | 34 | %.o:%.mm 35 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 36 | 37 | all: $(EXE) 38 | @echo Build complete 39 | 40 | $(EXE): $(OBJS) 41 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 42 | 43 | clean: 44 | rm -f $(EXE) $(OBJS) 45 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_opengl2.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Example usage: 2 | # mkdir build 3 | # cd build 4 | # cmake -g "Visual Studio 14 2015" .. 5 | 6 | cmake_minimum_required(VERSION 2.8) 7 | project(imgui_example_glfw_vulkan C CXX) 8 | 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 11 | endif() 12 | 13 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 14 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 15 | 16 | # GLFW 17 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 18 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 19 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 20 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 21 | option(GLFW_INSTALL "Generate installation target" OFF) 22 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 23 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 24 | include_directories(${GLFW_DIR}/include) 25 | 26 | # Dear ImGui 27 | set(IMGUI_DIR ../../) 28 | include_directories(${IMGUI_DIR} ..) 29 | 30 | # Libraries 31 | find_library(VULKAN_LIBRARY 32 | NAMES vulkan vulkan-1) 33 | set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 34 | 35 | # Use vulkan headers from glfw: 36 | include_directories(${GLFW_DIR}/deps) 37 | 38 | file(GLOB sources *.cpp) 39 | 40 | add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/examples/imgui_impl_glfw.cpp ${IMGUI_DIR}/examples/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_widgets.cpp) 41 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 42 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/gen_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 3 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 4 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/glsl_shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=0, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct { 7 | vec4 Color; 8 | vec2 UV; 9 | } In; 10 | 11 | void main() 12 | { 13 | fColor = In.Color * texture(sTexture, In.UV.st); 14 | } 15 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_glfw_vulkan/glsl_shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(push_constant) uniform uPushConstant { 7 | vec2 uScale; 8 | vec2 uTranslate; 9 | } pc; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | layout(location = 0) out struct { 16 | vec4 Color; 17 | vec2 UV; 18 | } Out; 19 | 20 | void main() 21 | { 22 | Out.Color = aColor; 23 | Out.UV = aUV; 24 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 25 | } 26 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_marmalade/data/app.icf: -------------------------------------------------------------------------------- 1 | # This file is for configuration settings for your 2 | # application. 3 | # 4 | # The syntax is similar to windows .ini files ie 5 | # 6 | # [GroupName] 7 | # Setting = Value 8 | # 9 | # Which can be read by your application using 10 | # e.g s3eConfigGetString("GroupName", "Setting", string) 11 | # 12 | # All settings must be documented in .config.txt files. 13 | # New settings specific to this application should be 14 | # documented in app.config.txt 15 | # 16 | # Some conditional operations are also permitted, see the 17 | # S3E documentation for details. 18 | 19 | [S3E] 20 | MemSize=6000000 21 | MemSizeDebug=6000000 22 | DispFixRot=FixedLandscape 23 | 24 | # emulate iphone 5 resolution, change these settings to emulate other display resolution 25 | WinWidth=1136 26 | WinHeight=640 27 | 28 | [GX] 29 | DataCacheSize=131070 30 | 31 | [Util] 32 | #MemoryBreakpoint=1282 33 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_marmalade/marmalade_example.mkb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env mkb 2 | 3 | # ImGui - standalone example application for Marmalade 4 | # Copyright (C) 2015 by Giovanni Zito 5 | # This file is part of ImGui 6 | # https://github.com/ocornut/imgui 7 | 8 | define IMGUI_DISABLE_INCLUDE_IMCONFIG_H 9 | define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS 10 | define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS 11 | define _snprintf=snprintf 12 | 13 | options 14 | { 15 | optimise-speed=1 16 | } 17 | 18 | includepaths 19 | { 20 | .. 21 | ../.. 22 | } 23 | 24 | subprojects 25 | { 26 | iwgx 27 | } 28 | 29 | files 30 | { 31 | (.) 32 | ["imgui"] 33 | ../../imgui.cpp 34 | ../../imgui_demo.cpp 35 | ../../imgui_draw.cpp 36 | ../../imgui_widgets.cpp 37 | ../../imconfig.h 38 | ../../imgui.h 39 | ../../imgui_internal.h 40 | 41 | ["imgui","Marmalade binding"] 42 | ../imgui_impl_marmalade.h 43 | ../imgui_impl_marmalade.cpp 44 | main.cpp 45 | 46 | } 47 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_null/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_directx11 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL2 (http://www.libsdl.org): 3 | # brew install sdl2 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += `sdl2-config --libs` 17 | LIBS += -L/usr/local/lib 18 | 19 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 20 | CXXFLAGS += `sdl2-config --cflags` 21 | CXXFLAGS += -Wall -Wformat 22 | CFLAGS = $(CXXFLAGS) 23 | 24 | %.o:%.cpp 25 | $(CXX) $(CXXFLAGS) -c -o $@ $< 26 | 27 | %.o:../%.cpp 28 | $(CXX) $(CXXFLAGS) -c -o $@ $< 29 | 30 | %.o:../../%.cpp 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< 32 | 33 | %.o:../%.mm 34 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 35 | 36 | %.o:%.mm 37 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 38 | 39 | all: $(EXE) 40 | @echo Build complete 41 | 42 | $(EXE): $(OBJS) 43 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 44 | 45 | clean: 46 | rm -f $(EXE) $(OBJS) 47 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 25 | ``` 26 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl2 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -lGL -ldl 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -framework OpenGl -framework CoreFoundation 25 | ``` 26 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_sdl_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl3 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_win32_directx10/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_win32.cpp ..\imgui_impl_dx10.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx10.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_win32_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx11.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx11.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_win32_directx12/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx12.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx12.exe /FoDebug/ /link d3d12.lib d3dcompiler.lib dxgi.lib 4 | 5 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/example_win32_directx9/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%DXSDK_DIR%/Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx9.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx9.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 4 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_allegro5.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Allegro 5 2 | // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Platform: Clipboard support (from Allegro 5.1.12) 7 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 8 | // Issues: 9 | // [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually. 10 | // [ ] Platform: Missing gamepad support. 11 | 12 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 13 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 14 | // https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd 15 | 16 | #pragma once 17 | 18 | struct ALLEGRO_DISPLAY; 19 | union ALLEGRO_EVENT; 20 | 21 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 22 | IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 23 | IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 24 | IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 25 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 26 | 27 | // Use if you want to reset your rendering device without losing ImGui state. 28 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 29 | IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 30 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_dx10.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX10 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct ID3D10Device; 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); 17 | IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); 19 | IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); 20 | 21 | // Use if you want to reset your rendering device without losing ImGui state. 22 | IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects(); 23 | IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects(); 24 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX11 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct ID3D11Device; 15 | struct ID3D11DeviceContext; 16 | 17 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 18 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 19 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 20 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 21 | 22 | // Use if you want to reset your rendering device without losing ImGui state. 23 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 24 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 25 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX9 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct IDirect3DDevice9; 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 17 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 19 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 20 | 21 | // Use if you want to reset your rendering device without losing ImGui state. 22 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 23 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 24 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_marmalade.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Marmalade + IwGx 2 | // Marmalade code: Copyright (C) 2015 by Giovanni Zito (this file is part of Dear ImGui) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID! 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | #pragma once 12 | 13 | IMGUI_IMPL_API bool ImGui_Marmalade_Init(bool install_callbacks); 14 | IMGUI_IMPL_API void ImGui_Marmalade_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_Marmalade_NewFrame(); 16 | IMGUI_IMPL_API void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data); 17 | 18 | // Use if you want to reset your rendering device without losing ImGui state. 19 | IMGUI_IMPL_API void ImGui_Marmalade_InvalidateDeviceObjects(); 20 | IMGUI_IMPL_API bool ImGui_Marmalade_CreateDeviceObjects(); 21 | 22 | // Callbacks (installed by default if you enable 'install_callbacks' during initialization) 23 | // You can also handle inputs yourself and use those as a reference. 24 | IMGUI_IMPL_API int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data); 25 | IMGUI_IMPL_API int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data); 26 | IMGUI_IMPL_API int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data); 27 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_metal.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for Metal 2 | // This needs to be used along with a Platform Binding (e.g. OSX) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | @class MTLRenderPassDescriptor; 13 | @protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder; 14 | 15 | IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id device); 16 | IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown(); 17 | IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor *renderPassDescriptor); 18 | IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, 19 | id commandBuffer, 20 | id commandEncoder); 21 | 22 | // Called by Init/NewFrame/Shutdown 23 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id device); 24 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture(); 25 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id device); 26 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects(); 27 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/imgui_impl_osx.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for OSX / Cocoa 2 | // This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..) 3 | // [ALPHA] Early bindings, not well tested. If you want a portable application, prefer using the GLFW or SDL platform bindings on Mac. 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this back-end). 8 | // Issues: 9 | // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters].. 10 | 11 | @class NSEvent; 12 | @class NSView; 13 | 14 | IMGUI_API bool ImGui_ImplOSX_Init(); 15 | IMGUI_API void ImGui_ImplOSX_Shutdown(); 16 | IMGUI_API void ImGui_ImplOSX_NewFrame(NSView *_Nullable view); 17 | IMGUI_API bool ImGui_ImplOSX_HandleEvent(NSEvent *_Nonnull event, NSView *_Nullable view); 18 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/libs/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/libs/glfw/lib-vc2010-32/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/examples/libs/glfw/lib-vc2010-32/glfw3.lib -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/libs/glfw/lib-vc2010-64/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/examples/libs/glfw/lib-vc2010-64/glfw3.lib -------------------------------------------------------------------------------- /examples/deps/imgui/src/examples/libs/usynergy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | uSynergy client -- Implementation for the embedded Synergy client library 3 | version 1.0.0, July 7th, 2012 4 | Copyright (c) 2012 Alex Evans 5 | 6 | This is a copy of the files once found at: 7 | https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro 8 | 9 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/fonts/ 7 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 8 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 9 | Suggested fonts and links. 10 | 11 | misc/freetype/ 12 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 13 | Benefit from better FreeType rasterization, in particular for small fonts. 14 | 15 | misc/natvis/ 16 | Natvis file to describe dear imgui types in the Visual Studio debugger. 17 | With this, types like ImVector<> will be displayed nicely in the debugger. 18 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 19 | 20 | misc/single_file/ 21 | Single-file header stub. 22 | We use this to validate compiling all *.cpp files in a same compilation unit. 23 | Users of that technique (also called "Unity builds") can generally provide this themselves, 24 | so we don't really recommend you use this in your projects. 25 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // imgui_stdlib.h 2 | // Wrappers for C++ standard library (STL) types (std::string, etc.) 3 | // This is also an example of how you may wrap your own similar types. 4 | 5 | // Compatibility: 6 | // - std::string support is only guaranteed to work from C++11. 7 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 8 | 9 | // Changelog: 10 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 11 | 12 | #pragma once 13 | 14 | #include 15 | 16 | namespace ImGui 17 | { 18 | // ImGui::InputText() with std::string 19 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 20 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 21 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 22 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 23 | } 24 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/examples/deps/imgui/src/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/natvis/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Natvis file to describe dear imgui types in the Visual Studio debugger. 3 | With this, types like ImVector<> will be displayed nicely in the debugger. 4 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 5 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/natvis/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{Size={Size} Capacity={Capacity}}} 9 | 10 | 11 | Size 12 | Data 13 | 14 | 15 | 16 | 17 | 18 | {{x={x,g} y={y,g}}} 19 | 20 | 21 | 22 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 23 | 24 | 25 | 26 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} 27 | 28 | Min 29 | Max 30 | Max.x - Min.x 31 | Max.y - Min.y 32 | 33 | 34 | 35 | 36 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/deps/imgui/src/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // imgui_single_file.h 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | #include "../../imgui.h" 11 | 12 | #ifdef IMGUI_IMPLEMENTATION 13 | #include "../../imgui.cpp" 14 | #include "../../imgui_demo.cpp" 15 | #include "../../imgui_draw.cpp" 16 | #include "../../imgui_widgets.cpp" 17 | #endif 18 | -------------------------------------------------------------------------------- /examples/first-frame-network/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(first-frame-network) 3 | 4 | add_executable(${PROJECT_NAME} main.cpp) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 7 | 8 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof) 9 | -------------------------------------------------------------------------------- /examples/first-frame-network/readme.md: -------------------------------------------------------------------------------- 1 | # first-frame-network sample code 2 | 3 | ## Overview 4 | 5 | The first-frame-network is a cross platform sample code that shows how to use the aditof sdk to talk to a remote ToF camera over the network. 6 | 7 | For example if the ip address of the target is `192.168.1.110` the run command should be: 8 | `./first-frame-network "192.168.1.110"` 9 | -------------------------------------------------------------------------------- /examples/first-frame/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(first-frame) 3 | 4 | add_executable(${PROJECT_NAME} main.cpp) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 7 | 8 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof) 9 | -------------------------------------------------------------------------------- /examples/first-frame/readme.md: -------------------------------------------------------------------------------- 1 | # first-frame sample code 2 | 3 | ## Overview 4 | 5 | The first-frame is a cross platform sample code that shows how to use the aditof sdk to configure a camera so that frames can be captured from it. 6 | -------------------------------------------------------------------------------- /examples/imshow-xavier/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(imshow-xavier) 4 | 5 | find_package(OpenCV) 6 | if(OPENCV_FOUND OR 7 | OPENCV_CORE_FOUND) # we check for this because the OpenCVConfig.cmake(v2.4.9.1) used on dragonboards fails to set OPENCV_FOUND 8 | if(OpenCV_VERSION VERSION_LESS "3.0.0") 9 | message(STATUS "USING OPENCV Version 2") 10 | add_definitions(-DOPENCV2) 11 | endif(OpenCV_VERSION VERSION_LESS "3.0.0") 12 | else() 13 | if (NOT OpenCV_INCLUDE_DIR OR NOT OpenCV_LIBS) 14 | message(FATAL_ERROR "find_package(openCV) failed. OpenCV_INCLUDE_DIR and OpenCV_LIBS need to be set.") 15 | else() 16 | message(STATUS "OpenCV_INCLUDE_DIR and OpenCV_LIBS have been set manually.") 17 | endif() 18 | endif() 19 | 20 | add_executable(${PROJECT_NAME} main.cpp) 21 | 22 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 23 | 24 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 25 | -------------------------------------------------------------------------------- /examples/imshow-xavier/readme.md: -------------------------------------------------------------------------------- 1 | # Imshow xavier example 2 | 3 | ### Overview 4 | This example demonstrates how to capture data from the TOF system on the Nvidia jetson and display it using OpenCV 5 | 6 | ![Display Image](https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/img/imshow.png) 7 | 8 | The following code snippet is used to convert the `aditof::Frame` into a `cv::Mat` containing the depth information 9 | ```cpp 10 | /* Convert from frame to depth mat */ 11 | cv::Mat mat; 12 | status = fromFrameToDepthMat(frame, mat); 13 | if (status != Status::OK) { 14 | LOG(ERROR) << "Could not convert from frame to mat!"; 15 | return 0; 16 | } 17 | ``` 18 | The IR information can be stored in a Mat by using the `fromFrameToIrMat` function instead of `fromFrameToDepthMat` 19 | 20 | Both data streams are available on Xavier platform. 21 | ```cpp 22 | status = camera->setFrameType("depth_ir"); 23 | ``` 24 | or 25 | ```cpp 26 | status = camera->setFrameType("ir_only"); 27 | ``` 28 | -------------------------------------------------------------------------------- /examples/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Sample Code for 3D TOF camera 2 | 3 | The examples in this directory provide sample applications to demonstrate how 3D TOF camera can be used. These applications are meant to help the developers in easily integrating the 3D TOF SDK in their applications. 4 | 5 | #### List of Examples 6 | 7 | | Name | Language | Description | 8 | | --------- | ----------- | -------------- | 9 | | aditof-demo | C++ | An application that uses OpenCV to display infrared and depth images | 10 | | first-frame | C++ | An example code that shows the step required to get to the point where camera frames can be captured | 11 | | first-frame-network | C++ | An example code that shows the step required to get to the point where camera frames can be captured from a remote target | 12 | -------------------------------------------------------------------------------- /misc/ad-96tof1-ebz/ad96tof1_eeprom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/misc/ad-96tof1-ebz/ad96tof1_eeprom.bin -------------------------------------------------------------------------------- /misc/nvidia/jetson/kernel_src/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-camera-adi-tof.dtsi: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "tegra210-camera-adi-tof.dtsi" 19 | 20 | / { 21 | host1x { 22 | i2c@546c0000 { 23 | adi_tof_cam0@64 { 24 | status = "okay"; 25 | }; 26 | 27 | eeprom: eeprom@56 { 28 | compatible = "atmel,24c1024"; 29 | reg = <0x56>; 30 | pagesize = <32>; 31 | }; 32 | 33 | tmp103: tmp103@73 { 34 | compatible = "ti,tmp103"; 35 | reg = <0x73>; 36 | }; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /scripts/3dsmartcam1/aditof-demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo ~/Workspace/aditof_sdk/build/examples/aditof-demo/aditof-demo -------------------------------------------------------------------------------- /scripts/3dsmartcam1/apps_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ~/Workspace/ 4 | sudo apt install -y git-lfs 5 | git clone https://github.com/robotics-ai/tof_process_public 6 | cd tof_process_public 7 | git lfs install 8 | git lfs fetch --all 9 | git lfs pull 10 | ./box_measure/ADI-Smart-Camera/install_box-measure_dependencies_bionic.sh 11 | ./door_sense/ADI-Smart-Camera/install_door-sense_dependencies_bionic.sh 12 | ./slam/ADI-Smart-Camera/install_slam_dependencies_bionic.sh 13 | sudo apt install -y --reinstall ./box_measure/ADI-Smart-Camera/aditof-camera-AD-3DSMARTCAM1-PRZ_0.0.1_arm64_nano.deb 14 | sudo apt install -y --reinstall ./box_measure/ADI-Smart-Camera/box-measure_0.0.5_arm64_nano.deb 15 | sudo apt install -y --reinstall ./door_sense/ADI-Smart-Camera/door-sense_0.0.4_arm64_nano.deb 16 | sudo apt install -y --reinstall ./slam/ADI-Smart-Camera/slam_0.0.1_arm64_nano.deb 17 | 18 | cat <> ~/Desktop/box-measure.desktop 19 | [Desktop Entry] 20 | Type=Link 21 | Name=Box-Measure 22 | Icon=/opt/robotics-ai/box-measure/product-logo.png 23 | OnlyShowIn=LXDE; 24 | URL=/usr/share/applications/box-measure-fx.desktop 25 | EOT 26 | 27 | cat <> ~/Desktop/door-sense.desktop 28 | [Desktop Entry] 29 | Type=Link 30 | Name=Door-Sense 31 | Icon=/opt/robotics-ai/door-sense/product-logo.png 32 | OnlyShowIn=LXDE; 33 | URL=/usr/share/applications/door-sense-fx.desktop 34 | EOT 35 | 36 | cat <> ~/Desktop/slam.desktop 37 | [Desktop Entry] 38 | Type=Link 39 | Name=Slam 40 | Icon=/opt/robotics-ai/slam/product-logo.png 41 | OnlyShowIn=LXDE; 42 | URL=/usr/share/applications/slam-fx.desktop 43 | EOT 44 | -------------------------------------------------------------------------------- /scripts/3dsmartcam1/readme.md: -------------------------------------------------------------------------------- 1 | ## Utilities for AD-3DSMARTCAM1-PRZ 2 | -------------------------------------------------------------------------------- /scripts/3dsmartcam1/sdk_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ~/Workspace/aditof_sdk/deps 4 | 5 | cd glog 6 | git fetch --all --tags 7 | git checkout tags/v0.3.5 8 | sudo rm -rf build_0_3_5 || true 9 | mkdir build_0_3_5 && cd build_0_3_5 10 | cmake -DWITH_GFLAGS=off -DCMAKE_INSTALL_PREFIX=/opt/glog .. 11 | sudo make -j8 && sudo make install 12 | cd ../.. 13 | 14 | cd libwebsockets 15 | git fetch --all --tags 16 | git checkout tags/v3.2.3 17 | sudo rm -rf build_3_2_3 || true 18 | mkdir build_3_2_3 && cd build_3_2_3 19 | cmake -DLWS_STATIC_PIC=ON -DCMAKE_INSTALL_PREFIX=/opt/websockets .. 20 | sudo make -j8 && sudo make install 21 | cd ../.. 22 | 23 | cd protobuf 24 | git fetch --all --tags 25 | git checkout tags/v3.9.0 26 | sudo rm -rf build_3_9_0 || true 27 | mkdir build_3_9_0 && cd build_3_9_0 28 | cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/opt/protobuf ../cmake 29 | sudo make -j8 && sudo make install 30 | cd ../.. 31 | 32 | cd ~/Workspace/aditof_sdk/ 33 | git checkout v3.1.0 34 | git pull 35 | git fetch --tags 36 | sudo rm -rf build || true 37 | mkdir build && cd build 38 | cmake -DUSE_3D_SMART=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 39 | make -j8 40 | cd ~/Workspace/aditof_sdk/scripts/3dsmartcam1 41 | cp aditof-demo.sh ~/Desktop/ 42 | ./vnc_install.sh 43 | -------------------------------------------------------------------------------- /scripts/3dsmartcam1/vnc_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo apt-get update -y 4 | sudo apt-get install -y x11vnc net-tools 5 | echo '/usr/sbin/lightdm' | sudo tee /etc/X11/default-display-manager > /dev/null 6 | sudo dpkg-reconfigure -fnoninteractive lightdm 7 | x11vnc -storepasswd 8 | 9 | #create systemd service for starting the VNC server and enable it 10 | sudo bash -c 'cat > /etc/systemd/system/x11vnc.service' << EOF 11 | [Unit] 12 | Description="x11vnc" 13 | Requires=display-manager.service 14 | After=display-manager.service 15 | 16 | [Service] 17 | ExecStart=/usr/bin/x11vnc -loop -nopw -xkb -repeat -noxrecord -noxfixes -noxdamage -forever -rfbport 5900 -display :0 -auth guess 18 | ExecStop=/usr/bin/killall x11vnc 19 | Restart=on-failure 20 | RestartSec=2 21 | 22 | [Install] 23 | WantedBy=multi-user.target 24 | EOF 25 | sudo systemctl enable x11vnc.service 26 | 27 | #create virtual display to set default resolution to 1920x1080 28 | sudo bash -c 'cat > /usr/share/X11/xorg.conf.d/10-monitor.conf' << EOF 29 | Section "Screen" 30 | Identifier "Screen0" 31 | Device "Tegra0" # e.g. Radeon, Intel, nvidia 32 | Monitor "DP" 33 | DefaultDepth 24 34 | SubSection "Display" 35 | Depth 24 36 | Virtual 1920 1080 # 1920 + 1680 (3600), 1080 + 1050 (2130) 37 | EndSubSection 38 | EndSection 39 | EOF 40 | -------------------------------------------------------------------------------- /scripts/jetson/rebuild_for_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This script can be used to rebuild the SDK depending on various platforms and cameras. 4 | #Its purpose is to be called from a shortcut placed on desktop. 5 | #It expects the parameters passed as the CMAKE command. 6 | 7 | #Possible build flag for the camera: -DUSE_FXTOF1=1 8 | #The implicit build, if no parameters are passed is for AD-96TOF1-EBZ. 9 | 10 | 11 | cd $(dirname $(dirname $(dirname $(realpath $0)))) 12 | git pull 13 | sudo rm -r -f build 14 | mkdir build 15 | cd build 16 | 17 | if [ "$#" -eq 1 ]; then 18 | cmake "$1" -DJETSON=1 -DWITH_EXAMPLES=off -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 19 | 20 | else 21 | cmake -DJETSON=1 -DWITH_EXAMPLES=off -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 22 | fi 23 | 24 | sudo cmake --build . --target install 25 | -------------------------------------------------------------------------------- /scripts/linux/rebuild_for_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This script can be used to rebuild the SDK depending on various platforms and cameras. 4 | #Its purpose is to be called from a shortcut placed on desktop. 5 | #It expects the parameters passed as the CMAKE command. 6 | 7 | #Possible build flag for the camera: -DUSE_FXTOF1=1 8 | #The implicit build, if no parameters are passed is for AD-96TOF1-EBZ. 9 | 10 | 11 | cd $(dirname $(dirname $(dirname $(realpath $0)))) 12 | git pull 13 | sudo rm -r -f build 14 | mkdir build 15 | cd build 16 | 17 | if [ "$#" -eq 1 ]; then 18 | cmake "$1" -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 19 | 20 | else 21 | cmake -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 22 | fi 23 | 24 | sudo cmake --build . --target install 25 | -------------------------------------------------------------------------------- /scripts/raspberrypi3/opencv.patch: -------------------------------------------------------------------------------- 1 | diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp 2 | index fab60fd..2c48041 100644 3 | --- a/modules/python/src2/cv2.cpp 4 | +++ b/modules/python/src2/cv2.cpp 5 | @@ -886,7 +886,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name) 6 | (void)name; 7 | if(!obj || obj == Py_None) 8 | return true; 9 | - char* str = PyString_AsString(obj); 10 | + const char* str = PyString_AsString(obj); 11 | if(!str) 12 | return false; 13 | value = String(str); 14 | -------------------------------------------------------------------------------- /scripts/raspberrypi3/rebuild_for_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This script can be used to rebuild the SDK depending on various platforms and cameras. 4 | #Its purpose is to be called from a shortcut placed on desktop. 5 | #It expects the parameters passed as the CMAKE command. 6 | 7 | #Possible build flag for the camera: -DUSE_FXTOF1=1 8 | #The implicit build, if no parameters are passed is for AD-96TOF1-EBZ. 9 | 10 | 11 | cd $(dirname $(dirname $(dirname $(realpath $0)))) 12 | git pull 13 | sudo rm -r -f build 14 | mkdir build 15 | cd build 16 | 17 | if [ "$#" -eq 1 ]; then 18 | cmake "$1" -DRASPBERRYPI=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="~/workspace/github/aditof_sdk/deps/installed/glog;~/workspace/github/aditof_sdk/deps/installed/protobuf;~/workspace/github/aditof_sdk/deps/installed/websockets" .. 19 | 20 | else 21 | cmake -DRASPBERRYPI=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="~/workspace/github/aditof_sdk/deps/installed/glog;~/workspace/github/aditof_sdk/deps/installed/protobuf;~/workspace/github/aditof_sdk/deps/installed/websockets" .. 22 | fi 23 | 24 | sudo cmake --build . --target install 25 | -------------------------------------------------------------------------------- /scripts/raspberrypi3/rpi3_sdk_deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x #echo on 3 | 4 | #install the kernel packages 5 | sudo apt update -y 6 | sudo apt upgrade -y 7 | sudo apt install v4l-utils -y 8 | sudo apt install libopencv-dev -y 9 | sudo apt install cmake -y 10 | sudo apt install libssl1.0-dev -y 11 | 12 | #create the work folder 13 | rm -rf /home/pi/workspace 14 | cd /home/pi 15 | mkdir workspace && cd workspace 16 | mkdir github && cd github 17 | 18 | #install glog 19 | cd /home/pi/workspace/github 20 | git clone --branch v0.6.0 --depth 1 https://github.com/google/glog 21 | cd glog 22 | mkdir build_0_3_5 && cd build_0_3_5 23 | cmake -DWITH_GFLAGS=off -DCMAKE_INSTALL_PREFIX=/opt/glog .. 24 | sudo make -j4 && sudo make install 25 | 26 | #install libwebsockets 27 | cd /home/pi/workspace/github 28 | git clone --branch v3.2.3 --depth 1 https://github.com/warmcat/libwebsockets 29 | cd libwebsockets 30 | mkdir build_3_2_3 && cd build_3_2_3 31 | cmake -DLWS_STATIC_PIC=ON -DCMAKE_INSTALL_PREFIX=/opt/websockets .. 32 | sudo make -j4 && sudo make install 33 | 34 | #install protobuf 35 | cd /home/pi/workspace/github 36 | git clone --branch v3.9.0 --depth 1 https://github.com/protocolbuffers/protobuf 37 | cd protobuf 38 | mkdir build_3_9_0 && cd build_3_9_0 39 | cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS="-latomic" -DCMAKE_INSTALL_PREFIX=/opt/protobuf ../cmake 40 | sudo make -j4 && sudo make install 41 | 42 | #download and build the SDK 43 | cd /home/pi/workspace/github 44 | git clone https://github.com/analogdevicesinc/aditof_sdk 45 | cd aditof_sdk 46 | mkdir build 47 | cd build 48 | cmake -DRASPBERRYPI=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 49 | make -j4 50 | -------------------------------------------------------------------------------- /scripts/readme.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | Scripts 4 | 5 | #### Directory Structure 6 | | Directory/File | Description | 7 | | --------- | ----------- | 8 | | dragonboard410c | Build scripts to be ran on Dragonboard 410c | 9 | | raspberrypi3 | Build scripts to be ran on Raspberry PI 3 | 10 | | linux | Build scripts to be ran on Linux | 11 | | windows | Build scripts to be ran on Windows | 12 | 13 | -------------------------------------------------------------------------------- /scripts/windows/readme.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | Build scripts to be ran on Windows. 4 | 5 | By default the sdk will be built in folder: **current_script_path\build** using the **Visual Studio 15 2017 Win64** generator and the **Release** configuration. 6 | The dependencies (glog, protobuf and websockets) will be downloaded and installed in **current_script_path\deps\installed**. 7 | Please use option -h or --help for further reference on how to change the defaults. 8 | 9 | ## Pre-requisites 10 | 11 | * CMake (Windows installer can be downloaded from: https://cmake.org/download/) 12 | 13 | * OpenCV (Install at least the release 3.4.1 of opencv from: https://opencv.org/releases/) 14 | 15 | * OpenSSL. (One option to get it on windows is from: https://slproweb.com/products/Win32OpenSSL.html. Make sure the get the developer package and not the light wheight package.) 16 | -------------------------------------------------------------------------------- /scripts/xavier-agx/debug_enable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $EUID > 0 ]]; then 4 | echo "This script must be run as root user" 5 | exit 6 | fi 7 | 8 | echo 1 > /sys/kernel/debug/tracing/tracing_on 9 | echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb 10 | echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable 11 | echo 1 > /sys/kernel/debug/tracing/events/freertos/enable 12 | echo 2 > /sys/kernel/debug/camrtc/log-level 13 | echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable 14 | echo > /sys/kernel/debug/tracing/trace 15 | -------------------------------------------------------------------------------- /scripts/xavier-agx/rebuild_for_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This script can be used to rebuild the SDK depending on various platforms and cameras. 4 | #Its purpose is to be called from a shortcut placed on desktop. 5 | #It expects the parameters passed as the CMAKE command. 6 | 7 | #Possible build flag for the camera: -DUSE_FXTOF1=1 8 | #The implicit build, if no parameters are passed is for AD-96TOF1-EBZ. 9 | 10 | 11 | cd $(dirname $(dirname $(dirname $(realpath $0)))) 12 | git pull 13 | sudo rm -r -f build 14 | mkdir build 15 | cd build 16 | 17 | if [ "$#" -eq 1 ]; then 18 | cmake "$1" -DXAVIER=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 19 | 20 | else 21 | cmake -DXAVIER=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 22 | fi 23 | 24 | sudo cmake --build . --target install 25 | -------------------------------------------------------------------------------- /scripts/xavier-nx/debug_enable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $EUID > 0 ]]; then 4 | echo "This script must be run as root user" 5 | exit 6 | fi 7 | 8 | echo 1 > /sys/kernel/debug/tracing/tracing_on 9 | echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb 10 | echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable 11 | echo 1 > /sys/kernel/debug/tracing/events/freertos/enable 12 | echo 2 > /sys/kernel/debug/camrtc/log-level 13 | echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable 14 | echo > /sys/kernel/debug/tracing/trace 15 | -------------------------------------------------------------------------------- /scripts/xavier-nx/rebuild_for_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #This script can be used to rebuild the SDK depending on various platforms and cameras. 4 | #Its purpose is to be called from a shortcut placed on desktop. 5 | #It expects the parameters passed as the CMAKE command. 6 | 7 | #Possible build flag for the camera: -DUSE_FXTOF1=1 8 | #The implicit build, if no parameters are passed is for AD-96TOF1-EBZ. 9 | 10 | 11 | cd $(dirname $(dirname $(dirname $(realpath $0)))) 12 | git pull 13 | sudo rm -r -f build 14 | mkdir build 15 | cd build 16 | 17 | if [ "$#" -eq 1 ]; then 18 | cmake "$1" -DXAVIERNX=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 19 | 20 | else 21 | cmake -DXAVIERNX=1 -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" .. 22 | fi 23 | 24 | sudo cmake --build . --target install 25 | -------------------------------------------------------------------------------- /sdcard-images-utils/README.md: -------------------------------------------------------------------------------- 1 | # Utilities to create SD card images for different embedded platforms 2 | 3 | ## Directory Structure 4 | | Directory | Description | 5 | | --------- | ----------- | 6 | | dragoboard410c | Utilities required to create SD card image for Dragonboard410c | 7 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/README.md: -------------------------------------------------------------------------------- 1 | # Utilities for Dragonboard410c 2 | 3 | To apply all patches, copy them to your kernel repository and run the following git command: 4 | 5 | 6 | ```console 7 | git am 0* 8 | ``` 9 | 10 | ## Directory Structure 11 | | Directory | Description | 12 | | --------- | ----------- | 13 | | linux-patches | Patches with changes that enable the ADI Time-Of-Flight | 14 | | utils | Utility scripts to create SD card image | 15 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/README.md: -------------------------------------------------------------------------------- 1 | # Linux patches 2 | 3 | ## Directory Structure 4 | | Directory | Description | 5 | | --------- | ----------- | 6 | | kernel_4_9_27 | This patches apply to kernel version 4.9.27 from D3Engineering (https://github.com/D3Engineering/linux_kernel_qcomlt/tree/d3/release/ov5640_4.9.27)| 7 | | kernel_4_14_96 | This patches apply to kernel version 4.14.96 from D3Engineering (https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=release/qcomlt-4.14)| 8 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_14_96/0002-enable-eeprom-driver.patch: -------------------------------------------------------------------------------- 1 | From 9537bce400331544de84182bf4ca2497acd4da3c Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Mon, 13 Apr 2020 13:41:44 +0300 4 | Subject: [PATCH 2/9] enable eeprom driver 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | kernel/configs/distro.config | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/kernel/configs/distro.config b/kernel/configs/distro.config 12 | index b503edb5b8e8ab1959dfbfdc52644acd7ef77ff9..ae6ddb915f3dd71356e443d4063e1eedffb6afb1 100644 13 | --- a/kernel/configs/distro.config 14 | +++ b/kernel/configs/distro.config 15 | @@ -233,6 +233,7 @@ CONFIG_DYNAMIC_DEBUG=y 16 | CONFIG_DRM_LOAD_EDID_FIRMWARE=y 17 | CONFIG_I2C_CHARDEV=y 18 | CONFIG_SPI_SPIDEV=m 19 | +CONFIG_EEPROM_AT24=m 20 | CONFIG_ZSMALLOC=m 21 | CONFIG_ZRAM=m 22 | CONFIG_TCP_CONG_ADVANCED=y 23 | -- 24 | 2.17.1 25 | 26 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_14_96/0003-fix-v4l-address.patch: -------------------------------------------------------------------------------- 1 | From 57b09fc60594a9dd47d43788661fc59633a55c22 Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Mon, 13 Apr 2020 13:50:32 +0300 4 | Subject: [PATCH 3/9] fix v4l address 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | include/uapi/linux/v4l2-controls.h | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h 12 | index 8374b44c32b7c4bd49bd9de7244c23af7bef08d0..80aa9bf4a6b1654128525b5123f8491f218c9832 100644 13 | --- a/include/uapi/linux/v4l2-controls.h 14 | +++ b/include/uapi/linux/v4l2-controls.h 15 | @@ -192,7 +192,7 @@ enum v4l2_colorfx { 16 | 17 | /* The base for the addi903x driver controls. 18 | * We reserve 16 controls for this driver. */ 19 | -#define V4L2_CID_USER_ADDI903X_BASE (V4L2_CID_USER_BASE + 0x10A0) 20 | +#define V4L2_CID_USER_ADDI903X_BASE (V4L2_CID_DV_CLASS_BASE + 0x100) 21 | 22 | /* MPEG-class control IDs */ 23 | /* The MPEG controls are applicable to all codec controls 24 | -- 25 | 2.17.1 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_14_96/0008-Fix-uvc_video.c-1-not-needed.patch: -------------------------------------------------------------------------------- 1 | From 01fddc14225769a3110618085ce167fa9346c9b3 Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Tue, 12 May 2020 13:03:30 +0300 4 | Subject: [PATCH 8/9] Fix uvc_video.c: +1 not needed 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | drivers/usb/gadget/function/uvc_video.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c 12 | index 3d0d5d94a62f2fe6927983ba6979784eb20eceeb..0f01c04d7cbd856581da53d6e69cba5f50b2c922 100644 13 | --- a/drivers/usb/gadget/function/uvc_video.c 14 | +++ b/drivers/usb/gadget/function/uvc_video.c 15 | @@ -243,7 +243,7 @@ uvc_video_alloc_requests(struct uvc_video *video) 16 | 17 | req_size = video->ep->maxpacket 18 | * max_t(unsigned int, video->ep->maxburst, 1) 19 | - * (video->ep->mult + 1); 20 | + * (video->ep->mult); 21 | 22 | for (i = 0; i < UVC_NUM_REQUESTS; ++i) { 23 | video->req_buffer[i] = kmalloc(req_size, GFP_KERNEL); 24 | -- 25 | 2.17.1 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_14_96/0008-UVC-gadget-Add-controls-for-eeprom-write-status.patch: -------------------------------------------------------------------------------- 1 | From 03363e722b0db88af889c7c6288e6ba2c37661e4 Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Wed, 16 Sep 2020 16:01:18 +0300 4 | Subject: [PATCH] UVC gadget: Add controls for eeprom write status 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | drivers/usb/gadget/legacy/webcam.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c 12 | index 4f26cfd12c03..f2bcbe838903 100644 13 | --- a/drivers/usb/gadget/legacy/webcam.c 14 | +++ b/drivers/usb/gadget/legacy/webcam.c 15 | @@ -144,7 +144,7 @@ static const struct UVC_EXTENSION_UNIT_DESCRIPTOR(1, 3) uvc_extension_header = { 16 | .bNrInPins = 1, 17 | .baSourceID[0] = 2, 18 | .bControlSize = 3, 19 | - .bmControls[0] = 0x3F, 20 | + .bmControls[0] = 0x7F, 21 | .bmControls[1] = 0x00, 22 | .bmControls[2] = 0x00, 23 | .iExtension = 0x00, 24 | -- 25 | 2.17.1 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_14_96/0009-devicetree-Disable-gps-and-watchdog.patch: -------------------------------------------------------------------------------- 1 | From 9f420773e76135201be260a784c24858fcfc4c19 Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Wed, 13 May 2020 13:17:27 +0300 4 | Subject: [PATCH 9/9] devicetree: Disable gps and watchdog 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi 12 | index 34d4b00e5c61187c75fbfa14d786a402f991911d..ef28485b5f0cfa138a8e067cead657c115f31014 100644 13 | --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi 14 | +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi 15 | @@ -1025,7 +1025,7 @@ 16 | 17 | qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>; 18 | 19 | - status = "okay"; 20 | + status = "disabled"; 21 | 22 | mba { 23 | memory-region = <&mba_mem>; 24 | -- 25 | 2.17.1 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_9_27/0006-dts-Disable-spi0-and-disable-pull-ups.patch: -------------------------------------------------------------------------------- 1 | From e182c73a13bbebd93472cd1fa6a08d1caa78f1ee Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Tue, 14 May 2019 18:02:40 +0300 4 | Subject: [PATCH 6/7] dts: Disable spi0 and disable pull-ups 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | arch/arm64/boot/dts/qcom/aditof-db410c.dtsi | 30 +++++++++++++++++++++ 9 | 1 file changed, 30 insertions(+) 10 | 11 | diff --git a/arch/arm64/boot/dts/qcom/aditof-db410c.dtsi b/arch/arm64/boot/dts/qcom/aditof-db410c.dtsi 12 | index 3dae0c1c82fda019a1efe7e17cedf7a00b420747..6cb63c2563921baa3686cd57a99769b0a812da15 100644 13 | --- a/arch/arm64/boot/dts/qcom/aditof-db410c.dtsi 14 | +++ b/arch/arm64/boot/dts/qcom/aditof-db410c.dtsi 15 | @@ -47,3 +47,33 @@ 16 | pagesize = <32>; 17 | }; 18 | }; 19 | + 20 | +&blsp_spi5{ 21 | + status = "disabled"; 22 | +}; 23 | + 24 | +&msmgpio{ 25 | + gpio_button1: gpio_button1 { 26 | + pinmux { 27 | + function = "gpio"; 28 | + pins = "gpio24"; 29 | + }; 30 | + pinconf { 31 | + pins = "gpio24"; 32 | + drive-strength = <2>; 33 | + input-enabled; 34 | + bias-disabled; 35 | + }; 36 | + }; 37 | +}; 38 | + 39 | +&pm8916_mpps { 40 | + gpio_button2: gpio_button2 { 41 | + pinconf { 42 | + pins = "mpp4"; 43 | + function = "digital"; 44 | + input-enabled; 45 | + bias-disabled; 46 | + }; 47 | + }; 48 | +}; 49 | -- 50 | 2.17.1 51 | 52 | -------------------------------------------------------------------------------- /sdcard-images-utils/dragonboard410c/linux-patches/kernel_4_9_27/0008-UVC-gadget-Add-controls-for-eeprom-write-status.patch: -------------------------------------------------------------------------------- 1 | From 03363e722b0db88af889c7c6288e6ba2c37661e4 Mon Sep 17 00:00:00 2001 2 | From: Dan Nechita 3 | Date: Wed, 16 Sep 2020 16:01:18 +0300 4 | Subject: [PATCH] UVC gadget: Add controls for eeprom write status 5 | 6 | Signed-off-by: Dan Nechita 7 | --- 8 | drivers/usb/gadget/legacy/webcam.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c 12 | index 4f26cfd12c03..f2bcbe838903 100644 13 | --- a/drivers/usb/gadget/legacy/webcam.c 14 | +++ b/drivers/usb/gadget/legacy/webcam.c 15 | @@ -144,7 +144,7 @@ static const struct UVC_EXTENSION_UNIT_DESCRIPTOR(1, 3) uvc_extension_header = { 16 | .bNrInPins = 1, 17 | .baSourceID[0] = 2, 18 | .bControlSize = 3, 19 | - .bmControls[0] = 0x3F, 20 | + .bmControls[0] = 0x7F, 21 | .bmControls[1] = 0x00, 22 | .bmControls[2] = 0x00, 23 | .iExtension = 0x00, 24 | -- 25 | 2.17.1 26 | 27 | -------------------------------------------------------------------------------- /sdk/src/cameras/readme.md: -------------------------------------------------------------------------------- 1 | ### Available camera details 2 | 3 | Camera details can be obtained by using the getDetails camera function and are presented below: 4 | 5 | * cameraID (string): Camera identification. 6 | * mode (string): The mode in which the camera operates. 7 | * frameType (frameDetails): Details about the frames that camera is capturing. 8 | * connection (ConnectionType): The type of connection with the camera. 9 | * intrinsics (struct): 10 | * cameraMatrix (vector(float)): The 3x3 intrinsic parameter matrix (a.k.a K matrix) with values specified in pixel units. 11 | * distorsionCoefficients (vector(float)) 12 | * pixelWidth (float): The width of a sensor unit cell specified in mm. 13 | * pixelHeight (float): The height of a sensor unit cell specified in mm. 14 | * depthParameters (struct): 15 | * depthGain (float) 16 | * depthOffset (float) 17 | * maxDept (int): The maximum distance (in millimeters) the camera can measure in the current operating mode. 18 | * minDepth (int): The minimum distance (in millimeters) the camera can measure in the current operating mode. 19 | * bitCount (int): The number of bits used for representing one pixel data. 20 | 21 | A detailed version of the above table can be found at: 22 | https://github.com/analogdevicesinc/aditof_sdk/blob/master/sdk/include/aditof/camera_definitions.h -------------------------------------------------------------------------------- /sdk/src/connections/network_javascript/README.md: -------------------------------------------------------------------------------- 1 | ## JavaScript bindings are still not completely functional. This is work in progress. 2 | 3 | In aditof_sdk/sdk/src/connections/network_javascript/example.html, modify the ip_address with the server's ip address. 4 | 5 | Then run script.sh: 6 | bash script.sh 7 | 8 | Then open developer tools in the browser to see the console logs. 9 | -------------------------------------------------------------------------------- /sdk/src/connections/network_javascript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "google-protobuf": "^3.19.3", 4 | "browserify": "^17.0.0", 5 | "watchify": "^4.0.0", 6 | "websocket-as-promised": "^2.0.1" 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /sdk/src/connections/network_javascript/script.sh: -------------------------------------------------------------------------------- 1 | # install dependencies for JS 2 | npm install 3 | 4 | # compile protobuf for JS: buffer_pb.js 5 | protoc --js_out=import_style=commonjs,binary:. buffer.proto 6 | 7 | # compile the JS scripts into a single script: bundle.js 8 | browserify network/network.js network/network_sensor_enumerator.js network/network_depth_sensor.js network/network_storage.js network/network_temperature_sensor.js -o bundle.js 9 | 10 | # start a web server in localhost on port 9000 11 | python3 -m http.server 9000 & 12 | 13 | # open an incognito window (no cache) in google chrome browser showing an example web page 14 | google-chrome --incognito http://localhost:9000/example.html 15 | -------------------------------------------------------------------------------- /sdk/src/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : sdk/src 2 | 3 | #### Overview 4 | Container for SDK source and header files 5 | 6 | #### Directory Structure 7 | | Directory/File | Description | 8 | | --------- | ----------- | 9 | | target | Directory containing Dragonboard and Raspberry Pi specific files | 10 | | linux | Directory containing Linux host specific files | 11 | | macos | Directory containing MacOS host specific files | 12 | | windows | Directory containing Windows host specific files | 13 | 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/Readme.md: -------------------------------------------------------------------------------- 1 | Please refer to [Wiki documentation](https://wiki.analog.com/resources/eval/user-guides/ad-96tof1-ebz/calibration) web page for calibration instructions. 2 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/__init__.py -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/Readme.md: -------------------------------------------------------------------------------- 1 | ## This project builds the hash map from Calibration data and/or AFE firmware. The Hash map is for storing calibration data in EEPROM. 2 | 3 | ### Run C++ 4 | 1. Requires C/C++ Compiler 5 | * Linux - Compiler included in environment [Calibration Environment Setup](../Readme.md) 6 | * Windows 7 | * Download and install [Visual Studio](https://visualstudio.microsoft.com/downloads/) 8 | Or 9 | * Install [MinGW](https://osdn.net/projects/mingw/releases/) 10 | 2. Install [CMake](https://cmake.org/install/) 11 | * Linux 12 | ``` 13 | sudo apt install cmake 14 | ``` 15 | 16 | 3. Create a folder called build in ./C++/ and open folder ./C++/build/ 17 | ``` 18 | cd .\C++\ 19 | mkdir build 20 | cd build 21 | ``` 22 | 23 | 4. Compile the project 24 | ``` 25 | cmake .. 26 | ``` 27 | 28 | * For Linux 29 | ``` 30 | make . 31 | ``` 32 | 33 | * For Windows 34 | * Debug 35 | ``` 36 | cmake --build ./ --config Debug 37 | ``` 38 | * Release 39 | ``` 40 | cmake --build ./ --config Release 41 | ``` 42 | 43 | 44 | 5. Run the Program 45 | 46 | * Linux 47 | ``` 48 | .\CalEEPROM 49 | ``` 50 | 51 | * Windows 52 | * Debug 53 | ``` 54 | cd ./Debug/ 55 | .\CalEEPROM.exe 56 | ``` 57 | * Release 58 | ``` 59 | cd ./Release/ 60 | .\CalEEPROM.exe 61 | ``` 62 | 63 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | sys.path.append(os.path.dirname(os.path.realpath(__file__))) 4 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4) 2 | project(cal_eeprom VERSION 0.0.1 LANGUAGES C CXX) 3 | 4 | set (CMAKE_CXX_STANDARD 11) 5 | 6 | # add the binary tree to the search path for include files 7 | # so that we will find TutorialConfig.h 8 | include_directories("${PROJECT_SOURCE_DIR}") 9 | 10 | if (WIN32) 11 | set(PLATFORM_NAME "win") 12 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") 13 | # using Visual Studio C++ 14 | add_compile_definitions(_CRT_SECURE_NO_WARNINGS) #add preprocessor to disable warning for Microsoft deprecated function 15 | endif() 16 | endif (WIN32) 17 | 18 | # add the executable 19 | add_executable( 20 | cal_eeprom 21 | main.cpp 22 | cal_eeprom.cpp) 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/calibration_map.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/cal_eeprom/calibration_map.bin -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/camera_intrinsic.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 042402019}, 4 | "Intrinsic" : {"5" : [664.982, 0.000, 381.462, 0.000, 663.478, 229.907, 0.000, 0.000, 1.000]}, 5 | "Distortion_Coeff" : {"6" : [ -0.243072, 0.200952, -0.000248, -0.000976, -0.166482]} 6 | } -------------------------------------------------------------------------------- /tools/calibration-96tof1/cal_eeprom/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1}, 26 | "Depth_Conv_Offset" : {"27": 0}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 1000}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c084 001f 2 | c085 001f 3 | c75d 0000 4 | c75f 0022 5 | c73d 0003 6 | c739 0044 7 | c750 0700 8 | c751 0700 9 | c752 0700 10 | c753 0700 11 | c754 0698 12 | c73b 0001 13 | c731 1010 14 | c75e 001f 15 | c730 1f1f 16 | 7c0b 00ff 17 | 7d05 0001 18 | 7c07 0000 19 | 7ce2 00ff 20 | c07f 0000 21 | c080 ffff 22 | c081 ffff 23 | c082 ffff 24 | c083 ffff 25 | c086 ff00 26 | c087 ffff 27 | c08e 0008 28 | c08e 001c 29 | c08f 0000 30 | c087 00cf 31 | c086 0011 32 | c08e 000c 33 | 7c32 0002 34 | 7c20 ffff 35 | 7d00 0002 36 | 4000 0000 37 | 7c22 0000 38 | 7c21 0000 39 | 7c20 fffb 40 | 7c22 0004 41 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a \\ PIXCNT Alignment 2 | 3 | c34a 0000 \\ Coring Disable Small sig Removal 4 | 5 | c084 001f 6 | c085 001f \\ Enable LDs via Blanking signals 7 | 8 | c0a9 0002 9 | 10 | 4001 0007 11 | 7c22 0004 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | c090 0040 5 | c091 0040 6 | c092 0040 7 | c093 0040 8 | c094 0040 9 | c095 0040 10 | c096 0040 11 | c097 0040 12 | c098 0040 13 | c099 0040 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit/Far/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40e6 009c /*vxsg_mode00_field00_seq39*/ 4 | 4140 009c /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4192 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41e6 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 421a 000b /*vxsg_mode02_field00_seq22*/ 10 | 4254 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0a00 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Far/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1.22014}, 26 | "Depth_Conv_Offset" : {"27": 2003.8}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 1000}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c75d 0000 2 | c75f 0022 3 | c73d 0003 4 | c739 0044 5 | c750 0700 6 | c751 0700 7 | c752 0000 8 | c753 0000 9 | c754 0698 10 | c73b 0000 11 | c731 1010 12 | c75e 0013 13 | c730 1313 14 | c75e 0013 15 | c730 1313 16 | 7c0b 00ff 17 | 7d05 0001 18 | 7c07 0000 19 | 7ce2 00ff 20 | c07f 0000 21 | c080 ffff 22 | c081 ffff 23 | c082 ffff 24 | c083 ffff 25 | c084 0013 26 | c085 0013 27 | c086 ff00 28 | c087 ffff 29 | c08e 0008 30 | c08e 001c 31 | c08f 0000 32 | c087 00cf 33 | c086 0011 34 | c08e 000c 35 | 7c32 0002 36 | 7c20 ffff 37 | 7d00 0002 38 | 4000 0000 39 | 7c22 0000 40 | 7c21 0000 41 | 7c20 fffb 42 | 7c22 0004 43 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a 2 | 3 | c084 0013 4 | c085 0013 5 | 6 | c0a9 0002 7 | 8 | 9 | 4001 0007 10 | 7c22 0004 11 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | 5 | C0A9 0000 // Use standby for LD tap info 6 | C090 0040 // POSLOC for LD1 (LD1) 7 | C091 0040 // NEGLOC for LD1 (LD1) 8 | C092 0040 // POSLOC for LD2 (LD2) 9 | C093 0040 // NEGLOC for LD2 (LD2) 10 | C094 0040 // POSLOC for LD3 (LD3) 11 | C095 0040 // NEGLOC for LD3 (LD3) 12 | C096 0040 // POSLOC for LD4 (LD4) 13 | C097 0040 // NEGLOC for LD4 (LD4) 14 | C098 0040 // POSLOC for LD5 (SUB) 15 | C099 0040 // NEGLOC for LD5 (SUB) -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit/Mid/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40e6 009c /*vxsg_mode00_field00_seq39*/ 4 | 4140 009c /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4192 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41e6 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 4220 000b /*vxsg_mode02_field00_seq22*/ 10 | 425a 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0200 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Mid/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1}, 26 | "Depth_Conv_Offset" : {"27": 390.23}, 27 | "Depth Max Value" : {"28" : 800}, 28 | "Depth Min Value" : {"29" : 2600}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c75d 0000 2 | c75f 0022 3 | c73d 0003 4 | c739 0044 5 | c750 0700 6 | c751 0700 7 | c752 0000 8 | c753 0000 9 | c754 0698 10 | c73b 0000 11 | c731 1010 12 | c75e 0013 13 | c730 1313 14 | c75e 0013 15 | c730 1313 16 | 7c0b 00ff 17 | 7d05 0001 18 | 7c07 0000 19 | 7ce2 00ff 20 | c07f 0000 21 | c080 ffff 22 | c081 ffff 23 | c082 ffff 24 | c083 ffff 25 | c084 0013 26 | c085 0013 27 | c086 ff00 28 | c087 ffff 29 | c08e 0008 30 | c08e 001c 31 | c08f 0000 32 | c087 00cf 33 | c086 0011 34 | c08e 000c 35 | 7c32 0002 36 | 7c20 ffff 37 | 7d00 0002 38 | 4000 0000 39 | 7c22 0000 40 | 7c21 0000 41 | 7c20 fffb 42 | 7c22 0004 43 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a 2 | 3 | c084 0053 4 | c085 0053 5 | 6 | c0a9 0002 7 | 8 | 4001 0007 9 | 7c22 0004 10 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | c090 0040 5 | c091 0040 6 | c092 0040 7 | c093 0040 8 | c094 0040 9 | c095 0040 10 | c096 0040 11 | c097 0040 12 | c098 0040 13 | c099 0040 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit/Near/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40e6 02b8 /*vxsg_mode00_field00_seq39*/ 4 | 4140 02b8 /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4192 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41e6 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 4220 000b /*vxsg_mode02_field00_seq22*/ 10 | 425a 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0200 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/Near/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1}, 26 | "Depth_Conv_Offset" : {"27": 0}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 800}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit/camera_intrinsic.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN": { 3 | "2": 1 4 | }, 5 | "Calibration_Date_stamp": { 6 | "3": 42402019 7 | }, 8 | "Intrinsic": { 9 | "5": [ 10 | 664.982, 11 | 0.000, 12 | 381.462, 13 | 0.000, 14 | 663.478, 15 | 229.907, 16 | 0.000, 17 | 0.000, 18 | 1.000 19 | ] 20 | }, 21 | "Distortion_Coeff": { 22 | "6": [ 23 | -0.243072, 24 | 0.200952, 25 | -0.000248, 26 | -0.000976, 27 | -0.166482 28 | ] 29 | } 30 | } -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c084 001f 2 | c085 001f 3 | c75d 0000 4 | c75f 0022 5 | c73d 0003 6 | c739 0044 7 | c750 0700 8 | c751 0700 9 | c752 0700 10 | c753 0700 11 | c754 0698 12 | c73b 0001 13 | c731 1010 14 | c75e 001f 15 | c730 1f1f 16 | 7c0b 00ff 17 | 7d05 0001 18 | 7c07 0000 19 | 7ce2 00ff 20 | c07f 0000 21 | c080 ffff 22 | c081 ffff 23 | c082 ffff 24 | c083 ffff 25 | c086 ff00 26 | c087 ffff 27 | c08e 0008 28 | c08e 001c 29 | c08f 0000 30 | c087 00cf 31 | c086 0011 32 | c08e 000c 33 | 7c32 0002 34 | 7c20 ffff 35 | 7d00 0002 36 | 4000 0000 37 | 7c22 0000 38 | 7c21 0000 39 | 7c20 fffb 40 | 7c22 0004 41 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a \\ PIXCNT Alignment 2 | 3 | c34a 0000 \\ Coring Disable Small sig Removal 4 | 5 | c084 001f 6 | c085 001f \\ Enable LDs via Blanking signals 7 | 8 | c0a9 0002 9 | 10 | 4001 0007 11 | 7c22 0004 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | c090 0040 5 | c091 0040 6 | c092 0040 7 | c093 0040 8 | c094 0040 9 | c095 0040 10 | c096 0040 11 | c097 0040 12 | c098 0040 13 | c099 0040 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit_RevC/Far/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40e6 009c /*vxsg_mode00_field00_seq39*/ 4 | 4140 009c /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4192 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41e6 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 421a 000b /*vxsg_mode02_field00_seq22*/ 10 | 4254 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0a00 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Far/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1.22014}, 26 | "Depth_Conv_Offset" : {"27": 2003.8}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 1000}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c75d 0000 2 | c75f 0022 3 | c73d 0003 4 | c739 0044 5 | c750 0700 6 | c751 0700 7 | c752 0700 8 | c753 0700 9 | c754 0698 10 | c73b 0001 11 | c731 1010 12 | c75e 001f 13 | c730 1f1f 14 | 7c0b 00ff 15 | 7d05 0001 16 | 7c07 0000 17 | 7ce2 00ff 18 | c07f 0000 19 | c080 ffff 20 | c081 ffff 21 | c082 ffff 22 | c083 ffff 23 | c084 001f 24 | c085 001f 25 | c086 ff00 26 | c087 ffff 27 | c08e 0008 28 | c08e 001c 29 | c08f 0000 30 | c087 00cf 31 | c086 0011 32 | c08e 000c 33 | 7c32 0002 34 | 7c20 ffff 35 | 7d00 0002 36 | 4000 0000 37 | 7c22 0000 38 | 7c21 0000 39 | 7c20 fffb 40 | 7c22 0004 41 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a 2 | 3 | 4001 0007 4 | 7c22 0004 5 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | c090 0040 5 | c091 0040 6 | c092 0040 7 | c093 0040 8 | c094 0040 9 | c095 0040 10 | c096 0040 11 | c097 0040 12 | c098 0040 13 | c099 0040 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit_RevC/Mid/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40ec 01d0 /*vxsg_mode00_field00_seq39*/ 4 | 4146 01d0 /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4198 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41ec 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 4226 000b /*vxsg_mode02_field00_seq22*/ 10 | 4260 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0200 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Mid/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 2}, 12 | "S0_LD_TAP" : {"13" : 64}, 13 | "S1_LD_TAP" : {"14" : 64}, 14 | "S2_LD_TAP" : {"15" : 64}, 15 | "S0_SUB_TAP" : {"16" : 64}, 16 | "S1_SUB_TAP" : {"17" : 64}, 17 | "S2_SUB_TAP" : {"18" : 64}, 18 | "Pulse_Spacing" : {"19" : 64}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1.5}, 26 | "Depth_Conv_Offset" : {"27": 0}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 1000}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/10_TGstartup_ADILD.lf: -------------------------------------------------------------------------------- 1 | c75d 0000 2 | c75f 0022 3 | c73d 0003 4 | c739 0044 5 | c750 0700 6 | c751 0700 7 | c752 0000 8 | c753 0000 9 | c754 0698 10 | c73b 0000 11 | c731 1010 12 | c75e 0013 13 | c730 1313 14 | c75e 0013 15 | c730 1313 16 | 7c0b 00ff 17 | 7d05 0001 18 | 7c07 0000 19 | 7ce2 00ff 20 | c07f 0000 21 | c080 ffff 22 | c081 ffff 23 | c082 ffff 24 | c083 ffff 25 | c084 0013 26 | c085 0013 27 | c086 ff00 28 | c087 ffff 29 | c08e 0008 30 | c08e 001c 31 | c08f 0000 32 | c087 00cf 33 | c086 0011 34 | c08e 000c 35 | 7c32 0002 36 | 7c20 ffff 37 | 7d00 0002 38 | 4000 0000 39 | 7c22 0000 40 | 7c21 0000 41 | 7c20 fffb 42 | 7c22 0004 43 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/11_XV_mux.lf: -------------------------------------------------------------------------------- 1 | c020 1167 2 | c028 00f1 3 | c100 0077 4 | c101 0077 5 | c102 0077 6 | c103 0077 7 | c104 0000 8 | c105 0000 9 | c106 0000 10 | c107 0000 11 | c108 00ff 12 | c109 00ff 13 | c10a 00ff 14 | c10b 00ff 15 | c10c 00ff 16 | c10d 00ff 17 | c10e 00ff 18 | c10f 00ff 19 | c070 0101 20 | c071 0303 21 | c072 0504 22 | c073 0706 23 | c074 0200 24 | c075 0504 25 | c076 0706 26 | c077 0908 27 | c078 110a 28 | c079 1312 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/13_Mode_Start.lf: -------------------------------------------------------------------------------- 1 | c3cf 010a 2 | 3 | c084 0053 4 | c085 0053 5 | 6 | c0a9 0002 7 | 8 | 4001 0007 9 | 7c22 0004 10 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/1_AFEstartup_silicon.lf: -------------------------------------------------------------------------------- 1 | c022 0001 2 | c031 0001 3 | c021 0000 4 | c020 0167 5 | c720 1100 6 | c030 0001 7 | c027 0001 8 | c025 0001 9 | c01c 0400 10 | c000 0001 11 | c001 0002 12 | c002 000f 13 | c003 01ec 14 | c023 0001 15 | c024 0ff2 16 | c026 0001 17 | c04f 000c 18 | c050 0011 19 | c051 0000 20 | c055 ffff 21 | c056 ffff 22 | c057 ffff 23 | c058 ffff 24 | c05d 0044 25 | c05e 0044 26 | c038 4000 27 | c039 4000 28 | c03a 0040 29 | c03b 0040 30 | c040 0040 31 | c041 0040 32 | c042 6040 33 | c043 6040 34 | c088 0000 35 | c089 0000 36 | c08a 00ff 37 | c08b 0000 38 | c08f 0000 39 | c0a4 4444 40 | c0a5 4444 41 | c0a6 0044 42 | c0e0 0002 43 | c044 6303 44 | c046 0043 45 | c02d 0000 46 | c02c 0001 47 | c01b 1140 48 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/2_LDstartup.lf: -------------------------------------------------------------------------------- 1 | c08c 0010 2 | c08d 0003 3 | c0a9 0002 4 | c090 0040 5 | c091 0040 6 | c092 0040 7 | c093 0040 8 | c094 0040 9 | c095 0040 10 | c096 0040 11 | c097 0040 12 | c098 0040 13 | c099 0040 14 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/3_MIPIstartup_ADDI9033_CYP.lf: -------------------------------------------------------------------------------- 1 | c400 0082 2 | c4aa 0001 3 | c401 0004 4 | c402 0003 5 | c403 0004 6 | c404 0003 7 | c405 0002 8 | c406 0003 9 | c407 0009 10 | c408 0003 11 | c41e 0080 12 | c4d4 00c2 13 | c4c4 0002 14 | c4f0 0000 15 | c4df 00b0 16 | c4e2 0007 17 | c4df 0000 18 | c4e2 0006 19 | c4e2 0002 20 | c4d3 001f 21 | c431 0082 22 | c4d4 0042 23 | c4d4 00c2 24 | c4da 0001 25 | c437 001e 26 | c436 002d 27 | c400 0002 28 | c431 0080 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/4_Driver_enable.lf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/aditof_sdk/df23b8912c47e738020a31ce1981a07729e9f8c6/tools/calibration-96tof1/config/BM_Kit_RevC/Near/4_Driver_enable.lf -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/8_LoopNumAddrList.lf: -------------------------------------------------------------------------------- 1 | /*LoopNum Addrs & Original Values for all modes/fields/seqs:*/ 2 | /*Addr Ori chan_modex_seqname*/ 3 | 40e6 02b8 /*vxsg_mode00_field00_seq39*/ 4 | 4140 02b8 /*vx0_mode00_field00_seq38*/ 5 | 474e ff77 /*dummy_link_var_var*//*vx1_mode00_field00_seq38*/ 6 | 4192 02f0 /*vxsg_mode01_field00_seq36*/ 7 | 41e6 02f0 /*vx0_mode01_field00_seq33*/ 8 | 4820 0210 /*vx1_mode01_field00_seq34*//*vx1_mode01_field00_seq33*/ 9 | 4220 000b /*vxsg_mode02_field00_seq22*/ 10 | 425a 000b /*vx0_mode02_field00_seq06*/ 11 | 48a8 0200 /*vx1_mode02_field00_seq07*//*vx1_mode02_field00_seq06*/ 12 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/linear_cal.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN" : {"2" : 1}, 3 | "Calibration_Date_stamp" : {"3" : 4242019}, 4 | "ISATG_Version" : {"5" : 1}, 5 | "Cal_SW Version" : {"6" : 1}, 6 | "Cal_Type" : {"7" : 1}, 7 | "Mode" : {"8" : 0}, 8 | "Exp_Level" : {"9" : 0}, 9 | "Timing_Project_Mode" : {"10" : 0}, 10 | "Pulse_Count" : {"11" : 100}, 11 | "No_of_Laser" : {"12" : 4}, 12 | "S0_LD_TAP" : {"13" : 102}, 13 | "S1_LD_TAP" : {"14" : 102}, 14 | "S2_LD_TAP" : {"15" : 102}, 15 | "S0_SUB_TAP" : {"16" : 102}, 16 | "S1_SUB_TAP" : {"17" : 102}, 17 | "S2_SUB_TAP" : {"18" : 102}, 18 | "Pulse_Spacing" : {"19" : 102}, 19 | "STDBY_Reg" : {"20" : 0}, 20 | "Cal_Init_Offset" : {"21" : 0}, 21 | "Cal_XCorr" : {"22" : [12364, 15390, 15619, 15687, 15712, 15697, 15679, 15658, 15611, 15576, 15550, 15527, 15499, 15467, 15429, 15385, 15337, 15293, 15244, 15190, 15137, 15088, 15059, 15027, 14993, 14947, 14904, 14865, 14829, 14791, 14752, 14728, 14696, 14632, 14592, 14532, 14471, 14389, 14339, 14290, 14275, 14248, 14242, 14265, 14291, 14395, 14510, 14748, 1725]}, 22 | "Cal_XPwr" : {"23" : [8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8]}, 23 | "Depth_Slope" : {"24" : 1024}, 24 | "Depth_Offset" : {"25" : 0}, 25 | "Depth_Conv_Gain" : {"26" : 1}, 26 | "Depth_Conv_Offset" : {"27": 0}, 27 | "Depth Max Value" : {"28" : 200}, 28 | "Depth Min Value" : {"29" : 800}, 29 | "Grid converter selection" : {"30": 0} 30 | } 31 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/r_lfs/9_RepeatNumAddrList_1.lf: -------------------------------------------------------------------------------- 1 | /*Pulsecount :505*/ 2 | 46e0 01f9 3 | 41c2 01f9 4 | 46bc 01f9 5 | 4686 01f9 6 | 4208 01f9 7 | 410a 01f9 8 | 4242 01f9 9 | 41ce 01f9 10 | 4110 01f9 11 | 41d4 01f9 12 | 47d6 01f9 13 | 415c 01f9 14 | 485e 01f9 15 | 47a0 01f9 16 | 40b0 01f9 17 | 4122 01f9 18 | 47e8 01f9 19 | 477c 01f9 20 | 46aa 01f9 21 | 47b2 01f9 22 | 416e 01f9 23 | 41b0 01f9 24 | 46f2 01f9 25 | 4174 01f9 26 | 41bc 01f9 27 | 40fe 01f9 28 | 411c 01f9 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/Near/r_lfs/9_RepeatNumAddrList_2.lf: -------------------------------------------------------------------------------- 1 | /*Pulsecount :505*/ 2 | 46e0 01f9 3 | 41c2 01f9 4 | 46bc 01f9 5 | 4686 01f9 6 | 4208 01f9 7 | 410a 01f9 8 | 4242 01f9 9 | 41ce 01f9 10 | 4110 01f9 11 | 41d4 01f9 12 | 47d6 01f9 13 | 415c 01f9 14 | 485e 01f9 15 | 47a0 01f9 16 | 40b0 01f9 17 | 4122 01f9 18 | 47e8 01f9 19 | 477c 01f9 20 | 46aa 01f9 21 | 47b2 01f9 22 | 416e 01f9 23 | 41b0 01f9 24 | 46f2 01f9 25 | 4174 01f9 26 | 41bc 01f9 27 | 40fe 01f9 28 | 411c 01f9 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/BM_Kit_RevC/camera_intrinsic.json: -------------------------------------------------------------------------------- 1 | { 2 | "Calibration_SN": { 3 | "2": 1 4 | }, 5 | "Calibration_Date_stamp": { 6 | "3": 42402019 7 | }, 8 | "Intrinsic": { 9 | "5": [ 10 | 664.982, 11 | 0.000, 12 | 381.462, 13 | 0.000, 14 | 663.478, 15 | 229.907, 16 | 0.000, 17 | 0.000, 18 | 1.000 19 | ] 20 | }, 21 | "Distortion_Coeff": { 22 | "6": [ 23 | -0.243072, 24 | 0.200952, 25 | -0.000248, 26 | -0.000976, 27 | -0.166482 28 | ] 29 | } 30 | } -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/eeprom_replace_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "cal_map_path": "", 3 | "firmware_path": "saved_results/00/near/latest/lf_files/", 4 | "mode": "near" 5 | } 6 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/intrinsic_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "intrinsic", 3 | "calibrate_intrinsic": true, 4 | "get_coordinates" : false, 5 | "output_data": false, 6 | 7 | "serial_number": 1, 8 | "min_checkerboards": 3, 9 | 10 | "firmware_path": "config/BM_Kit/Near", 11 | "config_path": "config", 12 | "output_path": "intrinsic", 13 | "results_path": "saved_results", 14 | "data_path": "intrinsic", 15 | 16 | "raw_frame_height": 960, 17 | "raw_frame_width": 640, 18 | "frame_height": 480, 19 | "frame_width": 640, 20 | 21 | "frame_count": 5 22 | 23 | 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/intrinsic_coordinates.json: -------------------------------------------------------------------------------- 1 | {"coordinates": [[[192, 12], [455, 207]], [[34, 131], [309, 346]], [[113, 240], [482, 458]], [[361, 114], [637, 372]]]} 2 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/ld_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "no_ld_max_threshold" : 10, 3 | "1_ld_min_threshold" : 100 4 | } -------------------------------------------------------------------------------- /tools/calibration-96tof1/config/ssh_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "hostname":"192.168.0.167", 3 | "username":"tof", 4 | "password":"toflab", 5 | "remote_path":"/home/tof/Documents" 6 | } 7 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/core/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # BSD 3-Clause License 3 | # 4 | # Copyright (c) 2019, Analog Devices, Inc. 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are met: 9 | # 10 | # 1. Redistributions of source code must retain the above copyright notice, this 11 | # list of conditions and the following disclaimer. 12 | # 13 | # 2. Redistributions in binary form must reproduce the above copyright notice, 14 | # this list of conditions and the following disclaimer in the documentation 15 | # and/or other materials provided with the distribution. 16 | # 17 | # 3. Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived from 19 | # this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # 32 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/logger.json: -------------------------------------------------------------------------------- 1 | { 2 | "version" : 1, 3 | "formatters": { 4 | "basic": { 5 | "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" 6 | } 7 | }, 8 | "handlers": { 9 | "console": { 10 | "class": "logging.StreamHandler", 11 | "level": "DEBUG", 12 | "formatter": "basic", 13 | "stream": "ext://sys.stdout" 14 | } 15 | }, 16 | "loggers": { 17 | " sampleLogger": { 18 | "level": "DEBUG", 19 | "handlers": ["console"], 20 | "propagate": "no" 21 | } 22 | }, 23 | "root": { 24 | "level": "DEBUG", 25 | "handlers": ["console"] 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/pc_config_far.json: -------------------------------------------------------------------------------- 1 | { 2 | "firmware_config_json_path": "config/BM_Kit/Far/sweep_config_far.json", 3 | "target_ir": 2000, 4 | "start_pc": 5, 5 | "max_pc": 2000, 6 | "board_type": "new", 7 | "distance": 210, 8 | "out_file": "new_far.json" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/pc_config_mid.json: -------------------------------------------------------------------------------- 1 | { 2 | "firmware_config_json_path": "config/BM_Kit/M3W/sweep_config_mid.json", 3 | "target_ir": 2000, 4 | "start_pc": 5, 5 | "max_pc": 2000, 6 | "board_type": "new", 7 | "distance": 60, 8 | "out_file": "new_mid.json" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /tools/calibration-96tof1/pc_config_near.json: -------------------------------------------------------------------------------- 1 | { 2 | "firmware_config_json_path": "config/BM_Kit/Near/sweep_config_near.json", 3 | "target_ir": 2000, 4 | "start_pc": 5, 5 | "max_pc": 2000, 6 | "board_type": "old", 7 | "distance": 16, 8 | "out_file": "old_near.json" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /tools/deps/wingetopt/.gitignore: -------------------------------------------------------------------------------- 1 | CMakeFiles 2 | Makefile 3 | cmake_install.cmake 4 | install_manifest.txt 5 | -------------------------------------------------------------------------------- /tools/deps/wingetopt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | PROJECT(wingetopt) 3 | 4 | add_library(wingetopt STATIC src/getopt.c src/getopt.h) 5 | 6 | target_include_directories(${PROJECT_NAME} PUBLIC src/) 7 | -------------------------------------------------------------------------------- /tools/eeprom-tool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(eeprom-tool LANGUAGES CXX C) 3 | 4 | set(CMAKE_CXX_STANDARD 11) 5 | 6 | add_executable(${PROJECT_NAME} main.cpp eeprom_tool.cpp cam96tof1_eeprom.cpp cli_helper.cpp camera_eeprom_factory.cpp) 7 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 8 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof) 9 | if (MSVC) 10 | target_link_libraries(${PROJECT_NAME} PRIVATE wingetopt) 11 | endif (MSVC) 12 | -------------------------------------------------------------------------------- /tools/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Tools 2 | 3 | The tools in this directory provide additional functionalities such as calibrating the TOF camera. 4 | 5 | #### List of Tools 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | calibration-96tof1 | A bundle of python scripts and configuration files that can be used to calibrate the AD-96TOF1-EBZ camera. | 10 | | eeprom-tool | A simple cli tool that allows the user to read / write the content of the eeprom memory to / from a file. | 11 | | test-fxtof1 | A test application used at the factory for verifying the camera. | 12 | 13 | -------------------------------------------------------------------------------- /tools/test-fxtof1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(test-fxtof1) 3 | 4 | find_package(OpenCV) 5 | if(OPENCV_FOUND OR 6 | OPENCV_CORE_FOUND) # we check for this because the OpenCVConfig.cmake(v2.4.9.1) used on dragonboards fails to set OPENCV_FOUND 7 | if(OpenCV_VERSION VERSION_LESS "3.0.0") 8 | message(STATUS "USING OPENCV Version 2") 9 | add_definitions(-DOPENCV2) 10 | endif(OpenCV_VERSION VERSION_LESS "3.0.0") 11 | else() 12 | if (NOT OpenCV_INCLUDE_DIR OR NOT OpenCV_LIBS) 13 | message(FATAL_ERROR "find_package(openCV) failed. OpenCV_INCLUDE_DIR and OpenCV_LIBS need to be set.") 14 | else() 15 | message(STATUS "OpenCV_INCLUDE_DIR and OpenCV_LIBS have been set manually.") 16 | endif() 17 | endif() 18 | 19 | if(DATA_HANDLING) 20 | add_definitions(-DDATA_HANDLING) 21 | endif() 22 | 23 | add_executable(${PROJECT_NAME} main.cpp) 24 | 25 | target_include_directories(${PROJECT_NAME} PRIVATE ${OpenCV_INCLUDE_DIR}) 26 | 27 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) 28 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 29 | 30 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof) 31 | -------------------------------------------------------------------------------- /tools/test-fxtof1/readme.md: -------------------------------------------------------------------------------- 1 | # test-fxtof1 production line testing application 2 | 3 | ## Overview 4 | 5 | camera-test is an application used by the factory to test the quality of the camera, 6 | calibration, as well as the eeprom content. 7 | 8 | In order for the latest frame (both IR and DEPTH image) to be saved as well as the measured 9 | distance, the cmake command must contain -DDATA_HANDLING=1 10 | -------------------------------------------------------------------------------- /utils/dragonboard/53-aditofsdkdragonboard.rules: -------------------------------------------------------------------------------- 1 | # allow read/write access to the eeprom and the temperature sensor for DragonBoard 2 | 3 | SUBSYSTEM=="i2c", 4 | RUN+="/bin/chown root:plugdev /sys/bus/i2c/devices/0-0056/eeprom", 5 | RUN+="/bin/chmod 0060 /sys/bus/i2c/devices/0-0056/eeprom", 6 | RUN+="/bin/chmod 666 /dev/i2c-1" 7 | -------------------------------------------------------------------------------- /utils/dragonboard/config_pipe.service: -------------------------------------------------------------------------------- 1 | description=Service for configuring the TOF data pipe 2 | StartLimitIntervalSec=10 3 | 4 | [Service] 5 | User=root 6 | ExecStart=/home/linaro/workspace/github/aditof_sdk/utils/dragonboard/config_pipe.sh 7 | Restart=on-failure 8 | RestartSec=3s 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /utils/dragonboard/config_pipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set +x 3 | 4 | sudo media-ctl -v -d /dev/media1 -l '"msm_csiphy1":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]' 5 | sudo media-ctl -v -d /dev/media1 -V '"addi903x 1-0064":0[fmt:SBGGR12/640x960 field:none],"msm_csiphy1":0[fmt:SBGGR12/640x960 field:none],"msm_csid0":0[fmt:SBGGR12/640x960 field:none],"msm_ispif0":0[fmt:SBGGR12/640x960 field:none],"msm_vfe0_rdi0":0[fmt:SBGGR12/640x960 field:none]' 6 | -------------------------------------------------------------------------------- /utils/dragonboard/readme.md: -------------------------------------------------------------------------------- 1 | # Utilities for Dragonboard 2 | 3 | This directory contains different utilities may be needed on the Dragonbard. 4 | 5 | #### List of Utilities 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | config_pipe.sh | Configures the video data pipeline coming from the camera | 10 | | config_pipe.service | A 'systemd' startup script that executes config-pipe.sh when linaro boots | 11 | | 53-aditofsdkdragonboard.rules | Allows read/write access to the eeprom and the temperature sensor | 12 | 13 | To configure config-pipe.sh to be executed automatically on boot: 14 | 15 | 1. copy the service file to systemd 16 | ``` 17 | sudo cp config_pipe.service /etc/systemd/system/ 18 | ``` 19 | 2. run: 20 | ``` 21 | sudo systemctl enable config_pipe 22 | ``` 23 | 24 | If you don't want to wait until you reboot the board so the changes take effect, you can start the service right away: 25 | 1. run: 26 | ``` 27 | sudo systemctl start config_pipe 28 | ``` 29 | -------------------------------------------------------------------------------- /utils/jetson/53-aditofsdkjetson.rules: -------------------------------------------------------------------------------- 1 | # allow read/write access to the eeprom and the temperature sensor for Jetson 2 | 3 | SUBSYSTEM=="i2c", 4 | RUN+="/bin/chown root:plugdev /sys/bus/i2c/devices/6-0056/eeprom", 5 | RUN+="/bin/chmod 0060 /sys/bus/i2c/devices/6-0056/eeprom", 6 | RUN+="/bin/chmod 666 /dev/i2c-6" 7 | -------------------------------------------------------------------------------- /utils/jetson/readme.md: -------------------------------------------------------------------------------- 1 | # Utilities for Jetson 2 | 3 | This directory contains different utilities may be needed on the Jetson. 4 | 5 | #### List of Utilities 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | 53-aditofsdkjetson.rules | Allows read/write access to the eeprom and the temperature sensor | 10 | -------------------------------------------------------------------------------- /utils/raspberrypi/53-aditofsdkraspberrypi.rules: -------------------------------------------------------------------------------- 1 | # allow read/write access to the eeprom and the temperature sensor RaspberryPi 2 | 3 | SUBSYSTEM=="i2c", 4 | RUN+="/bin/chown root:plugdev /sys/bus/i2c/devices/10-0056/eeprom", 5 | RUN+="/bin/chmod 0060 /sys/bus/i2c/devices/10-0056/eeprom", 6 | RUN+="/bin/chown root:plugdev /sys/bus/i2c/devices/11-0056/eeprom", 7 | RUN+="/bin/chmod 0060 /sys/bus/i2c/devices/11-0056/eeprom", 8 | RUN+="/bin/chmod 666 /dev/i2c-10", 9 | RUN+="/bin/chmod 666 /dev/i2c-11" 10 | -------------------------------------------------------------------------------- /utils/raspberrypi/readme.md: -------------------------------------------------------------------------------- 1 | # Utilities for Raspberry Pi 2 | 3 | This directory contains different utilities that may be needed on the Raspberry Pi. 4 | 5 | #### List of Utilities 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | tof-server.service | A 'systemd' startup script that starts the Time of Flight server when raspbian boots | 10 | | 53-aditofsdkraspberrypi.rules | Allows read/write access to the eeprom and the temperature sensor | 11 | 12 | To enable the service: 13 | 14 | 1. copy the service file to systemd 15 | ``` 16 | sudo cp tof-server.service /etc/systemd/system/ 17 | ``` 18 | 2. run: 19 | ``` 20 | sudo systemctl enable tof-server 21 | ``` 22 | 23 | If you don't want to wait until you reboot the board so the changes take effect, you can start the service right away: 24 | 1. run: 25 | ``` 26 | sudo systemctl start tof-server 27 | ``` 28 | -------------------------------------------------------------------------------- /utils/raspberrypi/tof-server.service: -------------------------------------------------------------------------------- 1 | description=Service for starting Time of Flight network server 2 | StartLimitIntervalSec=10 3 | 4 | [Unit] 5 | After=NetworkManager.service 6 | 7 | [Service] 8 | User=root 9 | ExecStart=/home/analog/workspace/github/aditof_sdk/build/apps/server/aditof-server 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /utils/xavier/53-aditofsdkxavier.rules: -------------------------------------------------------------------------------- 1 | # allow read/write access to the eeprom and the temperature sensor for Xavier 2 | 3 | SUBSYSTEM=="i2c", 4 | RUN+="/bin/chown root:plugdev /sys/bus/i2c/devices/1-0056/eeprom", 5 | RUN+="/bin/chmod 0060 /sys/bus/i2c/devices/1-0056/eeprom", 6 | RUN+="/bin/chmod 666 /dev/i2c-1" 7 | -------------------------------------------------------------------------------- /utils/xavier/readme.md: -------------------------------------------------------------------------------- 1 | # Utilities for Xavier 2 | 3 | This directory contains different utilities may be needed on the Xavier AGX. 4 | 5 | #### List of Utilities 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | 53-aditofsdkxavier.rules | Allows read/write access to the eeprom and the temperature sensor | 10 | --------------------------------------------------------------------------------