CN110022475B - Camera calibration method, camera and computer readable storage medium - Google Patents

Camera calibration method, camera and computer readable storage medium Download PDF

Info

Publication number
CN110022475B
CN110022475B CN201810022276.8A CN201810022276A CN110022475B CN 110022475 B CN110022475 B CN 110022475B CN 201810022276 A CN201810022276 A CN 201810022276A CN 110022475 B CN110022475 B CN 110022475B
Authority
CN
China
Prior art keywords
flash
value
color information
gain
shooting
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.)
Expired - Fee Related
Application number
CN201810022276.8A
Other languages
Chinese (zh)
Other versions
CN110022475A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810022276.8A priority Critical patent/CN110022475B/en
Publication of CN110022475A publication Critical patent/CN110022475A/en
Application granted granted Critical
Publication of CN110022475B publication Critical patent/CN110022475B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/02Diagnosis, testing or measuring for television systems or their details for colour television signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Abstract

The invention provides a calibration method of photographic equipment, which comprises the following steps: when a flash lamp is controlled to carry out flash shooting, more than two times of flash shooting are carried out within a set time length, and color information of a picture obtained by each flash shooting is obtained; and calibrating the white balance parameters of the flash shooting according to the color information. The invention also discloses a photographic device and a computer readable storage medium, by implementing the scheme, the white balance parameter calibration of flash shooting can be automatically carried out in the flash shooting process of the photographic device, and the white balance parameter calibration efficiency and accuracy of flash shooting are effectively improved; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost is increased.

Description

