CN113099202B - Automatic white balance optimization method, equipment and computer readable storage medium - Google Patents

Automatic white balance optimization method, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113099202B
CN113099202B CN202110210020.1A CN202110210020A CN113099202B CN 113099202 B CN113099202 B CN 113099202B CN 202110210020 A CN202110210020 A CN 202110210020A CN 113099202 B CN113099202 B CN 113099202B
Authority
CN
China
Prior art keywords
image
data
white balance
preset
automatic white
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
CN202110210020.1A
Other languages
Chinese (zh)
Other versions
CN113099202A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110210020.1A priority Critical patent/CN113099202B/en
Publication of CN113099202A publication Critical patent/CN113099202A/en
Application granted granted Critical
Publication of CN113099202B publication Critical patent/CN113099202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The application discloses an automatic white balance optimization method, equipment and a computer readable storage medium, wherein the automatic white balance optimization method comprises the following steps: acquiring first coded data of a YUV color space of an image; converting the first coded data of the YUV color space into second coded data of a preset color space; dividing an image into a plurality of image blocks according to a preset size; performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors; and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images. Through the method, the image can be converted into other color spaces with better robustness, then the color recognition is carried out on the image, and the accuracy of automatic white balance processing is improved by utilizing the color recognition result.

Description

Automatic white balance optimization method, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an automatic white balance optimization method, apparatus, and computer readable storage medium.
Background
Because the human eyes have unique adaptability, the world color plan observed by people is the same under different color temperatures and illumination. However, for a video monitoring camera, because factors such as a sensor and a lens in the camera cannot keep relatively stable characteristics under certain environmental changes, the camera cannot accurately judge the color of an image under different color temperatures, so that objective objects cannot be monitored truly. The automatic white balance technology is to correct the color shift of the whole color of the image shot by the camera under the low color temperature to yellow and the whole color of the image shot under the high color temperature to blue.
The current main automatic white balance algorithm is an automatic white balance algorithm based on priori knowledge, and the automatic white balance algorithm based on priori knowledge mainly marks the statistical points falling into a white area as white points by presetting the white area, and then marks the statistical points not falling into the white area as non-white points. The color can be corrected by the color gamut mapping rule in the mode, and the algorithm has high color cast correction precision and wide application range.
However, when the monitoring camera has a large area of green in an actual application scene, for example, an outdoor monitoring area, the automatic white balance algorithm based on priori knowledge can misuse the green statistical points as white points, so that the color of the whole image is color-cast.
Disclosure of Invention
The application provides an automatic white balance optimization method, automatic white balance optimization equipment and a computer readable storage medium.
The application provides a technical scheme that is: an automatic white balance optimization method is provided, the automatic white balance optimization method includes:
acquiring first coded data of a YUV color space of an image;
converting the first coded data of the YUV color space into second coded data of a preset color space;
dividing the image into a plurality of image blocks according to a preset size;
performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors;
and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images.
In some possible embodiments, the step of identifying the plurality of image segments by using the second encoded data and marking the image segments with the preset color includes:
acquiring at least one channel data of the second encoded data;
inputting the at least one channel data into a pre-trained classifier, wherein the classifier trains the preset color in advance;
and acquiring coordinate data of the image blocks conforming to the preset color according to the output result of the classifier.
In some possible embodiments, the automatic white balance optimization method further includes:
extracting characteristic data which accords with the preset color from the image;
training the classifier using the feature data;
wherein the classifier is a Weighted-KNN classifier.
In some possible embodiments, the preset color space is an HSV color space;
the step of inputting the at least one channel data into a pre-trained classifier comprises:
extracting H channel data of second coded data of the HSV color space;
calculating the mode of H channel data of each image block;
inputting the mode corresponding to each image block into the pre-trained classifier;
and marking the color of each image block based on the output result of the pre-trained classifier.
In some possible embodiments, the step of calculating the mode of the H-channel data for each image tile includes:
acquiring H channel data of pixel points in each image block;
respectively calculating the average value and the median of the H channel data of each image block;
and calculating the mode based on the average value and the median of the H channel data of each image block, wherein the mode is as follows:
M o =ξ-3(ξ-M d )
wherein xi is an average value, M d Is the median.
In some possible embodiments, the preset color space is an HSV color space;
the step of inputting the at least one channel data into a pre-trained classifier comprises:
extracting H channel data, S channel data and V channel data of second coded data of the HSV color space;
calculating the mode of H channel data, the mode of S channel data and the mode of V channel data of each image block;
inputting the mode corresponding to each image block into the pre-trained classifier;
and marking the color of each image block based on the output result of the pre-trained classifier.
In some possible embodiments, the preset color space is an HSV color space, an RGB color space, an LAB color space, or a YCrCb color space.
In some possible embodiments, after the step of performing an automatic white balance process on the coordinate data of the marked image blocks and the image, the automatic white balance optimization method further includes:
counting the number of image blocks of the preset color;
judging whether the number of the image blocks with the preset colors is smaller than a preset number threshold value or not;
if yes, stopping iteration and completing automatic white balance processing;
if not, executing the following steps: performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors; carrying out automatic white balance processing on the marked image block coordinate data and the image;
and until the counted number of the image blocks with the preset color is larger than or equal to the preset number threshold, or the iteration number reaches the preset iteration number threshold.
The other technical scheme provided by the application is as follows: the terminal equipment comprises an acquisition module, a conversion module, a division module, an identification module and a processing module; wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquisition module is used for acquiring first coded data of a YUV color space of the image;
the conversion module is used for converting the first coded data of the YUV color space into the second coded data of the preset color space;
the dividing module is used for dividing the image into a plurality of image blocks according to a preset size;
the identification module is used for carrying out color identification on the plurality of image blocks by utilizing the second coding data and marking out the image blocks with preset colors;
and the processing module is used for carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images.
The other technical scheme provided by the application is as follows: there is provided another terminal device comprising a processor and a memory, the memory storing a computer program, the processor being adapted to execute the computer program to implement the steps of the above-described automatic white balance optimization method.
The other technical scheme adopted by the application is as follows: there is provided a computer readable storage medium storing a computer program which when executed implements the steps of the above-described automatic white balance optimization method.
In contrast to the prior art, the beneficial effects of this application lie in: the terminal equipment acquires first coded data of a YUV color space of an image; converting the first coded data of the YUV color space into second coded data of a preset color space; dividing an image into a plurality of image blocks according to a preset size; performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors; and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images. Through the method, the image can be converted into other color spaces with better robustness, then the color recognition is carried out on the image, and the accuracy of automatic white balance processing is improved by utilizing the color recognition result.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained based on these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an embodiment of an automatic white balance optimization method provided in the present application;
FIG. 2 is a schematic diagram of the image division provided herein;
FIG. 3 is a schematic diagram showing a specific flow of step S14 in the automatic white balance optimization method shown in FIG. 1;
FIG. 4 is a schematic illustration of the classified image effects provided herein;
FIG. 5 is a flow chart of another embodiment of an automatic white balance optimization method of the present application;
fig. 6 is a schematic structural diagram of an embodiment of a terminal device provided in the present application;
fig. 7 is a schematic structural diagram of another embodiment of a terminal device provided in the present application;
fig. 8 is a schematic structural diagram of an embodiment of a computer readable storage medium provided in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 specifically, fig. 1 is a schematic flow chart of an embodiment of an automatic white balance optimization method provided in the present application. The automatic white balance optimization method is applied to terminal equipment, and can be particularly terminal equipment such as a smart phone, a tablet personal computer, a notebook computer, a computer or wearable equipment, and can also be a monitoring system in a bayonet traffic system. In the description of the embodiments described below, the description of the automatic white balance optimization method is performed using the terminal device as an execution subject in a unified manner.
As shown in fig. 1, the automatic white balance optimization method of the present embodiment specifically includes the following steps:
step S11: first encoded data of a YUV color space of an image is acquired.
The terminal equipment acquires a monitoring image acquired by a monitoring camera or a monitoring image intercepted from a monitoring video, and then processes the monitoring image through ISP (Image Signal Processing, image signals) to obtain first coded data of the monitoring image in a YUV color space. The ISP processing may include processing functions such as automatic exposure control, automatic gain control, automatic white balance, color correction, and the like.
Step S12: the first coded data of the YUV color space is converted into second coded data of a preset color space.
The first encoded data processed by the ISP may have an automatic white balance that is not accurate, and the color of the whole image is deviated due to the automatic white balance that is not accurate, so that color identification is difficult to a certain extent. To solve this problem, the embodiments of the present disclosure process with a method of converting a color space. The color space of the current comparative main stream includes: HSV color space, RGB color space, LAB color space, or YCrCb color space.
The terminal device converts the second encoded data of the YUV color space into second encoded data of a preset color space, wherein the preset color space can be any color space in the main stream color space. Taking the HSV color space as an example, the H channel of the HSV color space can completely store image color information under different illumination conditions, and has better robustness for color identification. Thus, the terminal device may convert the first encoded data of the YUV color space into the second encoded data of the HSV color space.
Step S13: dividing the image into a plurality of image blocks according to a preset size.
The terminal device segments the second encoded data of the HSV color space, and divides the monitoring image into m×n blocks, referring specifically to fig. 2, fig. 2 is a schematic diagram of the image division provided in the present application. According to the embodiment of the disclosure, the image is divided into the plurality of image blocks, and then each image block is subjected to color recognition, so that the efficiency of color recognition can be effectively improved, and the operation amount can be reduced.
Step S14: and carrying out color recognition on the plurality of image blocks by using the second coding data, and marking out the image blocks with preset colors.
The terminal equipment converts the first coded data of the YUV color space into the second coded data of the HSV color space, and further obtains H-channel data, S-channel data and V-channel data of the monitoring image. The terminal device can identify the large-area green part or other large-area non-white parts of the image only by carrying out threshold value distinction on the numerical value of the H channel data. In other embodiments, the terminal device may perform data processing and color recognition on the H-channel data, the S-channel data, and the V-channel data in each image block at the same time, and the combination of the S-channel data and the V-channel data may effectively improve accuracy of color recognition.
Wherein, the embodiment of the disclosure can set the preset color as a green color.
Referring specifically to fig. 3, fig. 3 is a schematic flow chart of step S14 in the automatic white balance optimization method shown in fig. 1. As shown in fig. 3, step S14 may specifically include the following substeps:
step S141: at least one channel data of the second encoded data is acquired.
The terminal equipment acquires one or more of H channel data, S channel data and V channel data in each image block.
Step S142: at least one channel data is input into a pre-trained classifier, wherein the classifier is trained on a preset color in advance.
The terminal device may input only the H-channel data of each image block into the pre-trained classifier, and may input the H-channel data, S-channel data, and V-channel data of each image block into the pre-trained classifier.
Taking three channel data as an example of inputting the classifier at the same time, the terminal device firstly acquires the channel data of the pixel points in each image block, wherein the channel data comprises H channel data, S channel data and V channel data.
The terminal equipment calculates the mode of each channel data, and the specific calculation formula is as follows:
M o =ξ-3(ξ-M d )
where ζ is the average value of the data of each channel, M d Is the median of the individual channel data.
Thus, the terminal device can obtain the mode H of the H channel data in each image block M Mode S of S channel data M Mode V of V channel data M . Then, using H M 、S M 、V M The HSV value of each image block is represented, so that the image processing speed can be effectively improved.
The pre-trained classifier in the embodiment of the disclosure may be a Weighted-KNN classifier. Because the KNN classifier selects the estimation of K nearest neighbors to use an arithmetic average value as a prediction target, namely whether the estimated estimation is a green part or not, the error introduced by the average value is too large, and the median cannot adapt to the influence of limit data. For the Weighted-KNN classifier, the coefficient p is assumed according to prior experience, and the preset green class distance is p×zmedia+ (1-p) ×zmean, where zmean is the median of the K nearest neighbor green class distances, and zmean is the average of the K nearest neighbor green class distances.
The Weighted-KNN classifier of an embodiment of the present disclosure may be specifically trained by:
the terminal equipment acquires the monitoring image after the green image is manually marked and segmented, and then extracts characteristic data related to green color in the monitoring image. Specifically, the terminal device calculates H, S, V color histogram data Date of the monitoring image, wherein the condition of the trained monitoring image is green color with automatic white balance disabled, and then takes Date as a feature to perform feature extraction. Finally, the terminal device trains the Weighted-KNN classifier according to the histogram data Date.
Step S143: and acquiring coordinate data of the image blocks conforming to the preset color according to the output result of the classifier.
Wherein the terminal device divides each image into a mode H M 、S M 、V M And inputting the characteristic into a Weighted-KNN classifier, performing color classification by the Weighted-KNN classifier, marking out the image blocks with green colors in the monitoring image, and outputting coordinate data of the image blocks with green colors. The classified image effect can be specifically referred to as fig. 4, and fig. 4 is a classified image effect provided in the present applicationIs a schematic diagram of (a).
Step S15: and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images.
The terminal equipment returns the image blocking coordinates marked as green color to the automatic white balance, so that for outdoor scenes, the automatic white balance can eliminate the large-area green scene interference areas as white areas, and the automatic white balance method can improve the stability and accuracy of processing.
In the embodiment of the disclosure, a terminal device acquires first encoded data of a YUV color space of an image; converting the first coded data of the YUV color space into second coded data of a preset color space; dividing an image into a plurality of image blocks according to a preset size; performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors; and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images. Through the method, the image can be converted into other color spaces with better robustness, then the color recognition is carried out on the image, and the accuracy of automatic white balance processing is improved by utilizing the color recognition result.
With continued reference to fig. 5, fig. 5 is a flowchart illustrating another embodiment of the automatic white balance optimization method of the present application. Specifically, the automatic white balance optimization method of the embodiment of the present disclosure may include the steps of:
step S21: first encoded data of a YUV color space of an image is acquired.
Step S22: the first coded data of the YUV color space is converted into second coded data of a preset color space.
Step S23: dividing the image into a plurality of image blocks according to a preset size.
Step S24: and carrying out color recognition on the plurality of image blocks by using the second coding data, and marking out the image blocks with preset colors.
Step S25: and carrying out automatic white balance processing on the marked coordinate data of the image blocks and the images.
The steps S21 to S25 are the same as the steps S11 to S15 in the above embodiment, and are not described here again.
In the embodiment of the present disclosure, in order to optimize the memory resources occupied by the automatic white balance optimization method in image processing, the following optimization may be further performed for the iteration parameter T of color recognition:
step S26: and counting the number of image blocks of a preset color.
In step 24, the terminal device performs color recognition on each image block, and then counts the number of image blocks marked as green.
Step S27: and judging whether the number of the image blocks with the preset colors is smaller than a preset number threshold value or not.
Wherein the terminal device presets a number threshold M according to prior experience, and then segments the image marked as green G Comparing with the quantity threshold M, the comparison result is as follows:
when N is G When < M, the iteration parameter t=0, which indicates that the effect of the automatic white balance processing has reached the requirement, and no iteration is required for color recognition, and the process proceeds to step S28.
When N is G When the color identification is not less than M, the iteration parameter T=N, wherein the value range of N is 30-50, which indicates that the effect of the automatic white balance processing is not expected yet, the terminal equipment needs to perform iterative optimization on the color identification, namely repeatedly executing the step S24 and the subsequent steps until the number N of image blocks marked as green color is reached G Less than the number threshold M, or up to N iterations.
According to the embodiment of the disclosure, the iteration times of the optimization method are determined by presetting the iteration threshold N, so that the memory resources of the monitoring camera can be effectively saved.
Step S28: and stopping iteration and completing automatic white balance processing.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
In order to implement the automatic white balance optimization method of the foregoing embodiment, the present application further provides a terminal device, and referring specifically to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of the terminal device provided in the present application.
As shown in fig. 6, the terminal device 400 of the present embodiment includes an acquisition module 41, a conversion module 42, a division module 43, an identification module 44, and a processing module 45.
Wherein, the acquiring module 41 is configured to acquire first encoded data of a YUV color space of an image; the conversion module 42 is configured to convert the first encoded data in the YUV color space into second encoded data in a preset color space; the dividing module 43 is configured to divide the image into a plurality of image blocks according to a preset size; the identifying module 44 is configured to perform color identification on the plurality of image segments by using the second encoded data, and mark image segments with preset colors; the processing module 45 is configured to perform automatic white balance processing on the coordinate data of the marked image blocks and the image.
In order to implement the automatic white balance optimization method of the above embodiment, the present application further provides another terminal device, and specifically referring to fig. 7, fig. 7 is a schematic structural diagram of another embodiment of the terminal device provided in the present application.
As shown in fig. 7, the terminal device 500 of the present embodiment includes a processor 51, a memory 52, an input-output device 53, and a bus 54.
The processor 51, the memory 52 and the input/output device 53 are respectively connected to the bus 54, and the memory 52 stores a computer program, and the processor 51 is configured to execute the computer program to implement the automatic white balance optimization method of the above embodiment.
In the present embodiment, the processor 51 may also be referred to as a CPU (Central Processing Unit ). The processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The processor 51 may also be a GPU (Graphics Processing Unit, graphics processor), also called a display core, a vision processor, a display chip, and is a microprocessor that is specially used for image computation on a personal computer, a workstation, a game machine, and some mobile devices (such as a tablet computer, a smart phone, etc.). The GPU is used for converting and driving display information required by a computer system, providing a line scanning signal for a display, controlling the correct display of the display, and is an important element for connecting the display and a personal computer mainboard and is also one of important equipment for 'man-machine conversation'. The display card is an important component in the host computer, and is very important for people who are engaged in professional graphic design to take on the task of outputting and displaying graphics. The general purpose processor may be a microprocessor or the processor 51 may be any conventional processor or the like.
The present application also provides a computer readable storage medium 600 for storing a computer program 61, as shown in fig. 8, which computer program 61, when executed by a processor, is adapted to carry out the method as described in the embodiments of the automatic white balance optimization method of the present application.
The method referred to in the embodiments of the automatic white balance optimization method of the present application may be stored in a device, such as a computer readable storage medium, when implemented in the form of a software functional unit and sold or used as a stand alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art, or in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present invention, and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the present invention.

