Image processing circuit, circuit device, and electronic device

The integration of histogram comparison and CRC error detection in gamma correction circuits ensures accurate and reliable image processing by detecting errors in gamma correction and lookup table integrity, preventing abnormal displays.

CN115131255BActive Publication Date: 2025-07-15SEIKO EPSON CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210293165.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-03-26
Filing Date
2022-03-24
Publication Date
2025-07-15
Estimated Expiration
2042-03-24

AI Technical Summary

Technical Problem

In the prior art, the image signal processing device cannot effectively determine whether the gamma correction is normal, resulting in an abnormal display that may occur without being discovered in time.

Method used

The image processing circuit is adopted, including a gamma correction circuit, an output image histogram calculation circuit, an input image histogram calculation circuit, a reference histogram calculation circuit and a histogram comparison circuit. By calculating and comparing the output image histogram and a reference histogram, the normality of gamma correction is determined, and the error in the lookup table is detected in combination with the CRC error detection circuit.

Benefits of technology

Dynamic detection of the gamma correction process is realized, transient and permanent errors can be discovered in a timely manner, ensuring the normal processing of the displayed image, and improving the reliability and security of image display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131255B_ABST
    Figure CN115131255B_ABST
Patent Text Reader

Abstract

An image processing circuit, a circuit device, and an electronic device are provided. The image processing circuit includes: a gamma correction circuit that performs gamma correction on input image data using a lookup table and outputs output image data; an output image histogram calculation circuit that calculates an output image histogram; an input image histogram calculation circuit that calculates an input image histogram; a reference histogram calculation circuit that calculates a reference histogram based on the input image histogram according to the lookup table; and a histogram comparison circuit that compares the output image histogram with the reference histogram.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing circuit, a circuit device, and an electronic device. Background Art

[0002] In Patent Document 1, the following image signal processing device, display device, and image signal processing method are disclosed: In order to perform gamma correction that improves visual recognition and contrast perception on an image signal having a histogram with pixel counts biased toward the white side and the black side, a gamma correction amount is calculated based on an average luminance value obtained from the histogram.

[0003] Patent Document 1: Japanese Patent Application Laid-Open No. 2009-225349

[0004] In the technology of Patent Document 1 described above, the image signal processing device cannot determine whether the gamma correction itself is performed normally. Therefore, even if abnormal display occurs due to incorrect gamma correction, it is possible to leave the abnormal display until a person observes the image and recognizes the abnormality. Summary of the Invention

[0005] One aspect of the present disclosure relates to an image processing circuit including: a gamma correction circuit that performs gamma correction on input image data using a lookup table and outputs output image data; an output image histogram calculation circuit that calculates a histogram of the output image data, i.e., an output image histogram; an input image histogram calculation circuit that calculates a histogram of the input image data, i.e., an input image histogram; a reference histogram calculation circuit that calculates a reference histogram, which is an expected value of the output image histogram, based on the input image histogram according to the lookup table; and a histogram comparison circuit that determines whether the gamma correction of the gamma correction circuit is normal by comparing the output image histogram with the reference histogram.

[0006] In addition, other aspects of the present disclosure relate to a circuit device including the image processing circuit described above.

[0007] In addition, another other aspect of the present disclosure relates to an electronic device including the image processing circuit described above. Brief Description of the Drawings

[0008] Figure 1 is a structural example of the image processing circuit.

[0009] Figure 2 is a flowchart of the processing performed by the image processing circuit.

[0010] Figure 3 is a first detailed structural example of the image processing circuit.

[0011] Figure 4This is an operation explanatory diagram of an image processing circuit.

[0012] Figure 5 This is a second detailed structural example of an image processing circuit.

[0013] Figure 6 This is a specific example of gamma correction error detection.

[0014] Figure 7 This is a specific example of gamma correction error detection.

[0015] Figure 8 This is a structural example of a circuit device.

[0016] Figure 9 This is a first structural example of an electronic device.

[0017] Figure 10 This is a second structural example of an electronic device.

[0018] Reference Numeral Explanation

[0019] 100: Image processing circuit; 110: Gamma correction circuit; 120: Output image histogram calculation circuit; 130: Input image histogram calculation circuit; 140: Reference histogram calculation circuit; 150: Histogram comparison circuit; 160: Register circuit; 162: Lookup table; 164: CRC expected value; 180: CRC error detection circuit; 190: Selector; 200: Circuit device; 210: Interface circuit; 220: Interface circuit; 500: Electronic device; 510: Processing device; 520: Electro-optical device; 521: Display controller; 522: Driver; 523: Electro-optical panel; 530: HUD; 531: HUD controller; 532: Projection device; GMERR: Gamma correction error signal; HBLANK: Horizontal blanking signal; HISIN: Input image histogram; HISOUT: Output image histogram; HISREF: Reference histogram; PXIN: Input image data; PXOUT: Output image data; RGERR: CRC error signal; VBLANK: Vertical blanking signal. Detailed Implementation Manner

[0020] Hereinafter, preferred embodiments of the present disclosure will be described in detail. In addition, the embodiments described below are not ways of unduly limiting the content recited in the claims, and not all of the structures described in the embodiments are necessarily essential structural elements.

[0021] 1. Image Processing Circuit

[0022] Figure 1This is a structural example of the image processing circuit 100 in the present embodiment. The image processing circuit 100 includes a gamma correction circuit 110, an output image histogram calculation circuit 120, an input image histogram calculation circuit 130, a reference histogram calculation circuit 140, a histogram comparison circuit 150, a register circuit 160, and a CRC error detection circuit 180. CRC is an abbreviation for cyclic redundancy check.

[0023] The image processing circuit 100 is composed of a logic circuit. For example, each circuit included in the image processing circuit 100 may also be composed of a separate logic circuit. Alternatively, the image processing circuit 100 may be a processor such as a DSP, and a program and an instruction set describing the functions of each circuit are stored in a memory (not shown), and the processor executes the program and the instruction set to implement the functions of each circuit. DSP is an abbreviation for digital signal processor.

[0024] Figure 2 This is a flowchart of the processing performed by the image processing circuit 100. As shown in S1, the input image data PXIN before gamma correction is input to the gamma correction circuit 110 and the input image histogram calculation circuit 130. The image processing circuit 100 performs the following processing of S2 to S9 for each input image data PXIN of one frame or for each input image data PXIN of one horizontal scan line. However, the image processing circuit 100 may also be configured to perform the following processing of S2 to S9 for each input image data PXIN of multiple frames or for each input image data PXIN of multiple horizontal scan lines.

[0025] As shown in S2, the gamma correction circuit 110 loads the look-up table 162 stored in the register circuit 160 into a memory or a register in the gamma correction circuit 110. The gamma correction circuit 110 performs gamma correction on the input image data PXIN using the loaded look-up table 162 and outputs the output image data PXOUT after gamma correction. The look-up table 162 is a table describing the transformation of the gray values in gamma correction, and is a table that correlates the gray values before correction with the gray values after correction. The gamma correction circuit 110 transforms the gray values of each pixel of the input image data PXIN through the look-up table 162 to obtain the gray values of each pixel of the output image data PXOUT.

[0026] As shown in S3, the output image histogram calculation circuit 120 calculates an output image histogram HISOUT that is a histogram of the output image data PXOUT. The histogram represents the distribution of gray values in the image. That is, the histogram represents the number of pixels having the color and the gray value for each gray value of each color. The number of pixels corresponding to one color and one gray value is one histogram data, and this one histogram data is also referred to as a bin.

[0027] As shown in S4, the input image histogram calculation circuit 130 calculates an input image histogram HISIN that is a histogram of the input image data PXIN.

[0028] As shown in S5, the reference histogram calculation circuit 140 initializes the reference histogram HISREF calculated in S6. Specifically, the number of pixels corresponding to each gray value in the reference histogram HISREF is initialized to zero.

[0029] As shown in S6, the reference histogram calculation circuit 140 calculates a reference histogram HISREF that is an expected value of the output image histogram HISOUT based on the input image histogram HISIN. The reference histogram HISREF is a histogram theoretically obtained as the expected value of the output image histogram HISOUT, and is a histogram that coincides with the output image histogram HISOUT if there is no abnormality in the processing of the image processing circuit 100. The reference histogram HISREF has the same size as the output image histogram HISOUT. For example, when the pixel data of each of RGB is 8 bits, each of the reference histogram HISREF and the output image histogram HISOUT has 3×256 bins. The reference histogram calculation circuit 140 transforms the input image histogram HISIN based on the look-up table 162, and thereby calculates the reference histogram HISREF. More specifically, the reference histogram calculation circuit 140 transforms each gray value through the look-up table 162, and accumulates the number of pixels corresponding to the gray value before transformation in the input image histogram HISIN as the number of pixels corresponding to the gray value after transformation in the reference histogram HISREF.

[0030] As shown in S7, the histogram comparison circuit 150 determines whether the output image histogram HISOUT coincides with the reference histogram HISREF by comparing the output image histogram HISOUT with the reference histogram HISREF, and outputs the determination result as a gamma correction error signal GMERR.

[0031] As shown in S8, when the output image histogram HISOUT coincides with the reference histogram HISREF, the histogram comparison circuit 150 determines that the gamma correction has been performed normally.

[0032] As shown in S9, when the output image histogram HISOUT does not coincide with the reference histogram HISREF, the histogram comparison circuit 150 determines that an error has occurred in the gamma correction. The non-coincidence of the output image histogram HISOUT and the reference histogram HISREF implies that a temporary error has occurred in any one of the logic related to the gamma correction, the logic related to the calculation of the reference histogram, or the look-up table 162 stored in the register circuit 160.

[0033] As shown in S21, the CRC error detection circuit 180 calculates a CRC value based on the data stored in the register circuit 160. The data stored in the register circuit 160 includes a lookup table 162. The CRC value obtained in S21 is referred to as the calculated CRC value.

[0034] As shown in S22, the CRC error detection circuit 180 determines whether the calculated CRC value matches the CRC expected value 164 stored in the register circuit 160, and outputs the determination result as a CRC error signal RGERR.

[0035] As shown in S23, when the calculated CRC value matches the CRC expected value 164, the CRC error detection circuit 180 determines that the data stored in the register circuit 160 is normal.

[0036] As shown in S24, when the calculated CRC value does not match the CRC expected value 164, the CRC error detection circuit 180 determines that an error has occurred in the data stored in the register circuit 160. The mismatch between the calculated CRC value and the CRC expected value 164 implies a permanent error in the data stored in the register circuit 160.

[0037] As described above, gamma correction error detection using the histogram shown in S1 to S9 and CRC-based register error detection shown in S21 to S24 are performed in parallel. However, the gamma correction error detection and the register error detection do not need to be performed at the same timing, and can also be performed at their respective independent timings. As described later, the gamma correction error detection is performed during the blanking period. The register error detection can be performed, for example, periodically, or can also be performed at the startup of the image processing circuit 100 or the like.

[0038] When an abnormality occurs in the lookup table 162, gamma correction cannot be performed normally. However, if the abnormality of the lookup table 162 can be detected by CRC, the abnormality of gamma correction can be detected. However, when a transient abnormality occurs in the lookup table 162 during the interval of the periodically performed CRC, the CRC cannot detect this abnormality. In addition, since CRC checks the register data, dynamic verification during image processing execution cannot be performed. That is, CRC cannot detect a logical error that occurs in the gamma correction process itself. It should be noted that a transient abnormality refers to an abnormality that occurs temporarily due to noise, electromagnetic waves, radiation, etc. and then returns to normal.

