TWI657690B - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- TWI657690B TWI657690B TW107107743A TW107107743A TWI657690B TW I657690 B TWI657690 B TW I657690B TW 107107743 A TW107107743 A TW 107107743A TW 107107743 A TW107107743 A TW 107107743A TW I657690 B TWI657690 B TW I657690B
- Authority
- TW
- Taiwan
- Prior art keywords
- pixel
- value
- adjacent
- error
- correction value
- Prior art date
Links
Landscapes
- Image Processing (AREA)
Abstract
影像處理裝置包含:輸入值接收單元、校正值計算單元、輸出值計算單元與輸出值指定單元。接收單元分別接收第一像素與相鄰於第一像素之第二像素之輸入值。校正值計算單元根據相鄰於第一像素之多個第一相鄰像素之多個分量誤差值與第一像素之輸入數來計算第一像素之校正值,且根據相鄰於第二像素之多個第二相鄰像素之多個分量誤差值與第二像素之輸入值來計算第二像素之校正值。輸出值計算單元根據第一像素與第二像素之校正值來分別計算第一像素與第二像素之輸出值。輸出值指定單元分別指定第一像素與第二像素之輸出值予第一像素與第二像素。 The image processing device includes an input value receiving unit, a correction value calculating unit, an output value calculating unit, and an output value specifying unit. The receiving unit receives the input values of the first pixel and the second pixel adjacent to the first pixel, respectively. The correction value calculation unit calculates a correction value of the first pixel according to the plurality of component error values of the plurality of first adjacent pixels adjacent to the first pixel and the input number of the first pixel, and according to the adjacent second pixel A plurality of component error values of the plurality of second adjacent pixels and an input value of the second pixel are used to calculate a correction value of the second pixel. The output value calculation unit calculates the output values of the first pixel and the second pixel, respectively, based on the correction values of the first pixel and the second pixel. The output value specifying unit specifies the output values of the first pixel and the second pixel to the first pixel and the second pixel, respectively.
Description
本揭露實施例是有關於一種影像處理裝置,且特別是有關於一種以誤差擴散(error diffusion)為基礎並加以改良之影像處理裝置。 The present disclosure relates to an image processing apparatus, and more particularly to an image processing apparatus based on error diffusion.
影像的像素值之量化(quantization)處理是影像處理中常見的技術,然而量化處理通常會造成影像之像素值之量化誤差。為了讓影像不會因為這些量化誤差而讓人眼感受到明顯的差異,誤差擴散(error diffusion)處理技術為一種常見的半色調(halftone)影像處理技術,誤差擴散處理技術乃是將影像中之像素的量化誤差分配到鄰近像素,從而分散量化誤差。相較於其他的半色調影像處理技術,誤差擴散處理技術在調和半色調影像品質與影像處理效率方面具有相當的優勢。 The quantization of pixel values of images is a common technique in image processing. However, quantization processing usually causes quantization errors of pixel values of images. In order to make the image not noticeable difference due to these quantization errors, error diffusion processing technology is a common halftone image processing technology, and error diffusion processing technology is used in the image. The quantization error of the pixel is distributed to adjacent pixels, thereby dispersing the quantization error. Compared with other halftone image processing technologies, error diffusion processing technology has considerable advantages in harmonizing halftone image quality and image processing efficiency.
舉例而言,其中一種習知的誤差擴散處理方式是將誤差擴散至右側像素(水平方向擴散)及下方像素(垂直方向擴散)。然而,水平方向擴散的作法對於硬體是不利的,例如硬體設計成本高、輸出的資訊處理量受限、傳遞時序不夠快等,因此習知的誤差擴散處理方式仍有改善之空間。 For example, one of the conventional methods of error diffusion processing is to spread the error to the right pixel (horizontal direction diffusion) and the lower pixel (vertical direction diffusion). However, the horizontal diffusion method is disadvantageous for the hardware, such as high hardware design cost, limited output processing capacity, and fast transfer timing. Therefore, there is still room for improvement in the conventional error diffusion processing method.
本揭露之目的在於提出一種影像處理裝置,以誤差擴散(error diffusion)為基礎並加以改良,從而改善習知的誤差擴散處理方式的缺陷。 The purpose of the present disclosure is to provide an image processing apparatus based on error diffusion and improved to improve the drawbacks 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 object of the present disclosure, an image processing apparatus 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 the first pixel of the image and an input value of the second pixel, wherein the first pixel is adjacent to the second pixel, wherein the first pixel and the second pixel system 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 a correction value of the first pixel according to the plurality of component error values of the plurality of first adjacent pixels adjacent to the first pixel and the input value of the first pixel, and according to the second adjacent Calculating a correction value of the second pixel by using a plurality of component error values of the plurality of second adjacent pixels of the pixel and an input value of the second pixel, wherein the plurality of first adjacent pixel systems are respectively located at the third position (x-1, y), fourth position (x-1, y-1), fifth position (x, y-1) and sixth position (x+1, y-1), wherein the plurality of second adjacent pixel systems 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 an output value of the first pixel according to the correction value of the first pixel, and calculate an output value of the second pixel according to the correction value of the second pixel. The output value specifying unit is configured 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 plurality of component error values of the plurality of first adjacent pixels and an input value of the first pixel. And a correction value of the second pixel is a sum of a plurality of component error values of the plurality of second adjacent pixels and an 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 correction value of the second pixel. Valid bit value.
在一些實施例中,上述影像處理裝置更包含誤差值計算單元,用以根據第一像素之校正值來計算第一像素之誤差值,且根據第二像素之校正值來計算第二像素之誤差值。 In some embodiments, the image processing apparatus further includes an error value calculation unit configured to calculate an error value of the first pixel according to the correction value of the first pixel, and calculate an error 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 a least significant bit (LSB) value of the correction value of the first pixel, and the error value of the second pixel is the lowest correction value of the second pixel. Valid 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 adjacent pixel located at the fourth position (x-1, y-1) is the error value of the first adjacent pixel located at the fourth position (x-1, y-1) B/Z; the component error value of the first adjacent pixel located at the fifth position (x, y-1) is C/Z of the error value of the first adjacent pixel located at the fifth position (x, y-1) The component error value of the first adjacent pixel located at the sixth position (x+1, y-1) is D/ of the error value of the first adjacent pixel located at the sixth position (x+1, y-1) Z; a component error value of the second adjacent pixel located at the fifth position (x, y-1) is an error value of the second adjacent pixel located at the fifth position (x, y-1) E/Z; the component error value of the second adjacent pixel located at the sixth position (x+1, y-1) is the error value of the second adjacent pixel located at the sixth position (x+1, y-1) F/Z; the component error value of the second adjacent pixel located at the seventh position (x+2, y-1) is the error of the second adjacent pixel located at the seventh position (x+2, y-1) The value of 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 a least significant bit (LSB) value of a correction value of the first adjacent pixel, and the error value of the second adjacent pixel is a second value. The least significant bit value of the correction value of the adjacent pixel.
在一些實施例中,位於第五位置(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) is the same pixel as the second adjacent pixel located at the fifth position (x, y-1), and is located at the sixth position ( The first adjacent pixel of x+1, y-1) is the same pixel as the second adjacent pixel located at the sixth position (x+1, y-1).
為讓本揭露的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the present invention will be more apparent from the following description.
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 designation unit
150‧‧‧誤差值計算單元 150‧‧‧Error value calculation unit
E3、E4、E5、E6、E7‧‧‧誤差值 E 3 , E 4 , E 5 , E 6 , E 7 ‧ ‧ error values
I1、I2‧‧‧輸入值 I 1 , I 2 ‧‧‧ input values
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 pixels
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 adjacent pixel/second adjacent pixel
從以下結合所附圖式所做的詳細描述,可對本揭露之態樣有更佳的了解。需注意的是,根據業界的標準實務,各特徵並未依比例繪示。事實上,為了使討論更為清楚,各特徵的尺寸都可任意地增加或減少。 A better understanding of the aspects of the present disclosure can be obtained from the following detailed description taken in conjunction with the drawings. It should be noted that, according to industry standard practices, the features are not drawn to scale. In fact, in order to make the discussion clearer, the dimensions of each feature can be arbitrarily increased or decreased.
[圖1]係根據本揭露的實施例之影像處理裝置的系統方塊圖。 1 is a system block diagram of an image processing apparatus 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 present disclosure.
[圖3]係根據本揭露的一實施例之第一相鄰像素之分量誤差值的擴散示意圖。 FIG. 3 is a schematic diagram of diffusion of component error values of first adjacent pixels according to an embodiment of the present disclosure.
[圖4]係根據本揭露的一實施例之第二相鄰像素之分量誤差值的擴散示意圖。 FIG. 4 is a schematic diagram of diffusion of component error values of second adjacent pixels according to an embodiment of the present disclosure.
以下仔細討論本發明的實施例。然而,可以理解的是,實施例提供許多可應用的概念,其可實施於各式各樣的特定內容中。所討論、揭示之實施例僅供說明,並非用以限定本發明之範圍。 Embodiments of the invention are discussed in detail below. However, it will be appreciated that the embodiments provide many applicable concepts that can be implemented in a wide variety of specific content. The examples discussed and disclosed are illustrative 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)於所接收之 影像中的像素資料。 1 is a system block diagram of an image processing apparatus 100 in accordance with an embodiment of the present disclosure. 2 is a schematic diagram of a pixel configuration in accordance with an embodiment of the present disclosure. Here, the meaning represented by the symbol in FIG. 2 is first defined, for example, the pixel at the position (x, y) is represented by P(x, y), and so on. Referring to FIG. 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) 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。 Correction value calculation unit 120 according to a first adjacent pixel adjacent to the first pixel P P (x, y) of (x-1, y) component of the error value of EC 11, adjacent the first pixel P (x , y) a component error value EC 12 of the first adjacent pixel P(x-1, y-1), and a first adjacent pixel P (x, y- adjacent to the first 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 The input value I 1 of y) is used to calculate the correction value D 1 of the first pixel P(x, y).
在本揭露的實施例中,第一像素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 adjacent pixel P(x-1, y), P(x-1, y-1), P ( I, y-1), P(x+1, y-1), multiple 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 configured to be adjacent to the second pixel according to the component error value EC 21 of the second adjacent pixel P(x, y-1) adjacent to the second pixel P(x+1, y). a component error value EC 22 of the second adjacent pixel P(x+1, y-1) of P(x+1, y), and a second adjacent neighboring second pixel P(x+1, y) Calculating the correction value of the second pixel P(x+1, y) by 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) 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 adjacent pixel P(x, y-1), P(x+1, y-1), The sum of the I 2 of the input values of the multiple component error values EC 21 , EC 22 , EC 23 and the second pixel P(x+1, y) of P(x+2, y-1), ie 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 adjacent pixel P(x-1, y) is the A/Z of the error value E 3 of the first adjacent pixel P(x-1, y). , which is The component error value EC 12 of the first adjacent pixel P(x-1, y-1) is B/Z of the error value E 4 of the first adjacent pixel P(x-1, y-1), that is, The component error value EC 13 of the first adjacent pixel P(x, y-1) is C/Z of the error value E 5 of the first adjacent pixel P(x, y-1), that is, The component error value EC 14 of the first adjacent pixel P(x+1, y-1) is the D/Z of the error value E 6 of the first adjacent pixel P(x+1, y-1), that is, The component error value EC 21 of the second adjacent pixel P(x, y-1) is the E/Z of the error value E 5 of the second adjacent pixel P(x, y-1), that is, The component error value EC 22 of the second adjacent pixel P(x+1, y-1) is the F/Z of the error value E 6 of the second adjacent pixel P(x+1, y-1), that is, The component error value EC 23 of the second adjacent pixel P(x+2, y-1) is the G/Z of the error value E 7 of the second adjacent pixel P(x+2, y-1), that is, . Wherein A, B, C, D, E, F, G, and 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 first adjacent pixels of a first pixel P(x, y) according to an embodiment of the present disclosure. In an embodiment of the present disclosure, A=7, B=3, C=6, D=1, and Z=16. in particular, ; ; ; . However, the disclosure is not limited thereto.
圖4係根據本揭露的一實施例之第二像素P(x+1,y)之第二相鄰像素之分量誤差值的擴散示意圖。在本揭露的一實施例中,E=F=G=5,Z=16。具體而言, ;;。然而,本揭露不受限於此。 4 is a schematic diagram of diffusion of component error values of second adjacent pixels of a second pixel P(x+1, y) according to an embodiment of the present disclosure. In an embodiment of the present disclosure, E = F = G = 5, Z = 16. in particular, ; ; . However, the disclosure is not limited thereto.
輸出值計算單元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 an 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). , ie, 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 an 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 The way to spread 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 adjacent pixel P(x-1, y) is the least significant bit of the correction value D 3 of the first adjacent pixel P(x-1, y). The value, that is, E 3 =LSB(D 3 ); the error value E 4 of the first adjacent pixel P(x-1, y-1) is the correction of the first adjacent pixel P(x-1, y-1) The least significant bit value of the value D 4 , that 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 adjacent pixel P(x, y-1), that is, E 5 = LSB (D 5 ); the first adjacent pixel (or the second adjacent pixel) P (x+1) The error value E 6 of y-1) is the least significant bit value of the correction value D 6 of the first adjacent pixel P(x+1, y-1), that is, E 6 =LSB(D 6 ); 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, since the correction value calculation unit 120 calculates the correction value of the first pixel according to the plurality of component error values of the plurality of first adjacent pixels and the input value of the first pixel, for example, FIG. 1 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 configured to specify the output value O 1 of the first pixel P(x, y) to the first pixel P(x, y), and specify the output value of the second pixel P(x+1, y). 2 to 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 second pixel P(x+1, y) 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 at the edge of the image, a In a case where at least one of the adjacent pixels and the second adjacent pixels are substantially absent, if in this case, the original pixel data of the most adjacent and substantially existing pixels is designated as the first phase that does not exist. Neighbor The original pixel data of the prime or second adjacent pixel. For example, when the first pixel P (x, y) is at the leftmost side of the image, the first adjacent pixel P(x-1, y) does not substantially exist, so the first adjacent pixel will be closest to P(x-1, y) and the original pixel data of the substantially existing pixel (ie, the first pixel P(x, y)) is designated as the original pixel data of the first adjacent pixel P(x-1, y), In this case, the rest of the situation (for example, the leftmost pixel of the second pixel P (x+1, y) position) is the same, and will not be described here.
應注意的是,對本揭露的實施例之第一相鄰像素而言,包含水平方向擴散與垂直方向擴散,對本揭露的實施例之第二相鄰像素而言,僅有垂直方向擴散。具體而言,對於本揭露的實施例之影像處理裝置100而言,僅有一半的像素會將其分量誤差值進行水平方向擴散與垂直方向擴散,其他另一半的像素則僅會將其分量誤差值進行垂直方向擴散。因此,相較於習知的誤差擴散處理方式,本揭露的實施例之影像處理裝置100具有以下效益:可降低硬體設計成本、提高輸出的資訊處理量、加快傳遞時序等。 It should be noted that for the first adjacent pixel of the embodiment of the present disclosure, horizontal diffusion and vertical diffusion are included, and for the second adjacent pixel of the disclosed embodiment, only the vertical direction is diffused. Specifically, for the image processing apparatus 100 of the embodiment of the present 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 component errors. The value is diffused vertically. Therefore, compared with the conventional error diffusion processing method, the image processing apparatus 100 of the embodiment of the present disclosure has the following advantages: the hardware design cost can be reduced, the information processing amount of the output can be increased, the transmission timing can be accelerated, and the like.
綜合上述,本揭露提出一種影像處理裝置,以誤差擴散(error diffusion)為基礎並加以改良,從而改善習知的誤差擴散處理方式的缺陷。 In summary, the present disclosure proposes an image processing apparatus based on error diffusion and improved to improve the drawbacks of the conventional error diffusion processing method.
以上概述了數個實施例的特徵,因此熟習此技藝者可以更了解本揭露的態樣。熟習此技藝者應了解到,其可輕易地把本揭露當作基礎來設計或修改其他的製程與結構,藉此實現和在此所介紹的這些實施例相同的目標及/或達到相同的優點。熟習此技藝者也應可明白,這些等效的建 構並未脫離本揭露的精神與範圍,並且他們可以在不脫離本揭露精神與範圍的前提下做各種的改變、替換與變動。 The features of several embodiments are summarized above, and those skilled in the art will be able to understand the aspects of the disclosure. Those skilled in the art will appreciate that the present disclosure can be readily utilized as a basis for designing or modifying other processes and structures, thereby achieving the same objectives and/or achieving the same advantages as the embodiments described herein. . Those skilled in the art should also understand that these equivalents are built. The spirit and scope of the present disclosure are not to be construed as being limited, and various changes, substitutions and changes can be made without departing from the spirit and scope of the 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 true TWI657690B (en) | 2019-04-21 |
TW201939936A 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) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201211978A (en) * | 2010-05-21 | 2012-03-16 | Seiko Epson Corp | Processing color sub-pixels |
TWI395484B (en) * | 2008-09-15 | 2013-05-01 | Univ Nat Taiwan Science Tech | Method of halftone watermarking for hiding multi-tone watermark or two-tone watermark |
US20170217158A1 (en) * | 2016-02-02 | 2017-08-03 | Yoshitomo KOBAYASHI | Image processing method, image processing apparatus, and non-transitory computer-readable medium |
-
2018
- 2018-03-07 TW TW107107743A patent/TWI657690B/en active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI395484B (en) * | 2008-09-15 | 2013-05-01 | Univ Nat Taiwan Science Tech | Method of halftone watermarking for hiding multi-tone watermark or two-tone watermark |
TW201211978A (en) * | 2010-05-21 | 2012-03-16 | Seiko Epson Corp | Processing color sub-pixels |
US20170217158A1 (en) * | 2016-02-02 | 2017-08-03 | Yoshitomo KOBAYASHI | Image processing method, image processing apparatus, and non-transitory computer-readable medium |
Also Published As
Publication number | Publication date |
---|---|
TW201939936A (en) | 2019-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8023758B2 (en) | Surface mesh matching for lens roll-off correction | |
US6813391B1 (en) | System and method for exposure compensation | |
US8411962B1 (en) | Robust image alignment using block sums | |
KR100366935B1 (en) | Image interpolation device | |
EP3584760A1 (en) | Image processing method and apparatus | |
WO2019041842A1 (en) | Image processing method and device, storage medium and computer device | |
WO2015032185A1 (en) | Image super-resolution reconfiguration system and method | |
CN107977989B (en) | Method and equipment for determining image offset | |
CN109194878B (en) | Video image anti-shake method, device, equipment and storage medium | |
US20100245664A1 (en) | Device and method for adaptive blending motion compensation interpolation in frame rate up-conversion | |
TWI657690B (en) | Image processing device | |
US8059920B2 (en) | Method and apparatus for pixel interpolation | |
US6876778B2 (en) | Edge enhancement method and apparatus in digital image scalar-up circuit | |
JP2017174311A (en) | Edge detection device and edge detection method | |
US7298926B2 (en) | Image size reduction method and system | |
CN113436285A (en) | Color space conversion method and device, electronic equipment and readable storage medium | |
JP4868249B2 (en) | Video signal processing device | |
US9530223B2 (en) | Image correction method and image correction device | |
KR101279576B1 (en) | Method for generating panorama image within digital image processing apparatus | |
CN110365865B (en) | Image processing device | |
US9905195B2 (en) | Image processing method | |
US20070248287A1 (en) | Pattern detecting method and related image processing apparatus | |
KR20100044977A (en) | Method for video interpolation and computer recordable medium storing the method | |
US10803567B2 (en) | Image processing method and image processing device | |
JP2851724B2 (en) | Image processing device |