Generic FPGA Pre-Processing Image Library for Industrial Vision Systems
Abstract
:1. Introduction
2. Related Work
3. Proposed Library
3.1. RGB/Gray
3.2. RGB/YCbCr
3.3. Inverse
3.4. Brightness
3.5. Binary
3.6. Convolution Mask
Algorithm 1 Convolution mask algorithm |
|
3.7. Sobel
3.8. Mean
3.9. Gaussian Filter
3.10. Erosion
3.11. Dilation
4. Experimental Setup
4.1. Architecture
4.2. Zybo Z7 Pcam 5C Demo
4.3. Frame Transmission
5. Experimental Results
5.1. Filters Results
5.2. Filters Processing Time
5.3. Industrial Application
6. Discussion
6.1. Developed Algorithms
6.2. CheckMate Integration
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Ebayyeh, A.A.R.M.A.; Mousavi, A. A Review and Analysis of Automatic Optical Inspection and Quality Monitoring Methods in Electronics Industry. IEEE Access 2020, 8, 183192–183271. [Google Scholar] [CrossRef]
- Chisholm, T.; Lins, R.; Givigi, S. FPGA-Based Design for Real-Time Crack Detection Based on Particle Filter. IEEE Trans. Ind. Inform. 2020, 16, 5703–5711. [Google Scholar] [CrossRef]
- Silva, B.A.d.; Lima, A.M.; Arias-Garcia, J.; Huebner, M.; Yudi, J. A Manycore Vision Processor for Real-Time Smart Cameras. Sensors 2021, 21, 7137. [Google Scholar] [CrossRef] [PubMed]
- Soubervielle-Montalvo, C.; Perez-Cham, O.E.; Puente, C.; Gonzalez-Galvan, E.J.; Olague, G.; Aguirre-Salado, C.A.; Cuevas-Tello, J.C.; Ontanon-Garcia, L.J. Design of a Low-Power Embedded System Based on a SoC-FPGA and the Honeybee Search Algorithm for Real-Time Video Tracking. Sensors 2022, 22, 1280. [Google Scholar] [CrossRef] [PubMed]
- Rodríguez-Araújo, J.; Rodríguez-Andina, J.J.; Fariña, J.; Chow, M.-Y. Field-Programmable System-on-Chip for Localization of UGVs in an Indoor iSpace. IEEE Trans. Ind. Inform. 2014, 10, 1033–1043. [Google Scholar] [CrossRef]
- Čížek, P.; Faigl, J. Real-Time FPGA-Based Detection of Speeded-Up Robust Features Using Separable Convolution. IEEE Trans. Ind. Inform. 2018, 14, 1155–1163. [Google Scholar] [CrossRef]
- Bhowmik, D.; Appiah, K. Embedded vision systems: A review of the literature. In Proceedings of the Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 10824 LNCS, Santorini, Greece, 2–4 May 2018; pp. 204–216. [Google Scholar] [CrossRef]
- Ezilarasan, M.R.; Britto; Pari, J.; Leung, M.F. Reconfigurable Architecture for Noise Cancellation in Acoustic Environment Using Single Multiply Accumulate Adaline Filter. Electronics 2020, 12, 810. [Google Scholar] [CrossRef]
- Seng, K.P.; Lee, P.J.; Ang, L.M. Embedded Intelligence on FPGA: Survey, Applications and Challenges. Electronics 2021, 10, 895. [Google Scholar] [CrossRef]
- Dinh, T.P.; Pham-Quoc, C.; Thinh, T.N.; Do Nguyen, B.K.; Kha, P.C. A flexible and efficient FPGA-based random forest architecture for IoT applications. Internet Things 2023, 22, 100813. [Google Scholar] [CrossRef]
- Asano, S.; Maruyama, T.; Yamaguchi, Y. Performance comparison of FPGA, GPU and CPU in image processing. In Proceedings of the FPL 09: 19th International Conference on Field Programmable Logic and Applications (2009), Prague, Czech Republic, 31 August–2 September 2009; pp. 126–131. [Google Scholar] [CrossRef]
- Fowers, J.; Brown, G.; Cooke, P.; Stitt, G. A performance and energy comparison of FPGAs, GPUs, and multicores for sliding-window applications. In Proceedings of the ACM/SIGDA International Symposium on Field Programmable Gate Arrays, Monterey, CA, USA, 22–24 February 2012; pp. 47–56. [Google Scholar]
- Chen, D.; Singh, D. Fractal video compression in OpenCL: An evaluation of CPUs, GPUs, and FPGAs as acceleration platforms. In Proceedings of the Asia and South Pacific Design Automation Conference, ASP-DAC (2013), Yokohama, Japan, 22–25 January 2013; pp. 297–304. [Google Scholar] [CrossRef]
- HajiRassouliha, A.; Taberner, A.J.; Nash, M.P.; Nielsen, P.M. Suitability of recent hardware accelerators (DSPs, FPGAs, and GPUs) for computer vision and image processing algorithms. Signal Process. Image Commun. 2018, 68, 101–119. [Google Scholar] [CrossRef]
- Rakvic, R.N.; Ngo, H.; Broussard, R.P.; Ives, R.W. Comparing an FPGA to a cell for an image processing application. In Eurasip Journal on Advances in Signal Processing; Springer: Berlin/Heidelberg, Germany, 2010; p. 764838. [Google Scholar] [CrossRef]
- Areibi, S.; Bld, A.T. A First Look at VHDL For Digital Design; Technical Report 2023-01P; School of Engineering at the University of Guelph: Guelph, ON, Canada, 2019. [Google Scholar]
- Coussy, P.; Gajski, D.D.; Meredith, M.; Takach, A. An introduction to high-level synthesis. IEEE Des. Test Comput. 2009, 26, 8–17. [Google Scholar] [CrossRef]
- Zohouri, H.R. High Performance Computing with FPGAs and OpenCL. arXiv 2018, arXiv:1810.09773. [Google Scholar]
- Sghaier, A.; Douik, A.; Machhout, M. FPGA implementation of filtered image using 2D Gaussian filter. Int. J. Adv. Comput. Sci. Appl. 2016, 7, 514–520. [Google Scholar] [CrossRef]
- Linares-Barranco, A.; Perez-Peña, F.; Moeys, D.P.; Gomez-Rodriguez, F.; Jimenez-Moreno, G.; Liu, S.C.; Delbruck, T. Low Latency Event-Based Filtering and Feature Extraction for Dynamic Vision Sensors in Real-Time FPGA Applications. IEEE Access 2019, 7, 134926–134942. [Google Scholar] [CrossRef]
- O’Loughlin, D.; Coffey, A.; Callaly, F.; Lyons, D.; Morgan, F. Xilinx vivado high level synthesis: Case studies. In Proceedings of the 25th IET Irish Signals & Systems Conference 2014 and 2014 China-Ireland International Conference on Information and Communications Technologies (ISSC 2014/CIICT 2014), Limerick, Ireland, 26–27 June 2014; pp. 352–356. [Google Scholar] [CrossRef]
- Cortes, A.; Velez, I.; Irizar, A. High level synthesis using Vivado HLS for Zynq SoC: Image processing case studies. In Proceedings of the 2016 Conference on Design of Circuits and Integrated Systems, DCIS 2016-Proceedings (2017), Granada, Spain, 23–25 November 2016; pp. 183–188. [Google Scholar] [CrossRef]
- Hill, K.; Craciun, S.; George, A.; Lam, H. Comparative analysis of OpenCL vs HDL with image-processing kernels on Stratix-V FPGA. In Proceedings of the International Conference on Application-Specific Systems, Architectures and Processors 2015-Septe (2015), Toronto, ON, Canada, 27–29 July 2015; pp. 189–193. [Google Scholar] [CrossRef]
- Cambuim, L.F.; Oliveira, L.A., Jr.; Barros, E.N.; Ferreira, A.P. An FPGA-based real-time occlusion robust stereo vision system using semi-global matching. In Journal of Real-Time Image Processing; Springer: Berlin/Heidelberg, Germany, 2020; pp. 1447–1468. [Google Scholar]
- Suresh, P.; Saravanakumar, U.; Iwendi, C.; Mohan, S.; Srivastava, G. Field-programmable gate arrays in a low power vision system. Comput. Electr. Eng. 2021, 90, 106996. [Google Scholar] [CrossRef]
- Peng, W.; Xie, J.; Gu, Z.; Liao, Q.; Huang, X. A high performance real-time vision system for curved surface inspection. Optik 2021, 232, 166514. [Google Scholar] [CrossRef]
- Ashir, A.M.; Ata, A.A.; Salman, M.S. FPGA-based image processing system for Quality Control and Palletization applications. In Proceedings of the 2014 IEEE International Conference on Autonomous Robot Systems and Competitions, ICARSC 2014 (2014), Espinho, Portugal, 14–15 May 2014; pp. 285–290. [Google Scholar] [CrossRef]
- Guo, H.; Xiao, H.; Wang, S.; He, W.; Yuan, K. Real-time detection and classification of machine parts with embedded system for industrial robot grasping. In Proceedings of the IEEE International Conference on Mechatronics and Automation, ICMA, Beijing, China, 2–5 August 2015; pp. 1691–1696. [Google Scholar] [CrossRef]
- Hocenski, Ž.; Aleksi, I.; Mijaković, R. Ceramic tiles failure detection based on FPGA image processing. In Proceedings of the IEEE International Symposium on Industrial Electronics—ISlE, Seoul, Republic of Korea, 5–8 July 2009; pp. 2169–2174. [Google Scholar] [CrossRef]
- Xilinx. AXI Reference Guide; Xilinx: San Jose, CA, USA, 15 June 2017. [Google Scholar]
- Khudhair, Z.N.; Khdiar, A.N.; El Abbadi, N.K.; Mohamed, F.; Saba, T.; Alamri, F.S.; Rehman, A. Color to Grayscale Image Conversion Based on Singular Value Decomposition. IEEE Access 2023, 11, 54629–54638. [Google Scholar] [CrossRef]
- Kim, N.H.; Yu, S.G.; Kim, S.E.; Lee, E.C. Non-Contact Oxygen Saturation Measurement Using YCgCr Color Space with an RGB Camera. Sensors 2021, 21, 6120. [Google Scholar] [CrossRef] [PubMed]
- Baker, E.J.; Majeed, A.A.; Alazawi, S.A.; Kasim, S.; Hassan, R.; Zakaria, N.H.; Sutikno, T. Video steganography using 3D distance calculator based on YCbCr color components. Indones. J. Electr. Eng. Comput. Sci. 2021, 24, 831. [Google Scholar] [CrossRef]
- Zhou, Y.; Fu, X. Research on the combination of improved Sobel operator and ant colony algorithm for defect detection. In MATEC Web of Conferences; EDP Sciences: Les Ulis, France, 2021; Volume 336, p. 10009. [Google Scholar]
- Tang, X.; Wang, X.; Hou, J.; Wu, H.; Liu, D. An improved Sobel face gray image edge detection algorithm. In Proceedings of the 2020 39th Chinese Control Conference (CCC), Shenyang, China, 27–29 July 2020; pp. 6639–6643. [Google Scholar]
- Zhi, S.; Cui, Y.; Deng, J.; Du, W. An FPGA-based simple RGB-HSI space conversion algorithm for hardware image processing. IEEE Access 2020, 8, 173838–173853. [Google Scholar] [CrossRef]
- Zybo Z7—Digilent Reference. Available online: https://digilent.com/reference/programmable-logic/zybo-z7/start (accessed on 30 October 2021).
- Zybo Z7 Pcam 5C Demo. Available online: https://digilent.com/reference/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/start (accessed on 30 October 2021).
- Introsys, S.A. Available online: https://www.introsys.eu (accessed on 11 November 2021).
- Halcon. Available online: https://www.mvtec.com/products/halcon (accessed on 20 October 2021).
Register/Buffer | Description |
---|---|
Resolution_x | Number of pixels in each row of a frame |
Resolution_y | Number of pixels in each column of a frame |
Count_x | Horizontal position of the current pixel |
Count_y | Vertical position of the current pixel |
Buffer_1 | Contains row y-2 pixel values (y represents the current row) |
Buffer_2 | Contains row y-1 pixel values |
Buffer_3 | Contains the values of the two previous pixels |
Developed Methods | Time (ns) | Clock Cycles |
---|---|---|
RGB/Gray | 10 | 1 |
RGB/YCbCr | 10 | 1 |
Inverse | 10 | 1 |
Brightness | 10 | 1 |
Binary | 10 | 1 |
Sobel | 60 | 6 |
Mean | 40 | 4 |
Gaussian | 30 | 3 |
Erosion | 10 | 1 |
Dilation | 10 | 1 |
Time per Frame (ms) | Time per Pixel (ns) | |||
---|---|---|---|---|
Methods | Mean | Faster | Mean | Faster |
RGB/Gray | 0.092 | 0.066 | 0.044 | 0.032 |
RGB/YCbCr | 0.091 | 0.065 | 0.044 | 0.031 |
Inverse | 0.094 | 0.064 | 0.046 | 0.031 |
Brightness | 0.090 | 0.067 | 0.044 | 0.032 |
Binary | 0.092 | 0.068 | 0.044 | 0.033 |
Sobel | 0.088 | 0.066 | 0.042 | 0.032 |
Mean | 0.086 | 0.064 | 0.041 | 0.031 |
Gaussian | 0.090 | 0.064 | 0.043 | 0.031 |
Erosion | 0.087 | 0.065 | 0.042 | 0.031 |
Dilation | 0.085 | 0.063 | 0.041 | 0.030 |
Time per Frame (ms) | Time per Pixel (ns) | |||
---|---|---|---|---|
Methods | Mean | Faster | Mean | Faster |
RGB/Gray | 13.87 | 10.99 | 6.69 | 5.30 |
RGB/YCbCr | 19.70 | 18.99 | 9.50 | 9.16 |
Inverse | 7.46 | 7.01 | 3.60 | 3.38 |
Brightness | 17.23 | 16.01 | 8.31 | 7.72 |
Binary | 5.37 | 5.00 | 2.59 | 2.41 |
Sobel | 101.19 | 79.00 | 48.80 | 38.10 |
Mean | 83.67 | 80.99 | 40.35 | 39.06 |
Gaussian | 54.81 | 53.00 | 26.43 | 25.56 |
Erosion | 11.07 | 9.99 | 5.34 | 4.82 |
Dilation | 18.48 | 18.00 | 8.91 | 8.68 |
Developed Methods | LUT (Units) | LUTRAM (Units) | FF (Units) | BRAM (Units) |
---|---|---|---|---|
RGB/Gray | 15 | 0 | 4 | 0 |
RGB/YCbCr | 145 | 0 | 28 | 0 |
Inverse | 26 | 0 | 27 | 0 |
Brightness | 29 | 0 | 28 | 0 |
Binary | 2 | 0 | 27 | 0 |
Sobel | 3052 | 1920 | 547 | 4.5 |
Mean | 4087 | 2880 | 336 | 4.5 |
Gaussian | 4205 | 2880 | 367 | 4.5 |
Erosion | 2951 | 2160 | 168 | 0 |
Dilation | 2972 | 2160 | 154 | 0 |
Platform | Time per Pixel (ns) | Time per Frame (ms) |
---|---|---|
FPGA | 80 | - |
Equations used on FPGA (CPU) | 55.6109 | 115.3149 |
Equations used on FPGA (GPU) | 0.1667 | 0.3458 |
Halcon (CPU) | 14.5828 | 30.2389 |
OpenCV (CPU) | 17.9598 | 37.2415 |
Platform | Power Consumption (W) |
---|---|
FPGA | 1–5 |
CPU | 15 |
GPU | 10–125 |
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. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ferreira, D.; Moutinho, F.; Matos-Carvalho, J.P.; Guedes, M.; Deusdado, P. Generic FPGA Pre-Processing Image Library for Industrial Vision Systems. Sensors 2024, 24, 6101. https://doi.org/10.3390/s24186101
Ferreira D, Moutinho F, Matos-Carvalho JP, Guedes M, Deusdado P. Generic FPGA Pre-Processing Image Library for Industrial Vision Systems. Sensors. 2024; 24(18):6101. https://doi.org/10.3390/s24186101
Chicago/Turabian StyleFerreira, Diogo, Filipe Moutinho, João P. Matos-Carvalho, Magno Guedes, and Pedro Deusdado. 2024. "Generic FPGA Pre-Processing Image Library for Industrial Vision Systems" Sensors 24, no. 18: 6101. https://doi.org/10.3390/s24186101
APA StyleFerreira, D., Moutinho, F., Matos-Carvalho, J. P., Guedes, M., & Deusdado, P. (2024). Generic FPGA Pre-Processing Image Library for Industrial Vision Systems. Sensors, 24(18), 6101. https://doi.org/10.3390/s24186101