[0039] In the present embodiment, the image processing circuit 100 includes a gamma correction circuit 110, an output image histogram calculation circuit 120, an input image histogram calculation circuit 130, a reference histogram calculation circuit 140, and a histogram comparison circuit 150. The gamma correction circuit 110 performs gamma correction on the input image data PXIN through a look-up table 162 and outputs the output image data PXOUT. The output image histogram calculation circuit 120 calculates an output image histogram HISOUT that is a histogram of the output image data PXOUT. The input image histogram calculation circuit 130 calculates an input image histogram HISIN that is a histogram of the input image data PXIN. The reference histogram calculation circuit 140 calculates a reference histogram HISREF that is an expected value of the output image histogram HISOUT based on the look-up table 162 according to the input image histogram HISIN. The histogram comparison circuit 150 compares the output image histogram HISOUT with the reference histogram HISREF to determine whether the gamma correction of the gamma correction circuit 110 is normal.

[0040] According to the present embodiment, the output image histogram HISOUT is calculated based on the gamma-corrected output image data PXOUT, and the reference histogram HISREF is calculated based on the input image histogram HISIN. Therefore, the signal processing paths of the output image histogram calculation and the reference histogram calculation are different. Thus, when an abnormality occurs in either the gamma correction process or the reference histogram calculation, the output image histogram HISOUT and the reference histogram HISREF become inconsistent, and thus the abnormality can be detected. This detection can be dynamically performed in the gamma correction process for the display image, and thus it is possible to verify whether the display image is being processed normally during operation.

[0041] In addition, in the present embodiment, the image processing circuit 100 includes: a register circuit 160 that stores the look-up table 162; and a CRC error detection circuit 180 that detects a CRC error of the look-up table 162 stored in the register circuit 160.

[0042] When a permanent error occurs in the look-up table 162, both the gamma correction and the reference histogram calculation performed based on the look-up table 162 are abnormal, and the output image histogram HISOUT and the reference histogram HISREF are abnormal, but they may be the same histogram. According to the present embodiment, by detecting the CRC error of the look-up table 162, a permanent error of the look-up table 162 can be detected. In addition, a permanent error means an error that does not naturally return to the normal state after the content of the look-up table 162 becomes abnormal, for example, an error caused by a hardware abnormality such as a short circuit.

[0043] As described below, the image processing circuit 100 of the present embodiment can be applied to, for example, the functional safety of automobiles. However, the image processing circuit 100 can be applied to various image processing devices that perform gamma correction.

[0044] The automotive industry is developing rapidly, and in order to ensure the reliability of products and the safety of users, more and more attention is being paid to safety. In automotive displays, it is essential to provide reliable display images to users. Therefore, in order to appropriately provide important information to users, it is essential to perform highly secure displays. In this regard, according to the present embodiment, it is possible to ensure that the image data correction for display is correctly executed. That is, the image processing circuit 100 of the present embodiment can check whether the function of gamma correction is normal during the normal operation of image processing in order to achieve the safety goal. The image processing circuit 100 of the present embodiment can detect both transient faults and permanent errors in the gamma correction lookup table.

[0045] 2. Detailed structural example

[0046] Figure 3 is a first detailed structural example of the image processing circuit 100. The image processing circuit 100 includes a gamma correction circuit 110, an output image histogram calculation circuit 120, an input image histogram calculation circuit 130, a reference histogram calculation circuit 140, a histogram comparison circuit 150, a register circuit 160, a CRC error detection circuit 180, and a selector 190. In Figure 3 illustrates the structure related to gamma correction error detection, and the illustration of the register circuit 160 and the CRC error detection circuit 180 is omitted.

[0047] In the first detailed structural example, the input image data PXIN is input to the image processing circuit 100 for each pixel data, and the image processing circuit 100 processes it for each pixel data.

[0048] Figure 4 shows an operation explanatory diagram of the image processing circuit 100. The vertical blanking signal VBLANK is a signal indicating the active period and vertical blanking. In Figure 4 the example of, VBLANK = 0 indicates the active period, and VBLANK = 1 indicates the vertical blanking period.

[0049] First, the operation of the image processing circuit 100 during the active period will be described. During the active period, the input image data PXIN is sequentially input to the image processing circuit 100 for each pixel data. In addition, when VBLANK = 0, the operations of the input image histogram calculation circuit 130 and the output image histogram calculation circuit 120 are enabled.

[0050] The pixel data of the input image data PXIN, the LUT address data lut_addr from the reference histogram calculation circuit 140, and the vertical blanking signal VBLANK are input to the selector 190. The selector 190 selects either the pixel data of the input image data PXIN or the LUT address data lut_addr according to the vertical blanking signal VBLANK. During the valid period when VBLANK = 0, the selector 190 selects the pixel data of the input image data PXIN and outputs it as the output data out.

[0051] The output data out from the selector 190 is input to the gamma correction circuit 110 as the input data data_in. The gamma correction circuit 110 performs gamma correction on the gray value of the input data data_in through the look-up table 162. That is, the gamma correction circuit 110 transforms the gray value of the input data data_in through the look-up table 162 and outputs the output data data_out of the transformed gray value. This output data data_out is output as the pixel data of the output image data PXOUT. In addition, assuming RGB image data with 256 gray levels for each color, the data size of the look-up table 162 is 3 × 256 × 8 bits.

[0052] The output data data_out from the gamma correction circuit 110 is input to the output image histogram calculation circuit 120. The output image histogram calculation circuit 120 accumulates the number of pixels for each gray value based on the pixel data input sequentially for each pixel data. That is, when the gray value of the pixel data is x, the output image histogram calculation circuit 120 increments the number of pixels with the gray value x by 1, and repeatedly performs this operation on the output image data PXOUT of one frame, thereby calculating the output image histogram HISOUT. The output image histogram calculation circuit 120 is implemented, for example, by an accumulator and a memory or register that stores the number of pixels for each gray value. In the case where the image data of one frame is, for example, 4k horizontal pixels, RGB image data, and 256 gray levels for each color, a 3 × 24-bit accumulator is used, and the data size of the histogram is 3 × 256 × 24 bits. 3 is the number of colors, 256 is the number of gray levels, and 24 is the number of bits when describing the maximum value of one interval in binary.

[0053] The pixel data of the input image data PXIN is input to the input image histogram calculation circuit 130. The input image histogram calculation circuit 130 accumulates the number of pixels for each gray level value based on the pixel data input sequentially for each pixel data, thereby calculating the input image histogram HISIN. The specific calculation method is the same as that of the output image histogram HISOUT. The input image histogram calculation circuit 130 is implemented, for example, by an accumulator and a memory or register that stores the number of pixels for each gray level value. The size of the accumulator is the same as that of the accumulator of the output image histogram calculation circuit 120, and the data size of the input image histogram HISIN is the same as the data size of the output image histogram HISOUT.

[0054] Next, the operation of the image processing circuit 100 during the vertical blanking period will be described. When VBLANK = 1, the operation of the reference histogram calculation circuit 140 is enabled.

[0055] The reference histogram calculation circuit 140 outputs LUT address data lut_addr for specifying the input gray level value i. Here, the number of gray levels for each color is set to 256, and i = 0, 1, 2, …, 255. The reference histogram calculation circuit 140 outputs lut_addr = 0, then outputs lut_addr = 1, and repeats this process sequentially until lut_addr = 255. The reference histogram calculation circuit 140 performs this repetition of lut_addr = 0 to 255 for each color.

[0056] When VBLANK = 1, the selector 190 selects the LUT address data lut_addr = i as the second input in2 and outputs it as the output data out.

[0057] The LUT address data lut_addr = i from the selector 190 is input to the gamma correction circuit 110 as the input data data_in. The gamma correction circuit 110 transforms the LUT address data lut_addr = i as the input data data_in through the lookup table 162 and outputs the output data data_out of the transformed gray level value. Let this transformed gray level value be y.

[0058] The output data data_out = y is input to the reference histogram calculation circuit 140 as the LUT output data lut = y. The reference histogram calculation circuit 140 calculates the reference histogram HISREF based on the LUT address data lut_addr = i, the LUT output data lut = y, and the input image histogram HISIN. Specifically, the reference histogram calculation circuit 140 calculates the reference histogram HISREF by the following formula (1). Formula (1) represents performing the operation on the right side and substituting it into the left side.

[0059] HISREF(y) = HISREF(y) + HISIN(i) ··· (1)

[0060] HISREF(y) represents the number of pixels with gray value y in the reference histogram HISREF. HISIN(i) represents the number of pixels with gray value i in the input image histogram HISIN. The reference histogram calculation circuit 140 sequentially calculates the above formula (1) with i = 0, 1, 2, ···, 255, and performs this calculation for each color, thereby calculating the reference histogram HISREF. The reference histogram calculation circuit 140 is implemented, for example, by an accumulator that calculates the above formula (1) and a memory or register that stores the number of pixels for each gray value. The size of the accumulator is the same as that of the accumulator of the output image histogram calculation circuit 120, and the data size of the reference histogram HISREF is the same as the data size of the output image histogram HISOUT.

[0061] The histogram comparison circuit 150 compares the output image histogram HISOUT calculated during the valid period with the reference histogram HISREF calculated during the vertical blanking period. For example, when the output image histogram HISOUT is consistent with the reference histogram HISREF, GMERR = 0 is output, and when they are inconsistent, GMERR = 1 is output. The histogram comparison circuit 150 compares the corresponding intervals of the output image histogram HISOUT and the reference histogram HISREF, and even if there is one inconsistent interval, it is determined that an error has occurred in the gamma correction. This comparison is performed after the reference histogram HISREF is calculated, for example, during the vertical blanking period when the reference histogram HISREF to be compared is calculated.

[0062] In the above-described embodiment, the vertical blanking signal VBLANK indicating the vertical blanking period is used as a trigger, the reference histogram calculation circuit 140 calculates the reference histogram HISREF, and the histogram comparison circuit 150 performs the comparison.

[0063] According to this embodiment, since the reference histogram HISREF is calculated during the vertical blanking period, the reference histogram HISREF is calculated at a timing different from the gamma correction performed during the valid period. Thus, when a transient error occurs in either the valid period or the vertical blanking period, its influence appears in the output image histogram HISOUT or the reference histogram HISREF, so that the transient error can be detected by comparing them. In addition, according to this embodiment, since the reference histogram HISREF is calculated during the vertical blanking period, which is longer than the horizontal blanking period, it is easy to ensure the processing time for calculating the reference histogram HISREF.

[0064] In addition, "using the blanking signal as a trigger" means using the switching timing from the effective period indicated by the blanking signal to the blanking period as a trigger, that is, using the timing of the transition of the logic level of the blanking signal as a trigger. Figure 4 In the process, the timing when the vertical blanking signal VBLANK changes from low level to high level becomes the trigger.

[0065] Furthermore, in the present embodiment, the input image histogram calculation circuit 130 calculates the input image histogram HISIN during the valid period in which the input image data PXIN is input.

[0066] According to the present embodiment, by calculating the input image histogram HISIN during the effective period, it is possible to calculate the reference histogram HISREF based on the input image histogram HISIN during the blanking period.

[0067] Figure 5 This is a second detailed configuration example of the image processing circuit 100. The second detailed configuration example differs from the first detailed configuration example in that the reference histogram HISREF is calculated during the horizontal blanking period and gamma correction error detection is performed for each horizontal scanning line. The following mainly describes the parts that are different from the first detailed configuration example.

[0068] The horizontal blanking signal HBLANK is a signal indicating an active period and a horizontal blanking period. HBLANK=0 indicates an active period, and HBLANK=1 indicates a horizontal blanking period.

[0069] During the effective period of HBLANK=0, the operation of the input image histogram calculation circuit 130 and the output image histogram calculation circuit 120 is enabled. During the horizontal blanking period of HBLANK=1, the operation of the reference histogram calculation circuit 140 is enabled. The selector 190 selects the pixel data of the input image data PXIN or the LUT address data lut_addr according to the horizontal blanking signal HBLANK. The selector 190 selects the pixel data of the input image data PXIN during the effective period of HBLANK=0, and selects the LUT address data lut_addr during the horizontal blanking period of HBLANK=1. The operation when each circuit is enabled is the same as that in the first detailed structure example.