Camera calibration method, camera and computer readable storage medium
Technical Field
The present invention relates to the field of flash lamp technology, and in particular, to a calibration method for a camera device, and a computer-readable storage medium.
Background
At present, most of photographic equipment is equipped with a flash lamp for supplementing light during shooting of low-light scenes. Because the flash time of the shooting process is generally set to be short due to the power consumption and the service life of the flash, the automatic exposure and the automatic white balance calculation cannot be completed by the photographic equipment in the flash period, so that the pre-flash is set once before the flash, and the automatic exposure value and the automatic white balance value in the flash period are calculated according to the data of the pre-flash. However, the color temperature of the flash lamp is different, and the flash effect of the flash lamp is different due to different flash lamp monomers; and when the color temperature of the flash lamp is greatly different, serious color cast exists.
Existing flash calibration schemes include: before the shooting equipment leaves a factory, a test engineer controls a flash lamp to carry out flash shooting in a specific environment, and the white balance deviation of the flash shooting of the shooting equipment is determined by comparing an actual scene with a picture obtained by the flash shooting, so that the white balance value of the flash shooting of the shooting equipment is calibrated. However, the existing flash lamp calibration scheme has the following problems: testing engineering personnel in the production link are required to be increased, so that the cost is increased; the calibration scene is single, and good effect can not be achieved when other scenes cannot be guaranteed; since the color temperature of the flash lamp changes with use, the white balance value of the photographing apparatus for flash photographing becomes more and more inaccurate.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a calibration method for a camera device, a camera device and a computer readable storage medium, which overcome the defect in the prior art that the white balance value of a flash lamp cannot be automatically calibrated.
The invention adopts the technical scheme that the method for calibrating the photographic equipment comprises the following steps:
when a flash lamp is controlled to carry out flash shooting, carrying out flash shooting for two times or more than two times within a set time length to obtain color information of a picture obtained by each flash shooting;
and calibrating the white balance parameters of the flash shooting according to the color information.
Optionally, the calibrating the white balance parameter of the flash shooting according to the color information includes:
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
and calibrating the white balance parameters of the flash shooting according to the color information comparison value.
Optionally, the calibrating the white balance parameter of the flash photography according to the color information comparison value includes:
judging whether the color information comparison value is larger than a first set threshold value or not;
and under the condition that the color information comparison value is greater than a first set threshold value, calibrating the white balance parameter of flash shooting according to the color information comparison value.
Optionally, the calibrating the white balance parameter of the flash shooting according to the color information comparison value when the color information comparison value is greater than a first set threshold includes:
under the condition that the color information comparison value is greater than a first set threshold value, judging whether the color information comparison value is greater than a second set threshold value;
if the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameters of flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
Optionally, the color information of the picture includes:
color information of a set region in the picture, and/or color information of a set object in the picture.
The present invention also provides a photographing apparatus including a processor, a memory, and a flash;
the processor is configured to execute a camera device calibration program stored in the memory to perform the steps of:
when the flash lamp is controlled to carry out flash shooting, carrying out flash shooting for two times or more than two times within a set time length to obtain color information of a picture obtained by each flash shooting;
and calibrating the white balance parameters of the flash shooting according to the color information.
Optionally, the calibrating the white balance parameter of the flash shooting according to the color information includes:
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
and calibrating the white balance parameters of the flash shooting according to the color information comparison value.
Optionally, the calibrating the white balance parameter of the flash photography according to the color information comparison value includes:
judging whether the color information comparison value is larger than a first set threshold value or not;
and under the condition that the color information comparison value is greater than a first set threshold value, calibrating the white balance parameter of flash shooting according to the color information comparison value.
Optionally, the calibrating the white balance parameter of the flash shooting according to the color information comparison value when the color information comparison value is greater than a first set threshold includes:
under the condition that the color information comparison value is greater than a first set threshold value, judging whether the color information comparison value is greater than a second set threshold value;
if the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameters of flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
Optionally, the color information of the picture includes:
color information of a set region in the picture, and/or color information of a set object in the picture.
The present invention also provides a computer readable storage medium storing one or more programs, which are executable by one or more processors, to implement the steps of the above-described photographing apparatus calibration method.
By adopting the technical scheme, the invention at least has the following advantages:
according to the camera equipment calibration method, the camera equipment and the computer-readable storage medium, the white balance parameters of flash shooting can be automatically calibrated in the process of flash shooting of the camera equipment, and the efficiency and the accuracy of white balance parameter calibration of flash shooting are effectively improved; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost is increased.
Drawings
FIG. 1 is a flowchart illustrating a calibration method of a camera apparatus according to first to second embodiments of the present invention;
FIG. 2 is a schematic diagram of the setting regions of flash-shot pictures of the second, third and fifth embodiments of the present invention;
FIG. 3 is a schematic view of a setting object of a flash shot picture according to the second, third and fifth embodiments of the present invention;
fig. 4 is a schematic structural diagram of a photographing apparatus according to a fourth embodiment to a fifth embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the intended purpose, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
A first embodiment of the present invention provides a calibration method for a camera device, as shown in fig. 1, including the following steps:
step S101, when controlling the flash lamp to carry out flash shooting, carrying out two or more times of flash shooting in a set time length to obtain the color information of the picture obtained by each time of flash shooting.
In some embodiments of the invention, one or more non-flash shots are taken before the first flash shot within a set length of time; according to the light information of the picture obtained by the first flash shooting within the set time length and the light information of the picture obtained by the non-flash shooting, calculating focusing parameters and exposure parameters of other flash shooting except the first flash shooting within the set time length; and according to the focusing parameters and the exposure parameters, performing flash shooting except for the first flash shooting within a set time length.
In some embodiments of the present invention, the number of flash lamps is not particularly limited. The flash may be a flash provided inside the photographing apparatus or a flash provided outside the photographing apparatus.
For example: step S101, including: when a flash lamp is controlled to carry out flash shooting, carrying out flash shooting twice within a set time length of 0.1s to obtain color information of a picture obtained by each flash shooting;
wherein, before the first flash shooting within the set time length of 0.1s, the non-flash shooting is carried out; according to the light information of the picture obtained by the first flash shooting within the set time length of 0.1s and the light information of the picture obtained by the non-flash shooting, calculating the focusing parameter, the exposure parameter and the white balance parameter of the second flash shooting within the set time length; and dividing the flash shooting for the second time within the set time length according to the focusing parameter, the exposure parameter and the white balance parameter.
And step S102, calibrating the white balance parameters of the flash shooting according to the color information of the picture obtained by each flash shooting.
The white balance parameter calibration of the flash shooting is automatically carried out in the process of carrying out the flash shooting by the photographic equipment each time, so that the efficiency and the accuracy of the white balance parameter calibration of the flash shooting are effectively improved.
According to the method for calibrating the photographic equipment, the white balance parameters of the flash shooting can be automatically calibrated in the process of the flash shooting of the photographic equipment, so that the efficiency and the accuracy of the white balance parameter calibration of the flash shooting are effectively improved; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
A second embodiment of the present invention is a calibration method for a camera device, as shown in fig. 1 to 3, including the following steps:
step S101, when controlling the flash lamp to carry out flash shooting, carrying out two or more times of flash shooting in a set time length to obtain the color information of the picture obtained by each time of flash shooting.
In some embodiments of the invention, one or more non-flash shots are taken before the first flash shot within a set length of time; according to the light information of the picture obtained by the first flash shooting within the set time length and the light information of the picture obtained by the non-flash shooting, calculating focusing parameters and exposure parameters of other flash shooting except the first flash shooting within the set time length; and according to the focusing parameters and the exposure parameters, performing flash shooting except for the first flash shooting within a set time length.
In some embodiments of the present invention, the number of flash lamps is not particularly limited. The flash may be a flash provided inside the photographing apparatus or a flash provided outside the photographing apparatus.
Optionally, step S101 includes:
the color information of the picture comprises: color information of a set region in the picture, and/or color information of a set object in the picture.
When the flash lamp is controlled to carry out flash shooting, the color information of a set area in a picture obtained by each flash shooting and/or the color information of a set object in the picture are obtained by carrying out the flash shooting twice or more within a set time length.
For example: step S101, including: when the flash is controlled to perform flash shooting, color information of the set area a in a picture obtained by each flash shooting is acquired by performing flash shooting twice within a set time period of 0.1S (as shown in fig. 2).
For another example: step S101, including: when the flash is controlled to perform flash shooting, color information of the set object B in a picture obtained by each flash shooting is acquired by performing flash shooting twice within a set time period of 0.1S (as shown in fig. 3).
And step S102, calibrating the white balance parameters of the flash shooting according to the color information of the picture obtained by each flash shooting.
Optionally, step S102 includes:
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
calibrating the white balance parameter of flash shooting according to the color information comparison value;
the method for calibrating the white balance parameter shot by the flash according to the color information comparison value comprises the following steps:
judging whether the color information comparison value is greater than a first set threshold value or not;
if the color information comparison value is judged to be larger than the first set threshold value, calibrating the white balance parameter shot by flashing according to the color information comparison value; otherwise, the white balance parameters of the flash shot are not calibrated.
Judging whether the color information comparison value is greater than a first set threshold value;
if the comparison value of the color information is judged to be larger than the first set threshold value, judging whether the comparison value of the color information is larger than a second set threshold value; otherwise, the white balance parameters of the flash shot are not calibrated.
If the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameter of the flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
And judging whether the object in the picture within the set time length is changed rapidly (for example, flash shooting is carried out on the object moving at high speed) and/or whether the light in the picture within the set time length is unstable (for example, flash shooting is carried out on the object with the rapidly changed light on the stage) according to a second set threshold. And when the object in the picture in the set time length is rapidly changed and/or the light in the picture in the set time length is unstable, calibrating the white balance parameter shot by the flash according to the color information comparison value to obtain the serious deviation of the white balance parameter shot by the flash. Therefore, if the color information comparison value is greater than the second set threshold, the calibration of the white balance parameter for flash photography is prohibited.
The white balance parameter calibration of the flash shooting is automatically carried out in the process of carrying out the flash shooting by the photographic equipment each time, so that the efficiency and the accuracy of the white balance parameter calibration of the flash shooting are effectively improved.
Wherein, the color information of the picture comprises: color information of a set region in the picture, and/or color information of a set object in the picture.
The calibration method for the photographic equipment according to the second embodiment of the invention can automatically calibrate the white balance parameters of flash shooting in the process of flash shooting of the photographic equipment, thereby effectively improving the efficiency and accuracy of the white balance parameter calibration of flash shooting; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
A third embodiment of the present invention is based on the above embodiments, and an application example of the present invention is described with reference to fig. 2 to 3 by taking a calibration method of a camera device as an example.
Step S301, when the flash lamp is controlled to carry out flash shooting, carrying out non-flash shooting once to obtain light information of the non-flash shooting.
The light information captured without flashing includes but is not limited to: scene brightness information photographed without flashing.
Step S302, after the first set time length, the first flash shooting is carried out, and the light information of the first flash shooting and the color information of the picture of the first flash shooting are obtained.
Optionally, the first set time period is 0.1 s.
The light information of the first flash shooting includes but is not limited to: scene brightness information of a first flash shot.
And step S303, after the second set time, carrying out second flash shooting according to the light information of the non-flash shooting and the light information of the first flash shooting to obtain the color information of the picture shot at the second flash shooting.
Optionally, the second set time period is 0.1 s.
According to the light information of the non-flash shooting and the light information of the first flash shooting, the mode of the second flash shooting comprises the following steps:
according to the scene brightness information of the non-flash shooting and the scene brightness information of the primary flash shooting, calculating focusing parameters and exposure parameters of the secondary flash shooting by combining targets in the scene; and carrying out the second flash shooting according to the focusing parameters and the exposure parameters of the second flash shooting.
And step S304, calibrating the white balance parameters of the flash shooting according to the color information of the picture shot by the first flash shooting and the color information of the picture shot by the second flash shooting.
Wherein, the color information of the picture comprises: color information of a set region in the picture, and/or color information of a set object in the picture.
Optionally, step S304 includes:
and calibrating the white balance parameters of the flash shooting according to the color information of the set area in the picture shot by the first flash shooting and the color information of the set area in the picture shot by the second flash shooting.
For example: as shown in fig. 2, the white balance parameter of flash photography is calibrated based on the color information of the set area a in the picture taken with the first flash and the color information of the set area a in the picture taken with the second flash.
Calculating a color information R/G difference value and a color information B/G difference value of the first flash shooting and the second flash shooting according to the pixel average R/G value and the pixel average B/G value of the set area A in the picture shot by the first flash shooting and the pixel average R/G value and the pixel average B/G value of the set area A in the picture shot by the second flash shooting;
the R/G difference value is the difference value between the average R/G value of the pixels in the set area A in the picture shot by the first flash and the average R/G value of the set area A in the picture shot by the second flash;
the B/G difference value is the difference value between the pixel average B/G value of the set area A in the picture shot by the first flash and the average B/G value of the set area A in the picture shot by the second flash;
the white balance parameters before calibration were R-gain, G-gain, and B-gain; the white balance parameters after calibration are R-gain ', G-gain ' and B-gain '
Setting the average R/G value × R of pixels in the area a in the picture taken with the first flash;
b-gain ═ B-gain- (B-gain) × B/G difference/pixel average B/G value × r of the area a in the picture taken with the first flash;
G-gain’=G-gain;
wherein r is an adjustment coefficient; optionally r is 0.8.
Optionally, step S304 includes:
and calibrating the white balance parameters of the flash shooting according to the color information of the set object in the picture shot by the first flash and the color information of the set object in the picture shot by the second flash.
For example: as shown in fig. 3, according to a preset object recognition and boundary recognition algorithm, extracting all the same objects in the first flash shot picture and the second flash shot picture, recognizing all the objects, selecting the centered object to set an object B;
and calibrating the white balance parameters of the flash shooting according to the color information of the object B set in the picture shot by the first flash and the color information of the object B set in the picture shot by the second flash.
Setting the pixel average R/G value and B/G value of an object B in a picture shot by a first flash, setting the average R/G value and B/G value of the object B in a picture shot by a second flash, and calculating the color information R/G difference value and B/G difference value of the first flash and the second flash;
the R/G difference value is the difference value between the pixel average R/G value of the set object B in the picture shot by the first flash and the average R/G value of the set object B in the picture shot by the second flash;
the B/G difference value is the difference value between the pixel average B/G value of the set object B in the picture shot by the first flash and the average B/G value of the set object B in the picture shot by the second flash;
the white balance parameters before calibration were R-gain, G-gain, and B-gain; the white balance parameters after calibration are R-gain ', G-gain ' and B-gain '
Setting the pixel average R/G value x R of the object B in the picture shot by the first flash of R-gain ═ R-gain- (R-gain) x B/G difference;
setting the pixel average B/G value x r of the object B in the picture shot by the first flash;
G-gain’=G-gain;
wherein r is an adjustment coefficient; optionally r is 0.8.
Optionally, step S304 includes:
calculating the color difference value of the pictures shot by the two times of flashing according to the color information of the pictures shot by the first flashing and the color information of the pictures shot by the second flashing;
judging whether the color difference value of the pictures shot by the flash light twice is larger than a set threshold value or not;
if the color difference value of the pictures shot by the two times of flashes is larger than a set threshold value, calibrating the white balance parameters shot by the flashes; otherwise, the white balance parameters of the flash shot are not calibrated.
Wherein, optionally, the threshold is set to 0.15.
The calibration method for the photographic equipment according to the third embodiment of the invention can automatically calibrate the white balance parameters of flash shooting in the process of flash shooting of the photographic equipment, thereby effectively improving the efficiency and accuracy of the white balance parameter calibration of flash shooting; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
A fourth embodiment of the present invention, a photographing apparatus, as shown in fig. 4, includes the following components:
a processor 501, a memory 502, and a flash 503. In some embodiments of the invention, the processor 501, the memory 502, and the flash 503 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502, and perform the following operations:
1) when the flash 503 is controlled to perform flash shooting, color information of a picture obtained by each flash shooting is acquired by performing flash shooting twice or more for a set time period.
In some embodiments of the invention, one or more non-flash shots are taken before the first flash shot within a set length of time; according to the light information of the picture obtained by the first flash shooting within the set time length and the light information of the picture obtained by the non-flash shooting, calculating focusing parameters, exposure parameters and white balance parameters of other flash shooting except the first flash shooting within the set time length; and according to the focusing parameter, the exposure parameter and the white balance parameter, performing flash shooting except for the first flash shooting within a set time length.
In some embodiments of the present invention, the number of the flash lamps 503 is not particularly limited. The flash 503 may be a flash provided inside the photographing apparatus or may be a flash provided outside the photographing apparatus.
For example: when the flash lamp 503 is controlled to flash and shoot, the color information of the picture obtained by each flash shooting is obtained by carrying out two flash shooting within the set time length of 0.1 s;
wherein, before the first flash shooting within the set time length of 0.1s, the non-flash shooting is carried out; according to the light information of the picture obtained by the first flash shooting within the set time length of 0.1s and the light information of the picture obtained by the non-flash shooting, calculating the focusing parameter, the exposure parameter and the white balance parameter of the second flash shooting within the set time length; and dividing the flash shooting for the second time within the set time length according to the focusing parameter, the exposure parameter and the white balance parameter.
2) And calibrating the white balance parameters of the flash shooting according to the color information of the picture obtained by each flash shooting.
The white balance parameter calibration of the flash shooting is automatically carried out in the process of carrying out the flash shooting by the photographic equipment each time, so that the efficiency and the accuracy of the white balance parameter calibration of the flash shooting are effectively improved.
The photographic equipment of the fourth embodiment of the invention can automatically calibrate the white balance parameters of flash shooting in the process of flash shooting of the photographic equipment, thereby effectively improving the efficiency and accuracy of the white balance parameter calibration of flash shooting; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
A fifth embodiment of the present invention, a photographing apparatus, as shown in fig. 4, includes the following components:
a processor 501, a memory 502, and a flash 503. In some embodiments of the invention, the processor 501, the memory 502, and the flash 503 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502, and perform the following operations:
1) when the flash 503 is controlled to perform flash shooting, color information of a picture obtained by each flash shooting is acquired by performing flash shooting twice or more for a set time period.
In some embodiments of the invention, one or more non-flash shots are taken before the first flash shot within a set length of time; according to the light information of the picture obtained by the first flash shooting within the set time length and the light information of the picture obtained by the non-flash shooting, calculating focusing parameters, exposure parameters and white balance parameters of other flash shooting except the first flash shooting within the set time length; and according to the focusing parameter, the exposure parameter and the white balance parameter, performing flash shooting except for the first flash shooting within a set time length.
In some embodiments of the present invention, the number of the flash lamps 503 is not particularly limited. The flash 503 may be a flash provided inside the photographing apparatus or may be a flash provided outside the photographing apparatus.
Optionally, when the flash 503 is controlled to perform flash shooting, a mode of obtaining color information of a picture obtained by each flash shooting by performing flash shooting twice or more than two times within a set time duration includes:
the color information of the picture comprises: color information of a set region in the picture, and/or color information of a set object in the picture.
When the flash 503 is controlled to perform flash shooting, by performing flash shooting twice or more for a set time period, color information of a set area in a picture obtained by each flash shooting and/or color information of a set object in the picture are acquired.
For example: when the flash 503 is controlled to perform flash shooting, color information of the set area a in a picture obtained by each flash shooting is acquired by performing flash shooting twice for a set time period of 0.1S (as shown in fig. 2).
For another example: when the flash 503 is controlled to perform flash shooting, color information of the set object B in a picture obtained by each flash shooting is acquired by performing flash shooting twice for a set time period of 0.1S (as shown in fig. 3).
2) And calibrating the white balance parameters of the flash shooting according to the color information of the picture obtained by each flash shooting.
Optionally, the method of calibrating the white balance parameter of flash shooting according to the color information of the picture obtained by flash shooting includes:
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
calibrating the white balance parameter of flash shooting according to the color information comparison value;
the method for calibrating the white balance parameter shot by the flash according to the color information comparison value comprises the following steps:
judging whether the color information comparison value is greater than a first set threshold value or not;
if the color information comparison value is judged to be larger than the first set threshold value, calibrating the white balance parameter shot by flashing according to the color information comparison value; otherwise, the white balance parameters of the flash shot are not calibrated.
Judging whether the color information comparison value is greater than a first set threshold value;
if the comparison value of the color information is judged to be larger than the first set threshold value, judging whether the comparison value of the color information is larger than a second set threshold value; otherwise, the white balance parameters of the flash shot are not calibrated.
If the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameter of the flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
And judging whether the object in the picture within the set time length is changed rapidly (for example, flash shooting is carried out on the object moving at high speed) and/or whether the light in the picture within the set time length is unstable (for example, flash shooting is carried out on the object with the rapidly changed light on the stage) according to a second set threshold. And when the object in the picture in the set time length is rapidly changed and/or the light in the picture in the set time length is unstable, calibrating the white balance parameter shot by the flash according to the color information comparison value to obtain the serious deviation of the white balance parameter shot by the flash. Therefore, if the color information comparison value is greater than the second set threshold, the calibration of the white balance parameter for flash photography is prohibited.
The white balance parameter calibration of the flash shooting is automatically carried out in the process of carrying out the flash shooting by the photographic equipment each time, so that the efficiency and the accuracy of the white balance parameter calibration of the flash shooting are effectively improved.
Wherein, the color information of the picture comprises: color information of a set region in the picture, and/or color information of a set object in the picture.
The photographic equipment of the fifth embodiment of the invention can automatically calibrate the white balance parameters of flash shooting in the process of flash shooting of the photographic equipment, thereby effectively improving the efficiency and accuracy of the white balance parameter calibration of flash shooting; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
A sixth embodiment of the present invention is a computer-readable storage medium.
The computer storage media may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
The computer readable storage medium stores one or more programs which are executable by one or more processors to implement some or all of the steps in any of the first to third embodiments of the present invention.
The computer-readable storage medium according to the sixth embodiment of the present invention stores one or more programs, where the one or more programs are executable by one or more processors, and can automatically calibrate the white balance parameters of flash photography during flash photography of the photographing apparatus, so as to effectively improve the efficiency and accuracy of white balance parameter calibration of flash photography; the white balance parameter calibration of flash shooting of the photographic equipment in the production stage due to the addition of a test engineer is avoided, and the production cost of the photographic equipment is effectively reduced.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (7)

1. A method for calibrating a camera device, comprising:
when a flash lamp is controlled to carry out flash shooting, carrying out flash shooting for two times or more than two times within a set time length to obtain color information of a picture obtained by each flash shooting;
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
according to the color information comparison value, calibrating the white balance parameter of flash shooting, comprising:
calculating a color information R/G difference value and a color information B/G difference value of the first flash shooting and the second flash shooting according to the pixel average R/G value and the pixel average B/G value of a set area A or a set object B in the picture shot by the first flash shooting and the pixel average R/G value and the pixel average B/G value of a set area A or a set object B in the picture shot by the second flash shooting;
the R/G difference value is the difference value between the pixel average R/G value of the set area A or the set object B in the picture shot by the first flash and the pixel average R/G value of the set area A or the set object B in the picture shot by the second flash;
the B/G difference value is the difference value between the pixel average B/G value of the set area A or the set object B in the picture shot by the first flash and the average B/G value of the set area A or the set object B in the picture shot by the second flash;
setting an area A or setting a pixel average R/G value x R of an object B in a picture shot by first flash;
setting an area A or setting a pixel average B/G value x r of an object B in a picture shot by a first flash;
G-gain’=G-gain;
r-gain is red gain before calibration, G-gain is green gain before calibration, B-gain is blue gain before calibration, R-gain ' is red gain after calibration, G-gain ' is green gain after calibration, and B-gain ' is blue gain after calibration; r is an adjustment coefficient; r-gain, G-gain and B-gain were obtained by one non-flash shot and the first flash shot.
2. The method of claim 1, wherein calibrating the white balance parameter for flash photography according to the color information comparison value comprises:
judging whether the color information comparison value is larger than a first set threshold value or not;
and under the condition that the color information comparison value is greater than a first set threshold value, calibrating the white balance parameter of flash shooting according to the color information comparison value.
3. The method according to claim 2, wherein the calibrating the white balance parameter of the flash photography according to the color information comparison value in the case that the color information comparison value is greater than a first set threshold value comprises:
under the condition that the color information comparison value is greater than a first set threshold value, judging whether the color information comparison value is greater than a second set threshold value;
if the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameters of flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
4. A photographic device, characterized in that the photographic device comprises a processor, a memory and a flash;
the processor is configured to execute a camera device calibration program stored in the memory to perform the steps of:
when the flash lamp is controlled to carry out flash shooting, carrying out flash shooting for two times or more than two times within a set time length to obtain color information of a picture obtained by each flash shooting;
comparing color information of pictures obtained by at least two times of flash shooting to obtain a color information comparison value;
according to the color information comparison value, calibrating the white balance parameter of flash shooting, comprising:
calculating a color information R/G difference value and a color information B/G difference value of the first flash shooting and the second flash shooting according to the pixel average R/G value and the pixel average B/G value of a set area A or a set object B in the picture shot by the first flash shooting and the pixel average R/G value and the pixel average B/G value of a set area A or a set object B in the picture shot by the second flash shooting;
the R/G difference value is the difference value between the pixel average R/G value of the set area A or the set object B in the picture shot by the first flash and the pixel average R/G value of the set area A or the set object B in the picture shot by the second flash;
the B/G difference value is the difference value between the pixel average B/G value of the set area A or the set object B in the picture shot by the first flash and the average B/G value of the set area A or the set object B in the picture shot by the second flash;
setting an area A or setting a pixel average R/G value x R of an object B in a picture shot by first flash;
setting an area A or setting a pixel average B/G value x r of an object B in a picture shot by a first flash;
G-gain’=G-gain;
r-gain is red gain before calibration, G-gain is green gain before calibration, B-gain is blue gain before calibration, R-gain ' is red gain after calibration, G-gain ' is green gain after calibration, and B-gain ' is blue gain after calibration; r is an adjustment coefficient; r-gain, G-gain and B-gain were obtained by one non-flash shot and the first flash shot.
5. The apparatus of claim 4, wherein the calibrating the white balance parameter of the flash photography according to the color information comparison value comprises:
judging whether the color information comparison value is larger than a first set threshold value or not;
and under the condition that the color information comparison value is greater than a first set threshold value, calibrating the white balance parameter of flash shooting according to the color information comparison value.
6. The apparatus of claim 5, wherein the calibrating the white balance parameter of the flash photography according to the color information comparison value in the case where the color information comparison value is greater than a first set threshold value comprises:
under the condition that the color information comparison value is greater than a first set threshold value, judging whether the color information comparison value is greater than a second set threshold value;
if the color information comparison value is larger than a second set threshold value, the white balance parameter shot by flash is forbidden to be calibrated; otherwise, calibrating the white balance parameters of flash shooting according to the color information comparison value;
wherein the second set threshold is greater than the first set threshold.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the photographing apparatus calibration method according to any one of claims 1 to 3.
CN201810022276.8A 2018-01-10 2018-01-10 Camera calibration method, camera and computer readable storage medium Expired - Fee Related CN110022475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810022276.8A CN110022475B (en) 2018-01-10 2018-01-10 Camera calibration method, camera and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810022276.8A CN110022475B (en) 2018-01-10 2018-01-10 Camera calibration method, camera and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110022475A CN110022475A (en) 2019-07-16
CN110022475B true CN110022475B (en) 2021-10-15

