CN114302068A - Image shooting method and device - Google Patents

Image shooting method and device Download PDF

Info

Publication number
CN114302068A
CN114302068A CN202210010747.XA CN202210010747A CN114302068A CN 114302068 A CN114302068 A CN 114302068A CN 202210010747 A CN202210010747 A CN 202210010747A CN 114302068 A CN114302068 A CN 114302068A
Authority
CN
China
Prior art keywords
image
pixel
preset
exposure time
exposure
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
CN202210010747.XA
Other languages
Chinese (zh)
Other versions
CN114302068B (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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202210010747.XA priority Critical patent/CN114302068B/en
Publication of CN114302068A publication Critical patent/CN114302068A/en
Application granted granted Critical
Publication of CN114302068B publication Critical patent/CN114302068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of image acquisition, and provides an image shooting method and device, which are applied to a main control chip in image shooting equipment, wherein the method comprises the following steps: the method comprises the steps that under the condition that a light supplementing device supplements light based on preset first light supplementing intensity, a lens is controlled to shoot a first image frame based on preset first exposure time; under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, the lens is controlled to shoot a second image frame based on preset second exposure time, and the sum of the first exposure time and the second exposure time is equal to the preset single-frame exposure duration; and fusing the first image frame and the second image frame to obtain a final image. The invention can obtain the final image of which the foreground and the background can both meet the definition, and can well meet the definition requirement of the shot image.

Description

Image shooting method and device
Technical Field
The invention relates to the technical field of image acquisition, in particular to an image shooting method and device.
Background
The existing network camera generally adopts a mode of white light, infrared, white light and infrared mixed supplementary lighting, even laser supplementary lighting, the supplementary lighting operation is not generally carried out on the scene in the daytime, and the supplementary lighting is not needed because the lighting brightness of the scene in the daytime is enough; in a night scene, because the illumination brightness is not enough, light supplementing operation is required, so that the brightness and definition of image exposure are ensured, and the image effect output by the network camera is not too dark.
However, when the current network camera performs light supplement operation, the definition and brightness of a near object can be ensured when the light supplement is performed on the near object, but the definition and brightness of a far background cannot be ensured, so that the far background is too dark; when the light is compensated for far, the definition and brightness of a background and an object at far can be ensured, but the definition and brightness of an object at near cannot be ensured, so that the brightness of the object at near is too high, and overexposure is caused; the sharpness of the final captured image does not meet the requirements.
Disclosure of Invention
The invention aims to provide an image shooting method and equipment, which can simultaneously ensure the definition of a near foreground and a far background in a shot image and excellently meet the definition requirement of the shot image.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides an image capturing method applied to a main control chip in an image capturing device, where the image capturing device further includes a lens and a light supplement device, both of which are electrically connected to the main control chip, and the method includes: the method comprises the steps that under the condition that a light supplementing device supplements light based on preset first light supplementing intensity, a lens is controlled to shoot a first image frame based on preset first exposure time, wherein the definition of a background in the first image frame meets a first preset condition; under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, controlling the lens to shoot a second image frame based on preset second exposure time, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to preset single-frame exposure time; receiving the first image frame and the second image frame sent by the lens; and fusing the first image frame and the second image frame to obtain a final image.
In a second aspect, the present invention provides an image capturing apparatus, where the image capturing apparatus includes a main control chip, a lens and a light supplement device, and both the lens and the light supplement device are electrically connected to the main control chip; the main control chip is used for controlling the lens to shoot a first image frame based on a preset first exposure time under the condition that the light supplementing device supplements light based on a preset first light supplementing intensity, wherein the definition of a background in the first image frame meets a first preset condition; the main control chip is further configured to control the lens to shoot a second image frame based on a preset second exposure time under the condition that the light supplementing device supplements light based on a preset second light supplementing intensity, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to a preset single-frame exposure duration; the lens is used for sending the first image frame and the second image frame to the main control chip; the main control chip is further configured to fuse the first image frame and the second image frame to obtain a final image.
Compared with the prior art, the method and the device have the advantages that under the condition that the light supplementing device supplements light based on the preset first light supplementing intensity, the lens is controlled to shoot the first image frame based on the preset first exposure time, wherein the definition of the background in the first image frame meets the first preset condition; under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, the lens is controlled to shoot a second image frame based on preset second exposure time, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to preset single-frame exposure time; and finally, the first image frame and the second image frame are fused to obtain a final image of which the foreground and the background can both meet the definition, and the definition requirement of the shot image is well met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a timing diagram of PWM control for exposure and fill light according to the prior art according to an embodiment of the present invention.
Fig. 2 is a block diagram of an image capturing apparatus according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating an image capturing method according to an embodiment of the present invention.
FIG. 4 is a diagram illustrating a single frame exposure duration of the prior art according to an embodiment of the present invention.
Fig. 5 is a diagram illustrating exposure time of a double-frame exposure according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating another image capturing method according to an embodiment of the present invention.
Fig. 7 is an exemplary diagram of an image luminance histogram according to an embodiment of the present invention.
FIG. 8 is a diagram illustrating intensity control during an exposure time according to the prior art.
Fig. 9 is a diagram illustrating an exemplary intensity control during a dual frame exposure period according to an embodiment of the present invention.
Fig. 10 is a flowchart illustrating another image capturing method according to an embodiment of the present invention.
Fig. 11 is a flowchart illustrating another image capturing method according to an embodiment of the present invention.
Fig. 12 is an exemplary diagram of linear relationships and relationships between weight thresholds and first and second pixel thresholds according to an embodiment of the present invention.
Icon: 10-an image capture device; 11-a main control chip; 12-a lens; 121-an image sensor; 122 — optics; 13-a light supplementing device; 131-a light supplement lamp; 132-fill light controller.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
The light filling mode adopted in the existing shooting technology is that the far background is clear and bright in some images with high light filling intensity, but the brightness is overexposed at the near position, or the light filling intensity is weak, the image is clear at the near position, but the far background is too dark and not clear, and the image which can meet the definition requirement of the far and near objects cannot be shot.
For the problem, although the method can suppress strong light and brighten dark places, the serious smear problem occurs when a photographed object is in a moving state, and the smear phenomenon is more serious when the object moves faster, the inventor researches the exposure and light supplement principle in the existing photographing technology, and finds that the existing image photographing equipment, such as a network camera, has two independent functions of image exposure and light supplement, and in a normal situation, when the network camera judges according to the brightness value L of an image, whether the light supplement needs to be started or not; when the image brightness is lower than the designated brightness value L1, the light supplement function is started; after the light supplement function is started, the light supplement is started, the image brightness is improved, the image exposure time is reduced, and the situation of overexposure of the image is avoided; when the ambient brightness is increased and the height appoints the brightness value L2, the light supplement function is turned off; after the light supplement function is closed, the image strength is reduced, and the image exposure time is prolonged; the exposure period of the image is 40ms one frame under normal conditions, and the exposure time is 0-10 ms; the fill-in light is controlled by Pulse-width Modulation (PWM), the control frequency is f (PWM) KHz, please refer to fig. 1, fig. 1 is a timing diagram of PWM control of exposure and fill-in light in the prior art provided by the embodiment of the present invention, in fig. 1, T is the image exposure time, and T is the exposure period; the supplementary lighting is performed in a function-on state whether in the image exposure time t or in the non-exposure time.
Through the above intensive research on the implementation principles of exposure and fill-in light, the inventor finds that although the wide dynamic mode adopts the double-frame exposure, the exposure duration strategy is not changed at all, only the single long-short frame exposure is adopted, and the total duration of the long-short frame exposure time in the double-frame exposure is greater than that of the single exposure, so that the total exposure duration is lengthened, which is the root cause of smear generation.
Referring to fig. 2, fig. 2 is a block schematic diagram of an image capturing apparatus 10 according to an embodiment of the present invention, where the image capturing apparatus 10 includes a main control chip 11, a lens 12, and a light supplement device 13, and the main control chip 11 is electrically connected to both the lens 12 and the light supplement device 13. The main control chip 11 sets the exposure time and the light supplement intensity, the main control chip 11 controls the light supplement device 13 to supplement light based on the light supplement intensity, and the main control chip 11 controls the lens to take a picture based on the exposure time.
The main control Chip 11 may be a System on Chip (SoC), which is also called a System on Chip (SoC), and is an integrated circuit with a special purpose, which includes a complete System and has all contents of embedded software, and has functions of executing a software program to perform data processing and hardware control.
The lens 12 is used for capturing images, and may be a single lens or a lens module consisting of a plurality of lenses.
In order to facilitate the SoC to process the image, as a specific embodiment, the lens 12 may include an image sensor 121 and an optical device 122, the main control chip 11 is electrically connected to the image sensor 121, and the lens 12 converts an optical signal captured when the optical device 122 shoots the object to be shot into raw image data through the image sensor 121 thereof and transmits the raw image data to the main control chip 11. The image sensor 121 may be a CMOS image sensor.
The light supplement device 13 is used for supplementing light to the target object to be photographed.
As a specific implementation manner, the light supplement device 13 may further include a light supplement lamp 131 and a light supplement controller 132, the main control chip 11 is electrically connected to the light supplement controller 132, and the main control chip 11 controls the light supplement lamp 131 to emit light by controlling the light supplement controller 132 according to a specified light supplement intensity. The fill light controller 132 may be PWM controlled.
On the basis of fig. 2, an embodiment of the present invention further provides an image capturing method applied to the main control chip 11 in the image capturing device in fig. 1, please refer to fig. 3, where fig. 3 is a flowchart illustrating an image capturing method according to an embodiment of the present invention, where the method includes the following steps:
step S100, under the condition that the light supplementing device supplements light based on a preset first light supplementing intensity, the lens is controlled to shoot a first image frame based on a preset first exposure time, wherein the definition of a background in the first image frame meets a first preset condition.
In this embodiment, the first exposure time and the first fill light intensity may be empirical values preset according to experimental data, and different first exposure times and different first fill light intensities may be set for different application scenes or for different light intensity environments.
In this embodiment, the first image frame is an image whose definition of the background satisfies a first preset condition, and the definition of the background satisfies the first preset condition may be that the definition of the background is greater than or equal to a first preset definition threshold. The first image frame may be shot according to the first exposure time under the condition of the first fill-in light intensity fill-in light, or may be shot according to the first exposure time under the condition of the adjusted first fill-in light intensity fill-in light, or shot according to the adjusted first exposure time after the exposure time is adjusted on the basis of the first exposure time.
And S101, under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, controlling the lens to shoot a second image frame based on preset second exposure time, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to preset single-frame exposure time.
In this embodiment, the second exposure time and the second fill light intensity may both be empirical values preset according to experimental data, and different second exposure times and different second fill light intensities may be set for different application scenes or for different light intensity environments.
In this embodiment, the second image frame is an image whose background definition meets a second preset condition, and the meeting of the background definition meets the second preset condition may be that the background definition is greater than or equal to a first preset definition threshold. The second image frame may be shot according to the second exposure time under the condition of the second fill-in light intensity, or may be shot according to the second exposure time after the fill-in light intensity is adjusted and shot according to the second exposure time under the condition of the adjusted second fill-in light intensity, or shot according to the adjusted second exposure time after the exposure time is adjusted and shot according to the adjusted second exposure time.
In this embodiment, the sum of the first exposure time and the second exposure time is equal to a preset single-frame exposure duration, and the single-frame exposure duration is the exposure duration of a single-frame single exposure. A single frame single exposure is a shooting mode generally adopted by a conventional image shooting device, and the shooting mode is a shooting mode in which a shutter button is pressed to the bottom once, and a camera opens a shutter only once regardless of the time length of pressing the shutter button, and only one frame of image is shot by exposure, please refer to fig. 4, fig. 4 is an exemplary diagram of a single frame exposure time length of the conventional technology provided by an embodiment of the present invention, in fig. 4, T1 is a single frame exposure time, T2 is a non-exposure time, and T is an exposure period.
In this embodiment, two image frames are captured within a single frame exposure duration at two different exposure times, a first image frame is captured based on a first exposure time and a first fill-in intensity, and a second image frame is captured based on a second exposure time and a second fill-in intensity, please refer to fig. 5, fig. 5 is an exemplary diagram of the exposure time of the dual frame exposure provided by the embodiment of the present invention, in fig. 5, T11 is the first exposure time, T12 is the second exposure time, T2 is a non-exposure time, and T is an exposure period.
Note that t11 and t12 in fig. 5 may be preset values or values adjusted based on preset values, but both t11 and t12 need to satisfy t11+ t12 to t1 regardless of the adjustment.
Step S102, receiving a first image frame and a second image frame sent by a lens.
And step S103, fusing the first image frame and the second image frame to obtain a final image.
In this embodiment, image fusion refers to extracting the beneficial information in each channel to the maximum extent by processing the image data about the same target collected by the multi-source channels through image processing, computer technology, and the like, and finally synthesizing into a high-quality image.
According to the method provided by the embodiment, the first image frame meeting the first preset condition and the second image frame meeting the second preset condition are shot in the single-frame exposure time, and finally the first image frame and the second image frame are fused to obtain the final image of which the foreground and the background can meet the definition, so that the definition requirement of the shot image is met well.
On the basis of fig. 3, an embodiment of the present invention further provides a specific implementation manner for capturing a first image frame, referring to fig. 6, fig. 6 is a flowchart illustrating another image capturing method provided in the embodiment of the present invention, and step S100 includes the following sub-steps:
in the substep S1000, the first exposure time is taken as the current first exposure time, and the first fill-in light intensity is taken as the current first fill-in light intensity.
Substep S1001:
s11: the method comprises the steps that under the condition that a light supplementing device supplements light based on current first light supplementing intensity, a lens is controlled to shoot a first exposure image based on current first exposure time;
s12: receiving a first exposure image sent by a lens;
s13: if the first exposure image does not meet the first preset condition, adjusting the current first exposure time and the current first fill-in light intensity, replacing the current first exposure time with the adjusted current first exposure time, replacing the current first fill-in light intensity with the adjusted current first fill-in light intensity, and repeatedly executing the steps S11-S13 until the first exposure image meets the first preset condition.
In this embodiment, as a specific determination method, it may be determined whether the first exposure image satisfies the first preset condition through the image brightness histogram, where the specific method is as follows:
firstly, generating an image brightness histogram of the first exposure image according to the brightness value of each pixel point in the first exposure image, wherein the image brightness histogram is used for representing a distribution graph of the brightness values of all the pixel points.
In this embodiment, the first exposure image includes a plurality of pixel points, each pixel point corresponds to a brightness value, and a value range of the brightness value is: [0, 255], the higher the luminance value, the higher the luminance is represented, where 0 represents the darkest area of pure black, 255 represents the brightest pure white, and the middle number is the gray of different luminance. Referring to fig. 7, fig. 7 is an exemplary diagram of an image luminance histogram according to an embodiment of the present invention, in which a horizontal axis of the image luminance histogram represents luminance values of 0 to 255, and a vertical axis of the image luminance histogram represents the number of pixels corresponding to the luminance values.
And secondly, calculating the area ratio of the area of the pixel points with the brightness values in the preset interval in the image brightness histogram to the total area of all the pixel points in the image brightness histogram.
In this embodiment, the preset interval may be set as required, and in a general case, the preset interval is set as a preset range with a brightness value between 0 and 255, for example, the preset interval is a range with a brightness value between 100 and 200, taking fig. 7 as an example, the area of all black parts in fig. 7 is the total area of all pixel points in the image brightness histogram, and the area of the black part in the rectangular frame is the area of the pixel points with a brightness value in the preset interval in the image brightness histogram.
And finally, if the area ratio is larger than a preset value, judging that the first exposure image meets a first preset condition, otherwise, judging that the first exposure image does not meet the first preset condition.
In the present embodiment, the preset value can be set as required.
It should be further noted that, in the prior art, the fill-in light intensity is maintained unchanged during the exposure time, and this way cannot perform finer-grained adjustment according to the actual exposure time and the requirement of the definition of the image, so that the fill-in light effect cannot be optimal, please refer to fig. 8, where fig. 8 is an exemplary diagram of intensity control during the exposure time in the prior art provided by an embodiment of the present invention, and in fig. 8, the fill-in light intensity is always maintained at p0 during the exposure time t.
In this embodiment of the present invention, the first fill-in light intensity is further adjusted in a finer granularity based on a preset first fill-in light intensity, and the fill-in light intensity can be controlled within an exposure time, please refer to fig. 9, where fig. 9 is an exemplary diagram of intensity control within a dual-frame exposure time period provided in this embodiment of the present invention, in fig. 9, when the exposure time is within a time t1, the fill-in light intensity is p1, and when the exposure time is within a time t2, the fill-in light intensity is p 2.
In the sub-step S1002, the first exposure image satisfying the first preset condition is used as the first image frame.
In the method provided by this embodiment, under the condition that the preset first fill-in light intensity and the preset first exposure time do not meet the requirements, the first exposure image meeting the first preset condition is finally obtained by adjusting the first fill-in light intensity and the first exposure time.
On the basis of fig. 6, an embodiment of the present invention further provides a specific implementation manner for capturing a second image frame, referring to fig. 10, fig. 10 is a flowchart illustrating another image capturing method provided in the embodiment of the present invention, and step S101 includes the following sub-steps:
in sub-step S1011, the second exposure time is updated according to the single frame exposure time and the current first exposure time corresponding to the first image frame.
In this embodiment, after the first exposure time is updated, the second exposure time needs to be updated according to the updated exposure time, that is, the current first exposure time corresponding to the first image frame.
In the sub-step S1012, the updated second exposure time is used as the current second exposure time, and the second fill-in light intensity is used as the current second fill-in light intensity.
Substep S1013:
s21: under the condition that the light supplementing device supplements light based on the current second light supplementing intensity, the lens is controlled to shoot a second exposure image based on the second exposure time;
s22: receiving a second exposure image sent by the lens;
s23: if the second exposure image does not satisfy the second preset condition, adjusting the current second fill-in light intensity, updating the current second fill-in light intensity with the adjusted current second fill-in light intensity, and repeating the steps S21-S23 until the second exposure image satisfies the second preset condition.
In this embodiment, the manner of determining whether the second exposure image satisfies the second preset condition is the same as the manner of determining whether the first exposure image satisfies the first preset condition, and details thereof are not repeated here.
Substep S1014: and taking the second exposure image meeting the second preset condition as a second image frame.
In the method provided by this embodiment, under the condition that the preset second fill-in light intensity and the preset second exposure time do not meet the requirements, the second exposure image meeting the second preset condition is finally obtained by adjusting the second fill-in light intensity and the second exposure time.
It should be noted that fig. 10 is only a specific implementation manner, and in fact, sub-steps S1011 to S1014 may also directly replace step S101 in fig. 3, and at this time, the preset first fill-in light intensity and the preset first exposure time do not need to be adjusted, so that the first image frame meeting the first preset condition can be obtained, and only the preset second fill-in light intensity needs to be adjusted, so that the second image frame meeting the second preset condition can be obtained.
On the basis of fig. 3, an embodiment of the present invention further provides a specific implementation manner for fusing the first image frame and the second image frame, please refer to fig. 11, fig. 11 is a flowchart illustrating another image capturing method provided in the embodiment of the present invention, and step S103 includes the following sub-steps:
and a substep S1031, determining a first weight according to the first pixel point, the first pixel threshold and the second pixel threshold.
In this embodiment, there are a plurality of first pixel points, and for each first pixel point, the sub-step S1031 may be adopted to determine the first weight corresponding to the first pixel point.
In this embodiment, the first pixel threshold and the second pixel threshold may be set as needed. According to the difference of the values of the pixel values of the first pixel points, the mode of determining the first weight is different, and the method at least comprises the following three steps:
(1.1) if the pixel value of the first pixel point is smaller than the first pixel threshold, determining a first weight according to the first linear relation.
In this embodiment, the first linear relationship is determined according to the first weight threshold, the first pixel threshold and the preset maximum value, wherein the weight when the preset maximum value is the pixel value 0 is set as 100%.
(1.2) if the pixel value of the first pixel point is greater than or equal to the first pixel threshold value and smaller than the second pixel threshold value, determining the first weight according to the second linear relation.
In this embodiment, the second linear relationship is determined according to the first weight threshold, the second weight threshold, the first pixel threshold and the second pixel threshold.
(1.3) if the pixel value of the first pixel point is larger than or equal to the second pixel threshold, determining the first weight according to the third linear relation.
In this embodiment, the third linear relationship is determined according to the third weight threshold, the second pixel threshold and the preset minimum value, wherein the preset minimum value is the weight when the pixel value is 255 and is set to 0%.
And a substep S1032 of determining a second weight according to the second pixel point, the first pixel threshold and the second pixel threshold.
In this embodiment, there are a plurality of second pixel points, and for each second pixel point, the sub-step S1032 may be adopted to determine the second weight corresponding to the second pixel point.
In this embodiment, the manner of determining the second weight is different according to the difference in the values of the pixel values of the second pixel points, and at least includes the following three types:
and (2.1) if the pixel value of the second pixel point is smaller than the first pixel threshold, determining a second weight according to a fourth linear relation.
In this embodiment, the fourth linear relationship is determined according to the fourth weight threshold, the first pixel threshold and the preset minimum value, wherein the weight when the preset minimum value is 255 is set as 0%.
And (2.2) if the pixel value of the first pixel point is greater than or equal to the first pixel threshold and smaller than the second pixel threshold, determining a second weight according to a fifth linear relation.
In this embodiment, the fifth linear relationship is determined according to the fourth weight threshold, the third weight threshold, the first pixel threshold and the second pixel threshold.
And (2.3) if the pixel value of the first pixel point is greater than or equal to the second pixel threshold, determining a second weight according to a sixth linear relation.
In this embodiment, the sixth linear relationship is determined according to the third weight threshold, the second pixel threshold and the preset maximum value, and the weight when the preset maximum value is the pixel value 0 is set as 100%.
In this embodiment, the first weight threshold, the second weight threshold, the third weight threshold, and the fourth weight threshold may be set as needed. To more clearly illustrate the linear relationships and the relationships between the weight thresholds and the first pixel threshold and the second pixel threshold, please refer to fig. 12, in which fig. 12 is an exemplary diagram of the linear relationships and the relationships between the weight thresholds and the first pixel threshold and the second pixel threshold according to an embodiment of the present invention.
And a substep S1033 of calculating a pixel value of a third pixel point according to the pixel value of the first pixel point, the first weight, the pixel value of the second pixel point, and the second weight, and obtaining a final image.
In this embodiment, the pixel value pv of the third pixel point may be calculated by the following formula: pv1 w1+ pv2 w2, where pv1 is the pixel value of the first pixel, w1 is the first weight, pv2 is the pixel value of the second pixel, and w2 is the second weight.
According to the method provided by the embodiment, different first weights are respectively set for the first pixel points in the first image frame and different second weights are set for the second pixel points in the second image frame according to different conditions, so that the definition of the foreground and the background of the final image obtained by fusion meets the requirement.
It should be noted that sub-steps S1031 to S1033 of step S103 may also replace step S103 in fig. 6 or fig. 10 to achieve the corresponding technical effect.
In summary, an embodiment of the present invention provides an image capturing method and an image capturing apparatus, which are applied to a main control chip in an image capturing apparatus, where the image capturing apparatus further includes a lens and a light supplement device, and both the lens and the light supplement device are electrically connected to the main control chip, and the method includes: under the condition that the light supplementing device supplements light based on preset first light supplementing intensity, controlling a lens to shoot a first image frame based on preset first exposure time, wherein the definition of a background in the first image frame meets a first preset condition; under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, the lens is controlled to shoot a second image frame based on preset second exposure time, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to preset single-frame exposure time; receiving a first image frame and a second image frame sent by a lens; and fusing the first image frame and the second image frame to obtain a final image. Compared with the prior art, the image processing method and the image processing device have the advantages that the first image frame meeting the first preset condition and the second image frame meeting the second preset condition are shot in the single-frame exposure time, and finally the first image frame and the second image frame are fused to obtain the final image with the foreground and the background meeting the definition, so that the definition requirement of the shot image is met well.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. The image shooting method is characterized by being applied to a main control chip in image shooting equipment, wherein the image shooting equipment further comprises a lens and a light supplementing device, the lens and the light supplementing device are both electrically connected with the main control chip, and the method comprises the following steps:
the method comprises the steps that under the condition that a light supplementing device supplements light based on preset first light supplementing intensity, a lens is controlled to shoot a first image frame based on preset first exposure time, wherein the definition of a background in the first image frame meets a first preset condition;
under the condition that the light supplementing device supplements light based on preset second light supplementing intensity, controlling the lens to shoot a second image frame based on preset second exposure time, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to preset single-frame exposure time;
receiving the first image frame and the second image frame sent by the lens;
and fusing the first image frame and the second image frame to obtain a final image.
2. The image capturing method as claimed in claim 1, wherein the controlling the lens to capture the first image frame based on the preset first exposure time in the case where the supplementary lighting device performs supplementary lighting based on the preset first supplementary lighting intensity comprises:
taking the first exposure time as a current first exposure time, and taking the first supplementary lighting intensity as a current first supplementary lighting intensity;
s11: controlling the lens to shoot a first exposure image based on the current first exposure time under the condition that the light supplementing device supplements light based on the current first light supplementing intensity;
s12: receiving a first exposure image sent by the lens;
s13: if the first exposure image does not meet the first preset condition, adjusting the current first exposure time and the current first fill-in light intensity, replacing the current first exposure time with the adjusted current first exposure time, replacing the current first fill-in light intensity with the adjusted current first fill-in light intensity, and repeatedly executing the steps S11-S13 until the first exposure image meets the first preset condition;
and taking the first exposure image meeting the first preset condition as the first image frame.
3. The image capturing method of claim 2, wherein the first exposure image includes a plurality of pixels, each pixel corresponds to a brightness value, and if the first exposure image does not satisfy the first preset condition, the step of adjusting the current first exposure time and the current first fill-in light intensity includes:
generating an image brightness histogram of the first exposure image according to the brightness value of each pixel point in the first exposure image, wherein the image brightness histogram is used for representing a distribution graph of the brightness values of all the pixel points;
calculating the area ratio of the area of the pixel points with the brightness values in the preset interval in the image brightness histogram to the total area of all the pixel points in the image brightness histogram;
if the area ratio is larger than a preset value, the first exposure image is judged to meet the first preset condition, and if not, the first exposure image is judged not to meet the first preset condition.
4. The image capturing method as claimed in claim 2, wherein the controlling the lens to capture the second image frame based on the preset second exposure time in the case that the supplementary lighting device performs supplementary lighting based on the preset second supplementary lighting intensity comprises:
updating the second exposure time according to the single-frame exposure duration and the current first exposure time corresponding to the first image frame;
taking the updated second exposure time as the current second exposure time, and taking the second fill-in light intensity as the current second fill-in light intensity;
s21: controlling the lens to shoot a second exposure image based on the second exposure time under the condition that the light supplementing device supplements light based on the current second light supplementing intensity;
s22: receiving the second exposure image sent by the lens;
s23: if the second exposure image does not meet the second preset condition, adjusting the current second fill-in light intensity, updating the current second fill-in light intensity with the adjusted current second fill-in light intensity, and repeatedly executing the steps S21-S23 until the second exposure image meets the second preset condition;
and taking a second exposure image meeting a second preset condition as the second image frame.
5. The image capturing method as claimed in claim 1, wherein the first image frame includes first pixel points, the second image frame includes second pixel points, the final image includes third pixel points, and the step of fusing the first image frame and the second image frame to obtain the final image includes:
determining a first weight according to the first pixel point, the first pixel threshold and the second pixel threshold;
determining a second weight according to a second pixel point, the first pixel threshold and the second pixel threshold;
and calculating the pixel value of the third pixel point according to the pixel value of the first pixel point, the first weight, the pixel value of the second pixel point and the second weight to obtain a final image.
6. The image capture method of claim 5, wherein the determining a first weight based on the first pixel point, the first pixel threshold, and the second pixel threshold comprises:
if the pixel value of the first pixel point is smaller than the first pixel threshold value, determining a first weight according to a first linear relation;
if the pixel value of the first pixel point is greater than or equal to the first pixel threshold value and smaller than the second pixel threshold value, determining a first weight according to a second linear relation;
and if the pixel value of the first pixel point is greater than or equal to the second pixel threshold value, determining the first weight according to the third linear relation.
7. The image capturing method according to claim 6, wherein the first linear relationship is determined based on a first weight threshold, a first pixel threshold, and a preset maximum value, the second linear relationship is determined based on a first weight threshold, a second weight threshold, a first pixel threshold, and a second pixel threshold, and the third linear relationship is determined based on a third weight threshold, a second pixel threshold, and a preset minimum value.
8. The image capture method of claim 5, wherein the determining a second weight based on a second pixel point, the first pixel threshold, and the second pixel threshold comprises:
if the pixel value of the second pixel point is smaller than the first pixel threshold value, determining a second weight according to a fourth linear relation;
if the pixel value of the first pixel point is greater than or equal to the first pixel threshold value and smaller than the second pixel threshold value, determining a second weight according to a fifth linear relationship;
and if the pixel value of the first pixel point is greater than or equal to the second pixel threshold, determining a second weight according to a sixth linear relation.
9. The image capturing method according to claim 8, wherein the fourth linear relationship is determined based on a fourth weight threshold, a first pixel threshold, and a preset minimum value, the fifth linear relationship is determined based on a fourth weight threshold, a third weight threshold, a first pixel threshold, and a second pixel threshold, and the sixth linear relationship is determined based on a third weight threshold, a second pixel threshold, and a preset maximum value.
10. The image shooting equipment is characterized by comprising a main control chip, a lens and a light supplementing device, wherein the lens and the light supplementing device are both electrically connected with the main control chip;
the main control chip is used for controlling the lens to shoot a first image frame based on a preset first exposure time under the condition that the light supplementing device supplements light based on a preset first light supplementing intensity, wherein the definition of a background in the first image frame meets a first preset condition;
the main control chip is further configured to control the lens to shoot a second image frame based on a preset second exposure time under the condition that the light supplementing device supplements light based on a preset second light supplementing intensity, wherein the definition of a foreground in the second image frame meets a second preset condition, and the sum of the first exposure time and the second exposure time is equal to a preset single-frame exposure duration;
the lens is used for sending the first image frame and the second image frame to the main control chip;
the main control chip is further configured to fuse the first image frame and the second image frame to obtain a final image.
CN202210010747.XA 2022-01-06 2022-01-06 Image shooting method and device Active CN114302068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210010747.XA CN114302068B (en) 2022-01-06 2022-01-06 Image shooting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210010747.XA CN114302068B (en) 2022-01-06 2022-01-06 Image shooting method and device

Publications (2)

Publication Number Publication Date
CN114302068A true CN114302068A (en) 2022-04-08
CN114302068B CN114302068B (en) 2023-09-26

Family

ID=80976225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210010747.XA Active CN114302068B (en) 2022-01-06 2022-01-06 Image shooting method and device

Country Status (1)

Country Link
CN (1) CN114302068B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115767277A (en) * 2022-09-21 2023-03-07 盐城众拓视觉创意有限公司 Multi-view vision-based light supplementing method for green box shooting

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070103562A1 (en) * 2005-11-04 2007-05-10 Sony Corporation Image-pickup device, image-pickup method, and program
CN106534712A (en) * 2016-10-24 2017-03-22 北京旷视科技有限公司 Control method, image processing unit, light-filling and camera device
US20170171449A1 (en) * 2015-12-15 2017-06-15 Olympus Corporation Image pickup apparatus, non-transitory computer-readable medium storing computer program, and image pickup method
CN108881730A (en) * 2018-08-06 2018-11-23 成都西纬科技有限公司 Image interfusion method, device, electronic equipment and computer readable storage medium
WO2019071613A1 (en) * 2017-10-13 2019-04-18 华为技术有限公司 Image processing method and device
CN111510637A (en) * 2020-04-20 2020-08-07 威海德盛电子有限公司 Brightness adjusting method and device of light supplementing device, road light supplementing device and electronic equipment
US20200294169A1 (en) * 2019-03-15 2020-09-17 Motorola Solutions, Inc. Device, system and method for dispatching responders to patrol routes
CN112188175A (en) * 2020-08-25 2021-01-05 北京旷视科技有限公司 Photographing apparatus and image processing method
CN113132639A (en) * 2021-04-22 2021-07-16 亮风台(上海)信息科技有限公司 Image processing method and device, electronic equipment and storage medium
CN113395457A (en) * 2020-03-11 2021-09-14 浙江宇视科技有限公司 Parameter adjusting method, device and equipment of image collector and storage medium
CN113438411A (en) * 2021-05-21 2021-09-24 上海闻泰电子科技有限公司 Image shooting method, image shooting device, computer equipment and computer readable storage medium
CN113592887A (en) * 2021-06-25 2021-11-02 荣耀终端有限公司 Video shooting method, electronic device and computer-readable storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070103562A1 (en) * 2005-11-04 2007-05-10 Sony Corporation Image-pickup device, image-pickup method, and program
US20170171449A1 (en) * 2015-12-15 2017-06-15 Olympus Corporation Image pickup apparatus, non-transitory computer-readable medium storing computer program, and image pickup method
CN106534712A (en) * 2016-10-24 2017-03-22 北京旷视科技有限公司 Control method, image processing unit, light-filling and camera device
WO2019071613A1 (en) * 2017-10-13 2019-04-18 华为技术有限公司 Image processing method and device
CN108881730A (en) * 2018-08-06 2018-11-23 成都西纬科技有限公司 Image interfusion method, device, electronic equipment and computer readable storage medium
US20200294169A1 (en) * 2019-03-15 2020-09-17 Motorola Solutions, Inc. Device, system and method for dispatching responders to patrol routes
CN113395457A (en) * 2020-03-11 2021-09-14 浙江宇视科技有限公司 Parameter adjusting method, device and equipment of image collector and storage medium
CN111510637A (en) * 2020-04-20 2020-08-07 威海德盛电子有限公司 Brightness adjusting method and device of light supplementing device, road light supplementing device and electronic equipment
CN112188175A (en) * 2020-08-25 2021-01-05 北京旷视科技有限公司 Photographing apparatus and image processing method
CN113132639A (en) * 2021-04-22 2021-07-16 亮风台(上海)信息科技有限公司 Image processing method and device, electronic equipment and storage medium
CN113438411A (en) * 2021-05-21 2021-09-24 上海闻泰电子科技有限公司 Image shooting method, image shooting device, computer equipment and computer readable storage medium
CN113592887A (en) * 2021-06-25 2021-11-02 荣耀终端有限公司 Video shooting method, electronic device and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李洪博;董岩;刘云清;赵馨;宋延嵩;: "可提高相机动态范围的图像融合方法研究", 红外技术, no. 09 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115767277A (en) * 2022-09-21 2023-03-07 盐城众拓视觉创意有限公司 Multi-view vision-based light supplementing method for green box shooting
CN115767277B (en) * 2022-09-21 2024-02-06 盐城众拓视觉创意有限公司 Green box shooting light supplementing method based on multi-eye vision

Also Published As

Publication number Publication date
CN114302068B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN108419023B (en) Method for generating high dynamic range image and related equipment
JP4115467B2 (en) Imaging device
CN102821284B (en) Dynamic video creation device and video creation method
CN108616689B (en) Portrait-based high dynamic range image acquisition method, device and equipment
US20110122254A1 (en) Digital camera, image processing apparatus, and image processing method
JP4600684B2 (en) Imaging apparatus and imaging method
CN111586314B (en) Image fusion method and device and computer storage medium
JP2007067907A (en) Image pickup apparatus, image pickup method, and image pickup program; and image processor, image processing method, and image processing program
CN109474770B (en) Imaging device and imaging method
CN101115149B (en) Image processing method
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
JP2006270218A (en) Electronic camera and electronic camera system
WO2012093519A1 (en) Imaging device and light emission amount control method
JP2012109900A (en) Photographing device, photographing method and program
CN113114926B (en) Image processing method and device and camera
CN108289173A (en) A kind of camera shooting control method, device, terminal device and storage medium
CN116320771B (en) Shooting method and electronic equipment
KR101594294B1 (en) Digital image signal processing method apparatus applying the method and medium for recording the method
CN114302068B (en) Image shooting method and device
CN111434104A (en) Image processing device, imaging device, image processing method, and program
CN112911146A (en) Intelligent dimming method based on human face
JP2001358986A (en) Image processing unit, image processing method, and recording medium
CN115633252B (en) Shooting method and related equipment thereof
CN113347368B (en) Video acquisition method and device based on exposure control
JP4869801B2 (en) Imaging device

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