CN103489427B - Yuv and converted into rgb convert rgb yuv method and system - Google Patents

Yuv and converted into rgb convert rgb yuv method and system Download PDF

Info

Publication number
CN103489427B
CN103489427B CN201210196607.2A CN201210196607A CN103489427B CN 103489427 B CN103489427 B CN 103489427B CN 201210196607 A CN201210196607 A CN 201210196607A CN 103489427 B CN103489427 B CN 103489427B
Authority
CN
China
Prior art keywords
data
yuv
rgb
pixels
plurality
Prior art date
Application number
CN201210196607.2A
Other languages
Chinese (zh)
Other versions
CN103489427A (en
Inventor
单旺财
陈小平
孔德明
肖本
Original Assignee
深圳深讯和科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳深讯和科技有限公司 filed Critical 深圳深讯和科技有限公司
Priority to CN201210196607.2A priority Critical patent/CN103489427B/en
Publication of CN103489427A publication Critical patent/CN103489427A/en
Application granted granted Critical
Publication of CN103489427B publication Critical patent/CN103489427B/en

Links

Abstract

一种YUV转换成RGB的方法,包括以下步骤:获取图像像素的YUV数据;将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据;计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据;获取所述组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 YUV to RGB converting one method, comprising the steps of: acquiring image data of YUV pixels; spliced ​​into the digital data on a significant digit of YUV data of pixels in a plurality of different segments of the digital image, to give the a combination of said plurality of pixels YUV data; calculating a plurality of combinations of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels; obtaining the combined digital RGB data on the number of bits in each pixel corresponding to each pixel section is RGB data. YUV和RGB数据大小范围为0~255,只需要8位就能表示,而很多处理器可处理的数据位长大于8位。 YUV and RGB data size in the range of 0 to 255, only 8 can be represented, and the data processor can handle many bits longer than 8 bits. 上述方法将图像中多个像素的数据组合成一个数据进行转换计算,充分利用了处理器的可处理数据位长,将多次转换计算合并成一次转换计算,从而提高了转换效率。 The method of the above-described image data of the plurality of pixels are combined into a data conversion calculations, taking advantage of the processor may process the data bit length of the multiple conversion calculations combined into a conversion calculation, thereby improving the conversion efficiency. 此外,还提供一种RGB转换成YUV的方法和系统以及RGB与YUV相互转换的系统。 It also provides a system for converting RGB to YUV and RGB method and system of the YUV conversion.

Description

YUV转换成RGB以及RGB转换成YUV的方法和系统 YUV conversion to RGB to YUV and RGB conversion method and system

【技术领域】 TECHNICAL FIELD

[0001] 本发明涉及图像处理领域,特别地涉及一种YUV转换成RGB的方法和系统、一种RGB转换成YUV的方法和系统以及一种RGB与YUV相互转换的系统。 [0001] The present invention relates to image processing, and more particularly, to a YUV to RGB conversion method and system for a RGB to YUV conversion and to a method and system for RGB and YUV conversion system.

【背景技术】 【Background technique】

[0002] RGB和YUV都是色彩空间,用于表示颜色,两者可以相互转化.YUV中的“Y”表示明亮度,也就是灰阶值;而“U”和“V”表示的则是影像色彩及饱和度,用于指定像素的颜色。 [0002] RGB and YUV color spaces are used to represent colors, the two can be transformed into each other .YUV the "Y" represents brightness, i.e. grayscale value; and "U" and "V" is represented by image color and saturation, color designation for the pixel. RGB色彩模式是工业界的一种颜色标准,是通过对红(R)、绿(G)、蓝(B)三个颜色通道的变化以及它们相互之间的叠加来得到各式各样的颜色的。 RGB color model is an industry standard color, by superimposing between the red (R), green (G), and blue three color channels change (B) and their mutual variety of colors to obtain of.

[0003] 与RGB视频信号传输相比,YUV视频信号最大的优点在于只需占用极少的数据存储空间和数据传输带宽,而且YUV视频信号还能非常方便的兼容黑白电视! [0003] Compared with the RGB video signal transmission, the biggest advantage YUV video signal that occupies only data storage and data transfer bandwidth is minimal, and YUV video signal can very easily compatible with black and white TV! 然而,在液晶屏上显示则需要RGB视频信号。 However, the display on the LCD screen RGB video signals is required.

[0004] YUV图像数据与RGB图像数据各有优缺点,因此,在很多场景下都有将YUV图像数据转换成RGB图像数据,或将RGB图像数据转换成YUV图像数据的需要。 [0004] YUV image data and the RGB image data have advantages and disadvantages, and therefore, have many scenarios converted YUV image data into RGB image data, or converting RGB image data into YUV image data needs. YUV与RGB相互转换的公式如下(RGB取值范围均为0-255): YUV to RGB conversion formula is as follows (RGB ranges are 0-255):

[0005] Y=0.299R+0.587G+0.114B ; [0005] Y = 0.299R + 0.587G + 0.114B;

[0006] U=-0.147R-0.289G+0.436B ; [0006] U = -0.147R-0.289G + 0.436B;

[0007] V=0.615R-0.515G-0.100B ; [0007] V = 0.615R-0.515G-0.100B;

[0008] R=Y+1.14V ; [0008] R = Y + 1.14V;

[0009] G=Y-0.39U-0.58V ; [0009] G = Y-0.39U-0.58V;

[0010] B=Y+2.03U。 [0010] B = Y + 2.03U.

[0011] 如今,影视剧集一般都为高清图像,图像的分辨率高,数据量也非常大,一集片长为I小时的影视的数据量动辄达到数G。 [0011] Today, the amount of data for high-definition television images typically episodes, high resolution image, a very large amount of data, a set of I Duration hours up to several hundreds of television G. 在YUV与RGB的相互转换中,图像的每一个像素的数据都要按照上述公式进行转换,计算量非常的大,效率比较低。 In the conversion of RGB to YUV, each pixel of image data must be converted according to the above formula, the amount of calculation is very large, the efficiency is relatively low.

【发明内容】 [SUMMARY]

[0012] 基于此,有必要提供一种能提高转换效率的YUV转换成RGB的方法。 [0012] Based on this, it is necessary to provide a method for converting RGB into YUV conversion efficiency can be improved.

[0013] 一种YUV转换成RGB的方法,包括以下步骤: [0013] A method of converting RGB, YUV, comprising the steps of:

[0014] 获取图像像素的YUV数据; [0014] YUV data of pixels of the image acquired;

[0015] 将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据; [0015] The number of significant digits on the image pixels YUV data of pixels in a plurality of digit spliced ​​to a different segment of data, the YUV data to obtain the combination of the plurality of pixels;

[0016] 计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据; [0016] Calculation of the plurality of combinations of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels;

[0017] 获取所述组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 [0017] Gets the combined digital RGB data on the number of bits corresponding to each pixel of each pixel section is RGB data.

[0018] 在其中一种实施例中,所述将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据的步骤包括: [0018] In one embodiment, the numbers on the significant digits of the image pixels YUV data of pixels in a plurality of digit spliced ​​to a different segment of data, to obtain a combination of the plurality of pixels YUV the data comprises the step of:

[0019] 将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据。 [0019] The YUV data of the plurality of pixels each corresponding to different bits to the left, and the left YUV data ORing, YUV data bits to the left so that the YUV data for each valid numbers on the number of significant digits of the digital data with other digital YUV data in the YUV do not overlap the left, or the calculation result is obtained composition YUV data of the plurality of pixels.

[0020] 基于此,还有必要提供一种能提高转换效率的YUV转换成RGB的系统。 [0020] Based on this, it is necessary to provide a conversion efficiency improved conversion YUV into RGB system.

[0021 ] 一种YUV转换成RGB的系统,包括: [0021] An RGB to YUV conversion system, comprising:

[0022] 数据获取模块,用于获取图像像素的YUV数据; [0022] Data acquisition module for acquiring the image data of YUV pixels;

[0023] 组合模块,用于将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据; [0023] The combination module, on the number of significant digits of the plurality of image pixels YUV data of pixels for splicing to different segments of a digital data, to obtain a combination of the plurality of pixels YUV data;

[0024] 计算模块,用于计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据; [0024] calculation means for calculating a combination of a plurality of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels;

[0025] 分解模块,用于获取所述组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 [0025] The decomposition module, configured to obtain the combined digital RGB data on the number of bits corresponding to each pixel of each pixel section is RGB data.

[0026] 在其中一个实施例中,所述组合模块用于将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据。 [0026] In one embodiment, the combining module for the plurality of pixels YUV data are left different respective bits, and performing an OR operation, the YUV data left after the YUV data of the left the numbers on each of the bits is such that the YUV data on the number of significant digits of the other YUV data in the effective number of bits that are left after the YUV data does not overlap, or a calculation result obtained is the desired a combination of said plurality of pixels YUV data.

[0027] 基于此,还有必要提供一种能提高转换效率的RGB转换成YUV的方法。 [0027] Based on this, it is necessary to provide a method for converting RGB converted into YUV efficiency is improved.

[0028] —种RGB转换成YUV的方法,包括以下步骤: [0028] - species RGB to YUV conversion method, comprising the steps of:

[0029] 获取图像像素的RGB数据; [0029] acquire data of RGB pixels of the image;

[0030] 将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据; [0030] The number of significant digits on the image pixels in the plurality of RGB pixel data in digital spliced ​​to a different segment of data, the RGB data to obtain the combination of the plurality of pixels;

[0031] 计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据; [0031] Calculation of the plurality of combinations of RGB data pixels YUV data to obtain a combination of the plurality of pixels;

[0032] 获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 [0032] The combination of numbers on the acquired digital YUV data for each pixel corresponding to each pixel section YUV data.

[0033] 在其中一个实施例中,所述将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据的步骤包括: [0033] In one embodiment, the numbers on the significant digits of the image data of RGB pixels of the plurality of pixels spliced ​​to different segments of a digital data, to obtain a combination of a plurality of pixels of the RGB data the steps include:

[0034] 将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据。 [0034] The RGB data of the plurality of pixels each corresponding to a different number of bits to the left and ORing the left RGB data, RGB data bits to the left so that the RGB data for each valid numbers on the number of significant digits of the digital data with other digital RGB in the RGB data does not overlap the left, or the calculation result is obtained composition RGB data of the plurality of pixels.

[0035] 基于此,还有必要提供一种能提高转换效率的RGB转换成YUV的系统。 [0035] Based on this, it is necessary to provide a higher conversion of RGB to YUV conversion efficiency of the system.

[0036] 一种RGB转换成YUV的系统,包括: [0036] An RGB to YUV conversion system, comprising:

[0037] 数据获取模块,用于获取图像像素的RGB数据; [0037] Data acquisition module for acquiring image data of RGB pixels;

[0038] 组合模块,用于将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据; [0038] The combination of modules, the number of significant digits of the plurality of pixels in pixel image data for RGB spliced ​​to different segments of a digital data, to obtain a combination of a plurality of pixels of the RGB data;

[0039] 计算模块,用于计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据; [0039] calculation means for calculating a plurality of combinations of RGB data of pixels to obtain a combination of the plurality of pixels YUV data;

[0040] 分解模块,用于获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 [0040] The decomposition module, configured to obtain the combined digits on digital YUV data for each pixel corresponding to each pixel section YUV data.

[0041] 在其中一个实施例中,所述组合模块用于将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据。 [0041] In one embodiment, the combining module for the RGB data of the plurality of pixels are different respective bits to the left, and the RGB data for the operation or the left, the left RGB data the digital numbers on the number of bits is such that each of the RGB data of the other active digital RGB data effectively in a number of bits of RGB data does not overlap the left, or the calculation result obtained is the desired a combination of said plurality of pixels of the RGB data.

[0042] 基于此,有必要提供一种能提高转换效率的RGB与YUV相互转换的系统。 [0042] Based on this, it is necessary to provide a system capable of improving conversion efficiency of RGB and YUV conversion.

[0043] —种RGB与YUV相互转换的系统,包括上述任一实施例中的YUV转换成RGB的系统以及上述任一实施例中的RGB转换成YUV的系统。 [0043] - Species RGB and YUV conversion system, including the embodiment of the system into an RGB YUV any preceding embodiment, and converting RGB to YUV embodiment of the system of any preceding embodiment.

[0044] 由于YUV和RGB数据大小的范围为O〜255,只需要8位就能表示YUV和RGB数据,对于16位、32位、64位或128位的YUV或RGB数据,除末尾8位数字外,其余数位上的数字都为0,而16位、32位、64位、128位的处理器一次可分别处理16位、32位、64位、128位的数据,因此,上述YUV转换成RGB以及RGB转换成YUV的方法和系统以及RGB与YUV相互转换的系统,将图像中多个像素的数据组合成一个数据进行转换计算,充分利用了处理器的可处理数据位长,将多次转换计算合并成一次转换计算,从而提高了YUV转换成RGB以及RGB转换成YUV的效率。 [0044] Since the size range of YUV and RGB data for O~255, only 8 bits of YUV and RGB data can be represented, for 16-bit, 32-bit, 64-bit or 128-bit RGB or YUV data, in addition to the end 8 digital, the other numbers on the number of bits is 0, the 16-bit, 32-bit, 64-bit, 128-bit processor once the processing are 16-bit, 32-bit, 64-bit, 128-bit data, the YUV conversion and converting RGB to RGB to YUV method and system, and a system RGB and YUV conversion, the image data of pixels are combined into a plurality of data conversion calculations, taking advantage of processor may process the data bit length of the multi- conversion is calculated as a conversion calculation combined, thereby improving the converted YUV to RGB and RGB to YUV conversion efficiency.

【附图说明】 BRIEF DESCRIPTION

[0045] 图1为一个实施例中的YUV转换成RGB的方法的流程示意图; [0045] Figure 1 is a schematic flow chart of conversion into YUV embodiment of the method of embodiments of RGB;

[0046] 图2为一个实施例中步骤S20的流程示意图; [0046] Figure 2 is an embodiment schematic flow chart of step S20 embodiment;

[0047] 图3为一个实施例中的YUV转换成RGB的系统的结构示意图; [0047] FIG. 3 is a schematic structural diagram of an example of transition of the YUV to RGB system embodiment;

[0048] 图4为一个实施例中的RGB转换成YUV的方法的流程示意图; [0048] FIG. 4 is a schematic flow chart of the embodiment converts RGB to YUV method of the embodiment;

[0049] 图5为一个实施例中的RGB转换成YUV的系统的结构示意图。 [0049] FIG. 5 is a schematic structural diagram of a conversion of RGB to YUV embodiment of the system of FIG.

【具体实施方式】 【Detailed ways】

[0050] 如图1所示,在一个实施例中,一种YUV转换成RGB的方法,包括以下步骤: [0050] Figure 1, in one embodiment, a method of converting RGB, YUV, comprising the steps of:

[0051] 步骤S10,获取图像像素的YUV数据。 [0051] Step S10, the acquired image pixels YUV data.

[0052] 具体的,YUV数据包括Y数据、U数据和V数据。 [0052] Specifically, YUV data comprising Y data, U data, and V data.

[0053] 步骤S20,将图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据。 [0053] step S20, the digital image on the significant digits of pixels YUV data of pixels in a plurality of different digital spliced ​​to a data segment to obtain a combination of the plurality of pixels YUV data.

[0054] 具体的,YUV数据的有效数位上的数字包括YUV数据的末位数字至最高位非零数字。 [0054] Specifically, the number of significant digits comprises YUV data to the YUV data of the last digit the most significant bit non-zero number. 所述多个像素的YUV数据的有效数位上的数字的数量和小于等于将YUV转换成RGB的处理器可处理的数据位数。 Said plurality of digits on a significant digit number of pixels YUV data and less than or equal to the number of bits converted YUV into RGB data processor can handle.

[0055] 以32位处理器为例,处理器计算的数据位长为32位,而YUV或RGB数据的大小范围为O〜255,只需要8位即能表示,对于32位的YUV或RGB数据,除末尾8位外,其余数位上的数字均为O。 [0055] In an example 32-bit processor, the data processor calculates the bit length is 32 bits, and the size range of the YUV or RGB data O~255, i.e. only 8 bits can be represented, for a 32-bit RGB or YUV data, in addition to an outer end 8, the number of remaining digits are both O. 因此,对于32位处理器,可获取4个像素的YUV数据的低8位数字组合成一个数据,或获取3个像素的YUV数据的低8位、低9位或低10位数字组合成一个数据。 Thus, for 32-bit processors, the lower 8 digits can obtain four pixels of data into a YUV data or YUV data acquisition low three pixels 8, 9 of low or low to a combination of 10 digits data.

[0056] 在一个实施例中,步骤S20的具体过程为:将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据。 [0056] In one embodiment, the process of step S20 is specifically: the plurality of pixels YUV data corresponding bits are different left and ORing the left YUV data, YUV data left the numbers on each of the bits is such that the YUV data on the number of significant digits of the other YUV data in the effective number of bits that are left after the YUV data does not overlap, or a calculation result obtained is the desired a combination of said plurality of pixels YUV data.

[0057] 如图2所示,在一个实施例中,步骤S20包括以下步骤: [0057] shown in Figure 2, in one embodiment, the step S20 comprises steps of:

[0058] 步骤S202,将多个像素中一个像素的YUV数据左移预设数量位,该预设数量大于等于所述多个像素中每一个像素的有效数位的长度,所述多个像素的数量与该预设数量的积小于等于将YUV转换成RGB的处理器可处理的数据位数。 [0058] step S202, a plurality of pixels in a YUV pixel data of a predetermined number of bits to the left, is greater than the predetermined number is equal to the plurality of pixels each pixel significant digits length, the plurality of pixels the number of the predetermined number of the product less than or equal converts YUV data into RGB bits of the processor can handle.

[0059] 步骤S203,将左移后的YUV数据与所述多个像素中未参与过或运算的一个像素的YUV数据进行或运算。 [0059] step S203, the YUV data to the plurality of pixels after the left is not involved in a YUV pixel data or ORing operation.

[0060] 步骤S204,将或运算结果左移所述预设数量位,将左移后的或运算结果与所述多个像素中未参与过或运算的一个像素的YUV数据进行或运算。 [0060] Step S204, the calculation result of the left or the predetermined number of bits, the OR operation result and the plurality of the pixels are not involved in the left YUV pixel data or a calculation or operation is performed.

[0061 ] 步骤S206,重复执行步骤S204,直到所述多个像素的YUV数据都参与过或运算,最终得到的或运算结果即为所述多个像素的组合YUV数据。 [0061] step S206, repeat the step S204, until the plurality of pixels are YUV data or calculation involved, the final result is obtained or the operational data of the YUV combinations of the plurality of pixels.

[0062] 以32位处理器为例,设获取3个像素的YUV数据的低10位组合成一个数据,设3个像素的Y数据分别为: [0062] In an example 32-bit processors, the lower 10 bits set acquired data are combined into a three pixels YUV data, Y data set are three pixels:

[0063] 00,0000000000,0000000000,0011000000 ; [0063] 00,0000000000,0000000000,0011000000;

[0064] 00,0000000000,0000000000,0000011000 ; [0064] 00,0000000000,0000000000,0000011000;

[0065] 00,0000000000,0000000000,0000000011。 [0065] 00,0000000000,0000000000,0000000011.

[0066] 可将第一个数据左移10位后与第二个数据进行或运算,得到00,0000000000,0011000000,0000011000,进一步将或运算结果左移10位后与第三个数据进行或运算,可得到00,0011000000,0000011000,0000000011,则该数据即为所述多个像素的组合YUV数据。 With the second data [0066] The first data may be left or the operation 10, to give 00,0000000000,0011000000,0000011000, further left or operation result data with the third operation or after 10 , 00,0011000000,0000011000,0000000011 obtained, the data is the combination of the plurality of pixels YUV data.

[0067] 步骤S30,计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据。 [0067] Step S30, the calculated composition of the plurality of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels.

[0068] 具体的,步骤SlO获取的YUV数据包括经过乘运算变换的YUV数据,具体包括:Y。 [0068] Specifically, in step SlO comprises YUV data obtained through calculation by converting the YUV data, comprises: Y. 、Un U2、V1, V2, U1=0.39U。 , Un U2, V1, V2, U1 = 0.39U. ,U2=2.03U。 , U2 = 2.03U. ,V1=L 14V。 , V1 = L 14V. ,V2=0.58V。 , V2 = 0.58V. ,其中为,Y。 Which is, Y. 、U。 , U. 、V。 , V. 为图像的原始Y数据、U数据、V数据。 Y is the original image data, U data, V data. 在步骤SlO之前,可计算得到UpUpVpV2,或在预先计算好的乘积表中查找Up U2、Vp V2的值。 Prior to step SlO, calculated to give UpUpVpV2, or a good product table lookup Up U2, Vp V2 values ​​calculated in advance. 进一步的,步骤S20将所述多个像素的Y。 Further, the step S20 to the plurality of pixels Y. 、Up U2, Vn ^数据分别组合成Y。 , Up U2, Vn ^ data are combined into a Y. '、u/、U2'、v/、v2'。 ', U /, U2', v /, v2 '.

[0069] 进一步的,步骤S30可按照如下公式计算所述多个像素的组合RGB数据:组合R数据=Y。 [0069] Further, the step S30 may calculate pixel data of a plurality of combinations of RGB according to the following equation: R composition data = Y. ' +V/ ;组合G数据=Y/ —U: -V/ ;组合B数据=Y/ +V/。 '+ V /; combination data G = Y / -U: -V /; composition data B = Y / + V /.

[0070] 步骤S40,获取组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 [0070] step S40, the acquired number of bit combinations on the digital RGB data of each pixel corresponding to each pixel section is RGB data.

[0071] 例如,对于32位处理器,将2个像素的YUV数据的低10位组合成组合YUV数据,第一个像素YUV数据的低10位在组合YUV数据中的位置为从末位数第11位至第20位,第二个像素YUV数据的低10位在组合YUV数据中的位置为从末位数第I位至第10位,则可获取组合RGB数据中从末位数第11位至第20位为第一个像素的RGB数据,获取组合RGB数据中从末位数第I位至第10位为第二个像素的RGB数据。 [0071] For example, for 32-bit processors, the lower 10 bits of YUV data into a combined two pixels YUV data, the lower 10 bits of a pixel position in the combined YUV data in the YUV data from the last digit bit 11 through 20, the position of the lower 10 bits of the YUV pixel data in the second composition is YUV data, may be available from the last digit of the I-bit to 10-bit RGB data from a combination of the last digit 11 through 20 for the first RGB pixel data, RGB data acquired from the combination of the RGB data bit last digit of I to 10 for the second pixel.

[0072] 如图3所示,在一个实施例中,一种YUV转换成RGB的系统,包括数据获取模块10、组合模块20、计算模块30、分解模块40,其中: [0072] As shown in FIG. 3, in one embodiment, a YUV to RGB conversion system 10 includes a data acquisition module, the combining module 20, a calculation module 30, decomposition module 40, wherein:

[0073] 数据获取模块10用于获取图像像素的YUV数据。 [0073] The data acquisition module 10 for acquiring image data of YUV pixels.

[0074] 具体的,YUV数据包括Y数据、U数据和V数据。 [0074] Specifically, YUV data comprising Y data, U data, and V data.

[0075] 组合模块20用于将图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据。 [0075] The combining module 20 is used on the significant digits of digital image pixels YUV data of pixels in a plurality of different digital spliced ​​to a data segment to obtain a combination of the plurality of pixels YUV data.

[0076] 具体的,YUV数据的有效数位上的数字包括YUV数据的末位数字至最高位非零数字。 [0076] Specifically, the number of significant digits comprises YUV data to the YUV data of the last digit the most significant bit non-zero number. 所述多个像素的YUV数据的有效数位上的数字的数量和小于等于将YUV转换成RGB的处理器可处理的数据位数。 Said plurality of digits on a significant digit number of pixels YUV data and less than or equal to the number of bits converted YUV into RGB data processor can handle.

[0077] 以32位处理器为例,处理器计算的数据位长为32位,而YUV或RGB数据的大小范围为O〜255,只需要8位即能表示,对于32位的YUV或RGB数据,除末尾8位外,其余数位上的数字均为O。 [0077] In an example 32-bit processor, the data processor calculates the bit length is 32 bits, and the size range of the YUV or RGB data O~255, i.e. only 8 bits can be represented, for a 32-bit RGB or YUV data, in addition to an outer end 8, the number of remaining digits are both O. 因此,对于32位处理器,组合模块20可获取4个像素的YUV数据的低8位数字组合成一个数据,或获取3个像素的YUV数据的低8位、低9位或低10位数字组合成一个数据。 Thus, for 32-bit processors, a combination module 20 may obtain the lower 8 digits of four pixels YUV data into a data acquisition or low YUV data of three pixels 8, 9 or lower 10 digits lower combined into one data.

[0078] 在一个实施例中,组合模块20可将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据。 [0078] In one embodiment, the combination module 20 may be a plurality of pixels YUV data corresponding bits are different from the left and ORing the left YUV data, YUV data bits left of to make the number of significant digits of the numbers on each of the YUV data of the number of significant digits and other digital YUV data in the YUV data does not overlap the left, or the calculation result is obtained of the plurality of YUV pixel data combination.

[0079] 具体的,组合模块20可将多个像素中一个像素的YUV数据左移预设数量位,该预设数量大于等于所述多个像素中每一个像素的有效数位的长度,所述多个像素的数量与该预设数量的积小于等于将YUV转换成RGB的处理器可处理的数据位数,进一步的,可将左移后的YUV数据与所述多个像素中未参与过或运算的一个像素的YUV数据进行或运算;进一步的,组合模块20可将或运算结果左移所述预设数量位,将左移后的或运算结果与所述多个像素中未参与过或运算的一个像素的YUV数据进行或运算;进一步的,组合模块20可重复执行上一步骤,直到所述多个像素的YUV数据都参与过或运算,最终得到的或运算结果即为所述多个像素的组合YUV数据。 [0079] Specifically, the module 20 may be a combination of a plurality of pixels in a YUV pixel data of a predetermined number of bits to the left, the predetermined number is greater than or equal to the length of the plurality of pixels in the significant digits for each pixel, the the number of the plurality of pixels of the predetermined number of the product less than or equal to RGB to YUV conversion processor can process data bits, further, may be YUV data of the plurality of pixels after the left is not involved or a YUV pixel data or arithmetic operation is performed; further, combination module 20 may shift left or the calculation result of the predetermined number of bits, the oR operation result to the plurality of pixels after the left is not involved YUV data of one pixel or ORing operation; further, a combination module 20 may repeat the previous step until said plurality of pixels are YUV data or calculation involved, the final result is obtained or the operation a combination of a plurality of pixels YUV data.

[0080] 以32位处理器为例,设获取3个像素的YUV数据的低10位组合成一个数据,设3个像素的Y数据分别为: [0080] In an example 32-bit processors, the lower 10 bits set acquired data are combined into a three pixels YUV data, Y data set are three pixels:

[0081] 00,0000000000,0000000000,0011000000 ; [0081] 00,0000000000,0000000000,0011000000;

[0082] 00,0000000000,0000000000,0000011000 ; [0082] 00,0000000000,0000000000,0000011000;

[0083] 00,0000000000,0000000000,0000000011。 [0083] 00,0000000000,0000000000,0000000011.

[0084] 组合模块20可将第一个数据左移10位后与第二个数据进行或运算,得到00,0000000000,0011000000,0000011000,进一步将或运算结果左移10位后与第三个数据进行或运算,可得到00,0011000000,0000011000,0000000011,则该数据即为所述多个像素的组合YUV数据。 With the second data [0084] The combining module 20 may be a first left data operation or 10, to give 00,0000000000,0011000000,0000011000, further left or operation results after the third 10 and the data ORed 00,0011000000,0000011000,0000000011 obtained, the data is the combination of the plurality of pixels YUV data.

[0085] 计算模块30用于计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据。 [0085] The calculation module 30 calculates the YUV data for combining the plurality of pixels, the RGB data to obtain the combination of the plurality of pixels.

[0086] 具体的,数据获取模块10获取的YUV数据包括经过乘运算变换的YUV数据,具体包括:Y。 [0086] Specifically, the data acquisition module 10 comprises YUV data acquired through calculation by converting the YUV data, comprises: Y. 、U0U2, V1^V2, U1=0.39U。 , U0U2, V1 ^ V2, U1 = 0.39U. ,U2=2.03U。 , U2 = 2.03U. ,V1=L 14V。 , V1 = L 14V. ,V2=0.58V。 , V2 = 0.58V. ,其中为,Y。 Which is, Y. 、U。 , U. 、V。 , V. 为图像的原始Y数据、U数据、V数据。 Y is the original image data, U data, V data. 数据获取模块10可预先计算得到UpUpVpV2,或在预先计算好的乘积表中查找UpUpVpV2的值。 Data acquisition module 10 may be pre-calculated values ​​obtained UpUpVpV2, or find a precomputed table UpUpVpV2 the product. 进一步的,组合模块20用于将所述多个像素的Y。 Further, a combination module 20 for the plurality of pixels Y. 、Up U2、据分别组合成Y /、u/、υ2'、ν/、ν2' ο , Up U2, respectively, according to a combination of Y /, u /, υ2 ', ν /, ν2' ο

[0087] 进一步的,计算模块30可按照如下公式计算所述多个像素的组合RGB数据:组合R数据=V +V/ ;组合G数据=Y/ -U/ -N2';组合B数据=Y/ + , N2丨。 [0087] Further, the calculation module 30 may be calculated as follows combination of the plurality of RGB pixel data: data combination of R = V + V /; combination data G = Y / -U / -N2 '; data B = composition Y / +, N2 Shu.

[0088] 分解模块40获取组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 [0088] The decomposition module 40 acquires the number of pixels corresponding to the number of bits for the RGB data of the combination of segments of each pixel as RGB data.

[0089] 例如,对于32位处理器,组合模块20将2个像素的YUV数据的低10位组合成组合YUV数据,第一个像素YUV数据的低10位在组合YUV数据中的位置为从末位数第11位至第20位,第二个像素YUV数据的低10位在组合YUV数据中的位置为从末位数第I位至第10位,则分解模块40可获取组合RGB数据中从末位数第11位至第20位为第一个像素的RGB数据,获取组合RGB数据中从末位数第I位至第10位为第二个像素的RGB数据。 [0089] For example, 20 low YUV data of two pixels of 32-bit processors, the combining module 10 into combined YUV data, a first position of the lower 10 bits YUV pixel data in the combined data from the YUV the last digit of 11 through 20, the position of the lower 10 bits of YUV data in the second composition YUV pixel data from the last digit of the first to the second position I 10, decomposition module 40 may acquire the RGB data in combination from the 11th bit to the last digit of 20 of the first pixel data of RGB, RGB data acquired from the combination of the RGB data bit last digit of I to 10 for the second pixel.

[0090] 如图4所示,在一个实施例中,一种RGB转换成YUV的方法,包括以下步骤: [0090] As shown, in one embodiment, a YUV to RGB converter 4 as a method, comprising the steps of:

[0091 ] 步骤S50,获取图像像素的RGB数据。 [0091] step S50, the RGB data of the image pixels acquired.

[0092] 具体的,RGB数据包括R数据、G数据和B数据。 [0092] Specifically, RGB data of the R data, G data and B data.

[0093] 步骤S60,将图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据。 [0093] step S60, the digital image on the significant digits of pixels in the plurality of RGB pixel data in digital spliced ​​to a different segment of data, the RGB data to obtain the combination of the plurality of pixels.

[0094] 具体的,RGB数据的有效数位上的数字包括RGB数据的末位数字至最高位非零数字。 [0094] Specifically, the number of significant digits comprises RGB data to RGB data of the last digit the most significant bit non-zero number. 所述多个像素的RGB数据的有效数位上的数字的数量和小于等于将RGB转换成YUV的处理器可处理的数据位数。 Said plurality of digits on a significant digit number of pixels of the RGB data and converts RGB to less than or equal to the number of bits of YUV data processor can handle.

[0095] 具体的,可将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据。 [0095] Specifically, the RGB data may be a plurality of pixels each corresponding to different bits to the left, the left and the RGB data are ORed bits of RGB data to the left so that each of the RGB data numbers on the significant digits of the numbers on the number of effective bits of the other digital RGB data in the RGB data of the left do not overlap, or calculation result is obtained composition RGB data of the plurality of pixels.

[0096] 步骤S70,计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据。 [0096] step S70, the RGB data calculated composition of the plurality of pixels, to obtain a combination of the plurality of pixels YUV data.

[0097] 具体的,步骤S50获取的RGB数据包括经过乘运算变换的RGB数据,具体包括:&、R2、R3、G1、G2、G3、B1、B2、B3,其中: [0097] Specifically, step S50 comprises RGB data acquired through multiplication transform RGB data, including: &, R2, R3, G1, G2, G3, B1, B2, B3, wherein:

[0098] R1=0.299R。 [0098] R1 = 0.299R. ,R2=0.147R。 , R2 = 0.147R. ,R3=0.615R0; , R3 = 0.615R0;

[0099] G1=0.587G。 [0099] G1 = 0.587G. ,G2=0.289G。 , G2 = 0.289G. ,G3=0.515G0; , G3 = 0.515G0;

[0100] B1=0.114B。 [0100] B1 = 0.114B. ,B2=0.436B。 , B2 = 0.436B. ,B3=0.1OOB0; , B3 = 0.1OOB0;

[0101] R。 [0101] R. 、G。 , G. 、B。 , B. 为图像的原始R数据、G数据、B数据。 Original R image data, G data, B data.

[0102] 在步骤S50之前,可计算得到Rp R2、R3、Gn G2, G3, Bn B2, B3,或在预先计算好的乘积表中查找Rp R2、R3、G0G2, G3、Bn B2, B3的值。 [0102] Before step S50, the calculated give Rp R2, R3, Gn G2, G3, Bn B2, B3, or to find Rp R2, R3, G0G2, G3, Bn B2 precomputed table in the product, B3 of value. 进一步的,步骤S60将所述多个像素的R:、R2、R3、G0G2'GrBpB2J3 数据分别组合成R/、R/、R3'、G/、G/、G/、B/、B/、B3'。 Further, in step S60 a plurality of pixels of the R:, R2, R3, G0G2'GrBpB2J3 data are combined into R /, R /, R3 ', G /, G /, G /, B /, B /, B3 '.

[0103] 进一步的,步骤S70可按照如下公式计算所述多个像素的组合YUV数据:组合Y数据=R/ +G1' +B1';组合U 数据=一R2' — G2' +B2';组合V 数据=R3' — G3' —B3'。 [0103] Further, step S70 may be a combination of the plurality of pixels YUV data is calculated as follows: composition data Y = R / + G1 '+ B1'; a combination U = data R2 '- G2' + B2 '; combination of V data = R3 '- G3' -B3 '.

[0104] 步骤S80,获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 [0104] step S80, the combination of numbers on the acquired digital YUV data corresponding to each pixel for each pixel segment YUV data.

[0105] 如图5所示,在一个实施例中,一种RGB转换成YUV的系统,包括数据获取模块50、组合模块60、计算模块70、分解模块80,其中: [0105] shown in Figure 5, in one embodiment, an RGB to YUV conversion system 50 includes a data acquisition module, the combining module 60, a calculation module 70, decomposition module 80, wherein:

[0106] 数据获取模块50用于获取图像像素的RGB数据。 [0106] Data acquisition module 50 for acquiring image data of RGB pixels.

[0107] 组合模块60用于将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据。 [0107] The combining module 60 is used on a significant digit number of said plurality of pixels in the pixel image data is RGB digital spliced ​​to a different segment of data, the RGB data to obtain the combination of the plurality of pixels.

[0108] 具体的,RGB数据的有效数位上的数字包括RGB数据的末位数字至最高位非零数字。 [0108] Specifically, the number of significant digits comprises RGB data to RGB data of the last digit the most significant bit non-zero number. 所述多个像素的RGB数据的有效数位上的数字的数量和小于等于将RGB转换成YUV的处理器可处理的数据位数。 Said plurality of digits on a significant digit number of pixels of the RGB data and converts RGB to less than or equal to the number of bits of YUV data processor can handle.

[0109] 组合模块60用于将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据。 [0109] combining module 60 for the RGB data of the plurality of pixels are different respective bits to the left and ORing the left RGB data, RGB data bits to the left of each of RGB such that a numbers on the significant digits of the digital data on the effective digit number of the other bits in the RGB data of the RGB data does not overlap the left, or the calculation result is obtained composition RGB data of the plurality of pixels .

[0110] 计算模块70用于计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据。 [0110] calculation module 70 calculates the RGB data for combining the plurality of pixels, to obtain a combination of the plurality of pixels YUV data.

[0111] 分解模块80用于获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 [0111] The decomposition module 80 is configured to obtain digital combined digital YUV data on each pixel-corresponding segment of YUV data of each pixel.

[0112] 一种RGB与YUV相互转换的系统,包括上述任一实施例中的YUV转换成RGB的系统以及上述任一实施例中的RGB转换成YUV的系统。 [0112] An RGB to YUV conversion, comprising converting YUV to RGB in the embodiment of the system of any of the foregoing embodiments, and conversion of RGB to YUV embodiment of the system in any preceding embodiment.

[0113] 由于YUV和RGB数据大小的范围为O〜255,只需要8位就能表示YUV和RGB数据,对于16位、32位、64位或128位的YUV或RGB数据,除末尾8位数字外,其余数位上的数字都为0,而16位、32位、64位、128位的处理器一次可分别处理16位、32位、64位、128位的数据,因此,上述YUV转换成RGB以及RGB转换成YUV的方法和系统以及RGB与YUV相互转换的系统,将图像中多个像素的数据组合成一个数据进行转换计算,充分利用了处理器的可处理数据位长,将多次转换计算合并成一次转换计算,从而提高了YUV转换成RGB以及RGB转换成YUV的效率。 [0113] Since the size range of YUV and RGB data for O~255, only 8 bits of YUV and RGB data can be represented, for 16-bit, 32-bit, 64-bit or 128-bit RGB or YUV data, in addition to the end 8 digital, the other numbers on the number of bits is 0, the 16-bit, 32-bit, 64-bit, 128-bit processor once the processing are 16-bit, 32-bit, 64-bit, 128-bit data, the YUV conversion and converting RGB to RGB to YUV method and system, and a system RGB and YUV conversion, the image data of pixels are combined into a plurality of data conversion calculations, taking advantage of processor may process the data bit length of the multi- conversion is calculated as a conversion calculation combined, thereby improving the converted YUV to RGB and RGB to YUV conversion efficiency.

[0114] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序控制相关的硬件来完成的,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 [0114] Those of ordinary skill in the art may understand that the above embodiments of the method all or part of the processes of the associated hardware can be accomplished by a program-controlled computer, the program may be stored in a computer readable storage medium. when the program is executed, the processes of the foregoing method embodiments. 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random AccessMemory, RAM)等。 Wherein the storage medium may be a magnetic disk, an optical disk, read-only memory (Read-Only Memory, ROM) or a random access memory (Random AccessMemory, RAM) and the like.