[0070] When the image data of one frame has, for example, 4k horizontal pixels, RGB image data, and 256 grayscales for each color, the size of the accumulator is 3×13 bits, and the data size of the histogram is 3×256×13 bits. 3 is the number of colors, 256 is the number of grayscales, and 13 is the number of bits when describing the maximum value of one interval in binary.

[0071] In the above-described embodiment, the horizontal blanking signal HBLANK indicating the horizontal blanking period is used as a trigger, and the reference histogram calculation circuit 140 calculates the reference histogram HISREF, and the histogram comparison circuit 150 performs the comparison.

[0072] According to this embodiment, the reference histogram HISREF is calculated during the horizontal blanking period, and thus the reference histogram HISREF is calculated at a timing different from that of the gamma correction performed during the valid period. Thereby, when a transient error occurs in either the valid period or the horizontal blanking period, its influence appears in the output image histogram HISOUT or the reference histogram HISREF, and thus the transient error can be detected by comparing them. According to this embodiment, since the histogram is calculated for each horizontal scan line, the data size of the histogram is smaller than that in the first detailed structural example where the histogram is calculated for each frame. Thereby, the storage area of the memory or register for storing the histogram can be saved.

[0073] Figure 6 and Figure 7 Shows a specific example of gamma correction error detection. As shown in the upper left side of Figure 6 , it is assumed that the input image data PXIN is image data of 3×3 pixels. One pixel has R pixel data rPXIN, G pixel data gPXIN, and B pixel data bPXIN, and is described as (rPXIN, gPXIN, bPXIN). Each pixel data is 2 bits, and the gray value is any one of 0 to 3.

[0074] As shown in the middle left side of Figure 6 , the lookup table for gamma correction transforms the input gray values i = 0, 1, 2, 3 into output gray values y = 0, 0, 0, 2. If the output gray value corresponding to the input gray value i is denoted as y = LUT(i), then LUT(0) = LUT(1) = LUT(2) = 0, and LUT(3) = 2.

[0075] As shown in the lower left side of Figure 6 , the output image data PXOUT is also image data of 3×3 pixels like the input image data PXIN. One pixel has pixel data (rPXOUT, gPXOUT, bPXOUT), and each pixel data is 2 bits, and the gray value is any one of 0 to 3. (rPXIN, gPXIN, bPXIN) is transformed through the lookup table, and thus (rPXOUT, gPXOUT, bPXOUT) is obtained.

[0076] As shown in Figure 6As shown on the lower right side, the output image histogram HISOUT consists of an R histogram rHISOUT, a G histogram gHISOUT, and a B histogram bHISOUT, and is described as HISOUT = (rHISOUT; gHISOUT; bHISOUT). rHISOUT is the histogram of the R pixel data rPXOUT of the output image data PXOUT, and has 4 intervals with gray values from 0 to 3. Similarly, gHISOUT and bHISOUT are the histograms of the G and B pixel data gPXOUT and bPXOUT of the output image data PXOUT, respectively, and each has 4 intervals. HISOUT formed by combining them has 3×4 intervals.

[0077] In Figure 7 it is illustrated by taking the processing of the R pixels in Figure 6 as an example. As Figure 7 shown on the lower right side of the lower paragraph, based on Figure 6 the rPXOUT on the lower left side of the lower paragraph, rHISOUT = (7, 0, 2, 0) is obtained. The numbers in the parentheses from left to right are the number of pixels with gray values 0, 1, 2, and 3. That is, rHISOUT(0) = 7, rHISOUT(1) = 0, rHISOUT(2) = 2, rHISOUT(3) = 0.

[0078] As Figure 6 shown on the upper right side of the upper paragraph, the input image histogram HISIN is the same as the output image histogram HISOUT, and is described as HISIN = (rHISIN; gHISIN; bHISIN). rHISIN is the histogram of the R pixel data rPXIN of the input image data PXIN, and has 4 intervals with gray values from 0 to 3. Similarly, gHISIN and bHISIN are the histograms of the G and B pixel data gPXIN and bPXIN of the input image data PXIN, respectively, and each has 4 intervals. HISIN formed by combining them has 3×4 intervals.

[0079] As Figure 6 shown on the right side of the middle paragraph, the reference histogram HISREF is the same as the output image histogram HISOUT, and is described as HISREF = (rHISREF; gHISREF; bHISREF). rHISREF is the histogram calculated based on rHISIN, and has 4 intervals with gray values from 0 to 3. Similarly, gHISREF and bHISREF are the histograms calculated based on gHISIN and bHISIN, respectively, and each has 4 intervals. HISREF formed by combining them has 3×4 intervals.

[0080] As Figure 7 shown in the upper paragraph, based on Figure 6The rPXIN on the upper left of the upper segment becomes rHISIN = (2, 3, 2, 2). The numbers in the parentheses from left to right are the number of pixels with gray values 0, 1, 2, and 3. That is, rHISIN(0) = 2, rHISIN(1) = 3, rHISIN(2) = 2, rHISIN(3) = 2.

[0081] As described in Figure 2 S5 of, the reference histogram HISREF is initialized. That is, before the operation of the reference histogram HISREF, rHISREF(0) = rHISREF(1) = rHISREF(2) = rHISREF(3) = 0.

[0082] When i = 0, y = LUT(0) = 0 is obtained through the look-up table. At this time, the following formula (2) is calculated through the above formula (1).

[0083] rHISREF(0) = rHISREF(0) + rHISIN(0) = 0 + 2 = 2 ··· (2)

[0084] When i = 1, y = LUT(1) = 0 is obtained through the look-up table. At this time, the following formula (3) is calculated through the above formula (1).

[0085] rHISREF(0) = rHISREF(0) + rHISIN(1) = 2 + 3 = 5 ··· (3)

[0086] When i = 2, y = LUT(2) = 0 is obtained through the look-up table. At this time, the following formula (4) is calculated through the above formula (1).

[0087] rHISREF(0) = rHISREF(0) + rHISIN(2) = 5 + 2 = 7 ··· (4)

[0088] When i = 3, y = LUT(3) = 2 is obtained through the look-up table. At this time, the following formula (5) is calculated through the above formula (1).

