Submitted:
08 August 2023
Posted:
09 August 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Acceleration Scheme
2.1. Overall design
- The dense optical flow field can be used for pixel-level image registration, so the optical flow tracking accuracy is significantly better than that of the sparse optical flow.
- The backend can still use FAST features and their corresponding sparse optical flow for pose estimation or can directly use the dense optical flow for estimation, making it more flexible to use.
- The dense optical flow facilitates the construction of a complete map.
2.2. GF dense optical flow tracking
2.3. FAST feature extraction
- Select a pixel point p in the image and denote its brightness as .
- Set a threshold T for .
- With pixel point p as the center, select 16 pixel points on a circle with a radius of 3.
- If the brightness of N consecutive points on the selected circle is greater than or less than , then the pixel point p can be considered as a feature point.
- Repeat the steps above to perform the same operation for each pixel.
3 Hardware Architecture
3.1. Image preprocessing module
-
The image is divided into 16 contextual regions of size 4×4, and its discrete PDF () can be calculated as following:where MN is the product of the number of rows M and columns N of image pixels, representing the total number of pixels in the image. is the number of pixels with a gray-level of . L is the maximum number of gray-levels in the image; corresponding to an 8-bit image, the value of L is 256.On this basis, the gray-level mapping function in the contextual regions can be obtained as following:where is the number of pixels with a gray-level of in the contextual region. Through the transformation of Equation (9), pixels with a gray-level of in the contextual region can be mapped to corresponding pixels with a gray-level of .
- For each sampled pixel in the image, find the points A, B, C and D from the center of the four relevant contextual regions adjacent to this pixel, with gray-level mappings , , and , respectively, as shown in Figure 3. Assuming that the original pixel intensity at the sample point X is , its new gray value is calculated by bilinear interpolation of the gray-level mappings that were calculated for each of the surrounding contextual regions:where and are normalized distances with respect to the pixel point A.
- Set a threshold for the maximum number of pixels in each of the bins associated with local histograms, and clip and reassign pixels that exceed the threshold to limit contrast enhancement and reduce background noise. After clipping the histogram, the pixels that were clipped are equally redistributed over the whole histogram to keep the total histogram count identical. In this contribution, the clip limit is set to 3, which means that for each bin associated with the local histogram, the maximum number of pixels allowed is 3 times the average histogram contents.
3.2. Pyramid processing module
3.3. Optical flow processing module
3.4. Feature extraction and tracking module
4. Evaluation and Discussion
4.1. Test benchmark system
- FPGA side: Receiver the MIPI image, perform the GF optical flow calculation and the FAST feature extraction and tracking processing.
- FPGA side: Store the FAST feature tracking result and original image data in the PS side DDR, and transfer them to an SD card.
- PC side: Read the raw image data from the SD card, and obtain intermediate results on image preprocessing and FAST feature extraction through high-level synthesis (HLS) simulation (Xilinx, 2014).
- PC side: Input the intermediate results to the MATLAB-based optical flow calculation and feature tracking program, to obtain the FAST feature tracking results of MATLAB.
- Compare feature tracking results from FPGA and MATLAB for verification and analysis.
4.2. Evaluation results
5. Conclusion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ákos, M. , Jeney, M., Dominik, R., Stefan, O. (2021). Hardware accelerated image processing on FPGA based PYNQ-Z2 board. Carpathian Journal of Electronic and Computer Engineering, 14(1): 20-23. [CrossRef]
- Badu, P. , Parthasarathy, E. (2022). Hardware acceleration for object detection using YOLOv4 algorithm on Xilinx Zynq platform. J Real-Time Image Proc 19, 931–940. J Real-Time Image Proc 19, 931–940. [CrossRef]
- Burri, M. , Nikolic, J., Gohl, P., Schneider, T., Rehder, J., Omari, S., Achtelik, W.M., Siegwart, R. (2016). The EuRoC micro aerial vehicle datasets. The International Journal of Robotics Research, 35(10): 1157-1163. [CrossRef]
- Barron, J.L., Fleet, D.J., Beauchemin, S.S. (1994). Performance of optical flow techniques. International Journal of Computer Vision, 12, 43-77. [CrossRef]
- Berthold, K.P. , Brian, G.S. (1981). Determining optical flow. Artificial Intelligence, 17(1-3): 185-203. [CrossRef]
- Chaikalis, D., Passalis, G., Passalis, N., Maroulis, D., Maroulis, T. (2008). Hardware Acceleration for 3D Image Reconstruction. 2008 Panhellenic Conference on Informatics, 147-151. [CrossRef]
- Davison, A.J. & Murray, D. (2022). Simultaneous location and map-building using active vision. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(7): 865-880. [CrossRef]
- Durrant-Whyte, H.F. , & Bailey, T. (2006). Simultaneous localization and mapping: part I. IEEE Robotics & Automation Magazine, 13, 99-110. https://10.1109/MRA.2006.1638022.
- Engel, J. , Koltun, V., Cremers, D. (2018). Direct Sparse Odometry. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(3): 611-625. [CrossRef]
- Fang, W. , Zhang, Y., Yu, Bo., Liu, S. (2017). FPGA-based ORB feature extraction for real-time visual SLAM. 2017 International Conference on Field Programmable Technology (ICFPT), 275-278. [CrossRef]
- Farnebäck, G. (2003). Two-frame motion estimation based on polynomial expansion. Proceeding of the 13th Scandinavian conference on image analysis, 363-370. [CrossRef]
- Floreano, D. , Wood R.J. (2015). Science, technology and the future of small autonomous drones. Nature, 521(7553): 460-6. [CrossRef]
- Gauch, J.M. (1992). Investigations of image contrast space defined by variations on histogram equalization. CVGIP: Graphical Models and Image Processing, 54(4): 269-280. [CrossRef]
- Gour, P. N. , Narumanchi, S., Saurav, S., Singh, S. (2014). Hardware accelerator for real-time image resizing. 18th International Symposium on VLSI Design and Test, Coimbatore, 1-6. [CrossRef]
- Lucas, B.D. , & Kanade, T. (1981). An iterative image registration technique with an application to stereo vision. Proceedings of the 7th international joint conference on Artificial intelligence - Volume 2 (IJCAI), 674-679. https://dl.acm.org/doi/10.5555/1623264.1623280.
- Nikolic, J. , Rehder, J., Burri, M., Gohl, P., Leutenegger, S., Furgale, P.T., Siegwart, R. (2014). A synchronized visual-inertial sensor system with FPGA pre-processing for accurate real-time SLAM. 2014 IEEE International Conference on Robotics and Automation (ICRA), 431-437. [CrossRef]
- Rosten, E. , & Drummond, T. (2006). Machine learning for high-speed corner detection. Proceedings of the 9th European conference on Computer Vision (ECCV) - Volume Part I, 430-443. [CrossRef]
- Suleiman, A. , Zhang, Z., Carlone, L., Karaman, S., Sze, V. (2019). Navion: A 2mW Fully Integrated Real-Time Visual-Inertial Odometry Accelerator for Autonomous Navigation of Nano Drones. IEEE Journal of Solid-State Circuits, 54(4): 1106-1119. [CrossRef]
- Scaramuzza, D. , & Fraundorfer, F. (2011). Visual odometry: part I – the first 30 years and fundamentals. IEEE Robotics & automation magazine, 18(4): 80-92. [CrossRef]
- Tang, J. , Liu, S., Zhang, Z., Fang W., Zhang Y. (2018). π-SoC: Heterogeneous SoC Architecture for Visual Inertial SLAM Applications. 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 8302-8307. [CrossRef]
- Xu, K. , Wang, X., Liu, X., Cao, C., Li, H., Peng, H., Wang, D. (2021). A dedicated hardware accelerator for real-time acceleration of YOLOv2. J Real-Time Image Proc, 18, 481-492. [CrossRef]
- Xilinx Inc. (2015). Accelerating OpenCV applications with Zynq-7000 All Programmable SoC using Vivado HLS videolibraries. [Online]. Available: https://www.xilinx.com/support/documentation/application_notes/xapp1167.pdf.
- Xilinx Inc. (2014). Vivado Design Suite tutorial high level synthesis, UG871 (v2014.1). [Online]. Available: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug871-vivado-high-level-synthesis-tutorial.pdf.
- Zuiderveld, K. (1994). Contrast limited adaptive histogram equalization. Graphics Gems, 474-485. [CrossRef]
- Zhang, Z. , Suleiman, A., Carlone, L., Sze, V., Karaman, S. (2017). Visual-inertial odometry on chip: an algorithm-and-hardware co-design approach. Robotics: Science and Systems. [CrossRef]











