CN113259556B - Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium - Google Patents

Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium Download PDF

Info

Publication number
CN113259556B
CN113259556B CN202110490098.3A CN202110490098A CN113259556B CN 113259556 B CN113259556 B CN 113259556B CN 202110490098 A CN202110490098 A CN 202110490098A CN 113259556 B CN113259556 B CN 113259556B
Authority
CN
China
Prior art keywords
image
screen
response
corrected
area
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
CN202110490098.3A
Other languages
Chinese (zh)
Other versions
CN113259556A (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.)
SHENZHEN CHINO-E COMMUNICATION CO LTD
Original Assignee
SHENZHEN CHINO-E COMMUNICATION 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 SHENZHEN CHINO-E COMMUNICATION CO LTD filed Critical SHENZHEN CHINO-E COMMUNICATION CO LTD
Priority to CN202110490098.3A priority Critical patent/CN113259556B/en
Publication of CN113259556A publication Critical patent/CN113259556A/en
Application granted granted Critical
Publication of CN113259556B publication Critical patent/CN113259556B/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/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0264Details of the structure or mounting of specific components for a camera module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • 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/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • 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
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention relates to the field of image processing, in particular to a method, a device, equipment and a storage medium for eliminating brightness difference and color difference in different areas, wherein a standard image with the same brightness and color temperature of a screen supplementary lighting image is shot in a standard lamp box by analyzing the brightness and color temperature of the screen supplementary lighting image, and an RAW image of the screen supplementary lighting image and an RAW image of the standard image are obtained; calculating a brightness attenuation starting point according to the RAW image of the screen supplementary lighting image to obtain a region to be corrected, and calculating each channel response of the region to be corrected; determining an image area which is the same as the area to be corrected in the standard image, calculating the response of each channel of the area, and using the response as a target response; and calculating the compensation correction ratio of each channel, and applying the compensation correction ratio to the area to be corrected pixel by pixel to finally make the brightness and color of each area of the picture consistent.