[0089] rHISREF(2) = rHISREF(2) + rHISIN(3) = 0 + 2 = 2 ··· (5)

[0090] According to the above formulas (2) to (5), rHISREF = (7, 0, 2, 0) is calculated. Figure 7 Showing an example where gamma correction is normal, rHISREF = (7, 0, 2, 0) is consistent with rHISOUT = (7, 0, 2, 0). When an error occurs in gamma correction or reference histogram calculation, rHISREF and rHISOUT are inconsistent with each other. In addition, the calculation and comparison of the R histogram are described here, but the G histogram and B histogram are also calculated and compared in the same way.

[0091] In the above-described embodiment, the look-up table 162 is a table that correlates the input gray value i in gamma correction with the output gray value y. Let k be an integer of 2 or more. For the input gray values i = i1, i2, ···, ik, the output gray values are LUT(i1) = LUT(i2) = ··· = LUT(ik) = y. In the input image histogram HISIN, the number of pixels of the gray values i1, i2, ···, ik are HISIN(i1), HISIN(i2), ···, HISIN(ik). At this time, the reference histogram calculation circuit 140 calculates the number of pixels HISREF(y) of the gray value y by HISREF(y) = HISIN(i1) + HISIN(i2) + ··· + HISIN(ik), and thus calculates the reference histogram HISREF.

[0092] In Figure 6 and Figure 7 the example of, i1 = 0, i2 = 1, i3 = 2, k = 3, LUT(0) = LUT(1) = LUT(2) = 0. At this time, as shown in the above equations (2) to (4), rHISREF(0) = rHISIN(0) + rHISIN(1) + rHISIN(2) = 2 + 3 + 2 = 7.

[0093] According to this embodiment, the gray value i is transformed into the gray value y = LUT(i) by the look-up table 162, and the number of pixels HISIN(i) corresponding to the gray value i before transformation in the input image histogram HISIN is accumulated as the number of pixels HISREF(y) corresponding to the gray value y = LUT(i) after transformation in the reference histogram HISREF. Thus, the reference histogram HISREF, which is the expected value of the output image histogram HISOUT, can be calculated using the look-up table 162.

[0094] Further, in this embodiment, let n be an integer of 2 or more, and let i = 1, 2, ···, n. The output gray value when the input gray value is i is LUT(i), the number of pixels of the gray value i in the input image histogram HISIN is HISIN(i), and the number of pixels of the gray value LUT(i) in the reference histogram HISREF is HISREF(LUT(i)). At this time, the reference histogram calculation circuit 140 selects the gray value i as the input gray value and outputs it to the gamma correction circuit 110, and inputs the output gray value LUT(i) from the gamma correction circuit 110. The reference histogram calculation circuit 140 adds the number of pixels HISIN(i) of the input image histogram to the number of pixels HISREF(LUT(i)) of the reference histogram.

[0095] According to this embodiment, the reference histogram calculation circuit 140 sequentially selects grayscale values i = 1, 2, ···, n, and thus the number of pixels HISIN(i) of the input image histogram is sequentially accumulated into the number of pixels HISREF(LUT(i)) of the reference histogram. For example, when the number of grayscale levels is 256, the reference histogram HISREF can be calculated by performing 256 accumulations, and the calculation of the reference histogram HISREF can be completed during the blanking period.

[0096] In addition, in this embodiment, the image processing circuit 100 includes a selector 190. The selector 190 selects the input image data PXIN or the grayscale value i output by the reference histogram calculation circuit 140 based on the blanking signal that is the vertical blanking signal VBLANK or the horizontal blanking signal HBLANK. When the blanking signal indicates the valid period, the selector 190 selects the input image data PXIN and outputs it to the gamma correction circuit 110, and the gamma correction circuit 110 outputs the output image data PXOUT. When the blanking signal indicates the blanking period, the reference histogram calculation circuit 140 outputs the grayscale value i, the selector 190 selects the grayscale value i and outputs it as the input grayscale value to the gamma correction circuit 110, and the gamma correction circuit 110 outputs the output grayscale value LUT(i) to the reference histogram calculation circuit 140.

[0097] According to this embodiment, gamma correction is performed during the valid period, and the output image histogram HISOUT and the input image histogram HISIN are calculated. During the blanking period, the reference histogram HISREF is calculated based on the input image histogram HISIN, and the reference histogram HISREF and the output image histogram HISOUT are compared. In this way, the reference histogram calculation and the histogram comparison are performed by using the vertical blanking signal VBLANK or the horizontal blanking signal HBLANK as a trigger.

[0098] 3. Circuit Device and Electronic Device

[0099] Figure 8 This is a structural example of a circuit device 200 including the image processing circuit 100. The circuit device 200 includes an interface circuit 210, first to mth image processing circuits GSC1 to GSCm, and an interface circuit 220. m is an integer of 1 or more. The circuit device 200 is, for example, an integrated circuit device in which a plurality of circuit elements are integrated on a semiconductor substrate.

[0100] The interface circuit 210 receives image data from a processing device external to the circuit device 200 and outputs the received image data PXDT1. The interface circuit 210 may include a receiving circuit for various communication interfaces. As an example, it includes receiving circuits such as LVDS, DVI, DisplayPort, GMSL, or GVIF. LVDS is an abbreviation for Low voltage differential signaling, DVI is an abbreviation for Digital Visual Interface, GMSL is Gigabit Multimedia Serial Link, and GVIF is an abbreviation for Gigabit Video InterFace.

[0101] The first to mth image processing circuits GSC1 to GSCm form an image processing pipeline for performing pipelined processing on various image processes. Any one of the first to mth image processing circuits GSC1 to GSCm corresponds to Figure 1 , Figure 3 or Figure 5 the image processing circuit 100. The first to mth image processing circuits GSC1 to GSCm perform pipelined processing on the image data PXDT1 and output the image data PXDTm + 1. The image processing circuits GSC1, GSC2, ···, GSCm perform image processing on the image data PXDT1, PXDT2, ···, PXDTm and output the image data PXDT2, PXDT3, ···, PXDTm + 1.

