CN111970501A - Pure color scene AE color processing method and device, electronic equipment and storage medium - Google Patents
Pure color scene AE color processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111970501A CN111970501A CN202010837446.5A CN202010837446A CN111970501A CN 111970501 A CN111970501 A CN 111970501A CN 202010837446 A CN202010837446 A CN 202010837446A CN 111970501 A CN111970501 A CN 111970501A
- Authority
- CN
- China
- Prior art keywords
- image
- pure
- data
- ratio
- color
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
Abstract
The invention discloses an AE color processing method for a pure color scene, which comprises the following steps: acquiring original data of an image, and calculating RGB data and brightness values according to the original data, wherein the RGB data comprises R data, G data and B data; and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, processing according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, and otherwise, processing according to a brightness value to obtain the automatic exposure target value. According to the method and the device, whether the image is a pure color image or not is identified, and the color quantity of the pure color scene is called as the basis for processing the automatic exposure target value under the condition that the image is the pure color image, so that the brightness value applied in the prior art is replaced, and the problems of high picture brightness, color information loss and poor user experience of the pure color scene in the prior art can be effectively improved.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an AE color processing method and device for a pure color scene, electronic equipment and a storage medium.
Background
Smart cameras are one of the most widely used configurations of smart terminals today. It is the light sensing element that converts the optical signal into an electrical signal for receipt and processing by the associated processing algorithms that support its technology. The processing of the entire signal forms one stream. The signal output collected by the same camera sensing element can form different image processing effects after being processed by different processing algorithms.
Currently, a mainstream mobile phone has an integrated main control chip, and a camera image processing algorithm is built in the mobile phone, which can be roughly classified into AE (automatic exposure), AWB (automatic white balance), AF (automatic focus), sharp (definition)/noise (denoising) algorithm, and the like.
The current AE processing flow includes collecting a color image by a camera sensing element, obtaining a brightness parameter thereof, and calculating a brightness target value according to the brightness target value, and the AE algorithm is a statistical convergence calculation. The method has good coverage for most scenes, but has limitation on large-area pure-color scenes, and the brightness which is often reflected does not meet the subjective requirements of human eyes and becomes too bright or too dark. For example, the brightness value of a picture is 130, the pixel value is 245, the conventional method is to calculate the value of 130 by using an AE algorithm, and the obtained AE target value is too large, so that the brightness of the picture generated by the scene is higher than that seen by actual human eyes, color details are lost, and the user experience is reduced.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the present invention is to provide an AE color processing method for a pure color scene, which can solve the problems of large color loss of a picture and poor user experience in the prior art.
The invention also aims to provide an AE color processing device for a pure color scene, which can solve the problems of large color loss of pictures and poor user experience in the prior art.
The invention also aims to provide an electronic device, which can solve the problems of large picture color loss and poor user experience in the prior art.
The fourth objective of the present invention is to provide a storage medium, which can solve the problems of large color loss of pictures and poor user experience in the prior art.
One of the purposes of the invention is realized by adopting the following technical scheme:
the AE color processing method for the pure color scene comprises the following steps of:
acquiring original data of an image, and calculating RGB data and brightness values according to the original data, wherein the RGB data comprises R data, G data and B data;
and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, processing according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, and otherwise, processing according to a brightness value to obtain the automatic exposure target value.
Preferably, the "determining whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data" specifically includes:
and calculating a first ratio of the R data to the G data and a second ratio of the B data to the G data, and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the first ratio and the second ratio.
Preferably, when the first ratio is greater than the first threshold and the second ratio is less than the second threshold, the image is defined as a pure red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image.
Preferably, after the raw data of the image is acquired, the following steps are further performed:
dividing the image into a plurality of target areas according to a preset size, and acquiring RGB data and a brightness value corresponding to each target area;
"determine whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data, if so, process the R data corresponding to the pure red image or the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value," specifically "determine whether the target region is one of a pure red image, a pure green image, and a pure blue image according to the RGB data corresponding to each target region, and if so, process the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value of the target region.
Preferably, the predetermined size is 200 x 150.
The second purpose of the invention is realized by adopting the following technical scheme:
an AE color processing device of a pure color scene comprises the following units:
a data acquisition unit: the method comprises the steps that original data configured for obtaining an image are calculated according to the original data to obtain RGB data and brightness values, wherein the RGB data comprise R data, G data and B data;
a processing judgment unit: the system is configured to judge whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, the system is processed according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, otherwise, the system is processed into the automatic exposure target value according to a brightness value.
Preferably, the processing and determining unit specifically determines whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data:
and calculating a first ratio of the R data to the G data and a second ratio of the B data to the G data, and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the first ratio and the second ratio.
Preferably, when the first ratio is greater than the first threshold and the second ratio is less than the second threshold, the image is defined as a pure red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image.
The third purpose of the invention is realized by adopting the following technical scheme:
an electronic device having a memory, a processor, and a computer readable program stored in the memory and executable by the processor, wherein the computer readable program, when executed by the processor, implements a AE color processing method for a solid color scene according to the present invention.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a storage medium having a computer readable program stored thereon and executable by a processor, wherein the computer readable program, when executed by the processor, implements the AE color processing method for a solid color scene according to the present invention.
Compared with the prior art, the invention has the beneficial effects that:
according to the method and the device, whether the image is a pure color image or not is identified, and the color quantity of the pure color scene is called as the basis for processing the automatic exposure target value under the condition that the image is the pure color image, so that the brightness value applied in the prior art is replaced, and the problems of high picture brightness, color information loss and poor user experience of the pure color scene in the prior art can be effectively improved.
Drawings
FIG. 1 is a flow chart of the AE color processing method of the pure color scene of the invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings and the detailed description below:
example one
As shown in fig. 1, the present invention provides an AE color processing method for a pure color scene, which specifically includes the following steps:
s1: acquiring original data of an image;
s2: calculating RGB data and brightness values according to original data, wherein the RGB data comprise R data, G data and B data;
s3: and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, processing according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, and otherwise, processing according to a brightness value to obtain the automatic exposure target value.
Specifically, in step S3, the method of determining whether the image is one of a pure red image, a pure green image, and a pure blue image is to calculate a first ratio of the R data to the G data, and a second ratio of the B data to the G data, and determine whether the image is one of a pure red image, a pure green image, and a pure blue image according to the first ratio and the second ratio.
As a preferred embodiment, when the first ratio is greater than the first threshold and the second ratio is less than the second threshold, the image is defined as a pure red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image. The value of the first threshold is set to 250, for example.
As a preferred embodiment, the following steps are further included between S1 and S2: the image is divided into a plurality of target areas according to a preset size, and RGB data and a brightness value corresponding to each target area are obtained. Wherein the predetermined size is preferably 200 x 150. The unit of the preset size is the number of pixels, the unit is one,
"determine whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data, if so, process the R data corresponding to the pure red image or the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value," specifically "determine whether the target region is one of a pure red image, a pure green image, and a pure blue image according to the RGB data corresponding to each target region, and if so, process the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value of the target region.
By identifying whether the image is a pure color image or not and calling the color quantity of the pure color scene as the basis for processing the automatic exposure target value under the condition that the image is the pure color image, the method replaces the brightness value applied in the prior art, and can effectively solve the problems of high picture brightness, color information loss and poor user experience of the pure color scene in the prior art.
Example two
The embodiment provides an AE color processing device for a pure color scene, which comprises the following units:
a data acquisition unit: the method comprises the steps that original data configured for obtaining an image are calculated according to the original data to obtain RGB data and brightness values, wherein the RGB data comprise R data, G data and B data;
a processing judgment unit: the system is configured to judge whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, the system is processed according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, otherwise, the system is processed into the automatic exposure target value according to a brightness value.
In the processing and determining unit, "determining whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data" specifically includes:
and calculating a first ratio of the R data to the G data and a second ratio of the B data to the G data, and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the first ratio and the second ratio. When the first ratio is larger than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image.
EXAMPLE III
The embodiment provides an electronic device, which is provided with a memory, a processor and a computer readable program stored in the memory and executable by the processor, and is characterized in that when the computer readable program is executed by the processor, the AE color processing method for a solid color scene is realized.
Example four
The present embodiment provides a storage medium having a computer readable program stored thereon and executable by a processor, wherein the computer readable program, when executed by the processor, implements the AE color processing method for a solid color scene according to any one of the present invention.
Various other modifications and changes may be made by those skilled in the art based on the above-described technical solutions and concepts, and all such modifications and changes should fall within the scope of the claims of the present invention.
Claims (10)
1. The AE color processing method for the pure color scene is characterized by comprising the following steps of:
acquiring original data of an image, and calculating RGB data and brightness values according to the original data, wherein the RGB data comprises R data, G data and B data;
and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, processing according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, and otherwise, processing according to a brightness value to obtain the automatic exposure target value.
2. The AE color processing method for a solid color scene of claim 1, wherein the specific step of determining whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data is:
and calculating a first ratio of the R data to the G data and a second ratio of the B data to the G data, and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the first ratio and the second ratio.
3. The AE color processing method for a solid color scene of claim 2, wherein when the first ratio is greater than the first threshold and the second ratio is less than the second threshold, the image is defined as a solid red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image.
4. The AE color processing method for solid color scenes according to claim 1, characterized in that after acquiring the raw data of the image, the following steps are further performed:
dividing the image into a plurality of target areas according to a preset size, and acquiring RGB data and a brightness value corresponding to each target area;
"determine whether the image is one of a pure red image, a pure green image, and a pure blue image according to the RGB data, if so, process the R data corresponding to the pure red image or the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value," specifically "determine whether the target region is one of a pure red image, a pure green image, and a pure blue image according to the RGB data corresponding to each target region, and if so, process the G data corresponding to the pure green image or the B data corresponding to the pure blue image to obtain an automatic exposure target value of the target region.
5. The AE color processing method for a solid color scene of claim 4, wherein the predetermined size is 200 x 150.
6. An AE color processing device of a pure color scene is characterized by comprising the following units:
a data acquisition unit: the method comprises the steps that original data configured for obtaining an image are calculated according to the original data to obtain RGB data and brightness values, wherein the RGB data comprise R data, G data and B data;
a processing judgment unit: the system is configured to judge whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data, if so, the system is processed according to R data corresponding to the pure red image or G data corresponding to the pure green image or B data corresponding to the pure blue image to obtain an automatic exposure target value, otherwise, the system is processed into the automatic exposure target value according to a brightness value.
7. The AE color processing apparatus for a solid color scene according to claim 6, wherein the processing and determining unit is configured to determine whether the image is one of a pure red image, a pure green image and a pure blue image according to the RGB data by:
and calculating a first ratio of the R data to the G data and a second ratio of the B data to the G data, and judging whether the image is one of a pure red image, a pure green image and a pure blue image according to the first ratio and the second ratio.
8. The AE color processing apparatus for a solid color scene of claim 7, wherein when the first ratio is greater than the first threshold and the second ratio is less than the second threshold, the image is defined as a solid red image; when the first ratio is larger than the first threshold value and the second ratio is larger than the second threshold value, determining that the image is a pure blue image; and when the first ratio is smaller than the first threshold value and the second ratio is smaller than the second threshold value, defining the image as a pure green image.
9. An electronic device having a memory, a processor, and a computer readable program stored in the memory and executable by the processor, wherein the computer readable program, when executed by the processor, implements the AE color processing method for a solid color scene according to any one of claims 1-5.
10. A storage medium having a computer readable program stored thereon that is executable by a processor, wherein the computer readable program, when executed by the processor, implements the AE color processing method for a solid color scene according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010837446.5A CN111970501A (en) | 2020-08-19 | 2020-08-19 | Pure color scene AE color processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010837446.5A CN111970501A (en) | 2020-08-19 | 2020-08-19 | Pure color scene AE color processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111970501A true CN111970501A (en) | 2020-11-20 |
Family
ID=73388880
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010837446.5A Pending CN111970501A (en) | 2020-08-19 | 2020-08-19 | Pure color scene AE color processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111970501A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473035A (en) * | 2021-07-23 | 2021-10-01 | 北京字节跳动网络技术有限公司 | Ambient brightness determination method and device and electronic equipment |
CN114025095A (en) * | 2021-11-10 | 2022-02-08 | 维沃移动通信有限公司 | Brightness adjusting method and device and electronic equipment |
-
2020
- 2020-08-19 CN CN202010837446.5A patent/CN111970501A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473035A (en) * | 2021-07-23 | 2021-10-01 | 北京字节跳动网络技术有限公司 | Ambient brightness determination method and device and electronic equipment |
CN114025095A (en) * | 2021-11-10 | 2022-02-08 | 维沃移动通信有限公司 | Brightness adjusting method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111028189B (en) | Image processing method, device, storage medium and electronic equipment | |
CN107635102B (en) | Method and device for acquiring exposure compensation value of high-dynamic-range image | |
US10757312B2 (en) | Method for image-processing and mobile terminal using dual cameras | |
WO2019148912A1 (en) | Image processing method, apparatus, electronic device and storage medium | |
CN110766621B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN110602467B (en) | Image noise reduction method and device, storage medium and electronic equipment | |
JP6160004B2 (en) | Scene recognition method and apparatus | |
CN110022469B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN111028190A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN108616689B (en) | Portrait-based high dynamic range image acquisition method, device and equipment | |
US20170180659A1 (en) | Calibration of Defective Image Sensor Elements | |
CN108156369B (en) | Image processing method and device | |
CN110445986B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN112261292B (en) | Image acquisition method, terminal, chip and storage medium | |
CN110717871A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN111970501A (en) | Pure color scene AE color processing method and device, electronic equipment and storage medium | |
CN107682611B (en) | Focusing method and device, computer readable storage medium and electronic equipment | |
CN112788251B (en) | Image brightness processing method and device, and image processing method and device | |
CN110740266B (en) | Image frame selection method and device, storage medium and electronic equipment | |
CN107644437B (en) | Color cast detection system and method based on blocks | |
CN114998122A (en) | Low-illumination image enhancement method | |
CN109672829B (en) | Image brightness adjusting method and device, storage medium and terminal | |
CN107464225B (en) | Image processing method, image processing device, computer-readable storage medium and mobile terminal | |
CN115239578A (en) | Image processing method and device, computer readable storage medium and terminal equipment | |
CN110930340B (en) | Image processing method and device |
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 |