CN109982087B - Image processing circuit and related image processing method - Google Patents

Image processing circuit and related image processing method Download PDF

Info

Publication number
CN109982087B
CN109982087B CN201711441096.5A CN201711441096A CN109982087B CN 109982087 B CN109982087 B CN 109982087B CN 201711441096 A CN201711441096 A CN 201711441096A CN 109982087 B CN109982087 B CN 109982087B
Authority
CN
China
Prior art keywords
color
image
specific
circuit
image processing
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.)
Active
Application number
CN201711441096.5A
Other languages
Chinese (zh)
Other versions
CN109982087A (en
Inventor
林晖智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MediaTek Inc
Original Assignee
MediaTek Inc
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 MediaTek Inc filed Critical MediaTek Inc
Priority to CN201711441096.5A priority Critical patent/CN109982087B/en
Publication of CN109982087A publication Critical patent/CN109982087A/en
Application granted granted Critical
Publication of CN109982087B publication Critical patent/CN109982087B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Abstract

An image processing circuit comprises a decision circuit, a conversion circuit and a color removal circuit, wherein the decision circuit is used for deciding a specific color which is different from all colors in a color code table; the conversion circuit is coupled to the decision circuit and is used for converting a first image with palette coding into a second image with a color space according to the color code table, wherein a pixel with a specific index value in the first image is converted into a pixel with the specific color; the color removing circuit is coupled to the converting circuit and is used for removing the specific color from the second image.

Description

Image processing circuit and related image processing method
Technical Field
The present invention relates to image processing, and more particularly, to an image processing circuit capable of processing color removal operations and a related image processing method.
Background
Palette-based coding (palette-based coding) is widely used in coding images, and its main concept is to use an index value to represent the color of each pixel, and when the display device is to display these images, it needs to use a color code table to convert these index values into image data encoded with another color space (e.g., red, green, and blue (RGB color space)) for display. Pictures encoded by conventional palette coding techniques support a color removal (key index) function, i.e., a user can remove the color of the picture corresponding to an index value by inputting the index value.
Fig. 1 is a diagram of an image processing circuit 100 according to the related art. As shown in fig. 1, the image processing circuit 100 includes a conversion circuit 110, a scaling circuit 120, and a color conversion circuit 130; in addition, the image processing circuit 100 is coupled to a memory 150, which stores a color code table. In operation of the image processing circuit 100, the conversion circuit 110 first receives a first image D1, wherein the color of each pixel in the first image D1 is represented by an index value, and the conversion circuit 110 is used to convert the first image D1 into a second image D2, and more specifically, the conversion circuit 110 converts the index value in the first image D1 into a color to generate a second image D2; then, the scaling circuit 120 is used for scaling the second image D2 to generate a scaled second image D2'; and the color removal circuit 130 is used for receiving a color removal command Iy, obtaining the color Cy indicated by the color removal command Iy from the memory 150 according to the color removal command Iy, and removing the color Cy from the scaled second image D2' to generate an output image D2 ".
For example, assuming that the color corresponding to the index value "10" is orange (e.g. the red component, the green component, and the blue component of the color space are (R1, G1, B1), if the user inputs the color removal command Iy to delete the color having the index value "10", the color removal circuit 130 searches the memory 150 for the color Cy corresponding to the index value "10" to directly replace the color of the pixel having the red component, the green component, and the blue component (R1, G1, B1) with black. However, when the image processing circuit 100 needs to enlarge the image, since the image enlargement operation involves the interpolation operation, it is likely that the new pixels generated by the interpolation will just have the colors of the red component, the green component, and the blue component (R1, G1, B1), respectively, and if the user just inputs a color removal command to delete the color with the index value "10", the pixels generated by the interpolation will be replaced by black at the same time, which will affect the display quality.
Disclosure of Invention
Therefore, one of the objectives of the present invention is to provide an image processing method, which can avoid the error caused by the color removal operation to maintain the display quality.
In one embodiment of the present invention, an image processing circuit is disclosed, which comprises a determining circuit, a converting circuit and a color removing circuit, wherein the determining circuit is used for determining a specific color different from all colors in a color code table; the conversion circuit is used for converting a first image with palette coding into a second image with a color space according to the color code table, wherein pixels with a specific index value in the first image are converted into pixels with the specific color; the color removal circuit removes the specific color from the second image.
In another embodiment of the present invention, an image processing method is disclosed, which includes: determining a specific color different from all colors in a color code table; converting a first image with palette coding into a second image with a color space according to the color code table, wherein pixels with a specific index value in the first image are converted into pixels with the specific color; and removing the specific color from the second image.
Drawings
Fig. 1 is a schematic diagram of an image processing circuit according to the related art.
FIG. 2 is a diagram of an image processing circuit according to an embodiment of the invention.
Fig. 3 is a flowchart of an image processing method according to an embodiment of the invention.
Fig. 4 is a schematic diagram of a red, green and blue color space.
FIG. 5 is a schematic diagram of a color space divided into a plurality of regions and colors recorded in a color code table.
Description of the symbols
100. 200 image processing circuit
110. 210 conversion circuit
120. 220 zooming circuit
130. 230 color removal circuit
240 decision circuit
150. 250 memory
D1 first image
D2 second image
D2' zoomed second image
D2' output image
Ix, Iy index value
Cx, Cy color
300 to 308 steps
Detailed Description
Please refer to fig. 2, which is a diagram illustrating an image processing circuit 200 according to an embodiment of the invention. As shown in fig. 2, the image processing circuit 200 includes a conversion circuit 210, a scaling circuit 220, a color conversion circuit 230, and a decision circuit 240; in addition, the image processing circuit 200 is coupled to a memory 250, which stores a color code table. In the present embodiment, the image processing circuit 200 is disposed in a television or a set-top box of a television, and is configured to receive the first image D1 encoded according to the color palette coding technique to generate the output image D2 ″ for a display panel to display or for a back-end circuit to perform further image processing.
In the image processing circuit 200, the conversion circuit 210 is used to convert the index value into a color. In detail, the converting circuit 210 first receives the first image D1, wherein the color of each pixel in the first image D1 is represented by an index value, and the color corresponding to each index value is recorded in the color code table stored in the memory 250; then, the converting circuit 210 reads the color code table from the memory 250, converts the index value of each pixel in the first image D1 into a corresponding color according to the color code table, and generates the second image D2 accordingly. For example, the color code table may record index values and corresponding colors, where the color refers to the composition of red, green, and blue components in a red-green-blue color space (RGB color space), and the red/green/blue components may be represented by one of values from 0 to 255, and the converting circuit 210 converts the index value corresponding to each pixel in the first image D1 into the corresponding color in the color code table according to the color code table.
The scaling circuit 220 is used for scaling the second image D2 to generate a scaled second image D2', wherein the scaling circuit 220 of the embodiment performs an enlarging operation on the second image D2, for example, enlarges the second image D2 with the original resolution of 1920 × 1080 to have the resolution of 3840 × 2160. It should be noted that, since the scaling circuit 220 generates a new pixel during the process of enlarging the second image D2, an interpolation operation is required to obtain the color of the new pixel, and the pixel value (i.e., color) generated by the interpolation may correspond to the color corresponding to one of the index values recorded in the color code table.
The color removal circuit 230 is used for removing a specific color from the scaled second image D2' according to a color removal command to generate an output image D2 "; if the color removal command is not received, the color removal circuit 230 does not need to process the scaled second image D2 ' (i.e., the scaled second image D2 ' can be directly used as the output image D2 '). Specifically, the color removal command is a specific index value Ix, and the color removal circuit 230 removes the color corresponding to the specific index value Ix in the scaled second image D2', i.e., adjusts the pixels with the color to black. For example, assuming that the user inputs a color removal command to remove the color corresponding to the index value "15", the color removal circuit 230 will adjust the pixels of the scaled second image D2' having the color corresponding to the index value "15" to black. However, as mentioned above, since the pixel value (i.e., color) generated by the interpolation during the process of the zooming operation of the second image D2 by the scaler 220 may correspond to the color corresponding to one of the index values recorded in the color code table, in case that the pixel value (i.e., color) generated by the interpolation is identical to the color corresponding to the index value "15", the color removal circuit 230 may erroneously adjust the pixel value generated by the interpolation to black, thereby causing defects in the display.
In order to solve the above problem, the image processing circuit 200 further includes a determining circuit 240 for determining a specific color Cx corresponding to the specific index value Ix, wherein the specific color Cx includes a specific red component, a specific green component, and a specific blue component (Rx, Gx, Bx). When the image processing circuit 200 receives a color removal command to remove a color with a specific index value Ix, the determining circuit 240 calculates a specific color Cx different from all colors in the color code table, then provides the specific index value Ix and the specific color Cx to the converting circuit 210, and provides the specific color Cx to the color removing circuit 230. At this time, the converting circuit 210 directly converts the pixels in the first image D1 having the specific index value Ix into the specific color Cx, i.e. for the specific index value, the converting circuit 210 does not determine the color corresponding to the specific index value according to the color code table; and the color removal circuit 230 adjusts the pixels in the scaled second image D2' having the specific color Cx to black without removing the color recorded in the color code table having the specific index value. For example, if the color removal command requires removal of the color (e.g., dark red) corresponding to the index value "15", the determining circuit 240 determines a specific color (e.g., amber) different from all the colors in the color code table, the converting circuit 210 converts all the pixels in the first image D1 having the index value "15" into the specific color (amber), and the color removing circuit 230 only removes amber from the scaled second image D2'. Therefore, the occurrence of the above-described event of erroneously removing the color of the pixel generated by the interpolation can be largely avoided.
In the embodiment shown in FIG. 2, the specific index Ix is transmitted to the conversion circuit 210 through the determination circuit 240, however, in another embodiment of the present invention, since the specific index Ix is not required for determining the specific color Cx, the specific index Ix can be directly input to the conversion circuit 210, and the determination circuit 240 only needs to transmit the specific color Cx to the conversion circuit 210.
Fig. 3 is a flowchart of an image processing method according to an embodiment of the invention. Referring to fig. 2 and the disclosure above, the process is as follows:
step 300: the process begins.
Step 302: when a color removal command is received, a specific color different from all colors in a color code table is determined, wherein the color removal command indicates that the color with a specific index value is to be removed.
Step 304: converting a first image with palette coding into a second image with a color space according to the color code table, wherein the pixels in the first image with the specific index value are directly converted into the specific color.
Step 306: and carrying out scaling operation on the second image to generate a scaled second image.
Step 308: and removing the specific color from the scaled second image according to the color removal instruction.
In the flowchart of the image processing method according to an embodiment of the invention shown in fig. 3, step 302 is to determine the specific color when a color removal command is received. However, in another embodiment, the determining circuit 240 may determine the specific color according to the content of the color code table in advance, without determining the specific color when the color removal instruction is received.
Although the specific color determined in the foregoing embodiment is different from all colors in the color code table, the specific color (yellowish) in the foregoing embodiment is still probably the same as the color of the pixel generated by interpolation, and therefore, in order to minimize the occurrence probability and consider the situation that interpolation usually occurs in a situation where neighboring colors are relatively close, another embodiment of the present invention provides a method for making the specific color determined by the determining circuit 240 have at least a certain step distance from the color recorded in the color code table.
Referring to fig. 4, a schematic diagram of a red, green, and blue color space is shown. In fig. 4, the red component (R), the green component (G) and the blue component (B) all have values between 0 and 255, i.e. 256 × 256 colors can be produced by different combinations of red/green/blue components. In the present embodiment, the determining circuit 240 divides the entire color space shown in fig. 4 into a plurality of regions, and in the present embodiment, the determining circuit 240 equally divides all of the red component (R), the green component (G), and the blue component (B) shown in fig. 3 into 8 segments, considering that the color code table has 256 index values/colors, that is, the entire color space is divided into 512 (8 × 8 — 512) cube regions, and each cube region contains 32 × 32 colors. For simplicity, only 8 regions are shown in FIG. 5 for further illustration.
The decision circuit 240 first sets a label for each cube region, and the label has a default value, such as a logic value "0". The determination circuit 240 then reads the color code table from the memory 250, and changes the label of the cubic area corresponding to the color recorded in the color code table to a logical value "1". For example, the black dots shown in fig. 5 represent the colors recorded in the shading code table, and the label of the cube region containing the black dots is set to a logic value "1", while the labels of the cube regions not containing the black dots (e.g., the two regions at the top left corner) maintain a default value "0".
Then, the determining circuit 240 may arbitrarily select a cubic area with a logical value of "0" of a label as a specific area, and select the specific color from the specific area to provide to the converting circuit 210 and the color removing circuit 230. In one embodiment, to ensure that the specific color and the color recorded by the color code table have a certain color level distance, the determining circuit 240 uses the color at the center point of the specific area as the specific color to ensure that the red component (R), the green component (G) and the blue component (B) of the specific color have at least a color level distance of "16" from the color recorded by the color code table. In addition, when the determination circuit 240 cannot find any cubic area with the logical value of "0" of the label, the color space needs to be divided into more cubic areas (e.g., 4096 (16 × 16 — 4096)) again, and the logical value of the label needs to be set again.
Since the color space is divided, rather than comparing each color to each other, the operation of the determining circuit 240 can quickly determine the specific color, and only requires few hardware/software resources. In addition, the specific color has at least a certain color level distance from the colors recorded in the color code table, so that the specific color is unlikely (with a low probability) to be the same as the color of any new pixel generated by the scaling circuit 220 during interpolation. In particular, the less regions divided in the entire color space, the less hardware/software resources are required, and the determined specific color must have a larger gradation distance from the colors recorded in the color code table.
Briefly summarized, in the image processing circuit and the related method, the determining circuit can determine a specific color having a certain color gradation distance with all colors in the color code table, and provide the specific color to the converting circuit and the color removing circuit for use in replacing the color originally required to be removed according to the color removing instruction inputted by the user. The invention can solve the problem of removing the color of the pixel generated by interpolation by mistake in the background art, and the related operation only needs few steps and hardware resources.
The above-mentioned embodiments are merely preferred embodiments of the present invention, and all equivalent changes and modifications made by the claims of the present invention should be covered by the scope of the present invention.

Claims (18)

1. An image processing circuit, comprising:
a decision circuit for deciding a specific color different from all colors in a color code table;
a conversion circuit for converting a first image with palette coding into a second image with a color space according to the color code table, wherein pixels with a specific index value in the first image are converted into pixels with the specific color; and
a color removal circuit for removing the specific color from the second image.
2. The image processing circuit of claim 1, further comprising:
a scaling circuit, coupled between the converting circuit and the color removing circuit, for scaling the second image to generate a scaled second image;
wherein the color removal circuit removes the specific color from the scaled second image.
3. The image processing circuit of claim 1 wherein the determining circuit divides the color space into a plurality of regions and selects a specific region from the plurality of regions, wherein the specific region does not include any color corresponding to the color code table, and the determining circuit further determines the specific color from the specific region.
4. The image processing circuit as claimed in claim 3, wherein the determining circuit determines the color corresponding to the center point of the specific region as the specific color.
5. The image processing circuit as claimed in claim 3, wherein the number of the plurality of regions is greater than the number of all index values in the color code table.
6. The image processing circuit of claim 3, wherein the determining circuit re-divides the color space into more regions when each of the plurality of regions includes at least one of the colors corresponding to the color code table.
7. The image processing circuit of claim 3 wherein the color space is a RGB color space and the determining circuit divides the color space into a plurality of cubic regions.
8. The image processing circuit as claimed in claim 3, wherein the plurality of regions respectively correspond to a label, the determining circuit sets labels of a portion of the plurality of regions including the corresponding color in the color code table, and the determining circuit selects a region from the plurality of regions whose label is not set as the specific region.
9. The image processing circuit of claim 1, disposed in a television or a television set-top box.
10. An image processing method, comprising:
determining a specific color different from all colors in a color code table;
converting a first image with palette coding into a second image with a color space according to the color code table, wherein pixels with a specific index value in the first image are converted into pixels with the specific color; and
removing the specific color from the second image.
11. The image processing method as claimed in claim 10, further comprising:
zooming the second image to generate a zoomed second image;
wherein the step of removing the specific color from the second image is removing the specific color from the scaled second image.
12. The method of claim 10, wherein the step of determining the specific color different from all colors in the color code table comprises:
dividing the color space into a plurality of regions;
selecting a specific region from the plurality of regions, wherein the specific region does not contain any corresponding color in the color code table; and
the specific color is determined from the specific area.
13. The image processing method as claimed in claim 12, wherein the step of determining the specific color from the specific region determines the color corresponding to the center point of the specific region as the specific color.
14. The image processing method as claimed in claim 12, wherein the number of the plurality of regions is greater than the number of all index values in the color code table.
15. The image processing method of claim 12, wherein when each of the plurality of regions includes at least one of the colors corresponding to the color code table, the color space is re-divided into more regions.
16. The image processing method of claim 12, wherein the color space is a red, green and blue color space, and the step of dividing the color space into the plurality of regions is dividing the color space into a plurality of cubic regions.
17. The image processing method of claim 12, wherein the plurality of regions respectively correspond to a tag, and the step of selecting the specific region from the plurality of regions comprises:
setting labels of a part of areas containing the corresponding colors in the color code table in the plurality of areas; and
selecting an area with an unset label from the plurality of areas as the specific area.
18. The image processing method of claim 10, applied to a television or a set-top box of a television.
CN201711441096.5A 2017-12-27 2017-12-27 Image processing circuit and related image processing method Active CN109982087B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711441096.5A CN109982087B (en) 2017-12-27 2017-12-27 Image processing circuit and related image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711441096.5A CN109982087B (en) 2017-12-27 2017-12-27 Image processing circuit and related image processing method

Publications (2)

Publication Number Publication Date
CN109982087A CN109982087A (en) 2019-07-05
CN109982087B true CN109982087B (en) 2021-07-02

Family

ID=67072275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711441096.5A Active CN109982087B (en) 2017-12-27 2017-12-27 Image processing circuit and related image processing method

Country Status (1)

Country Link
CN (1) CN109982087B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9311889B1 (en) * 2014-06-26 2016-04-12 Amazon Technologies, Inc. Image-based color palette generation
CN105981388A (en) * 2013-12-27 2016-09-28 寰发股份有限公司 Method and apparatus for syntax redundancy removal in palette coding
CN106464888A (en) * 2014-03-17 2017-02-22 诺基亚技术有限公司 Method and technical equipment for video encoding and decoding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105981388A (en) * 2013-12-27 2016-09-28 寰发股份有限公司 Method and apparatus for syntax redundancy removal in palette coding
CN106464888A (en) * 2014-03-17 2017-02-22 诺基亚技术有限公司 Method and technical equipment for video encoding and decoding
US9311889B1 (en) * 2014-06-26 2016-04-12 Amazon Technologies, Inc. Image-based color palette generation

Also Published As

Publication number Publication date
CN109982087A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN112492307B (en) Method, apparatus and computer readable storage medium for pixel pre-processing and encoding
CN107210026B (en) Pixel pre-processing and encoding
JP6649750B2 (en) Image processing apparatus and image processing method
JP4568460B2 (en) Image processing apparatus and recording medium
US8830533B2 (en) System and method for creating machine-readable codes in combination with other images such as logos
JP2000196907A (en) Method for selecting color to be assigned to pixel and method for encoding and storing picture
US9137418B2 (en) Image processing device and computer-readable storage medium storing computer-readable instructions
US9300840B2 (en) Image processing device and computer-readable storage medium storing computer-readable instructions
JP4156631B2 (en) Image processing method and image processing apparatus
US20070091184A1 (en) Method and apparatus for maintaining consistent white balance in successive digital images
KR20190073516A (en) Image processing apparatus, digital camera, image processing program, and recording medium
US7339703B2 (en) Image processing apparatus and method thereof
JP2006270325A (en) Image compression apparatus, image decompression apparatus, image data, image processing method and program
CN111835931B (en) Image processing apparatus, image forming apparatus, image reading apparatus, and control method
CN109982087B (en) Image processing circuit and related image processing method
US7885488B2 (en) Image processing apparatus, method and medium
JP4438834B2 (en) Image color determination apparatus, image color determination method, and program
US10397587B2 (en) Image processing apparatus and control method thereof
US20190188518A1 (en) Image processing circuit and associated image processing method
JP2007087218A (en) Image processor
US8170344B2 (en) Image storage device, image storage system, method of storing image data, and computer program product for image data storing
JP5206468B2 (en) Image processing apparatus and image processing program
CN110942420A (en) Method and device for eliminating image captions
US11501416B2 (en) Image processing method and image processing circuit capable of smoothing false contouring without using low-pass filtering
JP2000227848A (en) Image processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20191220

Address after: No.1, Duhang 1st Road, Hsinchu City, Hsinchu Science Park, Taiwan, China

Applicant after: MediaTek.Inc

Address before: 1/2, 4th floor, 26 Taiyuan Street, Zhubei City, Hsinchu County, Taiwan, China

Applicant before: MStar Semiconductor Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant