CN112651906A - Color control implementation method and system for image processing - Google Patents

Color control implementation method and system for image processing Download PDF

Info

Publication number
CN112651906A
CN112651906A CN202110183665.0A CN202110183665A CN112651906A CN 112651906 A CN112651906 A CN 112651906A CN 202110183665 A CN202110183665 A CN 202110183665A CN 112651906 A CN112651906 A CN 112651906A
Authority
CN
China
Prior art keywords
brightness
color
image processing
color control
change
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.)
Pending
Application number
CN202110183665.0A
Other languages
Chinese (zh)
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.)
Jiangsu Qiyang Semiconductor Technology Co ltd
Original Assignee
Jiangsu Qiyang Semiconductor Technology Co ltd
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 Jiangsu Qiyang Semiconductor Technology Co ltd filed Critical Jiangsu Qiyang Semiconductor Technology Co ltd
Priority to CN202110183665.0A priority Critical patent/CN112651906A/en
Publication of CN112651906A publication Critical patent/CN112651906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a color control realization method and a system thereof for image processing, wherein the method comprises the following steps in the histogram equalization processing of a video image: determining a multiple of change in brightness in the anti-glare adjustment; and adjusting the color according to the change multiple of the brightness. The method and the system for realizing the color control for the image processing adopt the change multiple of the brightness component to perform corresponding color change multiple on the color according to the change multiple of the brightness component in the brightness equalization processing set for keeping the brightness change of the image stable for the anti-dazzle in the histogram equalization processing of the video image, thereby limiting the change of the color according to the change of the brightness and ensuring that the color in the anti-dazzle processing is not distorted.

Description

