CN113038026B - Image processing method and electronic device - Google Patents

Image processing method and electronic device Download PDF

Info

Publication number
CN113038026B
CN113038026B CN202110225573.4A CN202110225573A CN113038026B CN 113038026 B CN113038026 B CN 113038026B CN 202110225573 A CN202110225573 A CN 202110225573A CN 113038026 B CN113038026 B CN 113038026B
Authority
CN
China
Prior art keywords
pixel
actual
exposure time
target
pixel point
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
CN202110225573.4A
Other languages
Chinese (zh)
Other versions
CN113038026A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110225573.4A priority Critical patent/CN113038026B/en
Publication of CN113038026A publication Critical patent/CN113038026A/en
Application granted granted Critical
Publication of CN113038026B publication Critical patent/CN113038026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/745Detection of flicker frequency or suppression of flicker wherein the flicker is caused by illumination, e.g. due to fluorescent tube illumination or pulsed LED illumination

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses an image processing method and electronic equipment, and belongs to the technical field of electronic equipment. Determining a target pixel value when a single pixel point is exposed with a target exposure time length by acquiring an original image acquired by an image sensor; the target exposure time is an integer number of period values of the current ambient light source, the actual exposure time of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted are determined, the compensation coefficient of the pixel point to be adjusted is determined according to the target exposure time, the target pixel value, the actual pixel value and the actual exposure time, and the original image is compensated according to the compensation coefficient. And determining a compensation coefficient through the target exposure time, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time, and compensating the original image by using the compensation coefficient, so that the obtained target image has no flicker phenomenon and the signal to noise ratio of the target image is not influenced.

Description