[0115] 以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。 [0115] Expression of the above-described embodiments are only several embodiments of the present invention, and detailed description thereof is more specific, but can not therefore be understood as limiting the scope of the present invention. 应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。 It should be noted that those of ordinary skill in the art, without departing from the spirit of the present invention, can make various changes and modifications, which fall within the protection scope of the present invention. 因此,本发明专利的保护范围应以所附权利要求为准。 Therefore, the protection scope of the present invention should be subject to the appended claims.

Claims (5)

1.一种YUV转换成RGB的方法,包括以下步骤: 获取图像像素的YUV数据; 将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据,具体包括:将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据; 计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据; 获取所述组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 CLAIMS 1. A method of converting RGB, YUV, comprising the steps of: acquiring image data of YUV pixels; the number of significant digits on YUV data of pixels in the image a plurality of pixels spliced ​​to a digital data of the different segments, YUV data to obtain the combination of the plurality of pixels, comprises: the plurality of pixels YUV data are left different respective bits, and performing an oR operation, a left bit YUV data in the YUV data left to make the number of each of YUV data on the number of the effective digits do not overlap with other digital YUV data on the valid number of bits that the YUV data in the left, the calculation result is obtained or the plurality YUV data pixel combination; combination of computing the plurality of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels; obtaining the combined digital RGB data on the number of bits corresponding to each pixel of each segment is RGB pixels data.
2.一种YUV转换成RGB的系统,其特征在于,包括: 数据获取模块,用于获取图像像素的YUV数据; 组合模块,用于将所述图像像素中多个像素的YUV数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合YUV数据,具体包括:将所述多个像素的YUV数据分别左移不同的相应位数,并将左移后的YUV数据进行或运算,YUV数据左移的位数要使得每一个YUV数据的所述有效数位上的数字与其他YUV数据的所述有效数位上的数字在左移后的YUV数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合YUV数据; 计算模块,用于计算所述多个像素的组合YUV数据,得到所述多个像素的组合RGB数据; 分解模块,用于获取所述组合RGB数据中各像素对应段的数位上的数字为各像素的RGB数据。 An RGB to YUV conversion system, characterized by comprising: a data acquisition module for acquiring the image data of YUV pixels; combination module, for the significant digits of the image pixel data in a plurality of pixels YUV digital spliced ​​to the different segments of a digital data, to obtain a combination of the plurality of pixels YUV data, comprises: the plurality of pixels are YUV data different respective bits to the left, and the left rear ORing YUV data, YUV data bits to the left so that the number on the digital YUV data of each of the valid digits with other valid YUV data in the YUV a number of bits of data in the left do not overlap, or calculation result is obtained composition YUV data of the plurality of pixels; calculating means for calculating a combination of a plurality of pixels YUV data, the RGB data to obtain a combination of the plurality of pixels; decomposition module, the composition for obtaining the number of bits on the digital RGB data of each pixel corresponding to each pixel section is RGB data.
3.一种RGB转换成YUV的方法,包括以下步骤: 获取图像像素的RGB数据; 将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据,具体包括:将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据; 计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据; 获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 A method of converting RGB to YUV, comprising the steps of: acquiring image data of RGB pixels; the number of significant digits on the image data of RGB pixels of the plurality of pixels spliced ​​to a digital data of the different segments, RGB data obtained composition the plurality of pixels, comprises: a plurality of RGB data of the pixels corresponding bits are different from the left, and the RGB data for the operation or the left, the left shift bit RGB data to make the number of each of the RGB data on the number of effective digits do not overlap with the digital RGB data on the other bit significand bit RGB data after the left, or the calculation result is obtained in the multi- combination of RGB data pixels; combination of computing the plurality of pixels RGB data, YUV data to obtain the combination of the plurality of pixels; obtaining the composition for the digital YUV of each pixel on the YUV digital data corresponding to each pixel segment data.
4.一种RGB转换成YUV的系统,其特征在于,包括: 数据获取模块,用于获取图像像素的RGB数据; 组合模块,用于将所述图像像素中多个像素的RGB数据的有效数位上的数字拼接到一个数据的不同段数位上,得到所述多个像素的组合RGB数据,具体包括:将所述多个像素的RGB数据分别左移不同的相应位数,并将左移后的RGB数据进行或运算,RGB数据左移的位数要使得每一个RGB数据的所述有效数位上的数字与其他RGB数据的所述有效数位上的数字在左移后的RGB数据中的数位不重叠,得到的或运算结果即为所述多个像素的组合RGB数据; 计算模块,用于计算所述多个像素的组合RGB数据,得到所述多个像素的组合YUV数据; 分解模块,用于获取所述组合YUV数据中各像素对应段的数位上的数字为各像素的YUV数据。 An RGB to YUV conversion system, characterized by comprising: a data acquisition module for acquiring image data of RGB pixels; combining module configured significant digits of the image data of RGB pixels of the plurality of pixels number on the digital spliced ​​to a different segment of data, the RGB data to obtain the combination of the plurality of pixels, comprises: a plurality of RGB data of the pixels corresponding bits are different from the left, and the left rear ORing RGB data, RGB data bits to the left so that the number on the digital RGB data of each of the valid digits with other RGB data effectively in a number of bits of the RGB data of the left do not overlap, or calculation result is obtained composition RGB data of the plurality of pixels; calculating means for calculating a plurality of combinations of RGB data of pixels to obtain a combination of the plurality of pixels YUV data; decomposition module, the composition for obtaining digital data on digital YUV pixel corresponding to each pixel of each segment of the YUV data.
5.一种RGB与YUV相互转换的系统,包括权利要求2所述的YUV转换成RGB的系统以及权利要求4所述的RGB转换成YUV的系统。 A RGB and YUV conversion system, comprising YUV according to claim 2 into an RGB system and as claimed in claim RGB 4 into the YUV system.
CN201210196607.2A 2012-06-14 2012-06-14 Yuv and converted into rgb convert rgb yuv method and system CN103489427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210196607.2A CN103489427B (en) 2012-06-14 2012-06-14 Yuv and converted into rgb convert rgb yuv method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210196607.2A CN103489427B (en) 2012-06-14 2012-06-14 Yuv and converted into rgb convert rgb yuv method and system