Color control implementation method and system for image processing
Technical Field
The invention relates to a software implementation method and a system for video image processing, in particular to an improvement of the software implementation method and the system for color control processing in image processing.
Background
In a video shooting processing technology of a camera in the prior art, each frame of a video needs to be processed, and finally, image processing of the whole video is achieved. In the frame image processing technology of video, the central idea of histogram equalization processing is to change the gray level histogram of the original image from a certain gray level interval in a comparison set to uniform distribution in the whole gray level range.
Histogram equalization is the non-linear stretching of an image to reassign image pixel values so that the number of pixels in a range of gray levels is approximately the same, and changes the histogram distribution of a given image to a "uniform" distribution histogram distribution.
When histogram equalization is performed on an image in the prior art, as shown in fig. 1, the effect of processing by using a conventional histogram equalization algorithm has two problems: 1. the image noise is too large, and obvious noise spots 101 are generated; 2. is the color distortion around the glare area 102. The color recovery is not difficult generally, but the brightness of the glare area is too high, so that the color recovery is difficult to use.
In fig. 1, since a gray-scale picture is used, the color distortion display effect on the periphery of the glare area 102 is not obvious, and in the original color map, the color distortion of the pixels in the area is very obvious, and the pixels with different colors are scattered to form a single color pixel in the noise spot 101 which finally transits to the center.
In the histogram equalization process, a change in luminance causes color distortion. For this reason, the prior art is still in need of improvement and development.
Disclosure of Invention
The invention aims to provide a method and a system for realizing color control for image processing, and provides a method and a system for realizing color control undistorted after histogram equalization processing for image processing aiming at the problems in the prior art.
The technical scheme of the invention is as follows:
a color control implementation method for image processing, comprising the following steps in a video image histogram equalization process:
A. determining a multiple of change in brightness in the anti-glare adjustment;
B. and adjusting the color according to the change multiple of the brightness.
The color control implementation method for image processing, wherein the step a further includes:
a1, determining a pixel interval of the glare point;
a2, controlling the brightness change of the image during the anti-dazzle treatment.
The color control implementation method for image processing, wherein the step a1 further includes:
a11, setting a first threshold value, starting detection from the high end of the histogram, and marking the first value detected to have more times than the first threshold value as e 1;
a12, detecting the pixel value with the first occurrence number larger than the first threshold value from the low end to the high end of the histogram as s 0;
the pixel values between the labels s0, e1 are glare pixels.
The color control implementation method for image processing, wherein the step a2 further includes:
a21, detecting continuously-occurring invalid values between s0 and e1, and recording a continuously-occurring maximum invalid value interval as [ e0, s1 ];
a22, in the histogram equalization process, the pixels in the [ s0, e0] section are enlarged, and the pixels in the [ s1, e1] section, that is, the invalid pixels, are squeezed.
The color control implementation method for image processing, wherein the step a2 further includes:
a23, determining the number of pixel values in a section [ s0, e0] to be N1, namely the width of the section N1= e0-s0+ 1;
a24, the width of the maximum possible section after the mapping of the histogram equalization processing is N = (maxvalue-minimum + 1), where minimum and maxvalue are the pixel values of the lowest luminance and the highest luminance, respectively.
The color control implementation method for image processing, wherein the step B further includes:
b1, determining the magnification of the brightness;
and B2, performing same-time magnification processing on the color.
The color control implementation method for image processing, wherein the step B1 further includes:
b11, brightness magnification factor = maximum range width of pixel value rmaxEffective pixel value range width, where rmaxIs the percentage of the total range occupied by the set valid pixel values.
The color control implementation method for image processing, wherein the step B2 further includes:
b21, the intermediate value of the chromatic aberration is middlevalue, and the chromatic aberration amplification processing formula is as follows: u 1= (u 0-midlevalue) × factor + midlevalue; v 1= (v 0-midlevalue) × factor + midlevalue.
In the method for implementing color control for image processing, in step B21, reasonable limits are set on the value ranges of u1 and v 1.
A color control implementation system for image processing employing any of the implementation methods, comprising:
a brightness change multiple determining module for determining a determined change multiple in the anti-glare adjustment;
and the color adjusting module is used for adjusting the color according to the change multiple of the brightness.
The invention provides a method and system for realizing color control of image processing, which adopts the change multiple of the brightness component in the histogram equalization processing of the video image according to the brightness equalization processing set for keeping the brightness change of the anti-dazzle image stable, and carries out the corresponding color change multiple on the color, thereby limiting the change of the color according to the change of the brightness and ensuring that the color in the anti-dazzle processing is not distorted.
Drawings
Fig. 1 is a graph showing effects after an anti-glare treatment of the prior art.
FIG. 2 is a flow chart of a preferred embodiment of the method and system for implementing color control for image processing according to the present invention.
FIG. 3 is a functional block diagram of a color control implementation method and system for image processing according to a preferred embodiment of the present invention.
Detailed Description
The following describes in detail preferred embodiments of the present invention.
In the method for implementing color control processing for image processing according to the present invention, as shown in fig. 2, in the image processing, mainly aiming at the single frame processing technology of the video, since the video acquires the image, there exists pixel noise, that is, a small number of invalid pixel values with small probability, that is, invalid values. And filtering the invalid value for one time in a median filtering mode to filter the invalid value as far as possible. There may be very few small probability pixel values occurring after filtering, but there is no big influence on the whole image processing result.
In the single-frame processing technology of video images, the pixel value of the glare point is generally large, and a small peak is formed on the histogram, so that whether the glare exists can be detected.
The specific method is that a first threshold value is preset, the detection is started from the high end of the histogram, the first value of the detected occurrence number which is more than the first threshold value is marked as e1, the pixel value of the first occurrence number which is more than the first threshold value is detected from the low end to the high end is marked as s0, and the pixel value between the marks [ s0, e1] is the glare pixel.
And detecting continuously-occurring invalid values between s0 and e1, recording the longest continuously-occurring invalid value interval as [ e0, s1], dividing [ s0, e1] into three parts by using the interval, wherein the middle part is [ e0, s1], the left part is [ s0, e0], and the right part is [ s1, e1 ]. Then the pixel value in the [ s1, e1] interval is the interval where the glare is really located, and the pixel value in the [ s0, e0] interval is the interval where the image effective value is located, and of course, a small amount of partial invalid values exist in the effective value interval, and further processing may be performed in other processing techniques, for example, if further calculation and analysis are performed, when an image with a plurality of peaks exists, filtering processing may be performed on the invalid values again.
In the subsequent histogram adjustment, only the pixels in the [ s0, e0] interval can be enlarged, and the interval [ s1, e1] in which the glare is located, i.e. the invalid pixels, can be squeezed together with other invalid pixels.
In the method for implementing the histogram equalization processing, the number of pixel values in the interval [ s0, e0] is determined to be N1, that is, the width of the interval N1= e0-s0+ 1. The width of the maximum possible interval after the mapping of the histogram equalization process is N = (maxvalue-minimum + 1), where minimum and maxvalue are pixel values of the lowest luminance and the highest luminance, respectively.
It is noted that in the YCbCr space, these two values are not 0 and 255 (8 bits) or 4095 (12 bits), 16 for 8 bits representing black and 235 for white as specified by ITU-T BT.601. For 12 bits, after being enlarged, 256 indicates black, and 3775 indicates white.
Here, a parameter is set: the range proportion r occupied by the mapped effective value can be changed within a certain range, and the minimum value is rmin= N1/N, maximum value rmaxAnd = 1. Then d1= r × N/N1, which is the spacing between the mapped active pixels, and d0= (1-r) × N/(N-N1), which is the spacing between the mapped inactive pixels.
Due to the presence of noise, the width of the detected significant value interval [ s0, e0] changes, and the change in width changes the overall brightness of the mapped image, and generally, the brightness of the mapped image is brighter as [ s0, e0] becomes narrower. In order to prevent the mapped image from flickering, the width of s0, e0 needs to be made relatively stable.
In the preferred embodiment of the brightness control processing implementation method for image processing of the present invention, at most ten nearest image detection intervals can be recorded in the histogram equalization algorithm and recorded as [ s0i, e0i ], where i =0, 1, 2, … … 9. After the current image detection is completed, [ s0, e0], the average value Na of the interval widths of the K (K < = 10) images is calculated, the comparison is carried out by using N1 and Na, if the change proportion exceeds a certain threshold value, the scene change is considered, the previous records are thrown away, and the recording is restarted. If the changed ratio does not exceed the threshold value, an average value is calculated using the section of the current image and the recorded sections (at most 11 sections), the resulting sections are designated as [ s0a, e0a ], and the section is taken as the valid section of the current frame. The valid interval of the current frame is stored as the [ s0, e0] interval of the buffer, and the processing of the next frame is also performed in the same loop processing.
In the color control processing method, the color is adjusted according to the change of the brightness. The pixel values are distributed in a three-dimensional cube, and the pixel values obtained by shooting under the low illumination condition are equivalent to compressing the color cube, and the color should be amplified by how many times the brightness is amplified.
The magnification of the brightness is calculated as follows: factor = maximum extent width of pixel value rmaxEffective pixel value range width, where rmaxIs the percentage of the total range occupied by the set valid pixel values. For color difference components, the colorless corresponds to a median value of 2048 for 12-bit representation and 128 for 8-bit representation, which is middleevalue, so the color difference calculation formula is: u 1= (u 0-midlevalue) × factor + midlevalue; v 1= (v 0-midlevalue) × factor + midlevalue.
Due to noise, u1 and v1 may be calculated to exceed a reasonable value range, and u1 and v1 are forced to be limited within an allowable range, that is, CLIP operation is applied: u 1= CLIP ((u 0-midlevalue) factor + middlevalue, minu, maxu); v 1= CLIP ((v 0-midlevalue) factor + middlevalue, minv, maxv).
And for the glare part and the invalid pixel part, the chromatic aberration is not amplified. The judgment condition is that, in the original four brightness values corresponding to the color difference signal, as long as one of the four brightness values belongs to the invalid pixel value or the glare pixel value, it is judged that the current color difference is not processed, that is, the factor is set to 1. Otherwise, carrying out the same magnification processing of chromatic aberration.
The invention also discloses a color control implementation system for image processing, based on the color control implementation method, as shown in fig. 3, the color control implementation system comprises: a brightness change factor determining module 110 for determining a determined change factor in the anti-glare adjustment; and a color adjusting module 120, configured to adjust the color according to the multiple of the brightness change. The modules are software-implemented modules and are arranged in a hardware control unit of the image pickup apparatus to implement internal processing of video images.
The invention provides a color control implementation method and a system for image processing, in the histogram equalization processing process of a video image, the processing process of brightness components in the anti-glare process can be utilized, the change multiple of the brightness components, namely the amplification multiple, for controlling the brightness flicker of the video image and realizing the brightness equalization is adopted, and the same multiple as the brightness components is adopted for amplification when effective pixels are processed, particularly images around a glare area are processed, so that a simple and rapid color equalization control scheme is realized. Meanwhile, in order to prevent the special influence of noise, such as excessive influence of glare on the image, the change range of the color can be limited, so that the change area of the image can be controlled, and the color difference processing of the image can be realized within a reasonable range.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