Claims (10)

1. An automatic white balance optimization method, characterized in that the automatic white balance optimization method comprises:
acquiring first coded data of a YUV color space of an image;
converting the first coded data of the YUV color space into second coded data of a preset color space;
dividing the image into a plurality of image blocks according to a preset size;
performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors;
carrying out automatic white balance processing on the marked image block coordinate data and the image;
the step of performing color recognition on the plurality of image blocks by using the second encoded data to mark image blocks with preset colors includes:
acquiring at least one channel data of the second encoded data;
inputting the at least one channel data into a pre-trained classifier, wherein the classifier trains the preset color in advance;
acquiring coordinate data of the image blocks conforming to the preset color according to the output result of the classifier;
the inputting the at least one lane data into a pre-trained classifier comprises:
extracting at least one channel data of the second encoded data of the preset color space;
calculating a mode of at least one channel data of each image partition;
and marking the color of each image block according to the output result of the pre-trained classifier, wherein the mode is calculated by the average value and the median of at least one channel data of each image block.
2. The method for optimizing automatic white balance according to claim 1, wherein,
the automatic white balance optimization method further comprises the following steps:
extracting characteristic data which accords with the preset color from the image;
training the classifier using the feature data;
wherein the classifier is a Weighted-KNN classifier.
3. The automatic white balance optimization method according to claim 1, wherein the preset color space is an HSV color space;
the step of inputting the at least one channel data into a pre-trained classifier comprises:
extracting H channel data of second coded data of the HSV color space;
calculating the mode of H channel data of each image block;
inputting the mode corresponding to each image block into the pre-trained classifier;
and marking the color of each image block based on the output result of the pre-trained classifier.
4. The method for optimizing automatic white balance according to claim 3, wherein,
the step of calculating the mode of the H-channel data of each image partition includes:
acquiring H channel data of pixel points in each image block;
respectively calculating the average value and the median of the H channel data of each image block;
and calculating the mode based on the average value and the median of the H channel data of each image block, wherein the mode is as follows:
Figure QLYQS_1
in the method, in the process of the invention,
Figure QLYQS_2
for average value,/->
Figure QLYQS_3
Is the median.
5. The automatic white balance optimization method according to claim 1, wherein the preset color space is an HSV color space;
the step of inputting the at least one channel data into a pre-trained classifier comprises:
extracting H channel data, S channel data and V channel data of second coded data of the HSV color space;
calculating the mode of H channel data, the mode of S channel data and the mode of V channel data of each image block;
inputting the mode corresponding to each image block into the pre-trained classifier;
and marking the color of each image block based on the output result of the pre-trained classifier.
6. The method for optimizing automatic white balance according to claim 1, wherein,
the preset color space is an HSV color space, an RGB color space, an LAB color space or a YCrCb color space.
7. The method for optimizing automatic white balance according to claim 1, wherein,
after the step of performing automatic white balance processing on the marked image block coordinate data and the image, the automatic white balance optimization method further comprises the following steps:
counting the number of image blocks of the preset color;
judging whether the number of the image blocks with the preset colors is smaller than a preset number threshold value or not;
if yes, stopping iteration and completing automatic white balance processing;
if not, executing the following steps: performing color recognition on the plurality of image blocks by using the second coding data, and marking out image blocks with preset colors; carrying out automatic white balance processing on the marked image block coordinate data and the image;
and until the counted number of the image blocks with the preset color is larger than or equal to the preset number threshold, or the iteration number reaches the preset iteration number threshold.
8. The terminal equipment is characterized by comprising an acquisition module, a conversion module, a division module, an identification module and a processing module; wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquisition module is used for acquiring first coded data of a YUV color space of the image;
the conversion module is used for converting the first coded data of the YUV color space into the second coded data of the preset color space;
the dividing module is used for dividing the image into a plurality of image blocks according to a preset size;
the identification module is used for carrying out color identification on the plurality of image blocks by utilizing the second coding data and marking out the image blocks with preset colors;
the processing module is used for carrying out automatic white balance processing on the marked image block coordinate data and the image;
the identification module is further used for acquiring at least one channel data of the second coded data; inputting the at least one channel data into a pre-trained classifier, wherein the classifier trains the preset color in advance; acquiring coordinate data of the image blocks conforming to the preset color according to the output result of the classifier;
the identification module is further used for extracting at least one channel data of the second coded data of the preset color space; calculating a mode of at least one channel data of each image partition; and marking the color of each image block according to the output result of the pre-trained classifier, wherein the mode is calculated by the average value and the median of at least one channel data of each image block.
9. A terminal device, characterized in that the terminal device comprises a processor and a memory; the memory stores a computer program, and the processor is configured to execute the computer program to implement the steps of the automatic white balance optimization method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed, implements the steps of the automatic white balance optimization method according to any one of claims 1 to 7.
CN202110210020.1A 2021-02-24 2021-02-24 Automatic white balance optimization method, equipment and computer readable storage medium Active CN113099202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110210020.1A CN113099202B (en) 2021-02-24 2021-02-24 Automatic white balance optimization method, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110210020.1A CN113099202B (en) 2021-02-24 2021-02-24 Automatic white balance optimization method, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113099202A CN113099202A (en) 2021-07-09
CN113099202B true CN113099202B (en) 2023-05-12

