Color Space Conversion from RGB to YCbCr based on FPGA
Color Space Conversion from RGB to YCbCr based on FPGA
Pei Yuan,Z. Hu,Gan Ouyang,Xue-jun Zhang
TLDR
A new algorithm from RGB to YCbCr color space on FPGA on Verilog language is implemented, which is suitable for the requirement of JPEG compression and is easy to be realized in the actual project.
Abstract
In image processing, color space conversion of RGB-YCbCr is often used. Based on ITU-T T.871 design standard and FPGA operation characteristics, this paper realizes the color space conversion from RGB to YCbCr using Verilog language. In the FPGA chip, the multiplier resources are very scarce. The optimization of multiplier resources and processing speed is often the bottleneck of image processing. In traditional methods, 5-9 multipliers are usually used. By optimizing the formula, compared with the results of other documents, this module only uses 4 multipliers, so the resource consumption is less. The pipeline design is used, the operation speed is fast, and the real-time performance is good. It is suitable for the requirement of JPEG compression and is easy to be realized in the actual project. Introduction With the continuous development of digital multimedia technology, digital image processing technology is widely used in various military, civilian, commercial and industrial production areas. The real-time performance of digital image processing has become the focus of attention. In recent years, the development of microelectronic technology and super large scale integrated circuit manufacturing technology, especially the development of field programmable gate array (FPGA), has provided new ideas and methods for improving the performance of image processing system [1-4]. Because the data preprocessing of the bottom layer image is very large, requiring fast processing speed, but the operation result is relatively simple, the image processing system with FPGA as the main processing chip is very good at image preprocessing. Aiming at the demand of real-time image processing, this paper implements a new algorithm from RGB to YCbCr color space on FPGA, and uses FPGA chip of xilinx to complete the design. JinXiaodong [1] and Feng Ansong [2] and others all refer to ITU-R BT.601 standard [5, 6]. The transformation from RGB to YCbCr is achieved by 9 and 5 multipliers, respectively. The range of Y is 16-235, and C's range is 16-240. In this paper, we refer to ITU-T T.871 standard and use the DSP48 kernel in FPGA to realize multiplications and additions, only using four multipliers to realize color space conversion. The range of values for both y and c is 0-255.It not only saves resources, but also improves the speed of the algorithm, which is suitable for the requirement of JPEG compression. Color Space RGB color mode is a color standard [7-9] in industry, which obtains all kinds of colors through the change of the three colors channels of red, green, blue and the superposition on each other. RGB represents the three colors channels of red, green and blue, which is a standard including almost all colors the human eyes can perceive, and it is one of the most widely used color system. The range of RGB is 0~255, and Table 1 lists corresponding R, G, and B values [10] of several colors. RGB color generation is easy to realize and is widely used in the display system of computer and color TV. However, in scientific research, RGB color space is not generally used, because its hue, brightness, saturation are shown together, which cannot be easily separated, leading the details difficult to digitally adjust.