Claims (10)

1. A color control implementation method for image processing, comprising the steps of, in a video image histogram equalization process:
A. determining a multiple of change in brightness in the anti-glare adjustment;
B. and adjusting the color according to the change multiple of the brightness.
2. The method of claim 1, wherein step a further comprises:
a1, determining a pixel interval of the glare point;
a2, controlling the brightness change of the image during the anti-dazzle treatment.
3. A color control implementation method for image processing according to claim 2, wherein said step a1 further comprises:
a11, setting a first threshold value, starting detection from the high end of the histogram, and marking the first value detected to have more times than the first threshold value as e 1;
a12, detecting the pixel value with the first occurrence number larger than the first threshold value from the low end to the high end of the histogram as s 0;
the pixel values between the labels s0, e1 are glare pixels.
4. A color control implementation method for image processing according to claim 3, wherein said step a2 further comprises:
a21, detecting continuously-occurring invalid values between s0 and e1, and recording a continuously-occurring maximum invalid value interval as [ e0, s1 ];
a22, in the histogram equalization process, the pixels in the [ s0, e0] section are enlarged, and the pixels in the [ s1, e1] section, that is, the invalid pixels, are squeezed.
5. The method for implementing color control in image processing according to claim 4, wherein said step A2 further includes:
a23, determining the number of pixel values in a section [ s0, e0] to be N1, namely the width of the section N1= e0-s0+ 1;
a24, the width of the maximum possible section after the mapping of the histogram equalization processing is N = (maxvalue-minimum + 1), where minimum and maxvalue are the pixel values of the lowest luminance and the highest luminance, respectively.
6. The method of claim 5, wherein step B further comprises:
b1, determining the magnification of the brightness;
and B2, performing same-time magnification processing on the color.
7. A color control implementation method for image processing according to claim 6, characterized in that said step B1 further comprises:
b11, brightness magnification factor = maximum range width of pixel value rmaxEffective pixel value range width, where rmaxIs the percentage of the total range occupied by the set valid pixel values.
8. A color control implementation method for image processing according to claim 7, wherein said step B2 further comprises:
b21, the intermediate value of the chromatic aberration is middlevalue, and the chromatic aberration amplification processing formula is as follows: u 1= (u 0-midlevalue) × factor + midlevalue; v 1= (v 0-midlevalue) × factor + midlevalue.
9. The method of claim 8, wherein in step B21, reasonable limits are set on the value ranges of u1 and v 1.
10. A color control implementation system for image processing using the implementation method as claimed in any one of claims 1 to 9, comprising:
a brightness change multiple determining module for determining a determined change multiple in the anti-glare adjustment;
and the color adjusting module is used for adjusting the color according to the change multiple of the brightness.
CN202110183665.0A 2021-02-10 2021-02-10 Color control implementation method and system for image processing Pending CN112651906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110183665.0A CN112651906A (en) 2021-02-10 2021-02-10 Color control implementation method and system for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110183665.0A CN112651906A (en) 2021-02-10 2021-02-10 Color control implementation method and system for image processing

