CN107454317B - Image processing method, image processing device, computer-readable storage medium and computer equipment - Google Patents

Image processing method, image processing device, computer-readable storage medium and computer equipment Download PDF

Info

Publication number
CN107454317B
CN107454317B CN201710625426.XA CN201710625426A CN107454317B CN 107454317 B CN107454317 B CN 107454317B CN 201710625426 A CN201710625426 A CN 201710625426A CN 107454317 B CN107454317 B CN 107454317B
Authority
CN
China
Prior art keywords
light
image
defogging
value
brightness value
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
CN201710625426.XA
Other languages
Chinese (zh)
Other versions
CN107454317A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710625426.XA priority Critical patent/CN107454317B/en
Publication of CN107454317A publication Critical patent/CN107454317A/en
Application granted granted Critical
Publication of CN107454317B publication Critical patent/CN107454317B/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
    • G06T5/73
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • 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/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • 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/10004Still image; Photographic image
    • 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

Abstract

The invention relates to an image processing method, an image processing device, a computer readable storage medium and computer equipment. The method comprises the following steps: if the mobile terminal is detected to receive the shooting instruction, detecting the current ambient light brightness value; searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value; and acquiring a defogging parameter value of the image after light supplement, and defogging the image after light supplement according to the defogging parameter value. According to the method, after the mobile terminal receives the shooting instruction, the current ambient light brightness value is detected, and the corresponding supplementary lighting brightness value is obtained according to the current ambient light brightness value for supplementary lighting, so that the picture brightness value obtained by shooting can be in a reasonable range, the problem of poor image impression caused by too dark images is avoided, and the image quality is improved.

Description