[0102] The interface circuit 220 sends the image data PXDTm + 1 to a device at the subsequent stage of the circuit device 200. The interface circuit 220 may include a sending circuit for various communication interfaces. As an example, it includes sending circuits such as LVDS, DVI, DisplayPort, GMSL, or GVIF.

[0103] Figure 9 is a first structural example of the electronic device 500 to which the image processing circuit 100 is applied. The electronic device 500 includes a processing device 510 and an electro-optical device 520.

[0104] The electro-optical device 520 is a liquid crystal display or an EL display, etc. EL is an abbreviation for electroluminescence. The electronic device 500 may be various devices equipped with the above-mentioned display. As an example, it is a display provided on a vehicle-mounted cluster panel, an information processing device such as a personal computer, or a portable information processing terminal such as a tablet-type terminal.

[0105] The electro-optical device 520 includes a display controller 521, a driver 522, and an electro-optical panel 523. The processing device 510 is a CPU, a microcomputer, a DSP, or the like, and sends the image data of the display image to the display controller 521. The display controller 521 performs image processing on the image data and outputs a display control signal together with the image data of the processing result to the driver 522. The display controller 521 includes an image processing circuit 100, which performs gamma correction, gamma correction error detection, and register error detection in the image processing for the above-mentioned image data. The display control signal is, for example, a vertical synchronization signal, a horizontal synchronization signal, and a pixel clock signal. The driver 522 drives the electro-optical panel 523 according to the received image data and display control signal.

[0106] Figure 10 This is a second structural example of the electronic device 500 to which the image processing circuit 100 is applied. The electronic device 500 includes a processing device 510 and an HUD 530. HUD is the abbreviation of Head Up Display.

[0107] The HUD 530 includes an HUD controller 531 and a projection device 532. The processing device 510 sends the image data of the display image to the HUD controller 531. The HUD controller 531 performs image processing on the image data and outputs a display control signal together with the image data of the processing result to the projection device 532. The HUD controller 531 includes an image processing circuit 100, which performs gamma correction, gamma correction error detection, and register error detection in the image processing for the above-mentioned image data. The projection device 532 includes, for example, a driver, a liquid crystal display panel, a light source, and an optical device. The driver causes the liquid crystal display panel to display an image based on the image data and the display control signal received from the HUD controller 531. The light source emits projection light toward the liquid crystal display panel, and the projection light that has passed through the liquid crystal display panel is incident on the optical device. The optical device projects the projection light that has passed through the liquid crystal display panel onto a screen. The screen is, for example, the windshield of a moving body, but a dedicated screen may also be provided. The moving body is an automobile, an airplane, a ship, or the like.

[0108] The image processing circuit of the present embodiment described above includes a gamma correction circuit, an output image histogram calculation circuit, an input image histogram calculation circuit, a reference histogram calculation circuit, and a histogram comparison circuit. The gamma correction circuit performs gamma correction on the input image data through a look-up table and outputs the output image data. The output image histogram calculation circuit calculates an output image histogram that is a histogram of the output image data. The input image histogram calculation circuit calculates an input image histogram that is a histogram of the input image data. The reference histogram calculation circuit calculates a reference histogram that is an expected value of the output image histogram based on the look-up table according to the input image histogram. The histogram comparison circuit determines whether the gamma correction of the gamma correction circuit is normal by comparing the output image histogram with the reference histogram.

[0109] According to the present embodiment, the output image histogram is calculated based on the output image data after gamma correction, and the reference histogram is calculated based on the input image histogram. Therefore, the signal processing paths of the output image histogram calculation and the reference histogram calculation are different. Thus, when an abnormality occurs in either the gamma correction process or the reference histogram calculation, the output image histogram and the reference histogram do not match, and thus the abnormality can be detected. This detection can be dynamically performed in the gamma correction process for the display image, and thus it can be verified whether the display image is being processed normally during operation.

[0110] In addition, in the present embodiment, the vertical blanking signal indicating the vertical blanking period may be used as a trigger, and the reference histogram calculation circuit calculates the reference histogram, and the histogram comparison circuit performs the comparison.

[0111] According to the present embodiment, the reference histogram is calculated during the vertical blanking period, and thus the reference histogram is calculated at a timing different from the gamma correction performed during the active period. Thus, when a transient error occurs in either the active period or the vertical blanking period, its influence appears in the output image histogram or the reference histogram, and thus the transient error can be detected by comparing them. In addition, according to the present embodiment, the reference histogram is calculated during the vertical blanking period that is longer than the horizontal blanking period, and thus it is easy to ensure the processing time for calculating the reference histogram.

[0112] In addition, in the present embodiment, the horizontal blanking signal indicating the horizontal blanking period may be used as a trigger, and the reference histogram calculation circuit calculates the reference histogram, and the histogram comparison circuit performs the comparison.

[0113] According to this embodiment, the reference histogram is calculated during the horizontal blanking period, so the reference histogram is calculated at a timing different from the gamma correction performed during the active period. Thus, when a transient error occurs in either the active period or the horizontal blanking period, its influence appears in the output image histogram or the reference histogram, so the transient error can be detected by comparing them. According to this embodiment, since the histogram is calculated for each horizontal scan line, the data size of the histogram is smaller than that in the case of calculating the histogram for each frame. Thereby, the storage area of the memory or register for storing the histogram can be saved.

[0114] In addition, in this embodiment, the input image histogram calculation circuit may also calculate the input image histogram during the active period when the input image data is input.

[0115] According to this embodiment, by calculating the input image histogram during the active period, the reference histogram can be calculated based on the input image histogram during the blanking period.

[0116] In addition, in this embodiment, the look-up table may also be a table that correlates the input gray value and the output gray value in gamma correction. Let k be an integer of 2 or more, and for the input gray values i1, i2, ···, ik, the output gray values are LUT(i1) = LUT(i2) = ··· = LUT(ik) = y. In the input image histogram, the number of pixels of the gray values i1, i2, ···, ik are HISIN(i1), HISIN(i2), ···, HISIN(ik). At this time, the reference histogram calculation circuit may also calculate the reference histogram by obtaining the number of pixels HISREF(y) of the gray value y by using HISREF(y) = HISIN(i1) + HISIN(i2) + ··· + HISIN(ik).