Publications (1)

Publication Number Publication Date
CN112651906A true CN112651906A (en) 2021-04-13

Family

ID=75371013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110183665.0A Pending CN112651906A (en) 2021-02-10 2021-02-10 Color control implementation method and system for image processing

Country Status (1)

Country Link
CN (1) CN112651906A (en)

Similar Documents

Publication Publication Date Title
CN109729332B (en) Automatic white balance correction method and system
US7969480B2 (en) Method of controlling auto white balance
CN105407296B (en) Real-time video enhancement method and device
US8493458B2 (en) Image capture apparatus and image capturing method
US20020106206A1 (en) Image-capturing device
CN107533756B (en) Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
KR20060086814A (en) Method of generating transfer curves for adaptive contrast enhancement
US8280162B2 (en) Image processing apparatus and recording medium recording image processing program
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN112651906A (en) Color control implementation method and system for image processing
KR20100089301A (en) White balance adjusting apparatus and method considering effect of single tone image
CN114640836B (en) Video data mapping method, LED display controller and LED display system
US8068147B2 (en) Setting the white balance of a video frame
JP2009063674A (en) Imaging apparatus and flash control method
JP6879636B1 (en) Image processing method
JP2006180267A (en) Picture quality correcting circuit
JP2000165906A (en) Method and device for automatic white balance control
JP4359803B2 (en) Imaging apparatus and method thereof
WO2022158010A1 (en) Image processing method
CN112651907A (en) Histogram equalization implementation method and system for image processing
JP6893068B1 (en) Image processing method
JP2013115571A (en) Information processing apparatus
JPH1132201A (en) Image processing unit
CN112651905A (en) Brightness regulation and control implementation method and system for image processing

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