Family

ID=76667614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110210020.1A Active CN113099202B (en) 2021-02-24 2021-02-24 Automatic white balance optimization method, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113099202B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5041427A (en) * 1972-08-29 1975-04-15
CN103413276A (en) * 2013-08-07 2013-11-27 清华大学深圳研究生院 Depth enhancing method based on texture distribution characteristics

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7196724B2 (en) * 2000-12-08 2007-03-27 Nikon Corporation Image signal processing device, digital camera and computer program product that perform white balance adjustment using pixel outputs from extracted areas
JP4677226B2 (en) * 2004-12-17 2011-04-27 キヤノン株式会社 Image processing apparatus and method
CN101212693A (en) * 2006-12-27 2008-07-02 兆宏电子股份有限公司 White balancing method and image adjusting device
TW201738841A (en) * 2016-04-25 2017-11-01 宏碁股份有限公司 Method of dynamic adjustment to automatic white balance under hybrid light sources

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5041427A (en) * 1972-08-29 1975-04-15
KR780000541B1 (en) * 1972-08-29 1978-11-02 Rca Corp Service adjustment system for television receiver
CN103413276A (en) * 2013-08-07 2013-11-27 清华大学深圳研究生院 Depth enhancing method based on texture distribution characteristics

Also Published As

Publication number Publication date
CN113099202A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
EP3477931B1 (en) Image processing method and device, readable storage medium and electronic device
CN108765278B (en) Image processing method, mobile terminal and computer readable storage medium
CN106803257B (en) Method for segmenting disease spots in crop disease leaf image
CN106683100B (en) Image segmentation defogging method and terminal
CN109919002B (en) Yellow stop line identification method and device, computer equipment and storage medium
CN107622497B (en) Image cropping method and device, computer readable storage medium and computer equipment
CN111179302B (en) Moving target detection method and device, storage medium and terminal equipment
CN108965646B (en) Image processing apparatus, image processing method, and program
CN110599516A (en) Moving target detection method and device, storage medium and terminal equipment
CN111310727B (en) Object detection method and device, storage medium and electronic device
CN112348778A (en) Object identification method and device, terminal equipment and storage medium
CN110188640B (en) Face recognition method, face recognition device, server and computer readable medium
CN109543487B (en) Automatic induction triggering method and system based on bar code edge segmentation
CN108647605B (en) Human eye gaze point extraction method combining global color and local structural features
CN113099202B (en) Automatic white balance optimization method, equipment and computer readable storage medium
CN110910429B (en) Moving target detection method and device, storage medium and terminal equipment
CN111539975A (en) Method, device and equipment for detecting moving target and storage medium
CN111563517A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110580706A (en) Method and device for extracting video background model
CN112101148B (en) Moving object detection method and device, storage medium and terminal equipment
JP2014016676A (en) Image region division device, method, and program
CN112949423A (en) Object recognition method, object recognition device, and robot
WO2015117464A1 (en) Device and method for processing video image
CN116740577B (en) Road ponding identification method, system, terminal and storage medium
JP6044130B2 (en) Image region dividing apparatus, method, and program

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
GR01 Patent grant
GR01 Patent grant