| Sequences | |||||
|---|---|---|---|---|---|
| i-1 | i | i+1 | i+2 | i+3 | |
| Memory content | The k-1 st image and its pyramid thumbnails | The k-1 st image and its pyramid thumbnails | The k-1 st image and its pyramid thumbnails | The optical flow between the k-2 st and k-1 st images | |
| The k st image and its pyramid thumbnails | The k st image and its pyramid thumbnails | The k st image and its pyramid thumbnails | The optical flow between the k-1 st and k st images | ||
| The k+1 st image and its pyramid thumbnails | The k+1 st image and its pyramid thumbnails | The k+1 st image and its pyramid thumbnails | |||
| The k+2 st image and its pyramid thumbnails | The k+2 st image and its pyramid thumbnails | ||||
| The k+3 st image and its pyramid thumbnails | |||||
| Processing tasks | Receive the k-1 st image and perform pyramid down; | Calculate the pyramid optical flow of the k-1 st image; Receive the k st image and perform pyramid down; |
Obtain the pyramid optical flow of the k-1 st image; Calculate the pyramid optical flow of the k st image; Receive the k+1 st image and perform pyramid down; |
Obtain the pyramid optical flow of the k st image; Calculate the pyramid optical flow of the k+1 st image; Receive the k+2 st image and perform pyramid down; Calculate the optical flow between the k-1 st and k st images; |
Obtain the pyramid optical flow of the k+1 st image; Calculate the pyramid optical flow of the k+2 st image; Receive the k+3 st image and perform pyramid down Calculate the; optical flow between the k st and k+1 st images. |
| Resource | Available | Utilization | Utilization % |
|---|---|---|---|
| LUT (look up table) | 341280 | 123300 | 36% |
| FF (flip flop) | 682560 | 147172 | 22% |
| BRAM | 744 | 386.5 | 52% |
| URAM | 112 | 68 | 61% |
| DSP | 3528 | 686 | 19% |
| IO | 328 | 82 | 25% |
| BUFG | 404 | 15 | 4% |
| MMCM | 4 | 1 | 25% |
| PLL | 8 | 3 | 38% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).