[0117] According to this embodiment, the gray values i1, i2, ···, ik are transformed into the gray values LUT(i1) = LUT(i2) = ··· = LUT(ik) = y through the look-up table 162, and the number of pixels HISIN(i1), HISIN(i2), ···, HISIN(ik) corresponding to the gray values before transformation in the input image histogram are accumulated as the number of pixels HISREF(y) corresponding to the gray values after transformation in the reference histogram HISREF. Thereby, the reference histogram HISREF, which is the expected value of the output image histogram HISOUT, can be calculated by using the look-up table 162.

[0118] In addition, in the present embodiment, the lookup table may also be a table that establishes the correspondence between the input gray value and the output gray value in gamma correction. Let n be an integer of 2 or more, i = 1, 2, ···, n, the output gray value when the input gray value is i be LUT(i), the number of pixels with the gray value i in the input image histogram be HISIN(i), and the number of pixels with the gray value LUT(i) in the reference histogram be HISREF(LUT(i)). At this time, the reference histogram calculation circuit may also select the gray value i as the input gray value and output it to the gamma correction circuit, input the output gray value LUT(i) from the gamma correction circuit, and add the number of pixels HISIN(i) of the input image histogram to the number of pixels HISREF(LUT(i)) of the reference histogram.

[0119] According to the present embodiment, the reference histogram calculation circuit sequentially selects the gray values i = 1, 2, ···, n, and thus the number of pixels HISIN(i) of the input image histogram is sequentially accumulated to the number of pixels HISREF(LUT(i)) of the reference histogram. For example, in the case where the number of gray levels is 256, the reference histogram can be calculated by performing 256 accumulations, and the calculation of the reference histogram can be completed during the blanking period.

[0120] In addition, in the present embodiment, the image processing circuit may also include a selector. The selector may also select the input image data or the gray value i output by the reference histogram calculation circuit according to the blanking signal, which is a vertical blanking signal or a horizontal blanking signal. It may also be that when the blanking signal indicates the valid period, the selector selects the input image data and outputs it to the gamma correction circuit, and the gamma correction circuit outputs the output image data. It may also be that when the blanking signal indicates the blanking period, the reference histogram calculation circuit outputs the gray value i, the selector selects the gray value i as the input gray value and outputs it to the gamma correction circuit, and the gamma correction circuit outputs the output gray value LUT(i) to the reference histogram calculation circuit.

[0121] According to the present embodiment, gamma correction is performed during the valid period, and the output image histogram and the input image histogram are calculated. During the blanking period, the reference histogram is calculated based on the input image histogram, and the reference histogram and the output image histogram are compared. In this way, the reference histogram calculation and the histogram comparison are executed by using the vertical blanking signal or the horizontal blanking signal as a trigger.

[0122] In addition, in the present embodiment, the image processing circuit may also include: a register circuit that stores the lookup table; and a CRC error detection circuit that detects the CRC error of the lookup table stored in the register circuit.

[0123] In the case where a permanent error occurs in the lookup table, both the gamma correction and the reference histogram calculation performed based on the lookup table become abnormal, and although the output image histogram and the reference histogram are abnormal, they may become the same histogram. According to the present embodiment, by detecting the CRC error of the lookup table, the permanent error of the lookup table can be detected.

[0124] In addition, the circuit device of the present embodiment includes the image processing circuit described in any one of the above.

[0125] In addition, the electronic device of the present embodiment includes the image processing circuit described in any one of the above.

[0126] In addition, although the present embodiment has been described in detail as above, those skilled in the art can easily understand that various modifications can be made without substantially departing from the new matters and effects of the present disclosure. Therefore, all such modified examples are included in the scope of the present disclosure. For example, in the specification or the drawings, a term described at least once together with a different term having a broader or synonymous meaning can be replaced with that different term at any position in the specification or the drawings. In addition, all combinations of the present embodiment and the modified examples are also included in the scope of the present disclosure. In addition, the structures and operations of the image processing circuit, the circuit device, the electronic device, etc. are not limited to the contents described in the present embodiment, and various modifications can be implemented.

Claims

1. An image processing circuit, characterized in that, The image processing circuit includes: a gamma correction circuit that performs gamma correction on input image data using a lookup table and outputs the output image data; an output image histogram calculation circuit that calculates a histogram of the output image data, i.e., the output image histogram; an input image histogram calculation circuit that calculates a histogram of the input image data, i.e., the input image histogram; a reference histogram calculation circuit that calculates a reference histogram, which is an expected value of the output image histogram, based on the lookup table and the input image histogram; and a histogram comparison circuit that determines whether the gamma correction of the gamma correction circuit is normal by comparing the output image histogram with the reference histogram.

2. The image processing circuit according to claim 1, wherein triggered by a vertical blanking signal indicating a vertical blanking period, the reference histogram calculation circuit calculates the reference histogram, and the histogram comparison circuit performs the comparison.

3. The image processing circuit according to claim 1, wherein triggered by a horizontal blanking signal indicating a horizontal blanking period, the reference histogram calculation circuit calculates the reference histogram, and the histogram comparison circuit performs the comparison.

4. The image processing circuit according to any one of claims 1 to 3, wherein the input image histogram calculation circuit calculates the input image histogram during a valid period when the input image data is input.

5. The image processing circuit according to any one of claims 1 to 3, wherein the image processing circuit includes: a register circuit that stores the lookup table; and a CRC error detection circuit that detects a CRC error of the lookup table stored in the register circuit.

6. A circuit device, characterized in that, The circuit device includes the image processing circuit according to any one of claims 1 to 5.

7. An electronic device, characterized in that, The electronic device includes the image processing circuit according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image signal processing apparatus, display, and image signal processing method

    JP2009225349A

  • Circuit device and electronic apparatus

    CN110211518A

  • Image processing apparatus and image processing system

    US20020186223A1