Description

Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium
Technical Field
The present invention relates to the field of image processing, and in particular, to a method, an apparatus, a device, and a storage medium for removing a luminance difference and a color difference by dividing regions.
Background
For saving cost, mobile phone manufacturers adopt screen light supplement to enable the front camera to shoot photos with good image quality in dark scenes. In the structural design, the front camera is generally positioned at the middle position above the screen at the upper left corner of the mobile phone screen, when the front camera is compensated by using the screen brightness, the sensor receives the influence of the screen brightness by the position of the camera relative to the screen, the current method adopted by the rendering module is to use the picture center as a correction starting point, determine the pixel quantity to be corrected by using the correction radius, namely the distance between the edge and the center, apply the same correction strength by using the correction strength as the correction radius of each direction of the image, apply a fixed correction strength to the area with larger original input pixel value to reach the expected output level, and use the correction strength to possibly fail to reach the expected output for the pixel with smaller original pixel value, thereby causing different areas of the same image to present different brightness and colors and seriously affecting the use feeling of a client.
Disclosure of Invention
Based on this, the present invention aims to provide a method, an apparatus, a device and a storage medium for eliminating luminance difference and color difference by regions, and the present invention only processes the regions with problems aiming at the problem that the luminance and color difference of different regions of an image still exists due to the hardware structure design after the image processing module processes the image, so that each region of the finally output image has the same luminance and color expression, and the image quality is improved.
The invention provides a method for eliminating brightness difference and color difference by regions, which comprises the following steps:
step 1: opening screen light supplement of the mobile terminal, shooting through a front camera of the mobile terminal to obtain a screen light supplement image, and converting the screen light supplement image into a first RAW image;
step 2: setting the color temperature and the brightness which are the same as those of the screen supplementary lighting image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
and step 3: obtaining a region to be corrected of the screen supplementary lighting image by calculating a brightness attenuation starting point, and calculating the response of each channel in the region to be corrected;
and 4, step 4: determining a region to be corrected which is the same as the screen supplementary lighting image in the standard image, calculating the response of each channel in the region to be corrected of the standard image, and taking the response as a target response;
and 5: calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen light supplement image and the target response;
and 6: and applying the compensation correction ratio to the area to be corrected of the screen supplementary lighting image pixel by pixel, and outputting the corrected image.
In one embodiment, the step of converting the screen fill-in image into the first RAW image comprises: and performing shading algorithm processing on the screen light supplement image, converting the screen light supplement image into a first RAW image through a dump command, and analyzing the color temperature and the exposure parameters of the screen light supplement image.
In one embodiment, a standard image is captured in the light box through a front camera of the mobile terminal, and the step of converting the standard image into the second RAW map includes: the same mobile terminal is used in a standard lamp box, a lens is covered by a soft light lens, and a standard image with the same color temperature and the same brightness as the screen supplementary lighting image is shot in a dark environment; and performing shading algorithm processing on the standard image, and converting the standard image into a second RAW image through dump commands.
In one embodiment, the method for calculating the response of each channel in the area to be corrected includes the steps of obtaining the area to be corrected of the screen fill-in light image by calculating a brightness attenuation starting point: calculating the distance between a front camera and a screen according to the positions of the front camera and the screen, calculating the output response of each row of pixels of the screen row by row from near to far, and determining the area to be corrected by judging the attenuation condition of the pixel response; wherein the output response is R, G in the first RAW map r 、G b And the response of each pixel of the B channel.
In one embodiment, based on the area to be corrected of the first RAW map, determining the area of the second RAW map, which is the same as the area to be corrected, and calculating the target response; wherein the target response is R, G in the second RAW map r 、G b And the response of each pixel of the B channel.
In one embodiment, the target response is used to calculate the correction intensity for the brightness attenuation part of the first RAW map, and the number of elements of each array in the target response is the number of pixels in the same area of the second RAW map as the area to be corrected.
In one embodiment, the step of calculating the compensation correction ratio of each channel according to the response of each channel in the region to be corrected of the screen fill-in light image and the target response includes: calculating the R, G r 、G b B channel compensation correction ratio C R 、C Gr 、C Gb 、C B And applying the compensation correction ratio to the area to be corrected pixel by pixel.
An apparatus for removing luminance and color differences in regions, the apparatus comprising:
the mobile terminal comprises an image acquisition module, a first RAW image and a second RAW image, wherein the image acquisition module is used for opening screen light supplement of the mobile terminal, acquiring a screen light supplement image through shooting of a front camera of the mobile terminal and converting the screen light supplement image into the first RAW image; setting the color temperature and the brightness which are the same as those of the screen supplementary lighting image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
the attenuation area identification module is used for obtaining an area to be corrected of the screen supplementary lighting image by calculating a brightness attenuation starting point and calculating the response of each channel in the area to be corrected;
the target response acquisition module is used for determining a region to be corrected, which is the same as the screen supplementary lighting image, in the standard image, calculating the response of each channel in the region to be corrected of the standard image, and taking the response as a target response;
the attenuation correction module is used for calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen supplementary lighting image and the target response;
and the attenuation area enhancement module is used for applying the compensation correction ratio to the area to be corrected of the screen light supplement image pixel by pixel and outputting the corrected image.
An apparatus for regionally removing luminance and color differences, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method for regionally removing luminance and color differences.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of regional elimination of luminance and color differences.
Aiming at the problem that brightness and color differences of different areas of the image caused by hardware structure design still exist after the image is processed by the image processing module, the invention only processes the areas with the problems, so that each area of the finally output image has the same brightness and color expression, and the image quality is improved.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
FIG. 1 is a flowchart illustrating a method for removing luminance difference and color difference by regions according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for removing luminance difference and color difference by regions according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for removing luminance difference and color difference by regions according to an embodiment of the present invention.
Detailed Description
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for removing a luminance difference and a color difference by regions according to an embodiment of the invention.
The invention provides a method for eliminating brightness difference and color difference by regions, which comprises the following steps:
s101: opening screen light supplement of the mobile terminal, shooting through a front camera of the mobile terminal to obtain a screen light supplement image, and converting the screen light supplement image into a first RAW image;
the mobile terminal refers to a computer device which can be used in moving, and is not limited to a mobile phone, a notebook computer and a tablet computer.
The screen light supplement means that the screen is used as a light source to brighten the surrounding environment of a shooting object at night or under the condition of weak light; the screen light supplement image is an image obtained by shooting when screen light supplement is carried out.
In one embodiment, the step of converting the screen fill-in image into the first RAW image comprises: and performing shading algorithm processing on the screen light supplement image, converting the screen light supplement image into a first RAW image through a dump command, and analyzing the color temperature and the exposure parameters of the screen light supplement image.
Inputting the screen fill-in light imagePerforming line shading algorithm processing, and obtaining an RAW image I through dump command 1 The RAW map I 1 The width is W, and the height is H; and simultaneously analyzing the exposure parameter and the AWB parameter of the screen fill-in light image, and determining the brightness and the color temperature of the screen fill-in light image.
S102: setting the color temperature and the brightness which are the same as those of the screen supplementary lighting image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
the lamp box is an image adjusting experimental apparatus which can adjust various standard color temperature light sources such as D65, D50, UV, U30, TL84 and A, H and has adjustable illumination.
The color temperature and the brightness refer to data obtained by analyzing exposure parameters and AWB parameters of the screen fill-in light image.
In one embodiment, a standard image is captured in the light box through a front camera of the mobile terminal, and the step of converting the standard image into a second RAW image includes: the same mobile terminal is used in a standard lamp box, a lens is covered by a soft light lens, and a standard image with the same color temperature and the same brightness as the screen supplementary lighting image is shot in a dark environment; and performing shading algorithm processing on the standard image, and converting the standard image into a second RAW image through a dump command.
In the shooting process, in order to eliminate the influence of other ambient light on a screen light supplement image, a soft light mirror is used to make light uniform during shooting, so that light at different angles is prevented from being scattered due to reflection of a shooting object; performing shading algorithm processing on the standard image, and obtaining an RAW image I through dump command 0
S103: obtaining a region to be corrected of the screen supplementary lighting image by calculating a brightness attenuation starting point, and calculating the response of each channel in the region to be corrected;
the brightness attenuation starting point is that the average brightness of each column of the image is calculated column by column, then the brightness difference of adjacent columns is calculated, and the column with the brightness difference larger than 10 is the brightness attenuation starting point.
The area to be corrected is an area with obvious attenuation of pixel response of the screen fill-in light image.
The response of each channel is R, G r 、G b And the response of each pixel of the B channel.
In one embodiment, the method for calculating the response of each channel in the area to be corrected includes the steps of: calculating the distance between a front camera and a screen according to the positions of the front camera and the screen, calculating the output response of each row of pixels of the screen row by row from near to far, and determining the area to be corrected by judging the attenuation condition of the pixel response; wherein the output response is R, G in the first RAW map r 、G b And the response of each pixel of the B channel.
Wherein, the RAW map I 1 Middle R, G r 、G b And the response of each pixel of the B channel is as follows:
Figure GDA0004044701900000051
Figure GDA0004044701900000053
Figure GDA0004044701900000054
Figure GDA0004044701900000055
in the formula, R 1 、G r1 、G b1 、B 1 Four response arrays containing w x h elements.
And calculating image areas needing to be corrected according to response attenuation ratios of different areas, wherein the calculation modes of the attenuation ratios are different according to different positions of the front-facing camera on a mobile phone screen.
Calculating the distance between the front camera and the screen when the front camera is positioned at the middle position above the screen, and calculating the output response of each row of pixels row by row from near to far; let the ith column pixel output response be P i The i +1 th column has an average pixel response of P i+1 By comparison of said P i And said P i+1 If P is i -P i+1 Not less than 10, and the average brightness of the continuous 10 columns from the i +1 th column is different from the output response of the pixels in the ith column by more than 10, the response attenuation of the pixels from the i +1 th column is considered to be obvious, and therefore the to-be-corrected area Block is determined a . Loading the RAW map I in a high-pass correction tool 1 The region to be corrected Block a The channel responses of (a) are:
Figure GDA0004044701900000061
Figure GDA0004044701900000062
Figure GDA0004044701900000063
/>
Figure GDA0004044701900000064
calculating the distance between the front camera and the screen in a diagonal mode when the front camera is positioned at the upper left position of the screen, calculating the output response of each row of pixels from near to far row by row, and setting the output response of the ith row of pixels as R i The i +1 th column has an average pixel response of R i+1 By comparison of said R i And said R i+1 If R is i -R i+1 ≧ 10, and the average brightness of 10 consecutive columns from the i +1 th column is different from the pixel output response of the i-th column by more than 10, then it is considered that the pixel response is faded from the i +1 th columnIs obviously subtracted, thereby determining the area Block to be corrected b . Loading the RAW map I in a high-pass correction tool 1 The region to be corrected Block b The response of each channel of (1) (assuming that the starting point coordinate of the (i + 1) th diagonal is (i +1,0) and the upper left corner of the image is the origin):
Figure GDA0004044701900000065
Figure GDA0004044701900000071
Figure GDA0004044701900000072
Figure GDA0004044701900000073
s104: determining a region to be corrected which is the same as the screen supplementary lighting image in the standard image, calculating the response of each channel in the region to be corrected of the standard image, and taking the response as a target response;
the target response is R, G r 、G b And the response of each pixel of the B channel.
In one embodiment, based on the area to be corrected of the first RAW map, determining the area of the second RAW map, which is the same as the area to be corrected, and calculating the target response; wherein the target response is R, G in the second RAW map r 、G b And the response of each pixel of the B channel.
By analyzing the region Block to be corrected a Or Block b Determining said RAW map I 0 And the region Block to be corrected a Or Block b The same region Target a Or Target b Loading the RAW map I in a high-pass correction tool 0 Is calculated at Target a Or Target b Wherein the target response is the RAW map I 0 In R 0 、G r0 、G b0 、B 0 The channel pixel response is:
Figure GDA0004044701900000074
Figure GDA0004044701900000075
Figure GDA0004044701900000076
Figure GDA0004044701900000077
in the formula, R 0 、G r0 、G b0 、B 0 Four response arrays containing w x h elements.
S105: calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen light supplement image and the target response;
the compensation correction ratio is: c R =R 0 /R 1 、C Gr =G r0 /G r1 、C Gb =G b0 /G b1 、C B =B 0 /B 1
In one embodiment, the target response is to the RAW map I 0 The luminance attenuation part of (4) calculates the correction intensity, said R, G r 、G b And the number of elements of each array in the B is the number of pixels in the area with the same absolute position.
In one embodiment, the R, G is calculated r 、G b B channel compensation correction ratio C B 、C Gr 、C Gb 、C B Applying said compensation correction pixel by pixel to said pixelAnd correcting the area.
Target in the same area a Or Target b The target of (1) to the RAW image I using screen fill-in light 1 The brightness attenuation part of (a) calculates a correction intensity to obtain the compensation correction ratio.
The region Block to be corrected a The calibration ratio of each channel of (a) is:
Figure GDA0004044701900000081
Figure GDA0004044701900000082
Figure GDA0004044701900000083
Figure GDA0004044701900000084
the region Block to be corrected b The calibration ratio of each channel of (a) is:
Figure GDA0004044701900000085
/>
Figure GDA0004044701900000091
Figure GDA0004044701900000092
Figure GDA0004044701900000093
s106: and applying the compensation correction ratio to the area to be corrected of the screen light filling image pixel by pixel, and outputting the corrected image.
The application refers to that the compensation correction ratio is used as a parameter to individually process the pixels of the area to be corrected through an algorithm
In one embodiment, the region Block to be corrected is processed a Or Block b Applying the compensation correction ratio pixel by pixel, the RAW image I 1 The part without the brightness attenuation is not operated, and finally a corrected image is obtained, so that each area of the image has the same brightness and color expression, and the image quality is improved.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a device for removing luminance difference and color difference by regions according to an embodiment of the invention.
The device can be realized by software, hardware or a combination of the two to become all or part of the equipment for eliminating the brightness difference and the color difference in the subarea. The device image acquisition module 71, target response acquisition module 72, attenuation region identification module 73, attenuation correction module 74, and attenuation region enhancement module 75.
The image obtaining module 71 opens a screen supplementary lighting of the mobile terminal, obtains a screen supplementary lighting image through the shooting of a front camera of the mobile terminal, and converts the screen supplementary lighting image into a first RAW image; setting the color temperature and the brightness which are the same as those of the screen supplementary lighting image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
the attenuation area identification module 72 is configured to obtain an area to be corrected of the screen supplementary lighting image by calculating a luminance attenuation starting point, and calculate a response of each channel in the area to be corrected;
the target response obtaining module 73 determines a region to be corrected, which is the same as the screen supplementary lighting image, in the standard image, calculates a response of each channel in the region to be corrected of the standard image, and uses the response as a target response;
the attenuation correction module 74 calculates a compensation correction ratio of each channel according to each channel response and the target response of the area to be corrected of the screen fill-in light image;
the attenuation region enhancement module 75 applies the compensation correction ratio to the region to be corrected of the screen fill-in light image pixel by pixel, and outputs the corrected image.
In the embodiment of the invention, the screen light supplement of the mobile terminal is turned on, the screen light supplement image is shot and obtained through a front camera of the mobile terminal, the screen light supplement image is subjected to rendering module processing, and the RAW image I is obtained through a dump command 1 And through analysis the luminance and the colour temperature of screen light filling image will the light source of lamp house sets up to the colour temperature the same with screen light filling image the leading camera through same mobile terminal in the lamp house obtains to have the same luminance and the colour temperature of screen light filling image the standard image, and will standard image is through the processing of shooting module, obtains through dump command and obtains RAW picture I 0 (ii) a According to RAW diagram I 1 Calculating a brightness attenuation starting point to obtain an area to be corrected of the screen fill-in light image, and calculating the response of each channel of the area to be corrected; and calculating the response of each channel in the area to be corrected of the standard image by determining the area to be corrected which is the same as the screen supplementary lighting image in the standard image, taking the response as the target response, calculating the compensation correction ratio of each channel, applying the compensation correction ratio to the area to be corrected pixel by pixel, and finally enabling the brightness and the color of each area of the picture to be consistent.
Fig. 3 is a schematic structural diagram of an apparatus for removing luminance difference and color difference by regions according to an embodiment of the present invention.
As shown in fig. 3, the apparatus 8 may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and operable on the processor 80, wherein the processor 80 executes the computer program 82 to implement the steps in the above-described method embodiments, such as the steps S101 to S106 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 71 to 75 shown.
Wherein the processor may include one or more processing cores. The processor is connected to various parts in the control device 8 by various interfaces and lines, and performs various functions of the control device 8 and processes data by operating or executing instructions, programs, code sets or instruction sets stored in the memory 81 and calling data in the memory 81, and optionally, the processor 80 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), programmable Logic Array (PLA). The processor 80 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content needing to be monitored by the touch monitoring screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 80, but may be implemented by a single chip.
The Memory 81 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 81 includes a non-transitory computer-readable medium. The memory 81 may be used to store instructions, programs, code sets or instruction sets. The memory 81 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned method embodiments, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 81 may optionally be at least one memory device located remotely from the processor 80.
The embodiment of the present invention further provides a computer storage medium, where multiple instructions may be stored in the computer storage medium, where the instructions are suitable for being loaded by a processor and for executing the method steps of the foregoing embodiment, and a specific execution process may refer to specific descriptions of the foregoing embodiment, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

Claims (9)

1. A method for eliminating brightness difference and color difference in regions is characterized by comprising the following steps:
step 1: opening screen light supplement of the mobile terminal, shooting through a front camera of the mobile terminal to obtain a screen light supplement image, and converting the screen light supplement image into a first RAW image;
step 2: setting the color temperature and the brightness which are the same as those of the screen supplementary lighting image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
and step 3: calculating the distance between a front camera and a screen according to the positions of the front camera and the screen, calculating the output response of each row of pixels of the screen row by row from near to far, and determining the screen by judging the attenuation condition of the pixel responseThe area to be corrected of the screen fill-in light image is provided, wherein the output response is R, G in the first RAW image r 、G b Response of each pixel of the B channel;
and 4, step 4: determining a region to be corrected which is the same as the screen supplementary lighting image in the standard image, calculating the response of each channel in the region to be corrected of the standard image, and taking the response as a target response, wherein the target response is R, G in the second RAW image r 、G b Response of each pixel of the B channel;
and 5: calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen light filling image and the target response;
step 6: and applying the compensation correction ratio to the area to be corrected of the screen supplementary lighting image pixel by pixel, and outputting the corrected image.
2. The method of claim 1, wherein the method for removing luminance difference and color difference comprises: the step of converting the screen fill-in image into a first RAW image includes: and performing shading algorithm processing on the screen light supplement image, converting the screen light supplement image into a first RAW image through a dump command, and analyzing the color temperature and exposure parameters of the screen light supplement image.
3. The method of claim 1, wherein the method for removing luminance difference and color difference comprises: the method comprises the following steps of shooting a standard image in the lamp box through a front camera of the mobile terminal, and converting the standard image into a second RAW image, wherein the steps comprise: the same mobile terminal is used in a standard lamp box, a lens is covered by a soft light lens, and a standard image with the same color temperature and the same brightness as the screen supplementary lighting image is shot in a dark environment; and performing shading algorithm processing on the standard image, and converting the standard image into a second RAW image through dump commands.
4. The method of claim 1, wherein the method for removing luminance difference and color difference by regions comprises: and determining the same area of the second RAW map and the area to be corrected based on the area to be corrected of the first RAW map, and calculating a target response.
5. The method of claim 4, wherein the method for removing luminance difference and color difference by regions comprises: and calculating correction intensity for the brightness attenuation part of the first RAW map by using the target response to obtain the compensation correction ratio, wherein the element number of each array in the target response is the pixel number in the same area of the second RAW map and the area to be corrected.
6. The method of claim 1, wherein the method for removing luminance difference and color difference by regions comprises: the step of calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen fill-in light image and the target response comprises the following steps: calculation R, G r 、G b Compensation correction ratio C of B channel R
Figure FDA0004044701890000021
C B And applying the compensation correction ratio to the area to be corrected pixel by pixel.
7. An apparatus for removing luminance and color differences in regions, the apparatus comprising:
the mobile terminal comprises an image acquisition module, a first RAW image and a second RAW image, wherein the image acquisition module is used for opening screen light supplement of the mobile terminal, acquiring a screen light supplement image through shooting of a front camera of the mobile terminal and converting the screen light supplement image into the first RAW image; setting the same color temperature and brightness as the screen light supplement image through a lamp box, shooting through a front camera of the mobile terminal in the lamp box to obtain a standard image, and converting the standard image into a second RAW image;
the attenuation area identification module calculates the distance between the front camera and the screen according to the positions of the front camera and the screen, calculates the output response of each row of pixels of the screen row by row from near to far, and judges the output responseDetermining a region to be corrected of the screen supplementary lighting image when the pixel response attenuation condition is broken; wherein the output response is R, G in the first RAW map r 、G b Response of each pixel of the B channel;
a target response obtaining module, configured to determine a region to be corrected, which is the same as the screen fill-in light image, in the standard image, calculate a response of each channel in the region to be corrected of the standard image, and use the response as a target response, where the target response is R, G in the second RAW image r 、G b Response of each pixel of the B channel;
the attenuation correction module is used for calculating the compensation correction ratio of each channel according to the response of each channel in the area to be corrected of the screen supplementary lighting image and the target response;
and the attenuation area enhancement module is used for applying the compensation correction ratio to the area to be corrected of the screen light supplement image pixel by pixel and outputting the corrected image.
8. An apparatus for regional elimination of luminance and color differences, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for regional elimination of luminance and color differences according to any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for regional elimination of luminance and color differences according to any one of claims 1 to 6.
CN202110490098.3A 2021-05-06 2021-05-06 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium Active CN113259556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110490098.3A CN113259556B (en) 2021-05-06 2021-05-06 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110490098.3A CN113259556B (en) 2021-05-06 2021-05-06 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium

Publications (2)

Publication Number Publication Date
CN113259556A CN113259556A (en) 2021-08-13
CN113259556B true CN113259556B (en) 2023-04-18

Family

ID=77223735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110490098.3A Active CN113259556B (en) 2021-05-06 2021-05-06 Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium

Country Status (1)

Country Link
CN (1) CN113259556B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI401973B (en) * 2009-02-13 2013-07-11 Altek Corp A Method to Improve the Color Shadow in Digital Image
JP6302555B2 (en) * 2014-07-08 2018-03-28 富士フイルム株式会社 Image processing apparatus, imaging apparatus, image processing method, and program
JP6573798B2 (en) * 2014-11-21 2019-09-11 三星電子株式会社Samsung Electronics Co.,Ltd. Image processing apparatus and image processing method
CN107846583B (en) * 2017-10-27 2020-09-01 维沃移动通信有限公司 Image shadow compensation method and mobile terminal
CN108012134B (en) * 2017-12-25 2019-08-02 Oppo广东移动通信有限公司 Image pickup method and device, computer readable storage medium and computer equipment
CN109068116B (en) * 2018-08-31 2021-01-22 青岛海信移动通信技术股份有限公司 Image processing method and device based on supplementary lighting, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN113259556A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US20200260001A1 (en) Global Tone Mapping
CN109712102B (en) Image fusion method and device and image acquisition equipment
CN108668093B (en) HDR image generation method and device
CN112118388B (en) Image processing method, image processing device, computer equipment and storage medium
US20090010538A1 (en) Apparatus and method for automatically computing gamma correction curve
CN111899182B (en) Color enhancement method and device
CN109785240B (en) Low-illumination image enhancement method and device and image processing equipment
JPWO2008050761A1 (en) Image processing method, image processing program, image processing apparatus, camera
CN113507598B (en) Video picture display method, device, terminal and storage medium
CN110660060B (en) OLED screen color mixing defect detection method, terminal equipment and computer readable medium
CN111083458B (en) Brightness correction method, system, equipment and computer readable storage medium
CN111861922A (en) Method and device for adjusting color correction matrix and storage medium
JP2009183010A (en) Imaging apparatus, white balance processing method of imaging apparatus, program, and recording medium
US20150071534A1 (en) System, Device and Method for Displaying a Harmonized Combined Image
WO2019104047A1 (en) Global tone mapping
WO2010089836A1 (en) Image processing device
CN113259556B (en) Method, device and equipment for eliminating brightness difference and color difference in different areas and storage medium
JP2010177917A (en) White balance adjusting device, white balance adjusting method, and white balance adjusting program
CN114930381A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110996015A (en) Spatial multiple exposure
JP7309415B2 (en) Image processing device, image processing method and program
CN110876042B (en) Circuit for controlling image capture device and related control method
CN110599551A (en) Image processing apparatus, image processing method, and storage medium
EP1345412A2 (en) Method and apparatus for composing flat lighting and correcting for lighting non-uniformity
CN114078426B (en) Method for eliminating influence of camera curve on lamp point image and display screen correction method

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