發表文章

目前顯示的是 7月 1, 2018的文章

Using the xfOpenCV library on a Xiinx FPGA board

xfOpenCV包含許多硬體加速函數,幫助開發者於SDx,使用類OpenCV的呼叫方式,快速實現基於FPGA的影像處理。 1. xfOpenCV function (Refer to :  Xilinx OpenCV User Guide ,  OpenCV on Zynq Webinar 1 )       (1) Read the image using cv::imread().       (2) Copy the data to xf::Mat.       (3) Call the processing function(s) in xfOpenCV.       (4) Copy the data from xf::Mat to cv::Mat.       (5) Write the output to image using cv::imwrite(). Note: For reVISION platform , there is no need to explicitly add the xfOpenCV library as an additional source locally in the SDx project.  For ZCU102 based platforms, the xfOpenCV library is available in the <platform_root>/sw/a53_linux/inc/xfopencv folder. For the ZC702 based platforms, the xfOpenCV library is available in the   <platform_root>/sw/a9_linux/inc/xfopencv  folder.                                                                (ex: home/shomin/zc702_trd/sw/a9_linux/inc/xfopencv) Changing the Hardware Kernel Configuration (For importing

Xilinx reVISION sample test 2 (live_IO)

圖片
本文記錄如何使用Xilinx ZC702 執行reVISION 範例程式 (live_IO) Step1: 安裝及下載所需開發工具及範例。 參:  前情提要 [實圖] 1. New SDx project 2. Input project name 3. Add Custom Platform (zc702_trd) 4. Next 5. Choose Templates (Dense Optical flow) 6. Active build configuration: Release, Options check: Generate bitstream and Generate SD card image 7. Build project 8. Wait...(about 30mins on my PC) 9. Copy all files in Release/sd_card folder to ZC702 SD card Step2: 執行build出來的執行.elf檔 (optical flow) 切換Video source 注意重點:  HDMI Input resolution改為1920x1080 線全部都接好再上電(否則會回報input resolution 0x0) 延伸思考: 如何於SDx project中修改source code,使輸入源變為USB3 Camera 儲存optical flow value,設計GPIO輸出

Xilinx Zynq Base Targeted Reference Design (TRD)

本文記錄如何於ZC702執行Base TRD範例程式。(版本: 2015.4) Step1: Download the TRD 參Reference 1.2 Section. Step2:  解壓縮TRD 複製ready to test資料夾內容至SD Card Step3: 連接好所有硬體裝置 HDMI I/O Keyboard, Mouse USB cable to Host PC Step4: 測試 Power on ZC702  比較不同Video Source和Filter Mode下,CPU的運作狀況。 Reference: http://www.wiki.xilinx.com/Zynq+Base+TRD+2015.4 Think: 如何使用SDx設計出一樣的效果? SDx liveIO sample: optical flow 與 TRD 有何差別? (SD Card內的檔案區別?)

Xilinx reVISION sample test 1 (file_IO)

本文記錄如何使用Xilinx ZC702 執行reVISION 範例程式。 Step1: 安裝及下載 Install SDx 2017.2 (2018.2不支援ZC702)  Download ZC702 reVISION package ( reVISION package )  Step2: 設定環境變數 後,執行SDx 2017.2 (參考: FPGAの部屋 ) source /opt/Xilinx/SDx/2017.2/settings64.sh  export SYSROOT=~/zc702_trd/sw/sysroot/  sdx  Step3: 於SDx開啟reVISION範例程式(ex:bilateral-File I/O)並編譯 New project => Xilinx SDx project => Add Custom Platform (zc702_trd) => bilateral-File I/O => Active build configuration (release) => Build Step4: 測試 複製所有於Release/sd_card路徑下的檔案至SD卡  將SD卡插入ZC702, power on  使用GtkTerm tool 連接Host端與ZC702 (設定port number, baud rates,..)  cd /media/card  執行.elf檔  Reference: Xilinx opencv user guide reVISION Getting Started Guide Note(1): It's necessary to change network name to "eth0" for SDx license manager Reference:   https://askubuntu.com/questions/767786/changing-network-interfaces-name-ubuntu-16-04 Note(2):  Add parameter "zc702_trd" in &quo

Visual odometry

圖片
Visual Odometry: The process of incrementally estimating your position and orientation with respect to an initial reference frames by tracking visual features. Refers to estimate not only the distance traveled, but the entire trajectory of a moving robot . Monocular Visual Odometry & Stereo Visual Odometry. (Stereo case is usually much more robust and concrete but restricted by the distance between objects. ) Difference between visual SLAM (Simultaneous Localization and Mapping): Visual SLAM: produces also map of features  Visual odometry: focuses on the camera trajectory. Steps (Stereo): Key: Perfectly feature point matching Reference: Visual Odmetry from scratch - A tutorial for beginners Monocular Visual Odometry using OpenCV Introduction to VO Real-time Stereo VO Multiple View Geometry Data base for testing algorithm Source code: libfovis ( Visual odometry library ) Think: 1. How to shorten the processing time ? (Paper above: 20m