Image processing method, image processing device, computer-readable storage medium and computer equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an image processing method, an image processing apparatus, a computer-readable storage medium, and a computer device.
Background
With the development of intelligent mobile terminals, it is more and more common to adopt intelligent mobile terminals to shoot. In the shooting process of adopting the intelligent mobile terminal, the ambient light brightness can influence the imaging quality, and people with darker images are not easy to show when the ambient light brightness is low; when the ambient light brightness is high, the image is bright and is easy to cause image overexposure. In the image forming process, the environmental light brightness is reasonably controlled, and the image forming quality can be improved.
Disclosure of Invention
The embodiment of the invention provides an image processing method, an image processing device, a computer readable storage medium and computer equipment, which can improve the quality of images obtained by shooting.
An image processing method comprising:
if the mobile terminal is detected to receive the shooting instruction, detecting the current ambient light brightness value;
searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value;
and acquiring a defogging parameter value of the image after light supplement, and defogging the image after light supplement according to the defogging parameter value.
An image processing apparatus comprising:
the searching module is used for detecting the current ambient light brightness value if the mobile terminal is detected to receive the shooting instruction;
the light supplementing module is used for searching a light supplementing brightness value corresponding to the ambient light brightness value and supplementing light to the shot image according to the light supplementing brightness value;
and the defogging module is used for acquiring a defogging parameter value of the image after light supplement and performing defogging processing on the image after light supplement according to the defogging parameter value.
One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the image processing method as described above.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform an image processing method as described above.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic internal structure diagram of a mobile terminal in one embodiment;
FIG. 2 is a flow diagram of a method of image processing in one embodiment;
FIG. 3 is a flow chart of an image processing method in another embodiment;
FIG. 4 is a flowchart of an image processing method in another embodiment;
FIG. 5 is a block diagram showing the configuration of an image processing apparatus according to an embodiment;
FIG. 6 is a block diagram showing the construction of an image processing apparatus according to another embodiment;
FIG. 7 is a block diagram showing the construction of an image processing apparatus according to another embodiment;
FIG. 8 is a schematic diagram of an image processing circuit in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Take a computer device as an example of a mobile terminal. Fig. 1 is a schematic diagram of the internal structure of a mobile terminal 10 according to an embodiment. As shown in fig. 1, the mobile terminal 10 includes a processor, a non-volatile storage medium, an internal memory and network interface, a display screen, and an input device, which are connected via a system bus. The non-volatile storage medium of the mobile terminal 10 stores an operating system and computer readable instructions, among other things. The computer readable instructions, when executed by a processor, implement an image processing method. The processor is operative to provide computing and control capabilities that support the overall operation of the mobile terminal 10. Internal memory within the mobile terminal 10 provides an environment for the execution of computer-readable instructions in a non-volatile storage medium. The network interface is used for network communication with the server. The display screen of the mobile terminal 10 may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a housing of the mobile terminal 10, or an external keyboard, a touch pad or a mouse. The mobile terminal 10 may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc. Those skilled in the art will appreciate that the configuration shown in fig. 1 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the mobile terminal 10 to which the present application applies, as a particular mobile terminal 10 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
FIG. 2 is a flow diagram of a method of image processing in one embodiment. As shown in fig. 2, an image processing method includes steps 202 to 206. Wherein:
step 202, if it is detected that the mobile terminal receives a shooting instruction, detecting a current ambient light brightness value.
Specifically, when the mobile terminal receives a shooting instruction, the light sensor may be used to obtain an ambient light brightness value. The step of acquiring the ambient light brightness value by adopting the light sensor comprises the following steps: and acquiring a sensor manager service, searching for the light sensor through the sensor manager, registering and monitoring the change of the light sensor, and acquiring an ambient light brightness value through the change of the light sensor. The ambient light brightness value is in lux.
And 204, searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value.
Specifically, when the current ambient light brightness value is weak, the brightness value of the captured image may be increased by fill-in light. The method for supplementing light can comprise the following steps: the light supplement is performed through a flash lamp, the light supplement is performed through a soft light, the light supplement is performed through enhancing the screen brightness, and the like. The mobile terminal is preset with a corresponding relation table between an ambient light brightness value and a fill-in light brightness value, and after the ambient light brightness value is obtained through the light sensor, a fill-in light brightness value corresponding to the ambient light brightness value can be searched for to fill in light. The mobile terminal can control the brightness value of the flash lamp, the brightness value of the soft light and the brightness value of the screen of the mobile terminal.
And step 206, acquiring a defogging parameter value of the image after light supplement, and performing defogging processing on the image after light supplement according to the defogging parameter value.
Specifically, after the photographed image is acquired by the light supplement, the image acquired by photographing after the light supplement may be subjected to defogging processing. The defogging processing on the image comprises various algorithms, such as a dark channel prior defogging algorithm, a single image defogging algorithm and the like. Taking a single image defogging algorithm as an example, the defogging parameter values can include an atmospheric light value, a transmissivity and an air light value; taking a dark channel prior defogging algorithm as an example, the defogging parameter values comprise an atmospheric light value and a transmissivity; the defogging method for the image to be processed based on the dark channel prior algorithm comprises the following steps of:
obtaining atmospheric scattering model
I(x)=J(x)t(x)+A(1-t(x))
Where i (x) is the observed image information, j (x) is the radiation information from the target, i.e. the restored fog-free image, x represents the spatial position of a certain pixel in the image, t (x) is the transmittance, and a is the atmospheric light value at infinity. The atmospheric light value can be obtained by calculating a gray scale image of an image to be processed, and can also be obtained by the corresponding relation between the atmospheric light value and the weather condition and the current time. In a normal case, the pixel with the maximum intensity in the image may be selected as the estimation of the atmospheric light value. Assuming that a is a known value, a channel with a very low channel value exists in three channels of RGB in the image to be processed, and the channel value is close to zero, then:
the transmittance obtained from the above formula is:
Figure BDA0001362703470000042
wherein
Figure BDA0001362703470000043
Namely, the dark primary color value of the fog-containing image in the field x can be adjusted by introducing a weight omega between 0 and 1, and finally the defogging parameter, namely the transmittance expression, is obtained as follows:
Figure BDA0001362703470000044
in order to ensure the defogging effect, a threshold value t may be set for the transmittance0Then the light intensity of the scene without fog is:
Figure BDA0001362703470000045
and defogging the image to be processed according to the acquired light intensity of the static object without the fog.
According to the image processing method in the embodiment of the invention, after the mobile terminal receives the shooting instruction, the current ambient light brightness value is detected, and the corresponding light supplement brightness value is obtained according to the current ambient light brightness value for light supplement, so that the picture brightness value obtained by shooting is in a reasonable range, the problem of poor image impression caused by too dark images is avoided, and the image quality is improved.
In one embodiment, the supplementing light for the captured image according to the brightness supplementing value includes:
and 302, if it is detected that the front camera of the mobile terminal receives a shooting instruction, adjusting the screen brightness according to the light supplementing brightness value to supplement light.
And 304, if it is detected that the rear camera of the mobile terminal receives a shooting instruction, adjusting the brightness of the flash lamp according to the light supplementing brightness value to supplement light.
Specifically, when it is detected that the mobile terminal front camera is adopted for shooting, the corresponding mobile terminal screen brightness level can be obtained according to the obtained supplementary lighting brightness value, and when the mobile terminal front camera executes a shooting instruction, the mobile terminal screen brightness is instantaneously adjusted for shooting. For example, when the acquired fill-in light brightness value is 10lux to 20lux, the screen brightness of the mobile terminal is adjusted to the maximum value of the current screen brightness; when the acquired fill-in light brightness value is 21lux to 40lux, adjusting the brightness value of the screen of the mobile terminal to be twice of the maximum value of the current screen brightness; and when the acquired fill-in light brightness value is larger than 40lux, adjusting the brightness value of the screen of the mobile terminal to be three times of the maximum value of the current screen brightness.
And when the fact that the rear camera of the mobile terminal is adopted for shooting is detected, adjusting the brightness value of a flash lamp of the mobile terminal according to the acquired light supplement brightness value, and then shooting. The method comprises the steps that the luminous intensity of a flash lamp in the mobile terminal is determined by the lamp tube power of the flash lamp, when the lamp tube power of the flash lamp in the mobile terminal is fixed, the brightness of the flash lamp can be controlled by adjusting the flash time of the flash lamp, namely after a light supplement brightness value is obtained, the flash time corresponding to the light supplement brightness value can be searched, and light supplement is carried out by adjusting the flash time. For example, when the flash time is 1/1000 seconds, the flash brightness value is set to 1; then the flash light brightness value is 1/2 when the flash time is 1/2000 seconds; at a flash time of 1/4000 seconds, the flash brightness value was 1/4. When the acquired fill-in light brightness value is 10lux to 20lux, the corresponding flash light brightness value is 1/4, and the flash time of photographing is adjusted to be 1/4000 seconds; when the obtained fill-in light brightness value is 21lux (lux, illuminance generated by uniform illumination of 1 Lumen (luminusflux) on a surface of 1 square meter) to 40lux, the corresponding flash light brightness value is 1/2, and the flash light time for photographing is adjusted to 1/2000 seconds; and when the acquired fill-in light brightness value is greater than 40lux, the corresponding flash light brightness value is 1, and the flash time of photographing is adjusted to 1/1000 seconds. In an embodiment, flash lamps with different powers may be further set in the mobile terminal, a correspondence between the fill-in luminance value and the flash lamps is pre-stored in the mobile terminal, and after the obtained fill-in luminance value, the flash lamp corresponding to the fill-in luminance value may be searched for and obtained, and flash photography is performed with the flash lamp. Wherein, the flash time can be set for flash lamps with different powers to control the flash brightness.
In one embodiment, if the mobile terminal is provided with a soft light, the brightness value of the soft light can be adjusted according to the acquired fill-in brightness value, and then shooting is performed. The brightness value of the soft light can be adjusted by setting a plurality of powers of soft lights, and different fill-in brightness values correspond to the soft lights with different powers.
According to the image processing method in the embodiment of the invention, when the shooting instruction is received, the light supplementing mode is determined by detecting the camera of the mobile terminal receiving the shooting instruction. When the front camera of the mobile terminal receives a shooting instruction, the user is judged to be a self-shooting scene, the user is close to the camera of the mobile terminal, and light supplement is carried out by adjusting screen brightness, so that the quality of images obtained by shooting is higher. When the rear camera of the mobile terminal receives a shooting instruction, light is supplemented through the flash lamp, the brightness value of the image is improved, and the shot and acquired image is clearer.
In one embodiment, the image processing method further includes: and if the number of the noise points in the defogged image is larger than a first threshold value, performing filtering and noise reduction processing on the defogged image.
Specifically, when there is noise in the image, the existence of null regions on the image may result in unsmooth image, i.e., poor quality of the image when the image contains noise, and directly performing smoothing on the image may cause blurring and loss of image details. The filtering algorithm can calculate the pixel value of the null value area according to the pixel values of the pixel points around the null value area, and the null value area on the image is filled, so that the image becomes smooth, and the definition of the image is improved. Common filtering algorithms may include median filtering, bilateral filtering, low-pass filtering, gaussian filtering, and the like. The bilateral filtering is used as smooth filtering, so that the image can be subjected to smooth processing, the edge detail information of the image can be kept, and the image quality is improved. In the embodiment, after the mobile terminal acquires the defogged image, whether noise in the defogged image is larger than a first threshold value or not is detected, if so, the noise in the defogged image is judged to be larger, and filtering and noise reduction processing is performed on the defogged image; and if not, the defogged image is not processed.
According to the image processing method in the embodiment of the invention, when more noise points exist in the defogged image, the defogged image is subjected to filtering and noise reduction treatment, so that noise pollution in the image can be removed, and the image quality is improved.
In one embodiment, the defogging parameter values include an atmospheric light value and a transmittance; the defogging processing on the image after the light supplement according to the defogging parameter values comprises the following steps:
step 402, obtaining a transmittance factor of each channel of the three preset RGB channels.
And step 404, acquiring the transmittance of each channel in the three RGB channels according to the transmittance factor.
And 406, performing defogging treatment on the three RGB channels respectively according to the atmospheric light value and the transmissivity of each channel in the three RGB channels.
Specifically, the influence of fog pollution on three channels of RGB is different, and when the defogging algorithm is adopted to defogg the whole image, the fog on the G channel and the B channel in the image cannot be removedAnd completely removing. Further, the influence of the fog with the same concentration on the three channels of RGB is different, wherein the transmissivity of the R channel is the highest, the transmissivity of the B channel is the lowest, and the transmissivity of the G channel is located between the two channels; and as the fog concentration increases, the difference between the three channels RGB also increases. In this embodiment, the transmittance factor ω is preset for three channels of RGBR、ωG、ωBWherein, in the step (A),
ωR=1
ωG=(0.9+0.1*t(x))2
ωB=(0.7+0.3*t(x))2
obtaining the transmissivity t of each channel of the three channels of RGB according to a preset transmissivity factorR、tG、tB
tR=ωR*t(x)=t(x)
tG=ωG*t(x)=t(x)*(0.9+0.1*t(x))2
tB=ωB*t(x)=t(x)*(0.7+0.3*t(x))2
Wherein, t (x) is the transmittance of the image to be processed, and assuming that the atmospheric light value a of the image to be processed is a known value, according to the formula:
Figure BDA0001362703470000071
replacing t (x) in the above formula with tR、tG、tBAnd then the defogging treatment can be sequentially carried out on the RGB three channels in the image to be treated.
According to the image processing method in the embodiment of the invention, the three channels RGB of the image to be processed are subjected to defogging treatment in sequence, different defogging intensities are realized for the three channels RGB, the situation that the fogging on the channel G and the channel B cannot be completely removed due to unified defogging treatment on the image in the traditional technology is broken through, the defogging effect is better, and the defogged image quality is higher.
In an embodiment, before performing the defogging process on the image after the light supplement according to the defogging parameter value, the image processing method further includes:
(1) and acquiring a fog concentration parameter value of the image after the light supplement.
(2) And if the fog concentration parameter value is larger than a second threshold value, carrying out defogging treatment on the image after the light supplement according to the defogging parameter value.
Specifically, the relationship between the fog density of the image and the atmospheric light value and transmittance is as follows:
F(x)=A*(1-t(x))
where f (x) represents a fog concentration, and when the atmospheric light value a is a fixed known value, the fog concentration increases as the transmittance decreases, and the fog concentration decreases as the transmittance increases. After the atmospheric light value and the transmittance of each pixel point in the supplemented image are obtained, the fog concentration parameter value of each pixel point in the supplemented image can be obtained. After the fog concentration parameter value of each pixel point in the image after light supplement is obtained, the average value of the fog concentration parameter values of each pixel point of the image after light supplement can be obtained and used as the fog concentration parameter value of the image after light supplement. If the fog concentration parameter value of the image subjected to light supplement is larger than a preset second threshold value, performing defogging processing on the image subjected to light supplement according to the algorithm; and if the fog concentration parameter value of the image subjected to light supplement is not larger than a preset second threshold value, performing defogging treatment on the image subjected to light supplement.
According to the image processing method in the embodiment of the invention, the fog concentration parameter value of the image is obtained before the image is subjected to defogging processing, and if the fog concentration parameter value of the image is larger than the preset value, the image is subjected to defogging processing. That is, when the image has a high haze density, the image is subjected to the defogging process, and when the image has a low haze density, the image is not subjected to the defogging process. By comparing the fog density of the image, the image can be processed in a targeted manner, the processing speed of the image is improved, and system resources are saved.
FIG. 5 is a block diagram showing an example of the structure of an image processing apparatus. As shown in fig. 5, an image processing apparatus includes a searching module 502, a light supplementing module 504, and a defogging module 506. Wherein:
the searching module 502 is configured to detect a current ambient light brightness value if it is detected that the mobile terminal receives the shooting instruction.
And a light supplementing module 504, configured to search for a light supplementing luminance value corresponding to the ambient light luminance value, and supplement light for the captured image according to the light supplementing luminance value.
And the defogging module 506 is configured to acquire a defogging parameter value of the image after the light supplement, and perform defogging processing on the image after the light supplement according to the defogging parameter value.
In an embodiment, the light supplementing module 504 is further configured to adjust the screen brightness according to the light supplementing brightness value to supplement light if it is detected that the front camera of the mobile terminal receives a shooting instruction; and if the fact that the rear camera of the mobile terminal receives a shooting instruction is detected, adjusting the brightness of the flash lamp according to the light supplementing brightness value to supplement light.
In one embodiment, the defogging parameter values include an atmospheric light value and a transmittance; the defogging module 506 is further configured to obtain a transmittance factor of each of three preset RGB channels; acquiring the transmissivity of each channel in the three RGB channels according to the transmissivity factor; and defogging the three RGB channels according to the atmospheric light value and the transmissivity of each channel in the three RGB channels.
Fig. 6 is a block diagram showing the configuration of an image processing apparatus according to another embodiment. As shown in fig. 6, an image processing apparatus includes a lookup module 602, a fill-in module 604, a defogging module 606, and a denoising module 608. The functions of the searching module 602, the light supplementing module 604, and the defogging module 606 are the same as those of the corresponding modules in fig. 5.
And the denoising module 608 is configured to perform filtering denoising processing on the defogged image if it is detected that the number of noise points in the defogged image is greater than a first threshold.
Fig. 7 is a block diagram showing the configuration of an image processing apparatus according to another embodiment. As shown in fig. 7, an image processing apparatus includes a searching module 702, a light supplementing module 704, a defogging module 706, and an obtaining module 708. The searching module 702, the light supplementing module 704, and the defogging module 706 have the same functions as the corresponding modules in fig. 5.
An obtaining module 708, configured to obtain a fog concentration parameter value of the image after light supplement.
The defogging module 706 is further configured to perform defogging processing on the image after the light supplement according to the defogging parameter value if the fog concentration parameter value is greater than a second threshold value.
The division of the modules in the image processing apparatus is only for illustration, and in other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the image processing apparatus.
The embodiment of the invention also provides a computer readable storage medium. One or more non-transitory computer-readable storage media embodying computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of:
(1) if the mobile terminal is detected to receive the shooting instruction, detecting the current ambient light brightness value;
(2) searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value;
(3) and acquiring a defogging parameter value of the image after light supplement, and defogging the image after light supplement according to the defogging parameter value.
In one embodiment, the supplementing light for the captured image according to the brightness supplementing value includes: if the fact that a front camera of the mobile terminal receives a shooting instruction is detected, adjusting the screen brightness according to the light supplementing brightness value to supplement light; and if the fact that the rear camera of the mobile terminal receives a shooting instruction is detected, adjusting the brightness of the flash lamp according to the light supplementing brightness value to supplement light.
In one embodiment, if the number of noise points in the defogged image is detected to be larger than a first threshold value, the defogged image is subjected to filtering and noise reduction processing.
In one embodiment, the defogging parameter values include an atmospheric light value and a transmittance; the defogging processing on the image after the light supplement according to the defogging parameter values comprises the following steps:
(1) and acquiring the transmittance factor of each of the preset RGB three channels.
(2) And acquiring the transmittance of each channel in the three RGB channels according to the transmittance factor.
(3) And defogging the three RGB channels according to the atmospheric light value and the transmissivity of each channel in the three RGB channels.
In one embodiment, the image processing method further includes: acquiring a fog concentration parameter value of the image subjected to light supplement; and if the fog concentration parameter value is larger than a second threshold value, carrying out defogging treatment on the image after the light supplement according to the defogging parameter value.
The embodiment of the invention also provides computer equipment. The computer device includes therein an Image processing circuit, which may be implemented using hardware and/or software components, and may include various processing units defining an ISP (Image signal processing) pipeline. FIG. 8 is a schematic diagram of an image processing circuit in one embodiment. As shown in fig. 8, for ease of explanation, only aspects of the image processing techniques related to embodiments of the present invention are shown.
As shown in fig. 8, the image processing circuit includes an ISP processor 840 and control logic 850. Image data captured by imaging device 810 is first processed by ISP processor 840, and ISP processor 840 analyzes the image data to capture image statistics that may be used to determine and/or control one or more parameters of imaging device 810. Imaging device 810 may include a camera having one or more lenses 812 and an image sensor 814. Image sensor 814 may include an array of color filters (e.g., Bayer filters), and image sensor 814 may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 814 and provide a set of raw image data that may be processed by ISP processor 840. The sensor 820 may provide raw image data to the ISP processor 840 based on the sensor 820 interface type. The sensor 820 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
The ISP processor 840 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and ISP processor 840 may perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
ISP processor 840 may also receive pixel data from image memory 830. For example, raw pixel data is sent from the sensor 820 interface to the image memory 830, and the raw pixel data in the image memory 830 is then provided to the ISP processor 840 for processing. The image Memory 830 may be a portion of a Memory device, a storage device, or a separate dedicated Memory within an electronic device, and may include a DMA (Direct Memory Access) feature.
Upon receiving raw image data from the sensor 820 interface or from the image memory 830, the ISP processor 840 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 930 for additional processing before being displayed. ISP processor 940 may also receive processed data from image memory 930 for image data processing in the raw domain and in the RGB and YCbCr color spaces. The processed image data may be output to a display 880 for viewing by a user and/or further processing by a graphics engine or GPU (graphics processing Unit). Further, the output of ISP processor 840 may also be sent to image memory 830 and display 880 may read image data from image memory 830. In one embodiment, image memory 830 may be configured to implement one or more frame buffers. Further, the output of the ISP processor 840 may be transmitted to an encoder/decoder 870 for encoding/decoding the image data. The encoded image data may be saved and decompressed before being displayed on the display 880 device.
The image data processed by the ISP processor 840 may be sent to the defogging module 860 for defogging of the image before being displayed. The defogging module 860 may perform defogging on the image data, which may include a defogging parameter value of the image after the light supplement, according to the above-mentioned defogging parameter value. The defogging module 860 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a coprocessor, or the like in the mobile terminal. After the defogging module 860 defogges the image data, the defogged image data may be transmitted to the encoder/decoder 870 to encode/decode the image data. The encoded image data may be saved and decompressed prior to display on a display 880 device. It is understood that the image data processed by the defogging module 860 may be directly transmitted to the display 880 for display without passing through the encoder/decoder 870. The image data processed by ISP processor 840 may also be processed by encoder/decoder 870 and then processed by defogging module 860. The encoder/decoder 870 may be a CPU, GPU, coprocessor, or the like in the mobile terminal.
The statistics determined by ISP processor 840 may be sent to control logic 850 unit. For example, the statistical data may include image sensor 814 statistical information such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 812 shading correction, and the like. Control logic 850 may include a processor and/or microcontroller that executes one or more routines (e.g., firmware) that may determine control parameters of imaging device 810 and ISP processor 840 based on the received statistical data. For example, the control parameters may include sensor 820 control parameters (e.g., gain, integration time for exposure control), camera flash control parameters, lens 812 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), as well as lens 812 shading correction parameters.
The following steps are used for realizing an image processing method by using the image processing technology in fig. 8:
(1) if the mobile terminal is detected to receive the shooting instruction, detecting the current ambient light brightness value;
(2) searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value;
(3) and acquiring a defogging parameter value of the image after light supplement, and defogging the image after light supplement according to the defogging parameter value.
In one embodiment, the supplementing light for the captured image according to the brightness supplementing value includes: if the fact that a front camera of the mobile terminal receives a shooting instruction is detected, adjusting the screen brightness according to the light supplementing brightness value to supplement light; and if the fact that the rear camera of the mobile terminal receives a shooting instruction is detected, adjusting the brightness of the flash lamp according to the light supplementing brightness value to supplement light.
In one embodiment, if the number of noise points in the defogged image is detected to be larger than a first threshold value, the defogged image is subjected to filtering and noise reduction processing.
In one embodiment, the defogging parameter values include an atmospheric light value and a transmittance; the defogging processing on the image after the light supplement according to the defogging parameter values comprises the following steps:
(1) and acquiring the transmittance factor of each of the preset RGB three channels.
(2) And acquiring the transmittance of each channel in the three RGB channels according to the transmittance factor.
(3) And defogging the three RGB channels according to the atmospheric light value and the transmissivity of each channel in the three RGB channels.
In one embodiment, the image processing method further includes: acquiring a fog concentration parameter value of the image subjected to light supplement; and if the fog concentration parameter value is larger than a second threshold value, carrying out defogging treatment on the image after the light supplement according to the defogging parameter value.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. An image processing method, comprising:
if the mobile terminal is detected to receive the shooting instruction, detecting the current ambient light brightness value;
searching a light supplementing brightness value corresponding to the ambient light brightness value, and supplementing light to the shot image according to the light supplementing brightness value;
acquiring a defogging parameter value of the image subjected to light supplement;
the defogging parameter values comprise an atmospheric light value A and a transmissivity; and carrying out defogging treatment on the image subjected to light supplement according to the defogging parameter values, wherein the defogging treatment comprises the following steps:
obtaining a transmissivity factor omega of each channel in three preset RGB channelsR、ωG、ωB(ii) a Wherein the content of the first and second substances,
ωR=1
ωG=(0.9+0.1*t(x))2
ωB=(0.7+0.3*t(x))2
obtaining the transmissivity t of each channel in the three RGB channels according to the transmissivity factorR、tG、tB(ii) a Wherein t (x) is the transmittance of the image after the fill-in light,
tR=ωR*t(x)=t(x)
tG=ωG*t(x)=t(x)*(0.9+0.1*t(x))2
tB=ωB*t(x)=t(x)*(0.7+0.3*t(x))2
according to the atmospheric light value A, the following formula is shownIn which t (x) is replaced by tR、tG、tBDefogging treatment is respectively carried out on the RGB three channels,
wherein, I (x) is the image after light supplement, J (x) is the image obtained after defogging treatment, t0A threshold value set for the transmittance t (x);
and carrying out defogging treatment on the image subjected to light supplement according to the defogging parameter value.
2. The image processing method according to claim 1, characterized in that the method further comprises:
and if the mobile terminal is provided with a soft light, adjusting the brightness value of the soft light according to the acquired brightness value of the supplementary lighting to supplement lighting.
3. The image processing method according to claim 1, characterized in that the method further comprises:
and if the number of the noise points in the defogged image is larger than a first threshold value, performing filtering and noise reduction processing on the defogged image.
4. The image processing method according to claim 1, wherein the supplementing the captured image according to the brightness supplementing value comprises:
when the fact that the front camera of the mobile terminal is adopted for shooting is detected, the corresponding mobile terminal screen brightness grade is obtained according to the obtained light supplementing brightness value, and when the front camera of the mobile terminal executes a shooting instruction, the mobile terminal screen brightness is adjusted instantaneously for light supplementing;
when the fact that shooting is conducted by the aid of the rear camera of the mobile terminal is detected, the flash time corresponding to the light supplementing brightness value is searched, and light supplementing is conducted by adjusting the flash time of the flash lamp.
5. The image processing method according to claim 1, wherein before the defogging processing on the supplemented image according to the defogging parameter value, the method further comprises:
acquiring a fog concentration parameter value of the image subjected to light supplement;
and if the fog concentration parameter value is larger than a second threshold value, carrying out defogging treatment on the image after the light supplement according to the defogging parameter value.
6. An image processing apparatus characterized by comprising:
the searching module is used for detecting the current ambient light brightness value if the mobile terminal is detected to receive the shooting instruction;
the light supplementing module is used for searching a light supplementing brightness value corresponding to the ambient light brightness value and supplementing light to the shot image according to the light supplementing brightness value;
the defogging module is used for acquiring defogging parameter values of the images after light supplement; the defogging parameter values comprise an atmospheric light value A and a transmissivity; and carrying out defogging treatment on the image subjected to light supplement according to the defogging parameter values, wherein the defogging treatment comprises the following steps:
obtaining a transmissivity factor omega of each channel in three preset RGB channelsR、ωG、ωB(ii) a Wherein the content of the first and second substances,
ωR=1
ωG=(0.9+0.1*t(x))2
ωB=(0.7+0.3*t(x))2
obtaining the transmissivity t of each channel in the three RGB channels according to the transmissivity factorR、tG、tB(ii) a Wherein t (x) is the transmittance of the image after the fill-in light,
tR=ωR*t(x)=t(x)
tG=ωG*t(x)=t(x)*(0.9+0.1*t(x))2
tB=ωB*t(x)=t(x)*(0.7+0.3*t(x))2
according to the atmospheric light value A, the following formula is shownIn which t (x) is replaced by tR、tG、tBDefogging treatment is respectively carried out on the RGB three channels,
Figure FDA0002212904750000031
wherein, I (x) is the image after light supplement, J (x) is the image obtained after defogging treatment, t0A threshold value set for the transmittance t (x);
and carrying out defogging treatment on the image subjected to light supplement according to the defogging parameter value.
7. The image processing apparatus according to claim 6, characterized in that:
the supplementary lighting module is further used for adjusting the brightness value of the soft light according to the acquired supplementary lighting brightness value to carry out supplementary lighting if the mobile terminal is provided with the soft light.
8. The image processing apparatus according to claim 6, characterized in that the apparatus further comprises:
and the de-noising module is used for carrying out filtering and de-noising processing on the image after the defogging processing if the number of the noise points in the image after the defogging processing is detected to be larger than a first threshold value.
9. The image processing apparatus according to claim 6, characterized in that:
the light supplementing module is further used for acquiring a corresponding mobile terminal screen brightness grade according to the acquired light supplementing brightness value when the front camera of the mobile terminal is detected to be used for shooting, and instantly adjusting the mobile terminal screen brightness to supplement light when the front camera of the mobile terminal executes a shooting instruction; when the fact that shooting is conducted by the aid of the rear camera of the mobile terminal is detected, the flash time corresponding to the light supplementing brightness value is searched, and light supplementing is conducted by adjusting the flash time of the flash lamp.
10. The image processing apparatus according to claim 6, characterized in that the apparatus further comprises:
the acquisition module is used for acquiring a fog concentration parameter value of the image subjected to light supplement;
and the defogging module is further used for defogging the image after the light supplement according to the defogging parameter value if the fog concentration parameter value is greater than a second threshold value.
11. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the image processing method of any of claims 1 to 5.
12. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the image processing method of any of claims 1 to 5.
CN201710625426.XA 2017-07-27 2017-07-27 Image processing method, image processing device, computer-readable storage medium and computer equipment Active CN107454317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710625426.XA CN107454317B (en) 2017-07-27 2017-07-27 Image processing method, image processing device, computer-readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710625426.XA CN107454317B (en) 2017-07-27 2017-07-27 Image processing method, image processing device, computer-readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN107454317A CN107454317A (en) 2017-12-08
CN107454317B true CN107454317B (en) 2020-01-10