Family

ID=67188019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810022276.8A Expired - Fee Related CN110022475B (en) 2018-01-10 2018-01-10 Camera calibration method, camera and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110022475B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1846447A (en) * 2003-09-04 2006-10-11 索尼株式会社 Image processing method, image processing apparatus, and computer program
CN101483717A (en) * 2008-01-08 2009-07-15 三星Techwin株式会社 Digital photographing apparatus and method for controlling the same
CN101600121A (en) * 2008-06-03 2009-12-09 亚洲光学股份有限公司 A kind of computational methods of white balance correct value
CN101889435A (en) * 2007-12-21 2010-11-17 诺基亚公司 Camera flash module and method for controlling same
CN102316327A (en) * 2010-07-06 2012-01-11 索尼公司 Image processing device, imaging method, and image processing method
CN104519204A (en) * 2013-10-01 2015-04-15 Lg电子株式会社 Mobile terminal and control method thereof
CN106604009A (en) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 Method and device for achieving automatic white balance function

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101014662B1 (en) * 2004-01-14 2011-02-16 삼성전자주식회사 Method for setting and adapting preset white balance of digital photographing apparatus
US10070111B2 (en) * 2015-12-22 2018-09-04 Adobe Systems Incorporated Local white balance under mixed illumination using flash photography

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1846447A (en) * 2003-09-04 2006-10-11 索尼株式会社 Image processing method, image processing apparatus, and computer program
CN101889435A (en) * 2007-12-21 2010-11-17 诺基亚公司 Camera flash module and method for controlling same
CN101483717A (en) * 2008-01-08 2009-07-15 三星Techwin株式会社 Digital photographing apparatus and method for controlling the same
CN101600121A (en) * 2008-06-03 2009-12-09 亚洲光学股份有限公司 A kind of computational methods of white balance correct value
CN102316327A (en) * 2010-07-06 2012-01-11 索尼公司 Image processing device, imaging method, and image processing method
CN104519204A (en) * 2013-10-01 2015-04-15 Lg电子株式会社 Mobile terminal and control method thereof
CN106604009A (en) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 Method and device for achieving automatic white balance function

