TW201939936A - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- TW201939936A TW201939936A TW107107743A TW107107743A TW201939936A TW 201939936 A TW201939936 A TW 201939936A TW 107107743 A TW107107743 A TW 107107743A TW 107107743 A TW107107743 A TW 107107743A TW 201939936 A TW201939936 A TW 201939936A
- Authority
- TW
- Taiwan
- Prior art keywords
- pixel
- value
- error
- neighboring
- adjacent
- Prior art date
Links
Landscapes
- Image Processing (AREA)
Abstract
Description
本揭露實施例是有關於一種影像處理裝置,且特別是有關於一種以誤差擴散(error diffusion)為基礎並加以改良之影像處理裝置。 The embodiments of the present disclosure relate to an image processing apparatus, and more particularly, to an image processing apparatus based on error diffusion and improved.
影像的像素值之量化(quantization)處理是影像處理中常見的技術,然而量化處理通常會造成影像之像素值之量化誤差。為了讓影像不會因為這些量化誤差而讓人眼感受到明顯的差異,誤差擴散(error diffusion)處理技術為一種常見的半色調(halftone)影像處理技術,誤差擴散處理技術乃是將影像中之像素的量化誤差分配到鄰近像素,從而分散量化誤差。相較於其他的半色調影像處理技術,誤差擴散處理技術在調和半色調影像品質與影像處理效率方面具有相當的優勢。 The quantization processing of image pixel values is a common technique in image processing. However, the quantization processing usually causes a quantization error of the image pixel values. In order to prevent the image from feeling obvious differences due to these quantization errors, error diffusion processing technology is a common halftone image processing technology. Error diffusion processing technology The quantization error of a pixel is distributed to neighboring pixels, thereby dispersing the quantization error. Compared with other halftone image processing technologies, error diffusion processing technology has considerable advantages in reconciling halftone image quality and image processing efficiency.
舉例而言,其中一種習知的誤差擴散處理方式是將誤差擴散至右側像素(水平方向擴散)及下方像素(垂直方向擴散)。然而,水平方向擴散的作法對於硬體是不利的,例如硬體設計成本高、輸出的資訊處理量受限、傳遞時序不夠快等,因此習知的誤差擴散處理方式仍有改善之空間。 For example, one of the conventional error diffusion processing methods is to diffuse errors to pixels on the right (horizontal diffusion) and pixels below (vertical diffusion). However, the horizontal diffusion method is disadvantageous to the hardware, such as high hardware design cost, limited information processing capacity, and insufficient transmission timing. Therefore, the conventional error diffusion processing method still has room for improvement.
本揭露之目的在於提出一種影像處理裝置,以誤差擴散(error diffusion)為基礎並加以改良,從而改善習知的誤差擴散處理方式的缺陷。 The purpose of this disclosure is to propose an image processing device that is based on error diffusion and is improved to improve the shortcomings of the conventional error diffusion processing method.
根據本揭露之上述目的,提出一種影像處理裝置包含:輸入值接收單元、校正值計算單元、輸出值計算單元與輸出值指定單元。輸入值接收單元用以接收影像之第一像素之輸入值與第二像素之輸入值,其中第一像素相鄰於第二像素,其中第一像素與第二像素係分別位於第一位置(x,y)與第二位置(x+1,y)。校正值計算單元用以根據相鄰於第一像素之多個第一相鄰像素之多個分量誤差值與第一像素之輸入值來計算第一像素之校正值,且根據相鄰於第二像素之多個第二相鄰像素之多個分量誤差值與第二像素之輸入值來計算第二像素之校正值,其中多個第一相鄰像素係分別位於第三位置(x-1,y)、第四位置(x-1,y-1)、第五位置(x,y-1)與第六位置(x+1,y-1),其中多個第二相鄰像素係分別位於第五位置(x,y-1)、第六位置(x+1,y-1)與第七位置(x+2,y-1)。輸出值計算單元用以根據第一像素之校正值來計算第一像素之輸出值,且根據第二像素之校正值來計算第二像素之輸出值。輸出值指定單元用以指定第一像素之輸出值予第一像素,且指定第二像素之輸出值予第二像素。 According to the above purpose of the present disclosure, an image processing apparatus is provided, which includes: an input value receiving unit, a correction value calculating unit, an output value calculating unit, and an output value specifying unit. The input value receiving unit is configured to receive an input value of a first pixel and an input value of a second pixel of the image, wherein the first pixel is adjacent to the second pixel, and the first pixel and the second pixel are respectively located at the first position (x , y) and the second position (x + 1, y). The correction value calculation unit is configured to calculate the correction value of the first pixel according to the component error values of the first adjacent pixels adjacent to the first pixel and the input value of the first pixel, and to calculate the correction value of the first pixel according to A plurality of component error values of a plurality of second adjacent pixels of the pixel and an input value of the second pixel are used to calculate a correction value of the second pixel, wherein the plurality of first adjacent pixels are respectively located at a third position (x-1, y), fourth position (x-1, y-1), fifth position (x, y-1), and sixth position (x + 1, y-1), where a plurality of second adjacent pixels are respectively It is located at the fifth position (x, y-1), the sixth position (x + 1, y-1), and the seventh position (x + 2, y-1). The output value calculation unit is configured to calculate the output value of the first pixel according to the correction value of the first pixel, and calculate the output value of the second pixel according to the correction value of the second pixel. The output value specifying unit is used to specify an output value of the first pixel to the first pixel, and specify an output value of the second pixel to the second pixel.
在一些實施例中,上述第一像素之校正值為多個第一相鄰像素之多個分量誤差值與第一像素之輸入值的 總和,上述第二像素之校正值為多個第二相鄰像素之多個分量誤差值與第二像素之輸入值的總和。 In some embodiments, the correction value of the first pixel is a value between a plurality of component error values of a plurality of first neighboring pixels and an input value of the first pixel. In sum, the correction value of the second pixel is the sum of the component error values of the plurality of second neighboring pixels and the input value of the second pixel.
在一些實施例中,上述第一像素之輸出值為第一像素之校正值之最高有效位元(most significant bit,MSB)值,上述第二像素之輸出值為第二像素之校正值之最高有效位元值。 In some embodiments, the output value of the first pixel is the most significant bit (MSB) value of the correction value of the first pixel, and the output value of the second pixel is the highest value of the correction value of the second pixel. Significant bit value.
在一些實施例中,上述影像處理裝置更包含誤差值計算單元,用以根據第一像素之校正值來計算第一像素之誤差值,且根據第二像素之校正值來計算第二像素之誤差值。 In some embodiments, the image processing apparatus further includes an error value calculation unit for calculating the error value of the first pixel according to the correction value of the first pixel, and calculating the error value of the second pixel according to the correction value of the second pixel. value.
在一些實施例中,上述第一像素之誤差值為第一像素之校正值之最低有效位元(least significant bit,LSB)值,上述第二像素之誤差值為第二像素之校正值之最低有效位元值。 In some embodiments, the error value of the first pixel is the least significant bit (LSB) value of the correction value of the first pixel, and the error value of the second pixel is the least correction value of the second pixel. Significant bit value.
在一些實施例中,位於第三位置(x-1,y)的第一相鄰像素之分量誤差值為位於第三位置(x-1,y)的第一相鄰像素之誤差值的A/Z;位於第四位置(x-1,y-1)的第一相鄰像素之分量誤差值為位於第四位置(x-1,y-1)的第一相鄰像素之誤差值的B/Z;位於第五位置(x,y-1)的第一相鄰像素之分量誤差值為位於第五位置(x,y-1)的第一相鄰像素之誤差值的C/Z;位於第六位置(x+1,y-1)的第一相鄰像素之分量誤差值為位於第六位置(x+1,y-1)的第一相鄰像素之誤差值的D/Z;位於第五位置(x,y-1)的第二相鄰像素之分量誤差值為位於第五位置(x,y-1)的第二相鄰像素之誤差值的 E/Z;位於第六位置(x+1,y-1)的第二相鄰像素之分量誤差值為位於第六位置(x+1,y-1)的第二相鄰像素之誤差值的F/Z;位於第七位置(x+2,y-1)的第二相鄰像素之分量誤差值為位於第七位置(x+2,y-1)的第二相鄰像素之誤差值的G/Z;其中A、B、C、D、E、F、G、Z為正整數,且A+B+C+D+E+F+G=2*Z。 In some embodiments, the component error value of the first neighboring pixel located at the third position (x-1, y) is A of the error value of the first neighboring pixel located at the third position (x-1, y). / Z; the component error value of the first neighboring pixel at the fourth position (x-1, y-1) is the error value of the first neighboring pixel at the fourth position (x-1, y-1) B / Z; the component error value of the first neighboring pixel at the fifth position (x, y-1) is the C / Z of the error value of the first neighboring pixel at the fifth position (x, y-1) ; The component error value of the first neighboring pixel at the sixth position (x + 1, y-1) is the D / of the error value of the first neighboring pixel at the sixth position (x + 1, y-1) Z; the component error value of the second adjacent pixel at the fifth position (x, y-1) is the error value of the second adjacent pixel at the fifth position (x, y-1) E / Z; the component error value of the second neighboring pixel at the sixth position (x + 1, y-1) is the error value of the second neighboring pixel at the sixth position (x + 1, y-1) F / Z; the component error value of the second neighboring pixel at the seventh position (x + 2, y-1) is the error of the second neighboring pixel at the seventh position (x + 2, y-1) Value G / Z; where A, B, C, D, E, F, G, Z are positive integers, and A + B + C + D + E + F + G = 2 * Z.
在一些實施例中,A=7,B=3,C=6,D=1,E=F=G=5。 In some embodiments, A = 7, B = 3, C = 6, D = 1, E = F = G = 5.
在一些實施例中,上述第一相鄰像素之誤差值為第一相鄰像素之校正值之最低有效位元(least significant bit,LSB)值,上述第二相鄰像素之誤差值為第二相鄰像素之校正值之最低有效位元值。 In some embodiments, the error value of the first adjacent pixel is the least significant bit (LSB) value of the correction value of the first adjacent pixel, and the error value of the second adjacent pixel is the second Least significant bit value of the correction value of adjacent pixels.
在一些實施例中,位於第五位置(x,y-1)的第一相鄰像素與位於第五位置(x,y-1)的第二相鄰像素為同一像素,位於第六位置(x+1,y-1)的第一相鄰像素與位於第六位置(x+1,y-1)的第二相鄰像素為同一像素。 In some embodiments, the first adjacent pixel located at the fifth position (x, y-1) and the second adjacent pixel located at the fifth position (x, y-1) are the same pixel and located at the sixth position ( The first adjacent pixel at x + 1, y-1) and the second adjacent pixel at the sixth position (x + 1, y-1) are the same pixel.
為讓本揭露的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above-mentioned features and advantages of the present disclosure more comprehensible, embodiments are described below in detail with reference to the accompanying drawings.
100‧‧‧影像處理裝置 100‧‧‧Image processing device
110‧‧‧輸入值接收單元 110‧‧‧input value receiving unit
120‧‧‧校正值計算單元 120‧‧‧correction value calculation unit
130‧‧‧輸出值計算單元 130‧‧‧output value calculation unit
140‧‧‧輸出值指定單元 140‧‧‧Output value specifying unit
150‧‧‧誤差值計算單元 150‧‧‧ Error value calculation unit
E3、E4、E5、E6、E7‧‧‧誤差值 E 3 , E 4 , E 5 , E 6 , E 7 ‧‧‧ error value
I1、I2‧‧‧輸入值 I 1 , I 2 ‧‧‧ Input value
P(x,y)‧‧‧第一像素 P (x, y) ‧‧‧first pixel
P(x+1,y)‧‧‧第二像素 P (x + 1, y) ‧‧‧ second pixel
P(x-1,y)、P(x-1,y-1)‧‧‧第一相鄰像素 P (x-1, y), P (x-1, y-1) ‧‧‧First adjacent pixel
P(x+2,y-1)‧‧‧第二相鄰像素 P (x + 2, y-1) ‧‧‧Second adjacent pixel
P(x,y-1)、P(x+1,y-1)‧‧‧第一相鄰像素/第二相鄰像素 P (x, y-1), P (x + 1, y-1) ‧‧‧first neighboring pixel / second neighboring pixel
從以下結合所附圖式所做的詳細描述,可對本揭露之態樣有更佳的了解。需注意的是,根據業界的標準實務,各特徵並未依比例繪示。事實上,為了使討論更為清楚,各特徵的尺寸都可任意地增加或減少。 A better understanding of the aspects of the present disclosure can be obtained from the following detailed description in conjunction with the accompanying drawings. It should be noted that, according to industry standard practice, features are not drawn to scale. In fact, to make the discussion clearer, the dimensions of each feature can be arbitrarily increased or decreased.
[圖1]係根據本揭露的實施例之影像處理裝置的系統方塊圖。 [FIG. 1] A system block diagram of an image processing device according to an embodiment of the present disclosure.
[圖2]係根據本揭露的實施例之像素配置示意圖。 FIG. 2 is a schematic diagram of a pixel configuration according to an embodiment of the disclosure.
[圖3]係根據本揭露的一實施例之第一相鄰像素之分量誤差值的擴散示意圖。 3 is a schematic diagram of diffusion of component error values of first neighboring pixels according to an embodiment of the disclosure.
[圖4]係根據本揭露的一實施例之第二相鄰像素之分量誤差值的擴散示意圖。 FIG. 4 is a schematic diagram of diffusion of component error values of a second neighboring pixel according to an embodiment of the disclosure.
以下仔細討論本發明的實施例。然而,可以理解的是,實施例提供許多可應用的概念,其可實施於各式各樣的特定內容中。所討論、揭示之實施例僅供說明,並非用以限定本發明之範圍。 Embodiments of the invention are discussed in detail below. It is understood, however, that the embodiments provide many applicable concepts that can be embodied in a wide variety of specific content. The embodiments discussed and disclosed are for illustration only and are not intended to limit the scope of the invention.
圖1係根據本揭露的實施例之影像處理裝置100的系統方塊圖。圖2係根據本揭露的實施例之像素配置示意圖。在此,先定義圖2中的符號所代表的意義,例如位於位置(x,y)的像素以P(x,y)表示,以此類推。請一併參照圖1與圖2,影像處理裝置100包含步驟輸入值接收單元110、校正值計算單元120、輸出值計算單元130、輸出值指定單元140與誤差值計算單元150。輸入值接收單元110接收影像之第一像素P(x,y)之輸入值I1與第二像素P(x+1,y)之輸入值I2。舉例而言,第一像素P(x,y)之輸入值I1為第一像素P(x,y)於所接收之影像中的像素資料,第二像素P(x+1,y)之輸入值I2為第二像素P(x+1,y)於所接收之 影像中的像素資料。 FIG. 1 is a system block diagram of an image processing apparatus 100 according to an embodiment of the present disclosure. FIG. 2 is a schematic diagram of a pixel configuration according to an embodiment of the disclosure. Here, the meaning represented by the symbols in FIG. 2 is first defined, for example, the pixel at the position (x, y) is represented by P (x, y), and so on. 1 and FIG. 2 together, the image processing apparatus 100 includes a step input value receiving unit 110, a correction value calculating unit 120, an output value calculating unit 130, an output value specifying unit 140, and an error value calculating unit 150. The first pixel P 110 receives an input value of an image receiving unit (x, y) of the input value I 1 and the second pixel P (x + 1, y) of the input value I 2. For example, the input value I 1 of the first pixel P (x, y) is the pixel data of the first pixel P (x, y) in the received image, and the second pixel P (x + 1, y) is the The input value I 2 is the pixel data of the second pixel P (x + 1, y) in the received image.
校正值計算單元120用以根據相鄰於第一像素P(x,y)之第一相鄰像素P(x-1,y)之分量誤差值EC11、相鄰於第一像素P(x,y)之第一相鄰像素P(x-1,y-1)之分量誤差值EC12、相鄰於第一像素P(x,y)之第一相鄰像素P(x,y-1)之分量誤差值EC13、相鄰於第一像素P(x,y)之第一相鄰像素P(x+1,y-1)之分量誤差值EC14以及第一像素P(x,y)之輸入值I1來計算第一像素P(x,y)之校正值D1。 The correction value calculation unit 120 is configured to calculate a component error value EC 11 adjacent to the first pixel P (x-1, y) adjacent to the first pixel P (x, y) , y) component error value EC 12 of the first neighboring pixel P (x-1, y-1), and the first neighboring pixel P (x, y- 1) the error component EC 13, a first adjacent pixel adjacent to the first pixel P (x, y) of P (x + 1, y- 1) component of the first error value and the EC 14 pixel P (x , y) of the input value I 1 calculates a first pixel P (x, y) of the correction value D 1.
在本揭露的實施例中,第一像素P(x,y)之校正值D1為第一相鄰像素P(x-1,y)、P(x-1,y-1)、P(x,y-1)、P(x+1,y-1)之多個分量誤差值EC11、EC12、EC13、EC14與第一像素P(x,y)之輸入值的I1總和,即D1=I1+(EC11+EC12+EC13+EC14)。 In the embodiment of the present disclosure, the correction value D 1 of the first pixel P (x, y) is the first neighboring pixel P (x-1, y), P (x-1, y-1), P ( x, y-1), P (x + 1, y-1) component error values EC 11 , EC 12 , EC 13 , EC 14 and I 1 of the input value of the first pixel P (x, y) The sum is D 1 = I 1 + (EC 11 + EC 12 + EC 13 + EC 14 ).
校正值計算單元120亦用以根據相鄰於第二像素P(x+1,y)之第二相鄰像素P(x,y-1)之分量誤差值EC21、相鄰於第二像素P(x+1,y)之第二相鄰像素P(x+1,y-1)之分量誤差值EC22、相鄰於第二像素P(x+1,y)之第二相鄰像素P(x+2,y-1)之分量誤差值EC23以及第二像素P(x+1,y)之輸入值I2來計算第二像素P(x+1,y)之校正值D2。 The correction value calculation unit 120 is also used to calculate the component error value EC 21 of the second adjacent pixel P (x, y-1) adjacent to the second pixel P (x + 1, y) and the second pixel adjacent to the second pixel P (x + 1, y). The component error value EC 22 of the second neighboring pixel P (x + 1, y-1) of P (x + 1, y) and the second neighboring pixel P (x + 1, y) of the second neighboring pixel The component error value EC 23 of the pixel P (x + 2, y-1) and the input value I 2 of the second pixel P (x + 1, y) are used to calculate the correction value of the second pixel P (x + 1, y) D 2 .
在本揭露的實施例中,第二像素P(x+1,y)之校正值D2為第二相鄰像素P(x,y-1)、P(x+1,y-1)、P(x+2,y-1)之多個分量誤差值EC21、EC22、EC23與第二像素P(x+1,y)之輸入值的I2總和,即D2=I2+(EC21+EC22+EC23)。 In the embodiment of the present disclosure, the correction value D 2 of the second pixel P (x + 1, y) is the second neighboring pixel P (x, y-1), P (x + 1, y-1), The sum of I 2 of the component error values EC 21 , EC 22 , EC 23 of P (x + 2, y-1) and the input value of the second pixel P (x + 1, y), that is, D 2 = I 2 + (EC 21 + EC 22 + EC 23 ).
在本揭露的實施例中,第一相鄰像素P(x-1,y) 之分量誤差值EC11為第一相鄰像素P(x-1,y)之誤差值E3的A/Z,即;第一相鄰像素P(x-1,y-1)之分量誤差值EC12為第一相鄰像素P(x-1,y-1)之誤差值E4的B/Z,即;第一相鄰像素P(x,y-1)之分量誤差值EC13為第一相鄰像素P(x,y-1)之誤差值E5的C/Z,即;第一相鄰像素P(x+1,y-1)之分量誤差值EC14為第一相鄰像素P(x+1,y-1)之誤差值E6的D/Z,即;第二相鄰像素P(x,y-1)之分量誤差值EC21為第二相鄰像素P(x,y-1)之誤差值E5的E/Z,即;第二相鄰像素P(x+1,y-1)之分量誤差值EC22為第二相鄰像素P(x+1,y-1)之誤差值E6的F/Z,即;第二相鄰像素P(x+2,y-1)之分量誤差值EC23為第二相鄰像素P(x+2,y-1)之誤差值E7的G/Z,即。其中A、B、C、D、E、F、G、Z為正整數,且A+B+C+D+E+F+G=2*Z。 In the embodiment of the present disclosure, the component error value EC 11 of the first neighboring pixel P (x-1, y) is A / Z of the error value E 3 of the first neighboring pixel P (x-1, y). , which is ; The component error value EC 12 of the first neighboring pixel P (x-1, y-1) is the B / Z of the error value E 4 of the first neighboring pixel P (x-1, y-1), that is, ; The component error value EC 13 of the first neighboring pixel P (x, y-1) is the C / Z of the error value E 5 of the first neighboring pixel P (x, y-1), that is, ; The component error value EC 14 of the first neighboring pixel P (x + 1, y-1) is the D / Z of the error value E 6 of the first neighboring pixel P (x + 1, y-1), that is, ; The component error value EC 21 of the second neighboring pixel P (x, y-1) is the E / Z of the error value E 5 of the second neighboring pixel P (x, y-1), that is, ; The component error value EC 22 of the second neighboring pixel P (x + 1, y-1) is the F / Z of the error value E 6 of the second neighboring pixel P (x + 1, y-1), that is, ; The component error value EC 23 of the second neighboring pixel P (x + 2, y-1) is the G / Z of the error value E 7 of the second neighboring pixel P (x + 2, y-1), that is, . Where A, B, C, D, E, F, G, Z are positive integers, and A + B + C + D + E + F + G = 2 * Z.
圖3係根據本揭露的一實施例之第一像素P(x,y)之第一相鄰像素之分量誤差值的擴散示意圖。在本揭露的一實施例中,A=7,B=3,C=6,D=1,Z=16。具體而言,;;;。然而,本揭露不受限於此。 FIG. 3 is a schematic diagram of diffusion of component error values of a first adjacent pixel of a first pixel P (x, y) according to an embodiment of the disclosure. In an embodiment of the present disclosure, A = 7, B = 3, C = 6, D = 1, Z = 16. in particular, ; ; ; . However, this disclosure is not limited to this.
圖4係根據本揭露的一實施例之第二像素P(x+1,y)之第二相鄰像素之分量誤差值的擴散示意圖。在本揭露的一實施例中,E=F=G=5,Z=16。具體而言, ;;。然而,本揭露不受限於此。 FIG. 4 is a schematic diagram of diffusion of component error values of a second adjacent pixel of a second pixel P (x + 1, y) according to an embodiment of the disclosure. In one embodiment of the present disclosure, E = F = G = 5 and Z = 16. in particular, ; ; . However, this disclosure is not limited to this.
輸出值計算單元130用以根據第一像素P(x,y)之校正值D1來計算第一像素P(x,y)之輸出值O1,且根據第二像素P(x+1,y)之校正值D2來計算第二像素P(x+1,y)之輸出值O2。在本揭露的實施例中,第一像素P(x,y)之輸出值O1為第一像素P(x,y)之校正值D1之最高有效位元(most significant bit,MSB)值,即O1=MSB(D1)。在本揭露的實施例中,第二像素P(x+1,y)之輸出值O2為第二像素P(x+1,y)之校正值D2之最高有效位元值,即O2=MSB(D2)。 The output value calculation unit 130 is configured to calculate the output value O 1 of the first pixel P (x, y) according to the correction value D 1 of the first pixel P (x, y), and according to the second pixel P (x + 1, The correction value D 2 of y) is used to calculate the output value O 2 of the second pixel P (x + 1, y). In the embodiment of the present disclosure, the output value O 1 of the first pixel P (x, y) is the most significant bit (MSB) value of the correction value D 1 of the first pixel P (x, y). , That is, O 1 = MSB (D 1 ). In the embodiment of the present disclosure, the output value O 2 of the second pixel P (x + 1, y) is the most significant bit value of the correction value D 2 of the second pixel P (x + 1, y), that is, O 2 = MSB (D 2 ).
誤差值計算單元150用以根據第一像素P(x,y)之校正值D1來計算第一像素P(x,y)之誤差值E1,且根據第二像素P(x+1,y)之校正值D2來計算第二像素P(x+1,y)之誤差值E2。在本揭露的實施例中,第一像素P(x,y)之誤差值E1為第一像素P(x,y)之校正值D1之最低有效位元(least significant bit,LSB)值,即E1=LSB(D1)。在本揭露的實施例中,第二像素P(x+1,y)之誤差值E2為第二像素P(x+1,y)之校正值D2之最低有效位元值,即E2=LSB(D2)。值得一提的是,誤差值計算單元150所計算出之第一像素P(x,y)之誤差值E1與第二像素P(x+1,y)之誤差值E2同樣會依上述的方式來擴散給其相鄰的像素。 The error value calculation unit 150 is configured to calculate the error value E 1 of the first pixel P (x, y) according to the correction value D 1 of the first pixel P (x, y), and according to the second pixel P (x + 1, The correction value D 2 of y) is used to calculate the error value E 2 of the second pixel P (x + 1, y). In the embodiment of the present disclosure, the error value E 1 of the first pixel P (x, y) is the least significant bit (LSB) value of the correction value D 1 of the first pixel P (x, y). , That is, E 1 = LSB (D 1 ). In the embodiment of the present disclosure, the error value E 2 of the second pixel P (x + 1, y) is the least significant bit value of the correction value D 2 of the second pixel P (x + 1, y), that is, E 2 = LSB (D 2 ). It is worth mentioning that the first pixel P (x, y) of the error value calculation unit 150 calculates the error value E 1 and the second pixel P (x + 1, y) of the same error value E 2 will be according to the above Way to diffuse to its neighboring pixels.
在本揭露的實施例中,第一相鄰像素P(x-1,y)之誤差值E3為第一相鄰像素P(x-1,y)之校正值D3之最低有效位元值,即E3=LSB(D3);第一相鄰像素P(x-1,y-1)之誤差 值E4為第一相鄰像素P(x-1,y-1)之校正值D4之最低有效位元值,即E4=LSB(D4);第一相鄰像素(或第二相鄰像素)P(x,y-1)之誤差值E5為第一相鄰像素P(x,y-1)之校正值D5之最低有效位元值,即E5=LSB(D5);第一相鄰像素(或第二相鄰像素)P(x+1,y-1)之誤差值E6為第一相鄰像素P(x+1,y-1)之校正值D6之最低有效位元值,即E6=LSB(D6);第二相鄰像素P(x+2,y-1)之誤差值E7為第二相鄰像素P(x+2,y-1)之校正值D7之最低有效位元值,即E7=LSB(D7)。值得一提的是,由於校正值計算單元120係例如,根據多個第一相鄰像素之多個分量誤差值以及第一像素之輸入值來計算第一像素之校正值,因此在圖1所示的系統方塊圖中,誤差值計算單元150所計算出的誤差值會送回校正值計算單元120來計算校正值。 In the embodiment of the present disclosure, the error value E 3 of the first neighboring pixel P (x-1, y) is the least significant bit of the correction value D 3 of the first neighboring pixel P (x-1, y). Value, that is, E 3 = LSB (D 3 ); the error value E 4 of the first neighboring pixel P (x-1, y-1) is the correction of the first neighboring pixel P (x-1, y-1) The least significant bit value of the value D 4 is E 4 = LSB (D 4 ); the error value E 5 of the first adjacent pixel (or the second adjacent pixel) P (x, y-1) is the first phase The least significant bit value of the correction value D 5 of the neighboring pixel P (x, y-1), that is, E 5 = LSB (D 5 ); the first neighboring pixel (or the second neighboring pixel) P (x + 1 , y-1) error value E 6 is the least significant bit value of the correction value D 6 of the first neighboring pixel P (x + 1, y-1), that is, E 6 = LSB (D 6 ); second The error value E 7 of the adjacent pixel P (x + 2, y-1) is the least significant bit value of the correction value D 7 of the second adjacent pixel P (x + 2, y-1), that is, E 7 = LSB (D 7 ). It is worth mentioning that, because the correction value calculation unit 120 is, for example, calculating the correction value of the first pixel based on the multiple component error values of the plurality of first neighboring pixels and the input value of the first pixel, it is shown in FIG. In the system block diagram shown, the error value calculated by the error value calculation unit 150 is sent back to the correction value calculation unit 120 to calculate the correction value.
輸出值指定單元140用以指定第一像素P(x,y)之輸出值O1予第一像素P(x,y),且指定第二像素P(x+1,y)之輸出值O2予第二像素P(x+1,y)。舉例而言,第一像素P(x,y)之輸出值O1為第一像素P(x,y)於所輸出之影像中的像素資料,第二像素P(x+1,y)之輸出值O2為第二像素P(x+1,y)於所輸出之影像中的像素資料。 The output value specifying unit 140 is used to specify an output value O 1 of the first pixel P (x, y) to the first pixel P (x, y), and specify an output value O of the second pixel P (x + 1, y). 2 for the second pixel P (x + 1, y). For example, the output value O 1 of the first pixel P (x, y) is the pixel data of the first pixel P (x, y) in the output image, and the output value of the second pixel P (x + 1, y) is The output value O 2 is the pixel data of the second pixel P (x + 1, y) in the output image.
值得一提的是,在本揭露的實施例中,當第一像素P(x,y)與第二像素P(x+1,y)之至少一者位處影像之邊緣,將可能產生第一相鄰像素與第二相鄰像素之至少一者實質上不存在的情況,若於此情況下,則將最鄰近的且實質存在的像素的原始像素資料指定成為該不存在的第一相鄰像 素或第二相鄰像素的原始像素資料。舉例而言,當第一像素P(x,y)位處影像之最左側,則第一相鄰像素P(x-1,y)實質上並不存在,故將最鄰近第一相鄰像素P(x-1,y)且實質存在的像素(即第一像素P(x,y))的原始像素資料指定成為第一相鄰像素P(x-1,y)的原始像素資料,依此類推,其餘情況(例如第二像素P(x+1,y)位處影像之最左側等)的做法亦同,於此不再贅述。 It is worth mentioning that in the embodiment of the present disclosure, when at least one of the first pixel P (x, y) and the second pixel P (x + 1, y) is located at the edge of the image, the first In the case where at least one of a neighboring pixel and a second neighboring pixel does not substantially exist, if this is the case, the original pixel data of the nearest and substantially existing pixel is designated as the non-existing first phase Neighbor The original pixel data of the prime or second neighboring pixel. For example, when the first pixel P (x, y) is at the far left of the image, the first neighboring pixel P (x-1, y) does not exist substantially, so it will be closest to the first neighboring pixel P (x-1, y) and the original pixel data of the substantially existing pixel (that is, the first pixel P (x, y)) is designated as the original pixel data of the first neighboring pixel P (x-1, y). By analogy, the rest of the cases (for example, the leftmost side of the image at the second pixel P (x + 1, y) position, etc.) are also the same, and will not be repeated here.
應注意的是,對本揭露的實施例之第一相鄰像素而言,包含水平方向擴散與垂直方向擴散,對本揭露的實施例之第二相鄰像素而言,僅有垂直方向擴散。具體而言,對於本揭露的實施例之影像處理裝置100而言,僅有一半的像素會將其分量誤差值進行水平方向擴散與垂直方向擴散,其他另一半的像素則僅會將其分量誤差值進行垂直方向擴散。因此,相較於習知的誤差擴散處理方式,本揭露的實施例之影像處理裝置100具有以下效益:可降低硬體設計成本、提高輸出的資訊處理量、加快傳遞時序等。 It should be noted that, for the first adjacent pixel of the embodiment of the present disclosure, it includes horizontal diffusion and vertical diffusion, and for the second adjacent pixel of the embodiment of the present disclosure, there is only vertical diffusion. Specifically, for the image processing apparatus 100 according to the embodiment of the disclosure, only half of the pixels will diffuse their component error values horizontally and vertically, and the other half of the pixels will only have their component errors Values are diffused vertically. Therefore, compared to the conventional error diffusion processing method, the image processing apparatus 100 of the embodiment of the present disclosure has the following benefits: it can reduce the cost of hardware design, increase the amount of output information processing, and speed up the transmission sequence.
綜合上述,本揭露提出一種影像處理裝置,以誤差擴散(error diffusion)為基礎並加以改良,從而改善習知的誤差擴散處理方式的缺陷。 In summary, the present disclosure proposes an image processing device based on error diffusion and improving it, thereby improving the shortcomings of the conventional error diffusion processing method.
以上概述了數個實施例的特徵,因此熟習此技藝者可以更了解本揭露的態樣。熟習此技藝者應了解到,其可輕易地把本揭露當作基礎來設計或修改其他的製程與結構,藉此實現和在此所介紹的這些實施例相同的目標及/或達到相同的優點。熟習此技藝者也應可明白,這些等效的建 構並未脫離本揭露的精神與範圍,並且他們可以在不脫離本揭露精神與範圍的前提下做各種的改變、替換與變動。 The features of several embodiments are summarized above, so those skilled in the art can better understand the aspects of the present disclosure. Those skilled in the art should understand that they can easily use this disclosure as a basis to design or modify other processes and structures, thereby achieving the same goals and / or achieving the same advantages as the embodiments described herein. . Those skilled in the art should also understand that these equivalent constructs Structures do not depart from the spirit and scope of this disclosure, and they can make various changes, substitutions, and alterations without departing from the spirit and scope of this disclosure.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107107743A TWI657690B (en) | 2018-03-07 | 2018-03-07 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107107743A TWI657690B (en) | 2018-03-07 | 2018-03-07 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI657690B TWI657690B (en) | 2019-04-21 |
TW201939936A true TW201939936A (en) | 2019-10-01 |
Family
ID=66996157
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107107743A TWI657690B (en) | 2018-03-07 | 2018-03-07 | Image processing device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI657690B (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8049930B2 (en) * | 2008-09-15 | 2011-11-01 | National Taiwan University Of Science And Technology | Method of halftone watermarking for hiding multi-tone watermark or two-tone watermark |
US20110285713A1 (en) * | 2010-05-21 | 2011-11-24 | Jerzy Wieslaw Swic | Processing Color Sub-Pixels |
JP2017136731A (en) * | 2016-02-02 | 2017-08-10 | 株式会社リコー | Image processing method, image processing system, and program |
-
2018
- 2018-03-07 TW TW107107743A patent/TWI657690B/en active
Also Published As
Publication number | Publication date |
---|---|
TWI657690B (en) | 2019-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240078649A1 (en) | Brightness and contrast enhancement for video | |
KR100366935B1 (en) | Image interpolation device | |
WO2019041842A1 (en) | Image processing method and device, storage medium and computer device | |
WO2013000435A1 (en) | Simplified bilateral intra smoothing filter | |
JP2012019513A (en) | Method and apparatus for converting 2d image to 3d image | |
US9286653B2 (en) | System and method for increasing the bit depth of images | |
CN108961170A (en) | Image processing method, device and system | |
US8314884B2 (en) | Device and method for adaptive blending motion compensation interpolation in frame rate up-conversion | |
CN104915939A (en) | Image equalization method and device | |
US8265419B2 (en) | Image processing apparatus and image processing method | |
TW201939936A (en) | Image processing device | |
US9530223B2 (en) | Image correction method and image correction device | |
JP2017174311A (en) | Edge detection device and edge detection method | |
KR101279576B1 (en) | Method for generating panorama image within digital image processing apparatus | |
CN110365865B (en) | Image processing device | |
CN109308690B (en) | Image brightness balancing method and terminal | |
CN103793892B (en) | Image processing apparatus and image processing method | |
CN115170413A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
TWI720628B (en) | Method and apparatus for enhancing brightness and contrast of video image,storage medium and electronic device | |
US20170076691A1 (en) | Image processing method | |
CN114424513A (en) | Highlight recovery for image processing pipelines | |
JP6627528B2 (en) | Image processing method and image processing apparatus | |
CN107154233B (en) | Image processing method and device and display control card | |
US20180102108A1 (en) | Image processing apparatus and image processing method | |
US9426493B2 (en) | Method and apparatus for inter-picture cost computation |