Publications (2)

Publication Number Publication Date
CN103489427A CN103489427A (en) 2014-01-01
CN103489427B true CN103489427B (en) 2015-12-02

Family

ID=49829607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210196607.2A CN103489427B (en) 2012-06-14 2012-06-14 Yuv and converted into rgb convert rgb yuv method and system

Country Status (1)

Country Link
CN (1) CN103489427B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847775A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 YUV-HSV color space transformation method and system
TWI629892B (en) * 2016-05-09 2018-07-11 國立成功大學 Rgb to yuv format conversion and inverse conversion method and circuit for depth packing and depacking
CN109120911A (en) * 2018-07-09 2019-01-01 武汉斗鱼网络科技有限公司 A kind of video method for transformation, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6034667A (en) * 1992-01-21 2000-03-07 Radius Inc. Method and apparatus for displaying YUV color information on a pseudo-color RGB display
CN1522401A (en) * 2001-10-29 2004-08-18 英特尔公司 Method and apparatus for parallel shift right merge of data
US7002627B1 (en) * 2002-06-19 2006-02-21 Neomagic Corp. Single-step conversion from RGB Bayer pattern to YUV 4:2:0 format

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4693652B2 (en) * 2006-02-27 2011-06-01 シャープ株式会社 Video signal processing device
TW201026072A (en) * 2008-12-30 2010-07-01 Princeton Technology Corp Data compression method and apparatus for image display based on overdrive processing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6034667A (en) * 1992-01-21 2000-03-07 Radius Inc. Method and apparatus for displaying YUV color information on a pseudo-color RGB display
CN1522401A (en) * 2001-10-29 2004-08-18 英特尔公司 Method and apparatus for parallel shift right merge of data
US7002627B1 (en) * 2002-06-19 2006-02-21 Neomagic Corp. Single-step conversion from RGB Bayer pattern to YUV 4:2:0 format

