Converting RGB Images to Gray-Scale by the Weighted Average Method, based on Shift-and-Add Technique on the Combination of Color Components for Reducing the Computational Units and Errors in FPGA
Mahdi Ajamin Hamednai
1
(
Department of Electrical Engineering, Najafabad Branch, Islamic Azad University, Najafabad, Iran
)
Payam Sanaee
2
(
Digital Processing and Machine Vision Research Center, Najafabad Branch, Islamic Azad University, Najafabad, Iran
)
Keywords: image processing, Computational complexity, Fixed-Point, field programmable gate arrays, RGB (red-green-blue) to gray-scale,
Abstract :
Converting RGB (red-green-blue) images to gray-scale is one of the important and fundamental issues in the field of image processing, so many algorithms have been developed to achieve this purpose. These algorithms are used in the most of the machine vision applications pre-processing unit to recognize face, target and objects. In the nearly all image recognition processes, the frame rate of the images which are applied to the system through the digital cameras, is too high; Therefore, in order to achieve real-time processing, the speed of algorithm calculations must be increased. Field programmable gate arrays (FPGA) chips are one of the choices to process algorithms by hardware rapidly. The advantages of these chips are the possibility of hardware implementation of procedures by concurrent and parallel processing algorithms and fully combinational logic circuits. In this research to reduce the calculation error, we used a fixed-point system, and we have a tradeoff between the accuracy and the used logic-blocks. This will help us to manage the hardware resources perfectly. In this article, we design and compare different methods to convert color image to gray on inexpensive FPGA chip. By using the combining color components method with fixed-point calculations (the fractional part of the image components coefficients are 8/15 bits, and in the calculations, the fractional part of numbers 8 bits), the mean square error (MSE) index for the Lenna 512×512 grayscale image was 0.0184 and 105 logic block (LB) units were used to implement the corresponding hardware.
[1] P. Sanaee, P. Moallem, F. Razzazi, "An interpolation filter based on natural neighbor Galerkin method for salt and pepper noise restoration with adaptive size local filtering window", Signal, Image and Video Processing, vol. 13 , pp. 895-903, Jan. 2019 (doi: 10.1007/s11760-019-01426-3).
[2] B. Lee, J. Choi, K. Yun, J.Y. Choi. "Gradient preserving RGB-to-gray conversion using random forest", Proceeding of the IEEE/ICIP, pp. 3170-3174, Quebec City, QC, Canada, Sept. 2015 (doi: 10.1109/ICIP.2015.7351388).
[3] H.Z. Nafchi, A. Shahkolaei, R. Hedjam, M. Cheriet, "CorrC2G: Color to gray conversion by correlation", IEEE Signal Processing Letters, vol. 24, no. 11, pp. 1651-1655, Nov. 2017 (doi: 10.1109/LSP.2017.2755077).
[4] Y. Kim, J. Cheolhun, J. Demouth, L. Seungyong, "Robust color-to-gray via nonlinear global mapping", ACM Transactions on Graphics, vol. 28, no. 5, pp. 1-4, Dec. 2009 (doi: 10.1145/1661412.1618507).
[5] H.A.A. Alshadoodee, M.Q. Dhahir, Z.H. Rasool, "Digital camera in movement tracking on FPGA board DE2", Proceeding of the IEEE/RusAutoCon, pp. 1-8, Sochi, Russia, Dec. 2019 (doi: 10.1109/RUSAUTOCON.2019.8867726).
[6] S.H. Keyhomayoon, M. Amoom, "Design and implementation of an intelligent high frequency counter with optimized architecture on a low cost FPGA Chip XC6SLX9-2FTG256C", Journal of Intelligent Procedures in Electrical Technology, vol. 14, no. 54, pp. 147-157, Sept. 2023 (dor: 20.1001.1.23223871.1402.14.54.10.6).
[7] O. Sharifi Tehrani, M. Ashorian, P. Moallem, “Hardware implementation of LMS-based adaptive noise cancellation core with low resource utilization”, Journal of Intelligent Procedures in Electrical Technology, vol. 2, no. 7, pp. 68-73, Dec. 2011 (dor: 20.1001.1.23223871.1390.2.7.8.6).
[8] A. Abdolazimi, A.S. Molahosseini, F. Keynia, "Detect and implement facial modes in image on FPGA using multilayer neural network", International Journal of Smart Electrical Engineering, vol. 10, no. 3, pp. 135-140, Sept. 2021 (doi: 10.30495/ijsee.2021.684015).
[9] X. Yang, S. Sha, "Exploiting energy–quality (E–Q) tradeoffs: A case study on color-to-grayscale converters with approximate design on FPGA", Journal of Circuits, Systems and Computers, vol. 30, no. 04, Article Number: 2150062, Aug. 2020 (doi: 10.1142/S0218126621500626).
[10] U. Swathi, U. Smitha, "Design and implementation of efficient RGB to gray scale converter architectures using reversible logic", Proceeding of IEEE/DISCOVER, pp. 194-199, Udupi, India, Oct. 2020 (doi: 10.1109/DISCOVER50404.2020.9278066).
[11] K. Kumar, R.K. Mishra, D. Nandan, "Efficient hardware of RGB to gray conversion realized on FPGA and ASIC", Procedia Computer Science, no. 171, pp: 2008-2015, Jan. 2020 (doi: 10.1016/j.procs.2020.04.215).
[12] Y. Zhang, X. Yang, L. Wu, J. Lu, K. Sha, A. Gajjar, H. He, "Exploring slice-energy saving on an video processing FPGA platform with approximate computing", Proceeding of the ICACS, pp. 138-143, Beijing, China, Jul 2018 (doi: 10.1145/3242840.3242852).
[13] G. Ravivarma, K. Gavaskar, D. Malathi, K.G. Asha, B. Ashok, S. Aarthi, "Implementation of sobel operator based image edge detection on FPGA", Materials Today: Proceedings, vol. 45, part 2, pp. 2401-2407, Jan. 2021 (doi: 10.1016/j.matpr.2020.10.825).
[14] B.P. Kumar, B.H. Kumar, "FPGA implementation of canny edge detection algorithm for noisy image identification", International Journal of Management, Technology and Engineering, vol. 9, no. 12, pp. 386-395, Dec. 2019.
[15] S. Yaman, M. Yildrim, B. Karmşhoğlu, Y. Erol, H. Kürüm, "Image and video processing applications using Xilinx system generator", Proceeding of the IEEE/ISDFS, pp. 1-5, Barcelos, Portugal, June 2019 (doi: 10.1109/ISDFS.2019.8757540).
[16] C. Li, Y. Bi, F. Marzani, F. Yang, "Fast FPGA prototyping for real-time image processing with very high-level synthesis", Journal of Real-Time Image Processing, vol. 16, pp. 1795–1812, Apr. 2017 (doi: 10.1007/s11554-017-0688-1).
[17] G. Wilson, Y. Premson, "FPGA implementation of hardware efficient algorithm for image contrast enhancement using Xilinx System Generator", Procedia Technology, vol. 24, pp. 1141-1148, Jan. 2016 (doi: 10.1016/j.protcy.2016.05.067).
_||_