Image processing method and electronic device
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to an image processing method and electronic equipment.
Background
At present, photographing is ubiquitous in life and work of people, and people record life and work through images. When an ambient light source is present, the photographed image may have a problem of flickering.
In the prior art, in order to improve the flicker phenomenon occurring in an image due to an ambient light source, it is common to adjust the exposure time of an image sensor at the time of photographing to improve the phenomenon, and adjust the exposure time of the image sensor to be a multiple of the period value of the ambient light source.
However, in the prior art, at least the following problems exist that when the exposure time of the image sensor is adjusted to be a multiple of the period value of the ambient light source, the exposure time of the image sensor is limited, and when the image is generally shot, the exposure time is often increased to reduce the sensitivity, so that an image with a high signal-to-noise ratio is obtained, and if the exposure time is limited, the acquired photo cannot be ensured to have an optimal signal-to-noise ratio.
Content of the application
The embodiment of the application aims to provide an image processing method and electronic equipment, which can solve the problem that the signal-to-noise ratio of an image cannot be ensured when the flicker of the image is solved by improving the exposure time.
In order to solve the technical problems, the application is realized as follows:
In a first aspect, an embodiment of the present application provides an image processing method, including:
acquiring an original image acquired by an image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths;
determining a target pixel value when exposing the single pixel point with the target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source;
determining the actual exposure time length of a pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source;
determining a compensation coefficient of the pixel point to be adjusted according to the target exposure time, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time of the pixel point to be adjusted;
and compensating the original image according to the compensation coefficient to obtain a target image.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
the original image acquisition module is used for acquiring an original image acquired by the image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths;
The first parameter determining module is used for determining a target pixel value when a single pixel point is exposed with a target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source;
the second parameter determining module is used for determining the actual exposure time length of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source;
the compensation coefficient determining module is used for determining a compensation coefficient of the pixel point to be adjusted according to the target exposure time length, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time length of the pixel point to be adjusted;
and the compensation module is used for compensating the original image according to the compensation coefficient so as to obtain a target image.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In the embodiment of the application, an original image acquired by an image sensor is acquired, wherein the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths; determining a target pixel value when a single pixel point is exposed in a target exposure time length, wherein the target exposure time length is an integer number of period values of a current ambient light source; determining the actual exposure time length of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted, wherein the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source; determining a compensation coefficient of the pixel point to be adjusted according to the target exposure time, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time of the pixel point to be adjusted; and compensating the original image according to the compensation coefficient to obtain a target image. When the original image has a flicker phenomenon, a compensation coefficient of a pixel to be adjusted is determined according to an integer number of period values of a current ambient light source where the image sensor is located, a target pixel value when exposure is performed by taking the integer number of period values of the current ambient light source as a target exposure time, an actual pixel value of the pixel to be adjusted and the actual exposure time of the pixel to be adjusted, and the original image is compensated through the compensation coefficient, so that the obtained target image has no flicker phenomenon, and the exposure time is not required to be limited in the process, so that the signal to noise ratio of the target image is not influenced.
Drawings
Fig. 1 shows a flowchart of an image processing method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of pixel cells in an original image in an embodiment of the present application;
FIG. 3 shows a flowchart of another image processing method provided by an embodiment of the present application;
fig. 4 shows a block diagram of an image processing apparatus provided in an embodiment of the present application;
fig. 5 shows a block diagram of another image processing apparatus provided in an embodiment of the present application;
FIG. 6 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 7 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
An image processing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, a flowchart of an image processing method provided in an embodiment of the present application may specifically include the following steps:
step 101, acquiring an original image acquired by an image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths.
In the embodiment of the application, an original image is acquired through an image sensor, the image sensor comprises a plurality of pixel areas, each pixel area comprises N pixels, so that N pixels can be output at a time at a single-channel position point, the N pixels can support at least two different exposure durations in total, and N is a positive integer greater than or equal to 2. For example, each pixel area includes 4 pixels, and a single-channel position point can output 4 pixels at a time, and the 4 pixels can support 4 different exposure durations at most.
Therefore, the original image acquired by the image sensor includes a plurality of pixel units a, one pixel unit a corresponds to one pixel area in the image sensor, as shown in fig. 2, each pixel unit a includes a plurality of pixel points, and the exposure time periods corresponding to the plurality of pixel points include at least two different exposure time periods, that is, each pixel unit includes at least two pixel points having different exposure time periods.
For example, the pixel unit a includes four pixel points, which are a first pixel point P1, a second pixel point P2, a third pixel point P3, and a fourth pixel point P4, where the exposure time of the second pixel point P2 is equal to the exposure time of the third pixel point P3, and the exposure time of the first pixel point P1, the exposure time of the fourth pixel point P4, and the exposure time of the second pixel point P2 are all unequal, that is, the pixel unit a includes pixel points having 3 different exposure time periods, the exposure time of the first pixel point P1 may be set to 1/50 seconds, the exposure time of the fourth pixel point P4 may be set to 1/60 seconds, the exposure time of the second pixel point P2 and the third pixel point P3 may be set to be greater than 1/60 seconds, and less than 1/50 seconds, and of course, the specific numerical values may be set according to practical situations, and the exposure time of the second pixel point P2 and the third pixel point P3 may also be greater than 1/50 seconds or less than 1/60 seconds.
Of course, the exposure time periods of each pixel point in the pixel units may be all unequal, which is not limited in the embodiment of the present application, so long as each pixel unit can be ensured to include pixel points with at least two different exposure time periods, and the number of the pixel points in each pixel unit a may be set according to the actual situation, which is not limited in the embodiment of the present application.
Step 102, determining a target pixel value when a single pixel point is exposed with a target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source.
In the embodiment of the application, after the original image is obtained, when the stripe with alternate brightness exists in the original image or the phenomenon that brightness of the original images of two adjacent frames is inconsistent is detected, the phenomenon that the original image flickers is determined. The flicker of the original image is generally caused by the existence of an ambient light source in a scene where the image sensor is located when the original image is acquired, for example, the image sensor acquires the original image in the ambient light source, and the exposure time of at least one pixel point in a pixel unit in the original image acquired by the image sensor is different from the integral number of period values of the current ambient light source, where the reason that the flicker of the original image is generally caused is that the ambient light source has an alternating current period, which may be other factors, however, embodiments of the present invention are not limited to this.
In order to eliminate the flicker phenomenon of the original image, the actual pixel value of the pixel to be adjusted in the original image needs to be adjusted to obtain a compensation pixel value, and the compensation pixel value of the pixel to be adjusted needs to be determined according to the target exposure time length when the image sensor acquires the original image, the target pixel value exposed by the target exposure time length, the actual pixel value of the pixel to be adjusted and the actual exposure time length of the pixel to be adjusted.
Therefore, in the case that the original image has flicker, it is necessary to determine a target pixel value when the single pixel point of the image sensor is exposed with a target exposure time when the original image is acquired, where the target exposure time is an integer number of period values of the current ambient light source, and the target pixel value is a pixel value corresponding to a pixel point that does not generate a flicker phenomenon under the target exposure time. The determination of the target exposure time and the target pixel value can be used for determining the compensation coefficient of the pixel point to be adjusted later.
For example, the period value of the current ambient light source where the image sensor is located is T', and the target pixel value when the exposure is performed with the integer number of period values T0 of the current ambient light source as the exposure time length is A0.
Step 103, determining the actual exposure time length of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source.
In the embodiment of the application, when the flicker phenomenon of the original image is detected, the actual exposure time of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted are obtained.
The pixel unit comprises a plurality of pixel points, and the actual exposure time of each pixel point can be preset, so that the actual exposure time of each pixel point can be directly read; the actual pixel value of each pixel point in the pixel unit is obtained through measurement, and when the actual exposure time of the pixel point in the pixel unit is unequal to the integer number of period values of the current ambient light source, the pixel point is the pixel point to be adjusted.
For example, the pixel unit a includes four pixel points P1, P2, P3 and P4, where the actual exposure time period of the first pixel point P1 is T1, the actual exposure time periods of the second pixel point P2 and the third pixel point P3 are T2, the actual exposure time period of the fourth pixel point P4 is T3, when the actual exposure time period T1 of the first pixel point P1, and the actual exposure time periods T2 of the second pixel point P2 and the third pixel point P3 are not equal to the integer period value T0 of the current ambient light source, and when the actual exposure time period T3 of the fourth pixel point P4 is equal to the integer period value T0 of the current ambient light source, the first pixel point P1, the second pixel point P2 and the third pixel point P3 are all pixels to be adjusted, and the fourth pixel point P4 is a pixel point that does not need to be adjusted.
The adjustment object in the original image can be determined by determining the pixel point to be adjusted, and the actual exposure time length and the actual pixel value of the pixel point to be adjusted are obtained to be used for determining the compensation coefficient when the pixel point to be adjusted is compensated subsequently.
Step 104, determining a compensation coefficient of the pixel point to be adjusted according to the target exposure time, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time of the pixel point to be adjusted.
In the embodiment of the present application, when the flicker phenomenon does not exist in the original image, the ratio of the pixel values of any two pixel points in one pixel unit is equal to the ratio of the exposure durations of the two pixel points, so after the actual exposure duration of the pixel point to be adjusted, the actual pixel value of the object to be adjusted, the target exposure duration T0 and the target pixel value A0 are obtained, the compensation coefficient of the pixel point to be adjusted is calculated according to the target exposure duration T0, the target pixel value A0, the actual exposure duration of the pixel point to be adjusted and the actual pixel value of the pixel point to be adjusted, and the determination of the compensation coefficient of the pixel point to be adjusted is used for compensating the actual pixel value of the pixel point to be adjusted.
And step 105, compensating the original image according to the compensation coefficient to obtain a target image.
In the embodiment of the application, after the compensation coefficient of the pixel point to be adjusted is obtained, the actual pixel value of the pixel point to be adjusted in the original image is compensated according to the compensation coefficient, so that the flicker phenomenon in the original image is eliminated, and the brightness of the target image is uniform.
The pixel points to be adjusted can be pixel points with the same exposure time length in all pixel units, when the actual pixel values of the pixel points to be adjusted are compensated by adopting the compensation coefficient, the actual pixel values of the pixel points to be adjusted in the original image of the current frame can be compensated, the actual pixel values of the pixel points to be adjusted in the original image of each subsequent frame can also be compensated, when the original image of the current frame has flicker, after the compensation coefficient is determined, the compensation coefficient determined by the original image of the current frame can be directly adopted for the original image of each subsequent frame, and the compensation coefficient is not required to be calculated according to the original image of each subsequent frame.
In the embodiment of the application, when the flicker phenomenon exists in the original image, the compensation coefficient of the pixel to be adjusted is determined according to the integer number of period values of the current environmental light source where the image sensor is located, the target pixel value when the exposure is performed by taking the integer number of period values of the current environmental light source as the target exposure time, the actual pixel value of the pixel to be adjusted and the actual exposure time of the pixel to be adjusted, and the original image is compensated through the compensation coefficient, so that the flicker phenomenon does not exist in the obtained target image, the exposure time is not required to be limited in the process, and the signal to noise ratio of the target image is not affected.
Referring to fig. 3, a flowchart of another image processing method provided in an embodiment of the present application may specifically include the following steps:
step 301, acquiring an original image acquired by an image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths.
This step is similar to the principle of step 101 in the above embodiment, and will not be described here again.
Step 302, determining a target pixel value when the single pixel point is exposed with a target exposure time length.
In the embodiment of the application, after the original image is acquired, a target pixel value obtained when a single pixel point in the process of acquiring the original image is exposed with a target exposure time length is determined.
In an alternative embodiment of the present application, step 302 includes: substep 3021 to substep 3023.
Sub-step 3021, monitoring the variation of the actual pixel value of each pixel point in the pixel unit within the preset time period.
In this embodiment of the present application, after an original image acquired by an image sensor is acquired, an actual pixel value of each pixel point in a pixel unit in the original image is monitored, and a variation of the actual pixel value of each pixel point in a preset time period is acquired, where the variation may be a maximum variation in the variation of the actual pixel value of each pixel point in each adjacent frame image in the preset time period, or may be a difference between the maximum actual pixel value and the minimum actual pixel value in the preset time period. The determination of the variation of the actual pixel value of each pixel in the pixel unit is used for determining the pixel in the pixel unit, which causes the flicker phenomenon of the original image.
For example, when the variation of the actual pixel value of the pixel point in the preset time period is the difference between the maximum actual pixel value and the minimum actual pixel value in the preset time period, 5 frames of images are acquired in the preset time period, the actual pixel values of the first pixel point P1 in the pixel unit a in the 5 frames of images are a1, a2, a3, a4 and a5 respectively, and a1 > a2 > a3 > a4 > a5, the actual pixel values of the second pixel point P2 and the third pixel point P3 in the 5 frames of images are b1, b2, b3, b4 and b5 respectively, and b1 > b2 > b3 > b4 and c5 respectively, and the actual pixel values of the fourth pixel point P4 in the 5 frames of images are c1, c2, c3 > c4 > c5 respectively, then the variation of the actual pixel value of the first pixel point P1 in the preset time period is b1, b2 > b3, b4 and b5 respectively, and the actual pixel value of the third pixel point P3 in the preset time period is the third pixel point P1-b 4 in the preset time period is the actual pixel value of the third pixel point P1-b 5.
The preset time period may be set according to actual situations, for example, the preset time period may be set to be 10 ms, 30 ms, 60 ms, or the like, which is not limited in the embodiment of the present application.
In sub-step 3022, when there is a change amount of the actual pixel value of any one pixel point in the pixel unit that is smaller than a preset threshold value, the pixel point whose change amount is smaller than the preset threshold value is determined as the target pixel point.
In the embodiment of the present application, after the variation of the actual pixel value of each pixel point in the pixel unit is obtained, whether the variation of the actual pixel value of each pixel point is smaller than a preset threshold is determined, when the variation of the actual pixel value of a certain pixel point is smaller than the preset threshold, the pixel point is considered to have no flicker phenomenon, the pixel point is determined to be a target pixel point, and the determination of the target pixel point is used to obtain the actual exposure duration corresponding to the target pixel value. The preset threshold may be determined according to an actual situation, which is not limited in the embodiment of the present application.
For example, the change amounts of the actual pixel values of the first pixel point P1 in the pixel unit a are a1-a5, the change amounts of the actual pixel values of the second pixel point P2 and the third pixel point P3 are b1-b5, and the change amounts of the actual pixel values of the fourth pixel point P4 are c1-c5, wherein the change amounts a1-a5 of the actual pixel values of the first pixel point P1 are smaller than a preset threshold, the change amounts b1-b5 of the actual pixel values of the second pixel point P2 and the third pixel point P3 are larger than a preset threshold, and the change amounts c1-c5 of the actual pixel values of the fourth pixel point P4 are also larger than the preset threshold, and the first pixel point P1 in the pixel unit a is determined as the target pixel point.
Sub-step 3023, determining an actual exposure time length of the target pixel point as the target exposure time length, and determining an actual pixel value of the target pixel point as the target pixel value.
In the embodiment of the present application, after the target pixel point is determined, the actual exposure time of the target pixel point may be obtained, and since the actual exposure time of the pixel point is preset, the actual exposure time corresponding to the target pixel point may be read after the target pixel point is determined, and since the target pixel point does not have a flicker phenomenon under the actual exposure time, the actual exposure time of the target pixel point is determined as the target exposure time, and the actual pixel value of the target pixel point is determined as the target pixel value.
For example, if the target pixel point is the first pixel point P1 in the pixel unit a, determining the actual exposure time period T1 corresponding to the first pixel point P1 as the target exposure time period, and determining the actual pixel value A1 of the first pixel point P1 as the target pixel value, if the actual exposure time period T1 of the first pixel point P1 is 1/60 seconds, determining the target exposure time period to be 1/60 seconds, if the actual exposure time period of the first pixel point P1 is 1/50 seconds, then the target exposure time period to be 1/50 seconds
The 1/50 second and 1/60 second are the period values corresponding to the alternating current commonly used in different countries at present, so that the actual exposure time of the pixel point is set to be 1/50 second or 1/60 second, and the method is suitable for most shooting scenes.
In another alternative embodiment of the present application, step 302 includes: substep 3024 to substep 3027.
Sub-step 3024, monitoring the variation of the actual pixel value of each pixel point in the pixel unit within the preset time period.
This step is similar in principle to the above-described sub-step 3021 and will not be described again here.
And step 3025, fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time length to obtain a fitting function when the variation of the actual pixel value of each pixel point in the pixel unit is greater than or equal to the preset threshold value.
In the embodiment of the application, after the variation of the actual pixel value of each pixel point in the pixel unit is obtained, the magnitude relation between the variation of the actual pixel value of each pixel point and a preset threshold is judged, when the variation of the actual pixel value of each pixel point in the pixel unit is greater than or equal to the preset threshold, the phenomenon that each pixel point in the pixel unit flickers is indicated, at this time, the actual pixel values and the corresponding actual exposure time periods of all the pixel points in the pixel unit are obtained, and a least square method is adopted to fit all the obtained actual pixel values and the obtained actual exposure time periods to obtain a fitting function related to the actual pixel values and the actual exposure time periods.
For example, when the variation amounts A1-a5 of the actual pixel values of the first pixel point P1, the variation amounts b1-b5 of the actual pixel values of the second pixel point P2 and the third pixel point P3, and the variation amounts c1-c5 of the actual pixel values of the third pixel point P4 in the pixel unit a are all greater than the preset threshold, at this time, the actual pixel values of all the pixel points in the original image and the corresponding actual exposure time periods are obtained, for example, fitting is performed according to the actual pixel value A1 of the first pixel point P1, the actual exposure time period T1 of the first pixel point P1, the actual pixel value A2 of the second pixel point P2 and the third pixel point P3, the actual exposure time period T2 of the second pixel point P2 and the third pixel point P3, and the actual exposure time period T3 of the fourth pixel point P4, so as to obtain the fitting function.
In addition, optionally, the actual pixel values and the corresponding actual exposure durations of all the pixel points in the plurality of pixel units may also be obtained, and the obtained actual pixel values and the obtained actual exposure durations may be fitted by using a least square method to obtain a fitting function, which is not specifically limited in the embodiment of the present application.
The ambient light source is a sine signal changing at a certain frequency, when the period value of the ambient light source is T ', the ambient light source is a sine function changing at a frequency of 1/T', and the fitting function is obtained by fitting all actual pixel values and actual exposure time length Also a sine function, wherein f (T) is the intensity value of the sine function at any moment, T is the actual exposure time, ω is the angular frequency, +.>For phase angle, a' is amplitude. By fitting all the actual pixel values and the actual exposure time length to obtain a fitting function, the angular frequency omega of the fitting function can be known, and the determination of the angular frequency omega is used for subsequently determining the period value of the current environment light source where the image sensor is located.
Sub-step 3026, determining a period value of said current ambient light source according to said fitting function.
In this embodiment of the present application, after a fitting function is obtained, the value of the angular frequency ω of the fitting function may be obtained according to the fitting function, the value of the actual period T in the fitting function may be obtained according to the actual period t=2pi/ω, the actual period T is determined as the period value of the current ambient light source where the image sensor is located, and after the period value of the current ambient light source is determined, the target pixel value when no flicker phenomenon is generated may be determined according to the period value of the current ambient light source.
Sub-step 3027, determining a target pixel value when the single pixel point is exposed for the target exposure duration according to the integer number of period values of the current ambient light source and the fitting function.
In the embodiment of the present application, after the period value of the current environmental light source is obtained, an integer number of period values of the current environmental light source are substituted into the fitting function, that is, the target exposure time length is substituted into the fitting function, and the fitting function is integrated between 0 and the target exposure time length, so that a target pixel value when the target exposure time length is used for exposure can be obtained through calculation, where the target pixel value is a pixel value obtained when the target exposure time length is used for exposure, that is, the target pixel value is an area value under one complete peak of one sine wave, and therefore, the target pixel value is a pixel value without a flicker phenomenon, and the obtaining of the target pixel value is used for determining a compensation coefficient of a pixel point to be adjusted subsequently.
Step 303, determining an actual exposure time length of a pixel point to be adjusted in the pixel unit and an actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source.
This step is similar to the principle of step 103 in the above embodiment, and will not be described here again.
Step 304, calculating a first ratio of the target pixel value to the target exposure time length, and a second ratio of the actual exposure time length of the pixel point to be adjusted to the actual pixel value of the pixel point to be adjusted.
And 305, determining the product of the first ratio and the second ratio as a compensation coefficient of the pixel point to be adjusted.
In this embodiment of the present application, when the flicker phenomenon does not exist in the original image, the ratio of the pixel values of any two pixel points in one pixel unit is equal to the ratio of the exposure durations of the corresponding two pixel points, so after the target exposure duration T0, the target pixel value A0, and the actual exposure duration T1 of the pixel point P1 to be adjusted are obtained, the compensation pixel value A1 'of the pixel point P1 to be adjusted can be determined, and the following values are obtained by A0/A1' =t0/T1:
a1' = (a0×t1)/T0 formula (1)
The compensation coefficient K of the pixel point P1 to be adjusted is the ratio between the compensation pixel value A1' of the pixel point P1 to be adjusted and the actual pixel value A1 of the pixel point P1 to be adjusted, namely
K=A1'/A1 formula (2)
Substituting formula (1) into formula (2) yields:
as can be seen from the formula (3), to obtain the compensation coefficient K of the pixel point P1 to be adjusted, a first ratio of the target pixel value A0 to the target exposure time period T0 and a second ratio of the actual exposure time period T1 of the pixel point P1 to be adjusted to the actual pixel value A1 of the pixel point P1 to be adjusted are required to be obtained, and then a product of the first ratio and the second ratio is calculated, so that the compensation coefficient of the pixel point P1 to be adjusted can be obtained, and the determination of the compensation coefficient is used for determining the compensation pixel value of the pixel point P1 to be adjusted according to the compensation coefficient.
Step 306, according to the compensation coefficient, compensating the actual pixel value of the pixel point to be adjusted and the actual pixel value of the specific pixel point to obtain the target image; the pixel points to be adjusted and the specific pixel points have the same exposure time length and belong to different pixel units.
In the embodiment of the application, the original image includes a plurality of pixel units, each pixel unit includes pixel points with different exposure time lengths, and different pixel units include pixel points with the same exposure time length.
After the compensation coefficient is determined for a part of pixel units by adopting the above-mentioned determination mode of the compensation coefficient, the actual pixel value of the pixel point to be adjusted for determining the compensation coefficient can be compensated according to the compensation coefficient, and the actual pixel value of a specific pixel point in the rest pixel units in the original image can also be compensated, wherein the specific pixel point has the same exposure time as the pixel point to be adjusted and belongs to the pixel point in different pixel units.
Specifically, the compensating for the actual pixel value of the pixel to be adjusted includes: substep 3061 and substep 3062.
And step 3061, determining the product of the actual pixel value of the pixel point to be adjusted and the compensation coefficient as the compensation pixel value of the pixel point to be adjusted.
In the embodiment of the application, after the compensation coefficient of the pixel to be adjusted is obtained, calculating a product of the compensation coefficient of the pixel to be adjusted and an actual pixel value of the pixel to be adjusted, determining the product as the compensation pixel value of the pixel to be adjusted, and determining the compensation pixel value of the pixel to be adjusted is used for compensating the actual pixel value of the pixel to be adjusted.
For example, if the compensation coefficient of the pixel point P1 to be adjusted is K and the actual pixel value of the pixel point P1 to be adjusted is A1, the compensation pixel value A1' =kxa1 of the pixel point is adjusted.
And step 3062, adjusting the actual pixel value of the pixel point to be adjusted to the compensation pixel value to obtain a target image.
In the embodiment of the application, after the compensation pixel value of the pixel to be adjusted is obtained, the actual pixel value of the pixel to be adjusted is adjusted to the compensation pixel value, so that the compensation of the actual pixel value of the pixel to be adjusted in the original image is completed, and the target image is obtained.
For example, for the pixel point P1 to be adjusted, the actual pixel value A1 of the pixel point P1 to be adjusted is adjusted to the compensation pixel value A1'.
It should be noted that, the process of compensating the pixel point to be adjusted is as follows: after light enters a lens in an image sensor, the light is filtered by an infrared filter, the filtered light enters a light sensing sensor in the image sensor, the light sensing sensor converts a light signal into an electric signal, then the electric signal is converted into a digital signal by an analog-to-digital circuit, and then the digital signal is processed by an image signal processor or a digital signal processor, namely, the image processing process from step 301 to step 306 in the embodiment of the application is realized in the image signal processor or the digital signal processor, so that a target image without a flicker phenomenon is obtained.
The compensation process for other specific pixels having the same exposure time as the pixel to be adjusted can be calculated according to the above method, and this embodiment is not described herein again.
In the embodiment of the application, by detecting the variation of the actual pixel value of each pixel point in the pixel unit within a preset time period, when a pixel point with the variation of the actual pixel value smaller than a preset threshold exists in the pixel unit, determining the pixel point as a target pixel point, determining the actual exposure time of the pixel point as a target exposure time, and determining the actual pixel value of the pixel point as a target pixel value, when a pixel point with the variation of the actual pixel value smaller than the preset threshold does not exist in the pixel unit, fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time to obtain a fitting function, obtaining a target exposure time and a target pixel value according to the fitting function, and obtaining a pixel point with the same exposure time as the target exposure time in the pixel unit and a pixel point with the same exposure time as the target exposure time in the pixel unit in the absence of the two modes, so that the target exposure time and the target pixel value to be obtained can be obtained, and the target exposure time and the target pixel value to be accurately adjusted according to the target exposure time can be obtained, and the target exposure time can be accurately adjusted.
It should be noted that, in the image processing method provided in the embodiment of the present application, the execution subject may be an image processing apparatus, or, a control module in the image processing apparatus for executing the loading image processing method. In the embodiment of the present application, an image processing apparatus executes a loaded image processing method as an example, and the image processing method provided in the embodiment of the present application is described.
Referring to fig. 4, a block diagram of an image processing apparatus according to an embodiment of the present application is shown.
The image processing apparatus 400 includes:
an original image acquisition module 401, configured to acquire an original image acquired by an image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths;
a first parameter determining module 402, configured to determine a target pixel value when a single pixel point is exposed with a target exposure duration; the target exposure time length is an integer number of period values of the current ambient light source;
a second parameter determining module 403, configured to determine an actual exposure duration of a pixel to be adjusted in the pixel unit and an actual pixel value of the pixel to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source;
The compensation coefficient determining module 404 is configured to determine a compensation coefficient of the pixel to be adjusted according to the target exposure time, the target pixel value, the actual pixel value of the pixel to be adjusted, and the actual exposure time of the pixel to be adjusted;
and the compensation module 405 is configured to compensate the original image according to the compensation coefficient to obtain a target image.
Referring to fig. 5, a block diagram of another image processing apparatus according to an embodiment of the present application is shown.
Optionally, on the basis of fig. 4, the first parameter determining module 402 includes:
the variation monitoring submodule is used for monitoring the variation of the actual pixel value of each pixel point in the pixel unit in a preset time period;
a target pixel point determining submodule, configured to determine, as a target pixel point, a pixel point whose variation is smaller than a preset threshold value when the variation of an actual pixel value of any one pixel point exists in the pixel unit is smaller than the preset threshold value;
and the first parameter determination submodule is used for determining the actual exposure time length of the target pixel point as the target exposure time length and determining the actual pixel value of the target pixel point as the target pixel value.
Optionally, the first parameter determining module 402 includes:
the variation monitoring submodule monitors the variation of the actual pixel value of each pixel point in the pixel unit in a preset time period;
the fitting function obtaining sub-module is used for fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time length under the condition that the variation of the actual pixel value of each pixel point in each pixel unit is larger than or equal to a preset threshold value, so as to obtain a fitting function;
the period value determining submodule is used for determining the period value of the current ambient light source according to the fitting function;
and the target pixel value determining submodule is used for determining a target pixel value when the single pixel point is exposed with the target exposure time according to the integer number of period values of the current ambient light source and the fitting function.
Optionally, the compensation coefficient determining module 404 includes:
a ratio determining submodule 4041, configured to calculate a first ratio of the target pixel value to the target exposure duration, and a second ratio of the actual exposure duration of the pixel to be adjusted to the actual pixel value of the pixel to be adjusted;
And the compensation coefficient determining submodule 4042 is configured to determine a product of the first ratio and the second ratio as a compensation coefficient of the pixel to be adjusted.
Optionally, pixel points with the same exposure time length exist in different pixel units; the method comprises the steps of carrying out a first treatment on the surface of the The compensation module 405 includes:
the compensation submodule 4051 is configured to compensate, according to the compensation coefficient, both the actual pixel value of the pixel point to be adjusted and the actual pixel value of the specific pixel point, so as to obtain the target image; the pixel points to be adjusted and the specific pixel points have the same exposure time length and belong to different pixel units.
Compensation submodule 4051 includes
The compensation pixel value determining unit is used for determining the product of the actual pixel value of the pixel point to be adjusted and the compensation coefficient as the compensation pixel value of the pixel point to be adjusted;
and the pixel value adjusting unit is used for adjusting the actual pixel value of the pixel point to be adjusted to the compensation pixel value so as to obtain a target image.
In the embodiment of the application, when the flicker phenomenon exists in the original image, the compensation coefficient of the pixel to be adjusted is determined according to the period value of the current environmental light source where the image sensor is located, the target pixel value when the exposure is performed by taking the integer number of the period values of the current environmental light source as the target exposure time, the actual pixel value of the pixel to be adjusted and the actual exposure time of the pixel to be adjusted, and the original image is compensated through the compensation coefficient, so that the flicker phenomenon does not exist in the obtained target image, and the exposure time is not required to be limited in the process, so that the signal to noise ratio of the target image is not influenced.
The image processing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The image processing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The image processing device provided in this embodiment of the present application can implement each process implemented by the image processing device in the method embodiments of fig. 1 to 3, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 6, the embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or an instruction stored in the memory 602 and capable of running on the processor 601, where the program or the instruction implements each process of the embodiment of the image processing method when executed by the processor 601, and the process can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
It should be noted that, the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 7 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710.
Those skilled in the art will appreciate that the electronic device 700 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 710 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The electronic device structure shown in fig. 7 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
A processor 710, configured to acquire an original image acquired by the image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths; determining a target pixel value when exposing the single pixel point with the target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source; determining the actual exposure time length of a pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source; determining a compensation coefficient of the pixel point to be adjusted according to the target exposure time, the target pixel value, the actual pixel value of the pixel point to be adjusted and the actual exposure time of the pixel point to be adjusted; and compensating the original image according to the compensation coefficient to obtain a target image.
In the embodiment of the application, when the flicker phenomenon exists in the original image, the compensation coefficient of the pixel to be adjusted is determined according to the period value of the current environmental light source where the image sensor is located, the target pixel value when the exposure is performed by taking the integer number of the period values of the current environmental light source as the target exposure time, the actual pixel value of the pixel to be adjusted and the actual exposure time of the pixel to be adjusted, and the original image is compensated through the compensation coefficient, so that the flicker phenomenon does not exist in the obtained target image, and the exposure time is not required to be limited in the process, so that the signal to noise ratio of the target image is not influenced.
Optionally, the processor 710 is further configured to monitor a variation of an actual pixel value of each pixel point in the pixel unit within a preset period of time; when the variation of the actual pixel value of any pixel point in the pixel unit is smaller than a preset threshold value, determining the pixel point with the variation smaller than the preset threshold value as a target pixel point; and determining the actual exposure time length of the target pixel point as the target exposure time length, and determining the actual pixel value of the target pixel point as the target pixel value.
Optionally, the processor 710 is further configured to monitor a variation of an actual pixel value of each pixel point in the pixel unit within a preset period of time; under the condition that the variation of the actual pixel value of each pixel point in the pixel units is larger than or equal to a preset threshold value, fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time length to obtain a fitting function; determining a period value of the current ambient light source according to the fitting function; and determining a target pixel value when the exposure is carried out with the target exposure time according to the integer number of period values of the current ambient light source and the fitting function.
Optionally, the processor 710 is further configured to calculate a first ratio of the target pixel value to the target exposure duration, and a second ratio of the actual exposure duration of the pixel to be adjusted to the actual pixel value of the pixel to be adjusted; and determining the product of the first ratio and the second ratio as a compensation coefficient of the pixel point to be adjusted.
Optionally, pixel points with the same exposure time length exist in different pixel units; the processor 710 is further configured to compensate, according to the compensation coefficient, both the actual pixel value of the pixel to be adjusted and the actual pixel value of the specific pixel to obtain the target image; the pixel points to be adjusted and the specific pixel points have the same exposure time length and belong to different pixel units.
In the embodiment of the application, by detecting the variation of the actual pixel value of each pixel point in the pixel unit within a preset time period, when a pixel point with the variation of the actual pixel value smaller than a preset threshold exists in the pixel unit, determining the pixel point as a target pixel point, determining the actual exposure time of the pixel point as a target exposure time, and determining the actual pixel value of the pixel point as a target pixel value, when a pixel point with the variation of the actual pixel value smaller than the preset threshold does not exist in the pixel unit, fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time to obtain a fitting function, obtaining a target exposure time and a target pixel value according to the fitting function, and obtaining a pixel point with the same exposure time as the target exposure time in the pixel unit and a pixel point with the same exposure time as the target exposure time in the pixel unit in the absence of the two modes, so that the target exposure time and the target pixel value to be obtained can be obtained, and the target exposure time and the target pixel value to be accurately adjusted according to the target exposure time can be obtained, and the target exposure time can be accurately adjusted.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the embodiment of the image processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction, so as to implement each process of the embodiment of the image processing method, and achieve the same technical effect, so that repetition is avoided, and no redundant description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (10)

1. An image processing method, comprising:
acquiring an original image acquired by an image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths;
determining a target pixel value when exposing the single pixel point with the target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source;
determining the actual exposure time length of a pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source;
calculating a first ratio of the target pixel value to the target exposure time length and a second ratio of the actual exposure time length of the pixel point to be adjusted to the actual pixel value of the pixel point to be adjusted;
determining the product of the first ratio and the second ratio as a compensation coefficient of the pixel point to be adjusted;
determining a compensation pixel value of the pixel point to be adjusted according to the actual pixel value of the pixel point to be adjusted and the compensation coefficient;
and adjusting the actual pixel value of the pixel point to be adjusted to the compensation pixel value to obtain a target image.
2. The method of claim 1, wherein the step of determining a target pixel value for the single pixel point when exposed for a target exposure time period comprises:
monitoring the variation of the actual pixel value of each pixel point in the pixel unit within a preset time period;
when the variation of the actual pixel value of any pixel point in the pixel unit is smaller than a preset threshold value, determining the pixel point with the variation smaller than the preset threshold value as a target pixel point;
and determining the actual exposure time length of the target pixel point as the target exposure time length, and determining the actual pixel value of the target pixel point as the target pixel value.
3. The method of claim 1, wherein the step of determining a target pixel value for the single pixel point when exposed for a target exposure time period comprises:
monitoring the variation of the actual pixel value of each pixel point in the pixel unit within a preset time period;
under the condition that the variation of the actual pixel value of each pixel point in the pixel units is larger than or equal to a preset threshold value, fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time length to obtain a fitting function;
Determining a period value of the current ambient light source according to the fitting function;
and determining a target pixel value when the single pixel point is exposed with the target exposure time according to the integer number of period values of the current ambient light source and the fitting function.
4. The method of claim 1, wherein pixel points with the same exposure time length exist in different pixel units; the step of adjusting the actual pixel value of the pixel point to be adjusted to the compensation pixel value to obtain a target image, further includes:
according to the compensation coefficient, compensating the actual pixel value of the specific pixel point;
the pixel points to be adjusted and the specific pixel points have the same exposure time length and belong to different pixel units.
5. An image processing apparatus, comprising:
the original image acquisition module is used for acquiring an original image acquired by the image sensor; the original image comprises a plurality of pixel units, and each pixel unit comprises at least two pixel points with different exposure time lengths;
the first parameter determining module is used for determining a target pixel value when a single pixel point is exposed with a target exposure time length; the target exposure time length is an integer number of period values of the current ambient light source;
The second parameter determining module is used for determining the actual exposure time length of the pixel point to be adjusted in the pixel unit and the actual pixel value of the pixel point to be adjusted; the actual exposure time length of the pixel point to be adjusted is not an integer number of period values of the current ambient light source;
the compensation coefficient determining module comprises a ratio determining submodule and a compensation coefficient determining submodule, wherein the ratio determining submodule is used for calculating a first ratio of the target pixel value to the target exposure time length and a second ratio of the actual exposure time length of the pixel point to be adjusted to the actual pixel value of the pixel point to be adjusted;
the compensation coefficient determining submodule is used for determining the product of the first ratio and the second ratio as the compensation coefficient of the pixel point to be adjusted;
the compensation module is used for determining the compensation pixel value of the pixel point to be adjusted according to the actual pixel value of the pixel point to be adjusted and the compensation coefficient; and adjusting the actual pixel value of the pixel point to be adjusted to the compensation pixel value to obtain a target image.
6. The apparatus of claim 5, wherein the first parameter determination module comprises:
The variation monitoring submodule is used for monitoring the variation of the actual pixel value of each pixel point in the pixel unit in a preset time period;
a target pixel point determining submodule, configured to determine, as a target pixel point, a pixel point whose variation is smaller than a preset threshold value when the variation of an actual pixel value of any one pixel point exists in the pixel unit is smaller than the preset threshold value;
and the first parameter determination submodule is used for determining the actual exposure time length of the target pixel point as the target exposure time length and determining the actual pixel value of the target pixel point as the target pixel value.
7. The apparatus of claim 5, wherein the first parameter determination module comprises:
the variation monitoring submodule monitors the variation of the actual pixel value of each pixel point in the pixel unit in a preset time period;
the fitting function obtaining sub-module is used for fitting the actual pixel value of each pixel point in each pixel unit and the corresponding actual exposure time length under the condition that the variation of the actual pixel value of each pixel point in each pixel unit is larger than or equal to a preset threshold value, so as to obtain a fitting function;
The period value determining submodule is used for determining the period value of the current ambient light source according to the fitting function;
and the target pixel value determining submodule is used for determining a target pixel value when the single pixel point is exposed with the target exposure time according to the integer number of period values of the current ambient light source and the fitting function.
8. The apparatus of claim 5, wherein different ones of said pixel cells are present in
Pixel points with the same exposure time length; the compensation module further comprises:
the compensation sub-module is used for compensating the actual pixel values of the specific pixel points according to the compensation coefficient so as to obtain the target image;
the pixel points to be adjusted and the specific pixel points have the same exposure time length and belong to different pixel units.
9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the image processing method according to any of claims 1-4.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the image processing method according to any of claims 1-4.
CN202110225573.4A 2021-03-01 2021-03-01 Image processing method and electronic device Active CN113038026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110225573.4A CN113038026B (en) 2021-03-01 2021-03-01 Image processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110225573.4A CN113038026B (en) 2021-03-01 2021-03-01 Image processing method and electronic device

Publications (2)

Publication Number Publication Date
CN113038026A CN113038026A (en) 2021-06-25
CN113038026B true CN113038026B (en) 2023-07-25

Family

ID=76465094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110225573.4A Active CN113038026B (en) 2021-03-01 2021-03-01 Image processing method and electronic device

Country Status (1)

Country Link
CN (1) CN113038026B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781321B (en) * 2021-08-02 2024-03-12 中国科学院深圳先进技术研究院 Information compensation method, device and equipment for image highlight region and storage medium
CN114374801A (en) * 2021-12-28 2022-04-19 苏州凌云视界智能设备有限责任公司 Method, device and equipment for determining exposure time and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109788207A (en) * 2019-01-30 2019-05-21 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7777787B2 (en) * 2005-10-17 2010-08-17 Nokia Corporation Preventing flicker effects in video electronic devices
JP2013219708A (en) * 2012-04-12 2013-10-24 Sony Corp Image processing device, image processing method and program
JP2016034094A (en) * 2014-07-31 2016-03-10 ソニー株式会社 Image processing system, image processing method, program and image sensor
WO2017032335A1 (en) * 2015-08-26 2017-03-02 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
WO2019071543A1 (en) * 2017-10-12 2019-04-18 SZ DJI Technology Co., Ltd. Systems and methods for automatic detection and correction of luminance variations in images
CN111131718B (en) * 2019-07-16 2021-05-14 深圳市艾为智能有限公司 Multi-exposure image fusion method and system with LED flicker compensation function
CN111163270A (en) * 2019-12-30 2020-05-15 Oppo广东移动通信有限公司 Method for eliminating flicker, electronic device and storage medium
CN111355864B (en) * 2020-04-16 2022-06-14 浙江大华技术股份有限公司 Image flicker elimination method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109788207A (en) * 2019-01-30 2019-05-21 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN113038026A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US11089207B2 (en) Imaging processing method and apparatus for camera module in night scene, electronic device and storage medium
US8098948B1 (en) Method, apparatus, and system for reducing blurring in an image
CN113038026B (en) Image processing method and electronic device
CN105611185B (en) image generating method, device and terminal device
US20090073306A1 (en) Method, medium, and apparatus for setting exposure time
CN105578067B (en) image generating method, device and terminal device
CN112689100B (en) Image detection method, device, equipment and storage medium
US20190230269A1 (en) Monitoring camera, method of controlling monitoring camera, and non-transitory computer-readable storage medium
CN108600736B (en) Terminal light sensation calibration method and device, terminal and storage medium
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN112312035B (en) Exposure parameter adjusting method, exposure parameter adjusting device and electronic equipment
CN105450932A (en) Backlight photographing method and device
CN113163128A (en) Image exposure method and electronic device
JP2004222231A (en) Image processing apparatus and image processing program
CN112383718A (en) Image exposure method and device and electronic equipment
CN110740266B (en) Image frame selection method and device, storage medium and electronic equipment
JP2014116710A (en) Imaging apparatus, imaging condition setting method, and program
CN109788206B (en) Photometry method, photometry device, photographing apparatus, and storage medium
US10547785B2 (en) Photographing method including image registration based on reference image, shake information, and a motion vector table
CN111861908B (en) Image processing method and device
CN111473887B (en) Shell temperature acquisition method and device, storage medium and electronic equipment
CN113422893B (en) Image acquisition method and device, storage medium and mobile terminal
KR20170048454A (en) Image processing method and device
CN114430461B (en) Method, device, terminal and storage medium for realizing soft photosensitivity based on deep learning
US20080007642A1 (en) Apparatus and method of image processing, and program therefor

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