a module solution provider ToF T1 User Guide Date: 2017/02/13 Software Test Engineer Hardware Test Supervisor Test Supervisor Center Supervisor Rex Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014
Version History Date Version Remark 2017/02/13 0.1 first draft 2017/04/20 0.2 Add T1 on Raspberry Pi 3 Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-1-
Table of Contents 1. INSTALLED OPENNI ON RASPBERRY PI 3... 3 2. INSTALL OPENNI DRIVER FOR WINDOWS... 錯誤! 尚未定義書籤 3. NIVIEWER... 22 4. HOW TO USE AN TOF PROJECT... 30 5. SAMPLES INTRODUCTION... 36 Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-2-
1. Installed OpenNI on Raspberry Pi 3 This chapter describes how to use the ToF camera on Raspberry Pi, including the Raspberry Pi environment setup, initial setup, driver installation, and so on. If you already have your own Raspberry Pi 3 environment, you can skip to the chapter 2. If you want ToF camera running on Windows system, you can skip to the chapter 3. 1.1. Burn operating system image Pre-requisite for burning OS image : 1. Raspbian Jessie, you can download from https://www.raspberrypi.org/downloads/raspbian/ 2. MicroSD card (at least 8 GB, because the OS image is more than 4GB), it s need to be formatted and reverted to an entire partition in logical size adjustment. 3. Burning software, here uses Win32 Disk Imager 1.0 on Windows. Step1. After starting the program, the "Device" list on the right side of the main screen will display all the USB devices that have been plugged in. Then select the device to be written. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-3-
Step2. Press the button behind "Image File" to select the image to be burned. Step3. Select the image you want to burn. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-4-
Step4. Press the "Write" button to start burning. Make sure which device be written is correct or not. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-5-
Step5. Wait for the image to finish burning. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-6-
1.2. Raspberry Pi 3 environment initial setup To set up your Raspberry Pi you will need: 1. SD card 2. Micro USB power 3. HDMI output 4. Ethernet (network) cable 5. USB keyboard and mouse (USB2.0) Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-7-
1. SD card Insert burned MicroSD card on section 1-1 into the slot behind the raspberry pi 3. 2. Micro USB power Raspberry Pi 3 Model B Requires a 5.1V - 2.5A (2500m/A) Power Supply for best results. 3. HDMI output You can output to screen by HDMI to HDMI lead or HDMI to DVI lead. 4. Ethernet (network) cable Networking is optional, although it makes updating and getting new software for your Raspberry Pi much easier. 5. USB keyboard and mouse (USB2.0) Any standard USB keyboard and mouse should work. Keyboards or mice that take a lot of power from the USB ports. 1.3. Initial setup Step1. Open Terminal Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-8-
Step2. input command : sudo raspi-config Step3. Change password Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-9-
Step4. Change hostname Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-10-
Step5. Internationalisation Options Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-11-
In Change Locale, find en_gb UTF-8 and press spacebar to cancel option. Then find en_us UTF-8 and press Spacebar to select option. Press Enter to finish Change Locale. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-12-
In Change Timezone, find your city and select it. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-13-
In Change Wi-fi Country, find your country and select it. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-14-
Step6. Press Right Direction Key to finish configuration and reboot. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-15-
Step7. Insert an Ethernet line or open Wi-Fi. Open Terminal and input command to upgrade : sudo apt-get -y dist-upgrade Step7. Input command to set the system to the correct time automatically: sudo timedatectl set-ntp yes Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-16-
2. Install driver for Raspberry Pi 3 Step1. Extract Calculus-Linux-Pi3-OpenNI2.2.tar.gz Step2. Open Terminal and input command to open extracted folder : (example : Folder on the desktop) cd Desktop/Calculus-Linux-Arm-OpenNI2.2/ Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-17-
Step3. Input command to install OpenNI driver: sudo./install.sh Step4. Launch OpenGL driver in order to show depth result. Input command to open configuration: sudo raspi-config Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-18-
Select Advanced Options Open the OpenGL driver. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-19-
Reboot and run NiViewer in: /home/pi/desktop/ Calculus-Linux-Arm-OpenNI2.2/tools Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-20-
3. Install driver for Windows Please check your Windows OS support 64bit or 32 bit. If your Windows OS support 64bit, install OpenNI-Windows-x64-2.2(caculus). If your Windows OS only support 32 bit, install OpenNI-Windows-x86-2.2(caculus). Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-21-
4. NIviewer 4.1. Launch NiViewer Step1. Plug both data and power cable to module. Step2. double click shortcut named NiViewer2.2(x64) with Caculus Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-22-
Step3. Initial screen as below. 1. Depth image 2. IR image 3. Measuring Pointer Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-23-
4.2. Display Mode Press key p or mouse right click->view->pointer mode will display more information in the bottom of the screen. 1. Distance (cm) from lens to measuring pointer target. 2. Frame count and timestamp (second). 3. Depth range of the current screen. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-24-
4.3. VIew/Presets Mouse right click will show menu as below. The item [5][8][9][0][-][=] will not work because the module lack of RGB camera. 4.4. VIew/Screen Layout The item Overlay means depth image lay on color ones, but the module is lack of color camera. It has no function of the item. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-25-
4.5. VIew/Depth 1. Off: turn the depth screen off 2. Linear Histogram: the depth view which NiViewer default show. 3. Psychedelic: In this mode each centimeter will have a difference color. 4. Psychedelic (millimeters): In this mode each centimeter will have a difference color and millimeters will have different shades. 5. Rainbow: the depth map with rainbow colors view mode. 4.6. VIew/Color No function cause of no color camera sensor. 4.7. Device/Streams/Depth 1. On/Off: turn depth stream on or off 2. Video Mode: there are 640x480@30fps or 80x60@30 fps for choice. 3. Mirror: change image to mirror 4. Reset Cropping: You can reset cropping to initial image size. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-26-
4.8. Device/Streams/Color No function cause of no color camera sensor. 4.9. Device/Streams/IR 1. On/Off: turn depth stream on or off 2. Video Mode: there are 640x480@30fps or 80x60@30 fps for choice. 3. Mirror: change image to mirror 4. Reset Cropping: You can reset cropping to initial image size. 4.10. Device/Registration No function cause of no color camera sensor. 4.11. Device/Frame Sync Make IR and Depth stream restart on the same frame. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-27-
4.12. Device/Mirror All Set both Depth and IR image to mirror direction. 4.13. Capture Step to record frames: Step1. Mouse right ->Capture->Start or press [s] key Step2. Pop up dialogue window. Type filename and where you want to save it. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-28-
Step3. Start capture. The status will show up on top of the screen. Step4. Press [x] key or mouse right->capture->stop to stop recording. 4.14. Play Pause/Resume: pause frame, click again will resume Read one frame: click will step one by one frame. 4.15. Quit Press [Esc] key or mouse right as below to leave NiViewer application. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-29-
5. How to use an ToF project Step1. Open the project data (Here use visual studio 2013). Step2. If your IDE version higher than visual studio 2010, please upgrade VC++ compiler and library. Right click the project name in solution explorer, click Upgrade VC++ Compiler and Libraries. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-30-
Step3. Right click the project name and click Properties. Choose C/C++ General Additional Include Directories. Add OpenNI2 Include folder path. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-31-
Choose C/C++ Linker Additional Library Directories. Add OpenNI2 library folder path. Right click the project name and click Build to build the project. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-32-
Step4. If the following error occurs, please change solution platform. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-33-
Step5. Open folder of project. Put c5v0xe1.dll in :../<project>/< solution platform >/Debug (Release)/OpenNI/Driver * c5v0xe1.dll can be found in : C:\Program Files\OpenNI2\Tools\OpenNI2\Drivers Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-34-
Step6. Run the ToF project. Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-35-
6. Samples Introduction 3.1 SimpleRead SimpleRead can output the depth data (measured in millimeters) of center pixel of current screen. If you want to ckeck other pixel data, please change the index of depth data array. For more information about OpenNI development, please refer to following link: http://openni.ru/openni-programmers-guide/index.html Copyright JORJIN TECHNOLOGIES INC. LIMITED 2014-36-