Family

ID=60489184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710625426.XA Active CN107454317B (en) 2017-07-27 2017-07-27 Image processing method, image processing device, computer-readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN107454317B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995437B (en) * 2017-12-22 2020-10-09 努比亚技术有限公司 Photo shooting and lighting method and mobile terminal
CN111915529A (en) * 2020-08-05 2020-11-10 广州市百果园信息技术有限公司 Video dim light enhancement method and device, mobile terminal and storage medium
CN114299067A (en) * 2022-03-04 2022-04-08 西安华创马科智能控制系统有限公司 Underground coal wall caving early warning method and device
CN116684739A (en) * 2023-06-20 2023-09-01 广东电网有限责任公司广州供电局 Image acquisition method and device for outdoor operation robot and computer equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101448164B1 (en) * 2013-04-22 2014-10-14 금오공과대학교 산학협력단 Method for Image Haze Removal Using Parameter Optimization
CN104732494A (en) * 2015-03-23 2015-06-24 无锡中科智能农业发展有限责任公司 Tissue culturing monitoring method and system based on image mist elimination
KR101689562B1 (en) * 2015-08-28 2016-12-26 한국항공대학교산학협력단 Haze removal method and device based on dual dark channel
KR101705536B1 (en) * 2015-10-08 2017-02-10 목포해양대학교 산학협력단 A fog removing method based on camera image
CN106408520B (en) * 2015-12-27 2019-05-14 华南理工大学 A kind of image defogging method of high color fidelity
CN106027916A (en) * 2016-07-18 2016-10-12 广东欧珀移动通信有限公司 Light compensation-based photographing method, and terminal

