CN101221737B - Gray scale conversion device and method - Google Patents
Gray scale conversion device and method Download PDFInfo
- Publication number
- CN101221737B CN101221737B CN200710001329XA CN200710001329A CN101221737B CN 101221737 B CN101221737 B CN 101221737B CN 200710001329X A CN200710001329X A CN 200710001329XA CN 200710001329 A CN200710001329 A CN 200710001329A CN 101221737 B CN101221737 B CN 101221737B
- Authority
- CN
- China
- Prior art keywords
- gradation
- color
- gray scale
- color gradation
- bits
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
技术领域technical field
本发明是关于一种灰阶或灰度(gray scale)转换装置及方法,且特别是关于一种可转换输入图像(input image)的灰阶度(或灰度,Gray level)的灰阶转换装置及方法。The present invention relates to a grayscale or grayscale (gray scale) conversion device and method, and in particular to a grayscale conversion that can convert the grayscale (or grayscale, Gray level) of an input image (input image) Devices and methods.
背景技术Background technique
一般而言,图形卡(Graphic card)的基本功能是提供计算机绘图显示,使计算机送出的信号可显示于显视器的正确位置。计算机上要显示的输入图像是透过图形卡转换为色彩图像的控制信号,送到显视器后,显现图形及色彩于屏幕上。Generally speaking, the basic function of a graphics card is to provide computer graphics display, so that the signal sent by the computer can be displayed at the correct position of the monitor. The input image to be displayed on the computer is a control signal converted into a color image through the graphics card, and after being sent to the monitor, the graphics and colors are displayed on the screen.
在先前技术中,若输入图像为10位图像,则需要一张10位的专用图形卡,将该10位图像换为色彩图像的控制信号;若输入图像为12位图像,则需要一张12位的专用图形卡,将该12位图像换为色彩图像的控制信号;以此类推。然而,由于专用图形卡的价位较高,会提高计算机整体的成本。In the prior art, if the input image is a 10-bit image, a 10-bit dedicated graphics card is needed to change the 10-bit image into a control signal for a color image; if the input image is a 12-bit image, a 12-bit graphics card is required. 12-bit dedicated graphics card, change the 12-bit image to the control signal of the color image; and so on. However, due to the high price of a dedicated graphics card, the overall cost of the computer will be increased.
因此,本发明的目的在于提供一种灰阶转换装置及方法,以解决上述问题。Therefore, the object of the present invention is to provide a grayscale conversion device and method to solve the above problems.
发明内容Contents of the invention
本发明的一目的在于提供一种灰阶转换装置及方法,无论输入图像的灰阶度为多少位(如8位、10位、12位等),皆可经由一般的图形卡加以转换。An object of the present invention is to provide a gray scale conversion device and method, no matter how many bits (such as 8 bits, 10 bits, 12 bits, etc.) the gray scale of an input image can be converted through a general graphics card.
根据一较佳具体实施例,本发明的灰阶转换装置包含接收模块(Receiving module)、编码模块(Encoding module)以及译码模块(Decoding module)。接收模块用于接收输入图像,其中,输入图像具有N位第一灰阶度(Gray level),N为一自然数。编码模块用于选择性地根据第一灰阶度的M个高位以及T个低位计算第一颜色阶度,并且根据第一灰阶度的M个高位计算第二颜色阶度以及第三颜色阶度,其中,M以及T为一自然数,且M加T等于N。译码模块通过一灰阶转换公式,用于将第一颜色阶度、第二颜色阶度以及第三颜色阶度转换为N位第二灰阶度。According to a preferred embodiment, the grayscale conversion device of the present invention includes a receiving module, an encoding module and a decoding module. The receiving module is used for receiving an input image, wherein the input image has N-bit first gray levels (Gray level), and N is a natural number. The encoding module is used to selectively calculate the first color gradation according to the M high bits and T low bits of the first gray scale, and calculate the second color gradation and the third color gradation according to the M high bits of the first gray scale degree, where M and T are a natural number, and M plus T is equal to N. The decoding module converts the first color gradation, the second color gradation, and the third color gradation into N-bit second grayscales through a grayscale conversion formula.
在此实施例中,译码模块计算得到的第一颜色阶度、第二颜色阶度以及第三颜色阶度即可经由一般的图形卡转换为控制信号,再传送至译码模块,进而转换为该N位第二灰阶度。之后,输入图像即可以N位灰阶度显示于显示装置上。In this embodiment, the first color gradation, the second color gradation, and the third color gradation calculated by the decoding module can be converted into control signals via a general graphics card, and then sent to the decoding module for conversion. is the N-bit second grayscale. After that, the input image can be displayed on the display device with N-bit grayscale.
关于本发明的优点与精神可以通过以下的发明详述及所附图式得到进一步的了解。The advantages and spirit of the present invention can be further understood through the following detailed description of the invention and the accompanying drawings.
附图说明Description of drawings
图1是示出应用本发明的灰阶转换装置的电子设备的功能方块图。FIG. 1 is a functional block diagram showing electronic equipment to which the grayscale conversion device of the present invention is applied.
图2为根据本发明一较佳具体实施例的灰阶转换方法的流程图。FIG. 2 is a flowchart of a grayscale conversion method according to a preferred embodiment of the present invention.
具体实施方式Detailed ways
本发明提供一种在一电子设备(如计算机等)中、转换一输入图像的灰阶度的装置及方法。无论输入图像的灰阶度为多少位(如8位、10位、12位等),皆可经由一般的图形卡加以转换。The invention provides a device and method for converting the gray scale of an input image in an electronic device (such as a computer). No matter how many bits the grayscale of the input image is (such as 8 bits, 10 bits, 12 bits, etc.), it can be converted through a general graphics card.
请参阅图1,图1是示出应用本发明的灰阶转换装置10的电子设备1的功能方块图。电子设备1包含灰阶转换装置10、图形卡12、数字视频接口(Digital Video Interface,DVI)14以及显示装置16。本发明的灰阶转换装置10包含接收模块100、编码模块102以及译码模块104。编码模块102包含判断单元1020。特别是,任何类型的图形卡以及数字视频接口皆适用于本发明。Please refer to FIG. 1 . FIG. 1 is a functional block diagram illustrating an electronic device 1 applying a
如图1所示,接收模块100用于接收输入图像Img,其中,输入图像Img具有N位灰阶度,N为一自然数。在此实施例中,设定输入图像Img的灰阶度为10位来做说明,即令N=10。As shown in FIG. 1 , the receiving
编码模块102用于选择性地根据输入图像Img的灰阶度的M个高位以及T个低位计算一第一颜色阶度,并且根据该M个高位计算一第二颜色阶度以及一第三颜色阶度,其中,M以及T为一自然数,且M加T等于N。实际应用时,第一颜色阶度可为蓝色阶度,第二颜色阶度可为绿色阶度,并且第三颜色阶度可为红色阶度;第一颜色阶度可为红色阶度,第二颜色阶度可为蓝色阶度,并且第三颜色阶度可为绿色阶度;或者第一颜色阶度可为绿色阶度,第二颜色阶度可为红色阶度,并且第三颜色阶度可为蓝色阶度。在此实施例中,设定第一颜色阶度为红色阶度,第二颜色阶度为蓝色阶度,并且第三颜色阶度为绿色阶度来做说明。The
此外,由于一般图像处理是以8位来呈现颜色阶度,因此,在此实施例中,设定输入图像Img的10位灰阶度中的前8位为高位(即M=8),并且后2位为低位(即T=2)。In addition, since general image processing uses 8 bits to present the color gradation, therefore, in this embodiment, the first 8 bits of the 10-bit gray scale of the input image Img are set as high bits (that is, M=8), and The last 2 bits are low bits (ie T=2).
当输入图像Img经由接收模块传送至编码模块102时,判断单元1020会判断输入图像Img的灰阶度Y1是否小于一阈值(Threshold)2N-1,若是,则根据下列公式一计算灰阶度Y3、红色阶度C1、蓝色阶度C2以及绿色阶度C3,若否,则根据下列公式二计算灰阶度Y4、红色阶度C1、蓝色阶度C2以及绿色阶度C3。在此实施例中,N=10,则阈值为29=512。公式一:
在上述公式一以及公式二中,X1为一第一预定值,X2为一第二预定值,X1加X2等于2(N-M)-1,Y3[M]代表灰阶度Y3的M个高位,Y3[T]代表灰阶度Y3的T个低位,Y4[M]表示该第四灰阶度的M个高位,Y4[T]表示该第四灰阶度的T个低位。在此实施例中,N=10,M=8,T=2,设定X1=2,X2=1,则公式一以及公式二可表示如下。公式一:
举例而言,若输入图像Img的灰阶度Y1为511,以10位表示为[0 1 1 1 1 1 1 1 1 1]。由于Y1(511)小于512,判断单元1020会根据公式一计算灰阶度Y3=509(若不能整除,则取整数),以10位表示为[0 1 1 1 1 1 1 1 0 1];红色阶度C1为127(以8位表示为[0 1 1 1 1 1 1 1])加1(以8位表示为[0 0 0 0 0 0 0 1])等于128;蓝色阶度C2为127(以8位表示为[0 1 1 1 1 1 1 1]);绿色阶度C3为127(以8位表示为[0 1 11 1 1 1 1])。For example, if the grayscale Y 1 of the input image Img is 511, it is expressed as [0 1 1 1 1 1 1 1 1] with 10 bits. Since Y 1 (511) is less than 512, the
之后,红色阶度C1、蓝色阶度C2以及绿色阶度C3经由图形卡12以及数字视频接口14传送至译码模块104。译码模块104通过一灰阶转换公式,将红色阶度C1、蓝色阶度C2以及绿色阶度C3转换为一10位的灰阶度Y2。在此实施例中,灰阶转换公式是以下列公式三表示。公式三:Y2=(a*C1+b*C2+c*C3)*2N-M Afterwards, the red gradation C 1 , the blue gradation C 2 and the green gradation C 3 are transmitted to the
在上述公式三中,a等于b加c等于在此实施例中,N=10,M=8,设定b=0.586,c=0.164,则公式三可表示如下。公式三:Y2=(0.25*C1+0.586*C2+0.164*C3)*4In the above formula 3, a is equal to b plus c equals In this embodiment, N=10, M=8, set b=0.586, c=0.164, then formula 3 can be expressed as follows. Formula 3: Y 2 =(0.25*C 1 +0.586*C 2 +0.164*C 3 )*4
因此,若红色阶度C1为128,蓝色阶度C2为127,且绿色阶度C3为127,则灰阶度Y2=509。Therefore, if the red level C 1 is 128, the blue level C 2 is 127, and the green level C 3 is 127, then the gray level Y 2 =509.
之后,输入图像Img即可以10位灰阶度Y2(509)显示于显示装置16上。Afterwards, the input image Img can be displayed on the
请参阅图2,图2为根据本发明一较佳具体实施例的灰阶转换方法的流程图。请一并参阅图1,根据上述的实施例,本发明的灰阶转换方法包含下列步骤。首先,执行步骤S100,接收输入图像Img,其中输入图像Img具有N位灰阶度。接着,执行步骤S102,选择性地根据输入图像Img的灰阶度的M个高位以及T个低位计算第一颜色阶度,并且根据该M个高位计算第二颜色阶度以及第三颜色阶度。之后,执行步骤S104,通过灰阶转换公式,将第一颜色阶度、第二颜色阶度以及第三颜色阶度转换为N位灰阶度。详细作用原理如上所述,在此不再赘述。Please refer to FIG. 2 . FIG. 2 is a flowchart of a grayscale conversion method according to a preferred embodiment of the present invention. Please also refer to FIG. 1 , according to the above-mentioned embodiment, the grayscale conversion method of the present invention includes the following steps. Firstly, step S100 is executed to receive an input image Img, wherein the input image Img has N-bit grayscale. Next, execute step S102, selectively calculate the first color gradation according to the M high bits and T low bits of the gray scale of the input image Img, and calculate the second color gradation and the third color gradation according to the M high bits . Afterwards, step S104 is executed to convert the first color gradation, the second color gradation, and the third color gradation into N-bit grayscales by using a grayscale conversion formula. The detailed working principle is as described above, and will not be repeated here.
相较于先前技术,本发明的灰阶转换装置的编码模块计算得到的红色阶度、蓝色阶度以及绿色阶度即可经由一般的图形卡转换为控制信号,再传送至译码模块,进而转换为具有与原始灰阶度相同位数的灰阶度。借此,即可免除专用图形卡的需求,进而降低成本。Compared with the prior art, the red gradation, blue gradation and green gradation calculated by the encoding module of the gray scale conversion device of the present invention can be converted into control signals via a general graphics card, and then sent to the decoding module. It is further converted into a grayscale with the same number of bits as the original grayscale. This eliminates the need for a dedicated graphics card, reducing costs.
通过以上较佳具体实施例的详述,是希望能更加清楚描述本发明的特征与精神,而并非以上述所公开的较佳具体实施例来对本发明的范围加以限制。相反地,其目的是希望能涵盖各种改变及具相等性的安排于本发明所欲申请的专利范围的范围内。因此,本发明所申请的专利范围的范围应该根据上述的说明作最宽广的解释,以致使其涵盖所有可能的改变以及具相等性的安排。Through the above detailed description of the preferred specific embodiments, it is hoped that the characteristics and spirit of the present invention can be described more clearly, and the scope of the present invention is not limited by the preferred specific embodiments disclosed above. On the contrary, the intention is to cover various changes and equivalent arrangements within the scope of the claimed invention. Therefore, the scope of the claimed patent scope of the present invention should be interpreted in the broadest way based on the above description, so as to cover all possible changes and equivalent arrangements.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200710001329XA CN101221737B (en) | 2007-01-09 | 2007-01-09 | Gray scale conversion device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200710001329XA CN101221737B (en) | 2007-01-09 | 2007-01-09 | Gray scale conversion device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101221737A CN101221737A (en) | 2008-07-16 |
CN101221737B true CN101221737B (en) | 2010-12-08 |
Family
ID=39631534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200710001329XA Expired - Fee Related CN101221737B (en) | 2007-01-09 | 2007-01-09 | Gray scale conversion device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101221737B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244968B (en) * | 2021-12-20 | 2024-01-09 | 北京镁伽科技有限公司 | Image conversion method, image conversion device and image signal generator |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1536552A (en) * | 2003-04-03 | 2004-10-13 | �����ɷ� | Liquid crystal display driving device and method |
CN1581280A (en) * | 2003-08-03 | 2005-02-16 | 瑞昱半导体股份有限公司 | Color conversion device and method thereof |
-
2007
- 2007-01-09 CN CN200710001329XA patent/CN101221737B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1536552A (en) * | 2003-04-03 | 2004-10-13 | �����ɷ� | Liquid crystal display driving device and method |
CN1581280A (en) * | 2003-08-03 | 2005-02-16 | 瑞昱半导体股份有限公司 | Color conversion device and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN101221737A (en) | 2008-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107863081B (en) | Multiple bases conversion method and its converter, display control method, display device | |
CN101620842B (en) | Image processing circuit, and display panel driver and display device mounting the circuit | |
CN101923824B (en) | Image data transfer to cascaded display panel drivers | |
US6927754B2 (en) | Method and apparatus for improving resolution of display unit | |
KR100810401B1 (en) | Display driver | |
US10096274B2 (en) | Data driver for reducing data transmission, display device, and data driving method | |
US9715857B2 (en) | Signal conversion device and method, signal generating system and display apparatus | |
CN101719359A (en) | Color distribution adjusting method and color distribution module | |
CN108877735A (en) | Show the gray-scale intensity method of adjustment and adjustment device of equipment | |
CN108074539B (en) | Electronic device, display driver and display data generation method of display panel | |
CN101388190A (en) | Jitter calculation method for liquid crystal display | |
JP5255219B2 (en) | Gray scale conversion apparatus and method | |
CN1997164A (en) | Data converting circuit and display apparatus using the same | |
CN101221737B (en) | Gray scale conversion device and method | |
CN105096800A (en) | Gray-scale voltage conversion method and module, data driving circuit and display panel | |
WO2011075949A1 (en) | Display screen drive circuit for controlling mixed superposition grey level | |
WO2017045255A1 (en) | Drive device and liquid crystal display | |
CN100417181C (en) | Image compression and decompression method capable of coding and decoding pixel data | |
CN103839506B (en) | Display device, drive circuit thereof, display panel drive method, and display system | |
CN103763538B (en) | A kind of realize the method and device that signal colour shows | |
CN100397443C (en) | Gamma adjusting method and device for multi-channel driver of display | |
CN101303834A (en) | Digital-to-analog converter and method thereof | |
JP5055201B2 (en) | Method and apparatus for improving gray gradation resolution of monochromatic image reproduction apparatus | |
KR101910150B1 (en) | Liquid crystal display and its driving method | |
CN103686109B (en) | Image processing method and image display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20101208 Termination date: 20200109 |