Also Published As

Publication number Publication date
CN110022475A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN104320593A (en) Automatic exposure control method for digital photographic device
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
JP2001311980A (en) Exposure controller
JP6303304B2 (en) camera
CN110493539B (en) Automatic exposure processing method, processing device and electronic equipment
JP2004236300A (en) Digital camera
TWI394443B (en) Image brightness correction method
CN102495511A (en) Automatic exposure regulating method for camera
CN112218065B (en) Image white balance method, system, terminal device and storage medium
JP2015130615A (en) Imaging device, control method of the same, and program
CN112351218A (en) Automatic exposure method, device, electronic equipment and computer readable storage medium
CN111447372B (en) Control method, device, equipment and medium for brightness parameter adjustment
TWI493968B (en) Method for capturing image
TWI472222B (en) Image brightness compensation method and digital image pickup device with image brightness compensation
WO2020107289A1 (en) Photographing method and apparatus, and unmanned aerial vehicle
CN110022475B (en) Camera calibration method, camera and computer readable storage medium
WO2015192545A1 (en) Photographing method and apparatus and computer storage medium
CN110072050B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
CN114125317A (en) Exposure control method, device, equipment and storage medium
CN108989696B (en) Automatic exposure method based on heat map
CN112351197A (en) Shooting parameter adjusting method and device, storage medium and electronic equipment
CN115103130B (en) Aperture control method, device, equipment and storage medium
CN114615439B (en) Exposure statistical method, device, electronic equipment and medium
CN111357276A (en) Shooting method and device and unmanned aerial vehicle
JP3970071B2 (en) Imaging apparatus, dimming method in imaging apparatus, program, and computer-readable storage medium

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211015