Also Published As

Publication number Publication date
CN103489427A (en) 2014-01-01

Similar Documents

Publication Publication Date Title
CN102349290B (en) Extended dynamic range and extended dimensionality image signal conversion
CN101346984B (en) Method for displaying colorful image and color display device for image
US9202292B2 (en) Image processing apparatus having a plurality of image processing blocks that are capable of real-time processing of an image signal
CN1320826C (en) Image processing circuit, image displaying device and image processing method
CN101329859A (en) Systems for converting image data in a color space
CN100469151C (en) Method and apparatus for enhancing local luminance of image
CN1867963A (en) Gamut conversion system and methods
JPH07131669A (en) Color image processing method and device
JP2001119714A (en) Method and device to obtain white color signal component, and method and device for adjusting luminance of video image
CN101076848A (en) Method and equipment for converting into target color space from source color space
JP2008153836A (en) Imaging device, image processor, image processing method, program for image processing method, and recording medium with program for image processing method recorded thereon
JP2010249859A (en) Display signal conversion apparatus
KR100547812B1 (en) Apparatus and a method for using a color reference table converting a color model of the pixel data,
CN103327323B (en) Efficient tone mapping high bit depth to a lower bit depth video display
JPWO2005081187A1 (en) Image processing apparatus, an image processing system, image processing method, image processing program, and an integrated circuit device
JPH06261332A (en) Primary color conversion method for multiple primary colors display
JPH07281633A (en) Picture display processing method of electronic display and device therefor
JP5296889B2 (en) Image processing apparatus and image processing method
JPH0646291A (en) Method and device for gamma correction
US8760461B2 (en) Device, system, and method for wide gamut color space support
KR100782818B1 (en) Method and system for luminance preserving color conversion from YUV to RGB
US8326072B2 (en) Image display apparatus, and method and apparatus for processing images
CN1700255A (en) Image transmitter, image receiver, and image transmitting system
KR20070032935A (en) Signal processing apparatus and method, and program
EP2887636B1 (en) Method of mapping source colors from a source color gamut into a target color gamut

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model