Also Published As

Publication number Publication date
CN107454317A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN107424198B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN109005364B (en) Imaging control method, imaging control device, electronic device, and computer-readable storage medium
CN108900782B (en) Exposure control method, exposure control device and electronic equipment
US20200045219A1 (en) Control method, control apparatus, imaging device, and electronic device
CN107451969B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
WO2020034737A1 (en) Imaging control method, apparatus, electronic device, and computer-readable storage medium
CN108419028B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
WO2020207262A1 (en) Image processing method and apparatus based on multiple frames of images, and electronic device
CN107454317B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
CN107395991B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN107481186B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
WO2020207261A1 (en) Image processing method and apparatus based on multiple frames of images, and electronic device
CN107317967B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107704798B (en) Image blurring method and device, computer readable storage medium and computer device
US11233948B2 (en) Exposure control method and device, and electronic device
WO2020034701A1 (en) Imaging control method and apparatus, electronic device, and readable storage medium
CN107563979B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
WO2020034702A1 (en) Control method, device, electronic equipment and computer readable storage medium
CN108833802A (en) Exposal control method, device and electronic equipment
WO2020034739A1 (en) Control method and apparatus, electronic device, and computer readable storage medium
CN108259754B (en) Image processing method and device, computer readable storage medium and computer device
CN110213462B (en) Image processing method, image processing device, electronic apparatus, image processing circuit, and storage medium
CN109191398B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
CN107341782B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
CN107464225B (en) Image processing method, image processing device, computer-readable storage medium and mobile terminal

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant