CN115842961A - Image adjusting method and device, electronic equipment and computer readable storage medium - Google Patents

Image adjusting method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN115842961A
CN115842961A CN202210262039.5A CN202210262039A CN115842961A CN 115842961 A CN115842961 A CN 115842961A CN 202210262039 A CN202210262039 A CN 202210262039A CN 115842961 A CN115842961 A CN 115842961A
Authority
CN
China
Prior art keywords
pixel
value
black level
pixel point
adjusted
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.)
Granted
Application number
CN202210262039.5A
Other languages
Chinese (zh)
Other versions
CN115842961B (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.)
Beijing Aixin Technology Co ltd
Original Assignee
Beijing Aixin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aixin Technology Co ltd filed Critical Beijing Aixin Technology Co ltd
Priority to CN202210262039.5A priority Critical patent/CN115842961B/en
Publication of CN115842961A publication Critical patent/CN115842961A/en
Application granted granted Critical
Publication of CN115842961B publication Critical patent/CN115842961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Abstract

The application provides an image adjusting method and device, electronic equipment and a computer readable storage medium, wherein the method comprises the steps of obtaining image data to be adjusted and a black level initial correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the black level initial correction value is a black level value output by an image sensor for collecting the image data to be adjusted; determining an initial adjustment pixel value of each pixel point according to the original pixel value and the black level initial correction value of each pixel point; acquiring a black level dynamic correction value; and adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image, thereby accurately correcting the black level.

Description

Image adjusting method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image adjustment method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The Black Level Correction (BLC) is an important link in image signal processing, and the Black Level is generated because there is a dark current in an image sensor itself, so that there is a certain output voltage even when there is no light irradiation, and the Black Level is generated to cause the output pixel value to be interfered, and finally the color of the image is abnormal.
In the traditional black level correction method, a fixed black level value is subtracted from each channel on the basis of effective pixels output by an image sensor, the fixed black level value is generally a recommended value given by an image sensor manufacturer, but in the actual working process, due to the influence of environmental factors of the image sensor, the black level often drifts, so that the black level correction is inaccurate, and the image color is abnormal.
Disclosure of Invention
An object of the embodiments of the present application is to provide an image adjusting method and apparatus, an electronic device, and a computer-readable storage medium, which are used to solve the problem of inaccurate correction caused by black level drift under the influence of environmental factors of an image sensor.
In a first aspect, the present invention provides an image adjusting method, including: acquiring image data to be adjusted and a black level initial correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the initial black level correction value is a black level value output by an image sensor for collecting the image data to be adjusted; determining an initial adjustment pixel value of each pixel point according to the original pixel value and the black level initial correction value of each pixel point; acquiring a black level dynamic correction value; and adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image.
According to the image adjusting method, after the initial adjusting pixel value of each pixel point is determined according to the original pixel value and the black level initial correction value of each pixel point, the black level dynamic correction value caused by the influence of the shooting parameters of the image sensor and/or the photosensitive condition of the image sensor is also obtained, so that the pixel value of each pixel point is adjusted based on the initial adjusting pixel value and the black level dynamic correction value of each pixel point, and the adjusted image is obtained.
In an alternative embodiment of the first aspect, the obtaining of the black level dynamic correction value includes: acquiring shooting condition parameters of image data to be adjusted; wherein the shooting condition parameters comprise the temperature and/or the exposure time of the image sensor; acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters; the correction data comprises a first black level dynamic correction value corresponding to each pixel point in a plurality of pixel points; adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image, comprising: and adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point to obtain an adjusted image.
In an optional implementation manner of the first aspect, acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters includes: judging whether the correction data corresponding to the shooting condition parameters are found in the correction table or not; wherein the correction table includes a plurality of correction data corresponding to the plurality of shooting condition parameters; and if the pixel values are found, acquiring a first black level dynamic correction value corresponding to each pixel point in the found correction data.
In an optional implementation manner of the first aspect, after determining whether the correction data corresponding to the shooting condition parameter is found in the correction table, the method further includes: if the correction data corresponding to the shooting condition parameters are not found, acquiring two groups of adjacent correction data of the shooting condition parameters in the correction table; and generating correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data to obtain a first black level dynamic correction value corresponding to each pixel point in the generated correction data.
In an optional implementation manner of the first aspect, adjusting a pixel value of each pixel point according to an initial adjustment pixel value of each pixel point and a first black level dynamic correction value corresponding to each pixel point to obtain an adjusted image includes: and subtracting the first black level dynamic correction value of the corresponding pixel point from the initial adjustment pixel value of each pixel point to obtain an adjusted image.
In the above embodiment, on the basis of the initial adjustment of the black level, the scheme corrects the first black level dynamic correction value only caused by the shooting condition parameters, so that the image shot by the image sensor is not affected by the black level caused by the shooting condition parameters, such as the temperature of the image sensor and/or the exposure time, the calibration accuracy of the black level is improved, and the color accuracy of the image is improved.
In an optional implementation manner of the first aspect, adjusting a pixel value of each pixel point according to an initial adjustment pixel value of each pixel point and a first black level dynamic correction value corresponding to each pixel point to obtain an adjusted image includes: subtracting the first black level dynamic correction value of the corresponding pixel point from the initial adjustment pixel value of each pixel point to obtain a secondary adjustment pixel value of each pixel point so as to obtain secondary adjustment image data; acquiring a second black level dynamic correction value; the second black level dynamic correction value is a pixel average value of a preset area of the secondary adjustment image data, and the preset area is a black area of the image sensor which does not see light; and adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In an optional implementation manner of the first aspect, adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjusted pixel value of each pixel point to obtain an adjusted image includes: and subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In the above embodiment, the second black level dynamic correction value is subtracted from the secondary adjustment pixel value of each pixel point, so that an adjusted image can be obtained.
In an optional implementation manner of the first aspect, adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image includes: subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain a tertiary adjustment pixel value of each pixel point so as to obtain tertiary adjustment image data; acquiring the pixel average value of each row of pixel points in a preset area of the three-time adjustment image data; and subtracting the pixel average value of the column from the three-time adjustment pixel value of each pixel point in the preset area to obtain the adjusted image.
In the above embodiment, the scheme not only corrects the first black level dynamic correction value brought by the shooting condition parameter, but also corrects the second black level dynamic correction value brought by the non-photosensitive area in the photosensitive condition of the image sensor, and also corrects the black level of each column of pixel points in the non-photosensitive area in the photosensitive condition of the image sensor, so that the black level drift brought by the environmental influence of the image sensor is solved, and the accuracy of black level correction is improved.
In an alternative embodiment of the first aspect, the obtaining of the black level dynamic correction value includes: acquiring a pixel average value of a preset area of initial adjustment image data to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor for invisible light; adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image, comprising: and subtracting the pixel average value of the preset area of the initial adjustment image data from the initial adjustment pixel value of each pixel point to obtain the adjusted image.
In the above embodiment, the scheme may correct the black level initial correction value and separately correct the black level influence caused by the non-photosensitive area of the image sensor, which is the preset area, so as to improve the correction accuracy of the black level.
In an alternative embodiment of the first aspect, the obtaining of the black level dynamic correction value includes: acquiring the pixel average value of each row of pixel points in a preset area of initial adjustment image data to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor for invisible light; adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image, comprising: and subtracting the pixel average value of the column from the initial adjustment pixel value of each pixel point in the preset region of the initial adjustment image data to obtain the adjusted image.
In the above embodiment, the present solution can perform correction for the black level brought by each column of pixels in the preset area, that is, the photosensitive area of the image sensor, on the basis of correcting the initial correction value for the black level, so as to improve the accuracy of correcting the black level.
In a second aspect, the present invention provides an image adjusting apparatus comprising: the acquisition module is used for acquiring image data to be adjusted and the initial black level correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the initial black level correction value is a black level value output by an image sensor for collecting the image data to be adjusted; the determining module is used for determining the initial adjustment pixel value of each pixel point according to the original pixel value and the black level initial correction value of each pixel point; the acquisition module is also used for acquiring the black level dynamic correction value; and the adjusting module is used for adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image.
According to the image adjusting device, after the initial adjustment pixel value of each pixel point is determined according to the original pixel value and the black level initial correction value of each pixel point, the black level dynamic correction value caused by the influence of the shooting parameters of the image sensor and/or the photosensitive condition of the image sensor is also acquired, the pixel value of each pixel point is adjusted based on the initial adjustment pixel value and the black level dynamic correction value of each pixel point, and the adjusted image is obtained.
In an optional implementation manner of the second aspect, the obtaining module is specifically configured to obtain shooting condition parameters of the image data to be adjusted; wherein the shooting condition parameters comprise the temperature and/or the exposure time of the image sensor; acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters; the correction data comprises a first black level dynamic correction value corresponding to each pixel point in a plurality of pixel points; the adjusting module is specifically configured to adjust the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of the second aspect, the obtaining module is further specifically configured to determine whether correction data corresponding to the shooting condition parameter is found in the correction table; wherein the correction table includes a plurality of correction data corresponding to a plurality of shooting condition parameters; and if the pixel values are found, acquiring a first black level dynamic correction value corresponding to each pixel point in the found correction data.
In an optional implementation manner of the second aspect, the obtaining module is further specifically configured to obtain two adjacent groups of correction data of the shooting condition parameter in the correction table if the correction data corresponding to the shooting condition parameter is not found; and generating correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data to obtain a first black level dynamic correction value corresponding to each pixel point in the generated correction data.
In an optional implementation manner of the second aspect, the adjusting module is further specifically configured to subtract the first black level dynamic correction value of the corresponding pixel point from the initial adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of the second aspect, the adjusting module is further specifically configured to subtract the first black level dynamic correction value of the corresponding pixel point from the initial adjusted pixel value of each pixel point, to obtain a secondary adjusted pixel value of each pixel point, so as to obtain secondary adjusted image data; acquiring a second black level dynamic correction value; the second black level dynamic correction value is the pixel average value of a preset area of the secondary adjustment image data, and the preset area is a black area of the image sensor for invisible light; and adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In an optional implementation manner of the second aspect, the adjusting module is further specifically configured to subtract the second black level dynamic correction value from the secondary adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of the second aspect, the adjusting module is further specifically configured to subtract the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain a tertiary adjustment pixel value of each pixel point, so as to obtain tertiary adjustment image data; acquiring the pixel average value of each row of pixel points in a preset area of the three-time adjustment image data; and subtracting the pixel average value of the column from the three-time adjustment pixel value of each pixel point in the preset area to obtain the adjusted image.
In an optional implementation manner of the second aspect, the obtaining module is further specifically configured to obtain a pixel average value of a preset area of the initial adjustment image data to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor for invisible light; the adjusting module is further specifically configured to subtract the pixel average value of the preset region of the initially adjusted image data from the initially adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of the second aspect, the obtaining module is further specifically configured to obtain a pixel average value of each column of pixel points in a preset region of the initial adjustment image data, so as to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor for invisible light; the adjusting module is further specifically configured to subtract the pixel average value of the row from the initial adjustment pixel value of each pixel point in the preset region of the initial adjustment image data, so as to obtain an adjusted image.
In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in any one of the implementation manners of the first aspect and the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the method of any one of the optional implementations of the first aspect and the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to perform the method of any one of the optional implementations of the first aspect and the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a first flowchart of an image adjustment method according to an embodiment of the present application;
FIG. 2 is a second flowchart of an image adjustment method according to an embodiment of the present application;
FIG. 3 is a third flowchart of an image adjustment method according to an embodiment of the present disclosure;
fig. 4 is a fourth flowchart of an image adjustment method according to an embodiment of the present application;
fig. 5 is a fifth flowchart of an image adjustment method according to an embodiment of the present application;
fig. 6 is a sixth flowchart of an image adjustment method according to an embodiment of the present application;
fig. 7 is a seventh flowchart of an image adjustment method according to an embodiment of the present application;
fig. 8 is an eighth flowchart of an image adjustment method according to an embodiment of the present application;
fig. 9 is a ninth flowchart of an image adjustment method according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an image adjustment apparatus according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 1000-an acquisition module; 1100-determination module; 1200-an adjustment module; 11-an electronic device; 1101-a processor; 1102-a memory; 1103 — communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
An embodiment of the present application provides an image adjusting method, which may further perform dynamic black level correction based on a conventional black level correction method, so as to make the black level correction more accurate, and the image adjusting method may be applied to an electronic device, such as a mobile phone, a computer, and the like, as shown in fig. 1, and the image adjusting method may include the following steps:
step S100: and acquiring image data to be adjusted and the initial black level correction value.
Step S110: and determining the initial adjustment pixel value of each pixel point according to the original pixel value and the black level initial correction value of each pixel point.
Step S120: the black level dynamic correction value is acquired.
Step S130: and adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image.
In step S100, the image data to be adjusted is image data collected and output by an image sensor, the image data to be adjusted includes original pixel values of a plurality of pixels, and the black level initial correction value is a black level value output by the image sensor collecting the image data to be adjusted, and the black level initial correction value may be a recommended value given by a manufacturer producing the image sensor.
After the image data to be adjusted and the black level initial correction value are obtained, step S110 may be executed to determine the initial adjustment pixel value of each pixel point according to the original pixel value of each pixel point and the black level initial correction value. As a possible implementation manner, the black level initial correction value may be subtracted from the original pixel value of each pixel, so as to obtain an initial adjustment pixel value of each pixel. The initial adjustment pixel values of all the pixel points can be used as initial adjustment image data to perform subsequent operation.
In step S120, the black level dynamic correction value represents a black level value due to the influence of the shooting parameters of the image sensor and/or the light sensing conditions of the image sensor, and the black level value due to the difference of the shooting parameters and/or the light sensing conditions is different, so that the black level value changes with the change of the shooting parameters and/or the light sensing conditions, that is, the black level value is dynamic and thus is a black level dynamic correction value.
On the basis, the method and the device adjust the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point, and therefore the adjusted image is obtained.
In the designed image adjustment method, after the initial adjustment pixel value of each pixel point is determined according to the original pixel value and the black level initial correction value of each pixel point, the black level dynamic correction value caused by the influence of the shooting parameters of the image sensor and/or the photosensitive condition of the image sensor is also obtained, so that the pixel value of each pixel point is adjusted based on the initial adjustment pixel value and the black level dynamic correction value of each pixel point, and the adjusted image is obtained.
In an alternative embodiment of this embodiment, the acquiring of the black level dynamic correction value in step S120 may be achieved by the following method, as shown in fig. 2, including:
step S200: and acquiring shooting condition parameters of the image data to be adjusted.
Step S210: and acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters, wherein the correction data comprises a first black level dynamic correction value of each pixel point.
On the basis of the above, step S130 may include the following steps:
step S220: and adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point to obtain an adjusted image.
In step S200, the shooting condition parameter of the image data to be adjusted represents the shooting condition parameter for shooting the image data to be adjusted by using the image sensor, for example, the shooting condition parameter may include the temperature of the image sensor and/or the exposure time, for example, the image data to be adjusted is shot by using the exposure time of 5 seconds, and then the shooting condition parameter obtained in step S200 is the exposure time of 5 seconds.
In step S210, the correction data includes a first black level dynamic correction value corresponding to each pixel point in the plurality of pixel points, and the correction data corresponding to different shooting condition parameters are different, for example, the first black level dynamic correction value of each pixel point in the image data to be adjusted shot with an exposure time of 5 seconds is different from the exposure time of 10 seconds; the first black level dynamic correction value of each pixel point in the image data to be adjusted shot under the condition that the temperature of the image sensor is 30 ℃ is different from the temperature of the image sensor, namely 40 ℃.
As a possible implementation manner, for step S210, the present solution may be implemented by the following steps, as shown in fig. 3, including:
step S300: judging whether the correction data corresponding to the shooting condition parameters are found in the correction table, if so, turning to the step S310; if not, go to step S320.
Step S310: and acquiring a first black level dynamic correction value corresponding to each pixel point in the searched correction data.
Step S320: and acquiring two adjacent groups of correction data of the shooting condition parameters in the correction table.
Step S330: and generating correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data to obtain a first black level dynamic correction value corresponding to each pixel point in the generated correction data.
In step S300, a correction table may be stored in advance, where the correction table includes a plurality of correction data corresponding to a plurality of shooting condition parameters, and specifically, the present solution may utilize an image sensor to shoot an image under a plurality of different shooting condition parameters in advance, and then calibrate a first black level dynamic correction value corresponding to each pixel point under a plurality of different shooting condition parameters based on the shot image, so as to generate the correction table for storage, where different pixel points may be mapped or associated with the corresponding first black level dynamic correction value through coordinate information of the different pixel points in the image, so that the corresponding first black level dynamic correction value may be found based on the coordinate information of the pixel points. Taking the exposure time as an example, the scheme may capture images at different exposure times (5 s, 10s, 15s, and 20 s) in advance, and then calibrate the first black level dynamic correction value corresponding to each pixel point of the corresponding exposure time based on the images captured at different exposure times, thereby generating the correction table.
On the basis, according to the present disclosure, after the step S200 is executed to obtain the shooting condition parameters of the image data to be adjusted, the correction data corresponding to the shooting condition parameters may be searched in the correction table according to the shooting condition parameters of the image data to be adjusted, and if the correction data is found, the first black level dynamic correction value corresponding to each pixel in the searched correction data is obtained, so that the step S220 is executed. For example, the exposure time of the image data to be adjusted is 5S, and based on the foregoing example, the correction data corresponding to the exposure time 5S can be found in the correction table, then the first black level correction value corresponding to each pixel point in the correction data of the exposure time 5S is obtained, so as to execute step S220.
And if the correction data corresponding to the shooting condition parameters are not found in the correction table, acquiring two adjacent groups of correction data of the shooting condition parameters in the correction table, and generating the correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data. For example, assuming that the exposure time of the image data to be adjusted is 7s, based on the foregoing example, the correction table only has the correction data corresponding to the exposure times of 5s, 10s, 15s and 20s, respectively, and on this basis, two adjacent sets of correction data of the exposure time of 7s, that is, the correction data of the exposure time of 5s and the correction data of the exposure time of 10s, can be acquired, so that the correction data of the exposure time of 7s is generated based on the two adjacent sets of correction data. Specifically, the first black level dynamic correction value of the pixel point a in the correction data of the exposure time 5s and the first black level dynamic correction value of the pixel point a in the correction data of the exposure time 5s are weighted and averaged, so that the first black level dynamic correction value of the pixel point a of the exposure time 7s can be obtained.
After the correction data corresponding to the shooting condition parameters are obtained in the above manner, step S220 may be executed to adjust the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value of the corresponding pixel point, so as to obtain an adjusted image.
As a possible implementation manner for step S220, as shown in fig. 4, the method includes:
step S400: and subtracting the first black level dynamic correction value of the corresponding pixel point from the initial adjustment pixel value of each pixel point to obtain an adjusted image.
In the above embodiment, the initial adjustment pixel value of each pixel point is subtracted by the first black level dynamic correction value of the corresponding pixel point, so that an adjusted image can be obtained.
In the embodiment, on the basis of initial adjustment of the black level, the scheme only corrects the first black level dynamic correction value brought by the shooting condition parameters, so that the image shot by the image sensor is not influenced by the shooting condition parameters such as the black level brought by the temperature and/or the exposure time of the image sensor, the calibration precision of the black level is improved, and the color precision of the image is improved.
As another possible implementation manner for step S220, as shown in fig. 5, the method includes:
step S500: and subtracting the first black level dynamic correction value corresponding to each channel from the initial adjustment pixel value of each pixel point to obtain a secondary adjustment pixel value of each pixel point so as to obtain secondary adjustment image data.
Step S510: and acquiring a second black level dynamic correction value.
Step S520: and adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In the above embodiment, in the present scheme, the initial adjustment pixel value of each pixel point is first subtracted by the first black level dynamic correction value of the corresponding pixel point to obtain the secondary adjustment pixel value of each pixel point, and the secondary adjustment pixel values of all the pixel points generate secondary adjustment image data.
Then, the scheme obtains a second black level dynamic correction value, wherein the black level dynamic correction value is a pixel average value of a preset area, the preset area refers to a black area of the image sensor without light, the pixel average value of the preset area can be obtained through detection of a specific detection module, specifically, the detection module can detect the photosensitive state of the image sensor, so that the range of the preset area can be determined, the pixel average value of all pixel points in the range of the preset area can be calculated, and the second black level dynamic correction value can be obtained by sending the pixel average value to an execution main body of the scheme. It should be noted here that, since the photosensitive states of the image sensors are different under different photosensitive conditions, the black regions of the invisible light are different under different photosensitive conditions, so that the second black level dynamic correction values are different under different photosensitive conditions.
On the basis of obtaining the second black level dynamic correction value, the scheme adjusts the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point, and obtains an adjusted image.
As a possible implementation manner, for step S520, as shown in fig. 6, the following manner may be included:
step S600: and subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In the above embodiment, the second black level dynamic correction value is subtracted from the secondary adjustment pixel value of each pixel point, so that an adjusted image can be obtained.
As another possible implementation, for step S520, as shown in fig. 7, the following manner may be included:
step S700: and subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain a tertiary adjustment pixel value of each pixel point so as to obtain tertiary adjustment image data.
Step S710: and obtaining the average pixel value of each column of pixel points in the preset area of the three-time adjustment image data.
Step S720: and subtracting the pixel average value of the column from the three-time adjustment pixel value of each pixel point in the preset area to obtain the adjusted image.
In the above embodiment, in the present scheme, the second black level dynamic correction value is subtracted from the secondary adjustment pixel value of each pixel point to obtain the tertiary adjustment pixel value of each pixel point, so as to obtain the tertiary adjustment image data. And then obtaining the pixel average value of each row of pixel points in a preset area of the cubic adjustment image data, wherein the preset area is a black area of the image sensor for invisible light, the specific determination mode is the same as the above, and after the preset area is determined, the pixel average value of each row of pixel points can be calculated, so that the pixel average value of the row in which the pixel point is located is subtracted from the cubic adjustment pixel value of each pixel point in the preset area to obtain an adjusted image.
In the above embodiment, the scheme not only corrects the first black level dynamic correction value brought by the shooting condition parameter, but also corrects the second black level dynamic correction value brought by the non-photosensitive area in the photosensitive condition of the image sensor, and also corrects the black level of each column of pixel points in the non-photosensitive area in the photosensitive condition of the image sensor, so that the black level drift brought by the environmental influence of the image sensor is solved, and the accuracy of black level correction is improved.
In an alternative embodiment of the present embodiment, in addition to the aforementioned manner of the black level correction for the shooting condition parameters alone and the combination of the plurality of types of black level corrections, the black level dynamic correction value is acquired in step S120, and as shown in fig. 8, the following steps may be further included:
step S800: and acquiring the pixel average value of a preset area of the initial adjustment image data to obtain the black level dynamic correction value.
On the basis of the above, the following steps may be included for step S130:
step S810: and subtracting the pixel average value of the preset area of the initial adjustment image data from the initial adjustment pixel value of each pixel point to obtain the adjusted image.
In the foregoing embodiment, on the basis of correcting the initial black level correction value, the present disclosure may also separately correct the black level influence caused by a preset area, that is, a photosensitive area of the image sensor, so as to improve the correction accuracy of the black level, where the acquiring process of step S800 is similar to the acquiring process of step S500, and is not described herein again.
In an alternative embodiment of the present embodiment, in addition to the foregoing embodiment, for acquiring the black level dynamic correction value in step S120, as shown in fig. 9, the following steps may be further included:
step S900: and acquiring the pixel average value of each row of pixel points in the preset area of the initial adjustment image data to obtain the black level dynamic correction value.
On the basis of the above, the following steps may be included for step S130:
step S910: and subtracting the pixel average value of the column from the initial adjustment pixel value of each pixel point in the preset region of the initial adjustment image data to obtain the adjusted image.
In the above embodiment, on the basis of correcting the initial black level correction value, the present solution may also separately correct the black level brought by each column of pixels in a preset area, that is, a non-photosensitive area of the image sensor, so as to improve the correction accuracy of the black level, where step S900 is similar to the obtaining manner of step S710, and is not described herein again.
Fig. 10 shows a schematic structural block diagram of an image adjusting apparatus provided in the present application, and it should be understood that the apparatus corresponds to the method embodiment executed in fig. 1 to 9, and can execute the steps related to the foregoing method, and the specific functions of the apparatus can be referred to the description above, and the detailed description is appropriately omitted here to avoid redundancy. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 1000, configured to obtain image data to be adjusted and an initial black level correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the black level initial correction value is a black level value output by an image sensor for collecting the image data to be adjusted; a determining module 1100, configured to determine an initial adjustment pixel value of each pixel according to the original pixel value and the black level initial correction value of each pixel; the obtaining module 1000 is further configured to obtain a black level dynamic correction value; the adjusting module 1200 is configured to adjust the pixel value of each pixel according to the initial adjusted pixel value and the black level dynamic correction value of each pixel, so as to obtain an adjusted image.
The image adjusting device of the above design, this scheme still obtains the black level dynamic correction value that brings because image sensor's shooting parameter influence and/or image sensor sensitization condition after confirming the initial adjustment pixel value of every pixel according to the original pixel value and the black level initial correction value of every pixel, thereby adjust the pixel value of every pixel based on the initial adjustment pixel value and the black level dynamic correction value of every pixel, thereby obtain the image that the adjustment is accomplished, consequently, this scheme adjusts the image based on black level dynamic correction value, can solve the inaccurate problem of correction that the black level drifts under the influence of image sensor environmental factor and brings, thereby improve the accuracy of black level correction, make the colour normal after the image adjustment.
In an optional implementation manner of this embodiment, the obtaining module 1000 is specifically configured to obtain shooting condition parameters of image data to be adjusted; wherein the shooting condition parameters comprise the temperature and/or the exposure time of the image sensor; acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters; the correction data comprises a first black level dynamic correction value corresponding to each pixel point in a plurality of pixel points; the adjusting module 1200 is specifically configured to adjust the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of this embodiment, the obtaining module 1000 is further specifically configured to determine whether to find the correction data corresponding to the shooting condition parameter in the correction table; wherein the correction table includes a plurality of correction data corresponding to the plurality of shooting condition parameters; and if the pixel values are found, acquiring a first black level dynamic correction value corresponding to each pixel point in the found correction data.
In an optional implementation manner of this embodiment, the obtaining module 1000 is further specifically configured to obtain two adjacent groups of correction data of the shooting condition parameter in the correction table if the correction data corresponding to the shooting condition parameter is not found; and generating correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data to obtain a first black level dynamic correction value corresponding to each pixel point in the generated correction data.
In an optional implementation manner of this embodiment, the adjusting module 1200 is further specifically configured to subtract the first black level dynamic correction value of the corresponding pixel point from the initial adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of this embodiment, the adjusting module 1200 is further specifically configured to subtract the first black level dynamic correction value of the corresponding pixel point from the initial adjusted pixel value of each pixel point, to obtain a secondary adjusted pixel value of each pixel point, so as to obtain secondary adjusted image data; acquiring a second black level dynamic correction value; the second black level dynamic correction value is the pixel average value of a preset area of the secondary adjustment image data, and the preset area is a black area of the image sensor for invisible light; and adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
In an optional implementation manner of this embodiment, the adjusting module 1200 is further specifically configured to subtract the second black level dynamic correction value from the secondary adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of this embodiment, the adjusting module 1200 is further specifically configured to subtract the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point, and obtain a tertiary adjustment pixel value of each pixel point, so as to obtain tertiary adjustment image data; acquiring the average pixel value of each column of pixel points in a preset area of the three-time adjustment image data; and subtracting the pixel average value of the column from the three-time adjustment pixel value of each pixel point in the preset area to obtain the adjusted image.
In an optional implementation manner of this embodiment, the obtaining module 1000 is further specifically configured to obtain a pixel average value of a preset area of the initial adjustment image data, so as to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor which does not see light; the adjusting module 1200 is further specifically configured to subtract the pixel average value of the preset area of the initially adjusted image data from the initially adjusted pixel value of each pixel point, so as to obtain an adjusted image.
In an optional implementation manner of this embodiment, the obtaining module 1000 is further specifically configured to obtain a pixel average value of each column of pixel points in a preset region of the initial adjustment image data, so as to obtain a black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of the plurality of pixel points, and the preset area is a black area of the image sensor for invisible light; the adjusting module 1200 is further specifically configured to subtract the pixel average value of the row from the initial adjustment pixel value of each pixel point in the preset region of the initial adjustment image data, so as to obtain an adjusted image.
As shown in fig. 11, the present application provides an electronic device 11 including: a processor 1101 and a memory 1102, the processor 1101 and the memory 1102 being interconnected and communicating with each other via a communication bus 1103 and/or other form of connection mechanism (not shown), the memory 1102 storing a computer program executable by the processor 1101, the processor 1101 executing the computer program when the computing device is running to perform the method in any alternative implementation, such as the steps S100 to S130: acquiring image data to be adjusted and a black level initial correction value; determining an initial adjustment pixel value of each pixel point according to the original pixel value and the black level initial correction value of each pixel point; acquiring a black level dynamic correction value; and adjusting the pixel value of each pixel point according to the initial adjustment pixel value and the black level dynamic correction value of each pixel point to obtain an adjusted image.
The present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the method of any one of the previous alternative implementations.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of any of the alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. An image adjustment method, comprising:
acquiring image data to be adjusted and a black level initial correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the black level initial correction value is a black level value output by an image sensor for collecting the image data to be adjusted;
determining an initial adjustment pixel value of each pixel point according to the original pixel value of each pixel point and the black level initial correction value;
acquiring a black level dynamic correction value; and
and adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the black level dynamic correction value to obtain an adjusted image.
2. The method according to claim 1, wherein the obtaining of the black level dynamic correction value comprises:
acquiring shooting condition parameters of the image data to be adjusted; wherein the shooting condition parameters comprise an image sensor temperature and/or an exposure time; and
acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters; the correction data comprises a first black level dynamic correction value corresponding to each pixel point in the plurality of pixel points;
the adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the dynamic black level correction value to obtain an adjusted image includes:
and adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point to obtain an adjusted image.
3. The method according to claim 2, wherein the acquiring correction data corresponding to the shooting condition parameters according to the shooting condition parameters comprises:
judging whether the correction data corresponding to the shooting condition parameters are found in a correction table or not; wherein the correction table includes a plurality of correction data corresponding to a plurality of shooting condition parameters;
and if the pixel values are found, acquiring a first black level dynamic correction value corresponding to each pixel point in the found correction data.
4. The method according to claim 3, wherein after the determining whether the correction data corresponding to the shooting condition parameter is found in a correction table, the method further comprises:
if the correction data corresponding to the shooting condition parameters are not found, acquiring two groups of adjacent correction data of the shooting condition parameters in the correction table;
and generating correction data corresponding to the shooting condition parameters according to the two adjacent groups of correction data to obtain a first black level dynamic correction value corresponding to each pixel point in the generated correction data.
5. The method according to claim 2, wherein the adjusting the pixel value of each pixel point according to the initial adjusted pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point to obtain the adjusted image comprises:
and subtracting the first black level dynamic correction value of the corresponding pixel point from the initial adjustment pixel value of each pixel point to obtain an adjusted image.
6. The method according to claim 2, wherein the adjusting the pixel value of each pixel point according to the initial adjusted pixel value of each pixel point and the first black level dynamic correction value corresponding to each pixel point to obtain the adjusted image comprises:
subtracting the first black level dynamic correction value of the corresponding pixel point from the initial adjustment pixel value of each pixel point to obtain a secondary adjustment pixel value of each pixel point so as to obtain secondary adjustment image data;
acquiring a second black level dynamic correction value; the second black level dynamic correction value is a pixel average value of a preset area of the secondary adjustment image data, and the preset area is a black area of the image sensor, which does not see light; and
and adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
7. The method according to claim 6, wherein the adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the secondarily adjusted pixel value of each pixel point to obtain an adjusted image comprises:
and subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain an adjusted image.
8. The method according to claim 6, wherein the adjusting the pixel value of each pixel point according to the second black level dynamic correction value and the twice-adjusted pixel value of each pixel point to obtain an adjusted image comprises:
subtracting the second black level dynamic correction value from the secondary adjustment pixel value of each pixel point to obtain a tertiary adjustment pixel value of each pixel point so as to obtain tertiary adjustment image data;
acquiring the average pixel value of each row of pixel points in the preset area of the three-time adjustment image data;
and subtracting the pixel average value of the column from the three-time adjustment pixel value of each pixel point in the preset area to obtain an adjusted image.
9. The method according to claim 1, wherein the obtaining of the black level dynamic correction value comprises:
acquiring the pixel average value of a preset area of initial adjustment image data to obtain the black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of a plurality of pixel points, and the preset area is a black area of invisible light of the image sensor;
the adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the dynamic black level correction value to obtain an adjusted image includes:
and subtracting the pixel average value of the preset area of the initial adjustment image data from the initial adjustment pixel value of each pixel point to obtain an adjusted image.
10. The method according to claim 1, wherein the obtaining of the black level dynamic correction value comprises:
acquiring the pixel average value of each row of pixel points in a preset area of initial adjustment image data to obtain the black level dynamic correction value; the initial adjustment data comprises an initial adjustment pixel value of each pixel point of a plurality of pixel points, and the preset area is a black area of invisible light of the image sensor;
the adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the dynamic black level correction value to obtain an adjusted image includes:
and subtracting the pixel average value of the column from the initial adjustment pixel value of each pixel point in the preset region of the initial adjustment image data to obtain the adjusted image.
11. An image adjusting apparatus, comprising: the device comprises an acquisition module, a determination module and an adjustment module;
the acquisition module is used for acquiring image data to be adjusted and the initial black level correction value; the image data to be adjusted comprises original pixel values of a plurality of pixel points, and the black level initial correction value is a black level value output by an image sensor for collecting the image data to be adjusted;
the determining module is used for determining an initial adjustment pixel value of each pixel point according to the original pixel value of each pixel point and the initial black level correction value;
the acquisition module is also used for acquiring a black level dynamic correction value; and
and the adjusting module is used for adjusting the pixel value of each pixel point according to the initial adjustment pixel value of each pixel point and the dynamic black level correction value to obtain an adjusted image.
12. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the method of any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 10.
CN202210262039.5A 2022-03-16 2022-03-16 Image adjustment method and device, electronic equipment and computer readable storage medium Active CN115842961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210262039.5A CN115842961B (en) 2022-03-16 2022-03-16 Image adjustment method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210262039.5A CN115842961B (en) 2022-03-16 2022-03-16 Image adjustment method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115842961A true CN115842961A (en) 2023-03-24
CN115842961B CN115842961B (en) 2023-08-11

Family

ID=85575305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210262039.5A Active CN115842961B (en) 2022-03-16 2022-03-16 Image adjustment method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115842961B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016058771A (en) * 2014-09-05 2016-04-21 リコーイメージング株式会社 Imaging device and imaging method
CN105578082A (en) * 2016-01-29 2016-05-11 深圳市高巨创新科技开发有限公司 adaptive black level correction method
WO2018168458A1 (en) * 2017-03-14 2018-09-20 日立オートモティブシステムズ株式会社 Image-capture device
CN110121036A (en) * 2018-02-05 2019-08-13 联咏科技股份有限公司 Image sensor apparatus and its black level modification method and computer-readable media
CN112911174A (en) * 2021-01-18 2021-06-04 珠海全志科技股份有限公司 Image dead pixel cluster correction method, computer device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016058771A (en) * 2014-09-05 2016-04-21 リコーイメージング株式会社 Imaging device and imaging method
CN105578082A (en) * 2016-01-29 2016-05-11 深圳市高巨创新科技开发有限公司 adaptive black level correction method
WO2018168458A1 (en) * 2017-03-14 2018-09-20 日立オートモティブシステムズ株式会社 Image-capture device
CN110121036A (en) * 2018-02-05 2019-08-13 联咏科技股份有限公司 Image sensor apparatus and its black level modification method and computer-readable media
CN112911174A (en) * 2021-01-18 2021-06-04 珠海全志科技股份有限公司 Image dead pixel cluster correction method, computer device and computer readable storage medium

Also Published As

Publication number Publication date
CN115842961B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN109345467B (en) Imaging distortion correction method, imaging distortion correction device, computer equipment and storage medium
CN108111828B (en) Projection equipment correction method and device and projection equipment
EP0447871B1 (en) Method of correcting image signal
US9104264B2 (en) Information processing apparatus and control method of information processing apparatus
US8537253B2 (en) Defect pixel detection apparatus and method for detecting defect pixel
CN104581136A (en) Image calibration system and calibration method of stereo camera
US20230086961A1 (en) Parallax image processing method, apparatus, computer device and storage medium
CN109361866B (en) Automatic exposure control method and system
CN108924426B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN108419067A (en) White balance parameter record, method of adjustment and device, storage medium, terminal, camera
CN101577831A (en) Control method and control device for starting white balance adjustment
CN104104946A (en) Method and electronic equipment for consistence correction of camera
CN114093292B (en) Luminance parameter correction method, device, equipment and luminance compensation system
CN113873222B (en) Linearity correction method and device for industrial camera
US11218650B2 (en) Image processing method, electronic device, and computer-readable storage medium
CN112393804A (en) Image correction method and device
CN115842961A (en) Image adjusting method and device, electronic equipment and computer readable storage medium
CN100464590C (en) Defect pixel detecting method
CN102209202A (en) Gamma correction curve extraction method for camera
CN110895372B (en) Optical axis deviation calibration method and related device
CN110896452A (en) Flash lamp correction method of mobile terminal, mobile terminal and device
CN114612946A (en) Exposure method, electronic device, storage medium, and program product
CN108650471B (en) L SC compensation method and device of fisheye camera and readable storage medium
KR20210028887A (en) Backlight Determination and Improvement Apparatus and Method between Smartphone Front Ambient Light Sensor and Rear Camera Sensor Using Artificial Object Detection
KR20190113251A (en) Method of correcting non-uniformity for thermal image camera

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