WO2022048465A1 - Camera exposure time adjustment method, device and program product - Google Patents

Camera exposure time adjustment method, device and program product Download PDF

Info

Publication number
WO2022048465A1
WO2022048465A1 PCT/CN2021/113951 CN2021113951W WO2022048465A1 WO 2022048465 A1 WO2022048465 A1 WO 2022048465A1 CN 2021113951 W CN2021113951 W CN 2021113951W WO 2022048465 A1 WO2022048465 A1 WO 2022048465A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
frames
frame
light
brightness
Prior art date
Application number
PCT/CN2021/113951
Other languages
French (fr)
Chinese (zh)
Inventor
程敏
卓峰
黄进新
方光祥
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022048465A1 publication Critical patent/WO2022048465A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors

Definitions

  • the invention relates to the field of cameras, in particular to a technology for adjusting the exposure time of cameras.
  • the ambient light intensity at night is much lower than during the day.
  • the image captured by the camera in low light conditions becomes blurred, so that the recognition rate of the image drops sharply.
  • a common practice is to use a fill light to provide additional lighting to the camera when the camera shoots video to improve the image shooting effect.
  • One camera solution is to use a single sensor and single lens architecture, and to generate visible light signals and infrared light signals respectively by time-multiplexing the sensors, and then register and fuse the visible light signals and infrared light signals in the time domain.
  • This solution is not only low cost, but also easy to manufacture on a large scale.
  • the present invention provides an embodiment of a method for adjusting the exposure time of a camera, which is used to adjust the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, so The 3 frames include color frames and black and white frames, and the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than that of the first camera.
  • the method includes: comparing the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames or color frames. ; Adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each adjusted light-filling time period is within a single fill-light period of the first camera.
  • the exposure time of the first camera can be adjusted.
  • the periodic fill light from the environment for example, the periodic fill light from the second camera
  • the periodic fill light from the second camera has different effects on the upper and lower parts of the same frame, so that the As for frames that appear half-light and half-dark.
  • each of the fill light time periods is within a single fill light period of the first camera, and different parts of the frame are equally affected by the periodic fill light during the exposure process, reducing the image captured by the first camera. Uneven light and dark conditions.
  • the first camera includes: a lens for collecting light including the periodic supplementary light; a sensor for collecting light at different times according to the light collected by the lens The color frame and the black and white frame are generated.
  • This scheme introduces the hardware structure of the first camera.
  • the sensor used in this scheme can sense both visible light to generate color frames and non-visible light (such as infrared light) to generate black and white frames. Color frames and black and white frames are generated at different times.
  • the periodic fill light is non-visible light
  • each of the adjusted fill light time periods corresponds to a black and white frame
  • each of the fill light time periods is located in a corresponding black and white frame. in the fill light cycle.
  • the total number of frames in the shooting period of the first camera is 3 frames, wherein the 3 frames include: 1 black and white frame and 2 consecutive color frames, or, 1 color frame and 2 consecutive black and white frames.
  • This scheme limits the number of frames in the frame period to 3 frames, and 2 frames of the same type are consecutive. Using adjacent frames of the same type makes it easier to compare brightness.
  • the black and white frame and the color frame have the same exposure period.
  • the periodic fill light comes from a fill light of the second camera.
  • This protocol introduces a common source of periodic fill light.
  • the periodic fill light comes from a fill light of the second camera, and the second camera and the first camera are located in the same shooting environment, and the first camera and the first camera are located in the same shooting environment.
  • the shooting cycle of a camera is the same, and the fill light rule is the same.
  • This scheme describes the commonality of the first camera and the second camera.
  • the shooting period includes a plurality of black and white frames
  • the supplementary light period includes a plurality of supplementary light time periods
  • the number of supplementary light time periods is the same as that in the shooting period.
  • the number of black and white frames included is the same.
  • the supplementary light intensity of each supplementary light time period is also the same.
  • each black and white frame will be affected by the periodic fill light in the environment, so the brightness of the two black and white frames before and after is similar. Reduced the flickering phenomenon caused by the large difference between the two brightnesses in the front and rear videos.
  • the front frame and the back frame are 2 frames generated by the camera at different times.
  • the front frame is generated first, and the latter frame is generated later.
  • the present invention provides an embodiment of a camera
  • the camera includes a lens for collecting light
  • the light received by the lens includes periodic supplementary light from the environment, each of the periodic supplementary light
  • the fill light time period is shorter than the fill light period of the camera
  • the sensor is used to convert the light signal collected by the lens into an electrical signal, and each shooting period generates at least 3 frames, and the 3 frames include color frames and black and white frames.
  • frame a processor for: comparing the brightness of two adjacent frames of the same type in the same shooting period, wherein the frames of the same type are black and white frames, or color frames; adjusting the brightness of the subsequent frames of the camera according to the comparison result
  • the exposure start time until each adjusted fill-light time period is within a single fill-light period of the camera.
  • the second aspect also supports corresponding possible implementations and has corresponding technical effects.
  • the present invention provides an exposure time adjustment device for adjusting the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, and the 3 frames Including color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than the fill light period of the first camera, It is characterized in that, the device includes: a brightness comparison module for comparing the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames. , or the type is color frame; the adjustment module is used to adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is located in a single complement of the first camera. within the photoperiod.
  • the third aspect also supports corresponding possible implementations and has corresponding technical effects.
  • the present invention also provides an embodiment of a program product, the program product includes computer-readable code instructions, when the computer-readable code instructions are executed by the first camera, the first camera can execute the first camera. aspects and various possible implementations of the first aspect. And have the corresponding technical effect.
  • Figure 1 shows an embodiment of a camera topology.
  • FIG. 2 illustrates an embodiment of the exposure sequence of frames to the present invention.
  • Figure 3 shows a frame with uneven exposure.
  • Figure 4A shows a frame with uneven exposure.
  • Figure 4B shows a uniformly exposed frame.
  • Figure 5 shows the relationship between the exposure timing of the frames captured by the two cameras.
  • Figure 6 shows the relationship between the exposure timing of the frames captured by the two cameras.
  • Figure 7 shows the relationship between the exposure timing of the frames captured by the two cameras.
  • Figure 8 shows the relationship between the exposure timing of the frames captured by the two cameras.
  • FIG. 9 exemplarily describes the brightness relationship of the previous frame relative to the subsequent frame in the above four strategies.
  • FIG. 10 is an alternative embodiment of an exposure time adjustment method.
  • Figure 11 is an alternative embodiment of an exposure time adjustment device.
  • the embodiment of the present invention is used to adjust the exposure time of the camera. For example, in a scene, there are more than two cameras for continuous shooting. These cameras each fill light for the frames they shoot during shooting. In addition to the convenience of shooting, it may also affect other cameras in the cycle. This effect is often unfavorable, such as causing uneven brightness of the frames.
  • the present invention can adjust the exposure time of one or more cameras to reduce the visual deterioration of the frames generated by the cameras caused by this effect.
  • These two or more cameras can have: the same shooting period, the number of frames shot in each shooting period is the same; the sequence of the types of frames shot in each shooting period is also the same, for example, in each frame period, one is shot first Color frames, and then shoot 2 black and white frames in succession; the same fill light rule, for example: fill light for each black and white frame shot by itself, and the fill light time for each black and white frame is the same.
  • the camera 11 includes a lens 111 , a sensor 112 , a system on chip (SOC) 113 , and a fill light 114 .
  • the fill light 12 may be a part of the camera; the fill light 12 may also be independent of the camera, and thus may not be part of the camera.
  • the lens 111 is used to collect the light from the photographed object.
  • the lens 111 is usually a lens group composed of multiple pieces of optical glass (or plastic), and may be composed of a concave lens, a convex lens, an M-type lens, etc., or a combination of lenses.
  • the lens 111 can be a spherical mirror or an aspherical mirror.
  • the camera 11 in FIG. 1 has only one lens, so it is called a monocular camera.
  • the sensor 112 receives light from the lens, performs photoelectric conversion through exposure, and generates a black and white frame (grayscale frame) and a color frame (color frame). Black and white frames may also be referred to as grayscale images or grayscale frames; color frames may also be referred to as color images.
  • control logic that alternately exposes visible and non-visible light (such as infrared light), so that a single sensor can alternately generate black-and-white and color frames. Taking the video frame rate of 25 frames/second as an example, the total exposure time required to obtain a black and white frame and a color frame is 1/25 of a second. The average exposure time for a frame is 1/50 of a second.
  • Black and white frames and color frames are continuously generated.
  • Black and white frames can provide brightness information
  • visible light frames can provide color information and brightness information.
  • the camera 11 is also called a single-sensor camera.
  • the system-on-chip 113 is an integrated circuit chip.
  • the system-on-chip 113 may integrate an image signal processor (ISP), a digital signal processor, a CPU, an encoder, and the like.
  • the digital signal processor camera amplifies and corrects the electrical signal;
  • the ISP has the ability to optimize the frame;
  • the CPU (such as The processor) can fuse black and white frames and color frames to generate a fusion image, and can also control the fill light 114, such as adjusting the fill light start time and cut-off time of the fill light through an exposure control circuit (not shown); coding;
  • the device is used to encode the frames processed by the CPU with protocols such as JPEG, H.264, and H.265, so as to facilitate the transmission and preservation of the frames.
  • one or more of the ISP, digital signal processor, CPU, and encoder may be separate physical modules, not integrated in the SOC.
  • the fill light 114 is used to provide fill light for the object being photographed. For example, when the sensor 112 exposes infrared light, the fill light 114 performs infrared light fill light, thereby improving the imaging effect of the black and white frame.
  • the fill light 114 may be a part of the camera 11 , or may be an external device not belonging to the camera 11 .
  • Ambient fill light In addition to the built-in/external fill light of the camera, the fill light that occurs in the environment where the camera is located. This fill light may have a fixed periodicity. For example: periodic supplementary light from other cameras in the environment where the camera is located, periodic lights on and off, periodic flashing alarm lights, etc.
  • Exposure period The time it takes for the camera's sensor to capture a single frame.
  • Shooting cycle The sensor of the camera shoots cyclically with multiple frames as a cycle, such as 2 black and white frames + 2 color frames as a cycle to shoot repeatedly, or 1 color frame + 2 black and white frames as a cycle, each The time required for a loop is one shooting cycle.
  • Frames within the same capture cycle can be fused to generate color frames. For example, fuse 2 black and white frames with 1 color frame in the same cycle to generate 2 color frames; fuse 2 black and white frames with 2 color frames in the same cycle to generate 2 color frames.
  • Pixel strip A frame consists of multiple rows of pixels, and a row (or multiple rows) of pixels of a frame is called a pixel strip.
  • a pixel strip For sensors that expose pixel-by-pixel strips (eg, row-by-line exposure sensors), a pixel strip is a single exposure unit. The initial exposure time of each pixel strip is different, and the sensor first exposes the pixel strip located above, and then exposes the pixel strip located below.
  • Fill light period used to describe the length of the time period during which all pixel strips are in the exposed state. For example: the time it takes from the exposure of the bottom pixel bar of a frame to the end of the exposure of the top pixel bar of this frame.
  • a sensor eg, a progressive exposure sensor
  • exposure of the entire frame is not initiated at the same time. Rather, it is exposed gradually in a certain order. Specifically, the top of the frame is first generated by exposure, and then gradually exposed downward until the bottom of the final frame is generated, and the exposure of the entire frame is completed.
  • the bottom pixel bar of the frame may be generated by exposure first, and then gradually exposed upward until the top pixel bar of the frame is generated by exposure.
  • the first fill light of the first camera generates the first fill light; the second fill light of the second camera generates the second fill light, and the first camera generates the frame P through exposure.
  • Frame P consists of 8 pixel strips from P1 to P8, with P1 at the top and P8 at the bottom. Each pixel strip is a row of pixels (if the sensor can If multiple rows of pixels are exposed at the same time, each pixel bar can be multiple rows of pixels).
  • the effects of the first supplementary light and the second supplementary light on the exposure process of the frame P are marked with hatched parts in FIG. 2 .
  • the first camera starts to expose P1 (A1 is also the exposure start time of frame P), and at time A2, the first camera starts to expose P2...
  • time A5 is the time when the exposure of P1 ends, A8
  • the time is the time at which the exposure of P8 ends (and also the time at which the exposure of frame P ends).
  • the duration of the first supplementary light and the duration of the second supplementary light may be the same.
  • the time period A1-A5 is the exposure time period of the pixel bar P1
  • the time period A1-A8 is the exposure period of the first camera
  • the time period A9-A5 is the fill light period of the first camera.
  • the brightness of the frame is affected by the exposure level when the sensor generates the frame, and the exposure level is determined by the amount of light entering the sensor. The more light that comes in, the more photons are converted into electrons and the brighter the resulting frame. The amount of incoming light is determined by both the light intensity and the light duration.
  • Each row of the sensor corresponds to a row of pixels in frame P, and the sensor performs exposure row by row. Rows with a large amount of light input produce relatively bright pixel bars; rows with less light input produce relatively dim pixel bars.
  • the amount of incoming light includes three sources: the first supplementary light, the second supplementary light, and other light in the environment other than the first supplementary light and the second supplementary light (eg, natural light in the environment). Since the impact of natural light on different pixel strips is the same, it will not cause problems such as video flickering. For the convenience of description, in the embodiment of the present invention, the influence of natural light on exposure is not introduced separately unless otherwise specified. Similarly, since the fill light of the first camera is controlled by the first camera, the fill light period of the first camera can be easily synchronized with the fill light period of the camera.
  • the following introduces the problem caused by the non-synchronization of the fill light period of the first camera and the fill light period of the second camera.
  • P1-P2 are only affected by the first supplementary light; while P3-P8 are affected by both the first supplementary light and the second supplementary light. Therefore, the exposure amounts of different pixel strips are not the same, which will cause uneven brightness in the exposed frame P.
  • the exposure of P1 and P2 is not affected by the second fill light.
  • P3-P6 are partially affected by the second supplementary light, wherein: the overlapping part of P3 and the second supplementary light is 201, the overlapping part of P4 and the second supplementary light is 202, and the area of the area 202 is larger than the area of the area 201. Therefore, The influence of the second fill light on the exposure of P4 is greater than that of the second fill light on the exposure of P3; similarly, the exposure of P5 and P6 is gradually increased by the influence of the second fill light. However, P7 and P8 are more affected by the second supplementary light than P5 and P6. Therefore, the frame P as a whole presents the effect of "upper dark and lower bright".
  • FIG. 1 is an example frame of "upper dark and lower bright" due to uneven fill light. It can be seen from the picture that the lower body of the pedestrian in the photo is brighter, while the upper body is very dark and can hardly be seen clearly.
  • the frame of Fig. 4A is opposite to that of Fig. 3.
  • the pedestrians appearing in the frame show the visual effect of "light on the top and dark on the bottom", the upper body is brighter, and the legs are too dark to be seen clearly.
  • the reason for the generation of Fig. 4A is: the part above the frame is not only affected by natural light, but also affected by 2 fill lights (the first fill light and the second fill light) during exposure, and the sensor obtains the total input
  • the amount of light is relatively large; while the lower part of the frame is only affected by natural light during exposure, and is only affected by one fill light (the first fill light), and the amount of light entering the sensor is relatively small.
  • FIG. 4B is the adjacent previous frame of FIG. 4A , and each pixel strip of the frame is illuminated the same, so the light and shade of FIG. 4B are visually uniform.
  • the “uneven-uniform” change as shown in FIG. 4B and FIG. 4A appears repeatedly in the video a “flickering” effect will appear visually, causing discomfort to the user.
  • the video (full or partial) generated by camera A will flicker or color cast.
  • the exposure start time of the subsequent frames of the first camera is adjusted by comparing the brightness of adjacent frames captured by the camera. For example: Adjust the exposure time of the camera (or the fill light time and the exposure time according to the law that the frame exposure process is disturbed by the periodic supplementary light from the non-camera in the environment (such as the supplementary light of the non-camera). time), so that during the exposure process of the camera, all the pixel strips of the same frame are affected by the same periodic fill light (or all the same pixel strips are not affected by the ambient fill light), thus Achieves uniform brightness throughout the frame. In the exposure period of the same frame, different pixel strips are not affected by the ambient fill light inconsistently, so that a "half-light and half-dark" frame appears; it also avoids the flickering phenomenon caused by the difference in brightness between the front and rear frames.
  • the adjacent frames are frames of the same type, for example, two adjacent black and white frames, or two adjacent color frames. It should be noted that, in this embodiment of the present invention, what is concerned is whether the exposure of the camera is disturbed by the ambient supplementary light, and the supplementary light of the camera itself may not be considered, that is to say, the first camera turns on the supplementary light or turns off the supplementary light. None of the lights affect the implementation of embodiments of the present invention.
  • the supplementary light in the environment is periodic, and can come from other cameras different from the first camera, or from other periodic lighting devices.
  • the embodiments of the present invention compare the brightness of the same position in two adjacent frames of the same camera. For example, compare the average brightness of the uppermost pixel strip of the previous frame with the brightness of the uppermost pixel strip of the second frame; The average luminance value of the top three pixel bars is compared; alternatively, the average luminance value (eg arithmetic mean) of the lower 1/5 part of the previous frame is compared with the average luminance value of the lower 1/5 of the following frame.
  • the camera can periodically compare the brightness values, or start the brightness value comparison in the camera administrator's control box.
  • first camera and a second camera in the same area, both of which are single-sensor cameras, both of which can generate both color frames and black and white frames.
  • the exposure time for black and white frames and color frames is the same, and this exposure time is called the exposure period.
  • both cameras shoot in a period of three frames, which is called a shot period. Included in each shooting cycle: 1 color frame and 2 black and white frames.
  • the second camera exposure generates frames 210, 211, 212, 213 and 214, wherein frames 210 and 213 are color frames, frames 211 and 212 are black and white frames, and the black and white frames use fill light during the exposure process .
  • the first camera exposure generates frame 215, frame 216, frame 217, frame 218 and frame 219, wherein frame 215 and frame 218 are color frames, frame 216, frame 217 and frame 219 are black and white frames, and black and white frames are used in the process of exposure fill light.
  • Frame 210 corresponds to frame 215
  • frame 211 corresponds to frame 216
  • frame 212 corresponds to frame 217 .
  • the frame 215 is generated before the frame 216 , so the frame 215 is the frame before the frame 216
  • the frame 216 is the frame after the frame 215 .
  • this embodiment is described by taking an example of using an infrared fill light to fill light for a black and white frame. In addition to fill light for black and white frames, it can also fill light with visible light during exposure of color frames, and can also fill light with infrared fill lights during exposure of color frames. Whether to use fill lights during exposure of color frames , does not affect the implementation of the embodiments of the present invention.
  • Table 1 below describes the operation of the cameras shown in Figure 5 at different time periods.
  • the exposure of frame 216 is as follows.
  • the fill light 3 will affect the exposure of the pixel strips of the frame 216. Among them, the pixel strips located above the frame 216 are more affected than the pixel strips located below the pixel strip 216 .
  • the fill light 4 of the second camera starts to work.
  • the pixel bar above the frame 216 has been exposed, so it will not be affected by the fill light 4.
  • the lower pixel bar of the frame 216 is still in the process of exposure, so it will be affected by the fill light 4 . Therefore, the frame 216 after the exposure is completed will exhibit a feature of being dark on the top and bright on the bottom, similar to the situation in FIG. 3 .
  • the supplementary light 4 is also affected by the second camera.
  • the frame 217 after exposure is completed will show the characteristics of upper light and lower dark.
  • the luminance value of the lower pixel bar in frame 216 after exposure is completed is higher than the luminance value of the lower pixel bar in frame 217 .
  • the formation of the pixel strip at the bottom of frame 216 is affected by three fill lights, which are: t3-t4 time period The fill light 3, the complete fill light 1 (t3-t5 time period), the fill light 4 of the t7-t8 time period.
  • the formation of the pixel bar at the bottom of the frame 217 is affected by a total of 2 fill lights, namely: fill light 4 in the time period t9-t10, and complete fill light 2 (time period t9-t11).
  • the total duration of the former affected by the fill light during the exposure process is greater than that of the latter, so the brightness value of the pixels obtained by exposure is higher, that is, the brightness of the pixel bar at the bottom of frame 216 is greater than that of the pixel bar at the bottom of frame 217.
  • the first and second cameras both use 3 frames as a shooting cycle, color frames and black and white frames will appear repeatedly. Shortly after the second camera starts exposing the color frame, the second camera starts exposing the color frame, and the time difference between the two exposure times is less than one exposure period. That is to say, the first camera lags behind the shooting of the same type of frames by the second camera, if the difference between the frames shot by the first and second cameras is described in the coordinate system with time as the axis. Two periodic waveforms are formed, and there is a phase difference between the two waveforms.
  • the symbol "-" in the - ⁇ frame period indicates that the phase of the first camera lags behind the phase of the second camera. Since the phase is periodic, "lag" and “advance" in various embodiments of the present invention are relative concepts. For example: the shooting period of the first camera lags behind the shooting period of the second camera, and the delayed phase difference value is ⁇ 1 ; The phase difference value of is ⁇ 1 +2 ⁇ .
  • the exposure time of the first camera according to ⁇ 1 +2n* ⁇ it can be synchronized with the shooting cycle of the second camera.
  • the exposure start time of the subsequent frames of the first camera can be advanced. To describe, it is equivalent to adjusting the phase of the exposure period of the first camera by ⁇ 1 .
  • the actually adjusted phase may not be a fixed value but a phase range. Since ⁇ gives the direction of adjustment and the range of adjustment, the adjustment can be completed quickly after obtaining ⁇ .
  • the phase of the first camera can be adjusted forward appropriately, and the difference between the start time of the fill light between the first camera and the second camera can be reduced, so that: Light 3 has the same impact on the exposure of all pixel strips in the black and white frame 216, and makes the fill light 4 have the same impact on the exposure of all pixel strips in the black and white frame 217, so that the fill light of the second camera is achieved in advance to achieve the same exposure of the two .
  • the exposure period of the first camera is 200ms, and the shooting period is 600ms; the exposure time of the first camera to the color frame is 40ms later than that of the second camera, then the exposure time of the first camera The exposure time is advanced by 40ms+n*600ms, where n is any integer including 0. Since the first camera adjusts its own exposure time based on the fill light time of the second camera, it can be considered that there is a master-slave relationship between the two.
  • the second camera is the master camera and the first camera is the slave camera.
  • the derivation process of the first adjustment strategy is described in detail above.
  • the second adjustment strategy, the third adjustment strategy and the fourth adjustment strategy will be introduced below. Since the derivation process and principle are similar to the first adjustment strategy, for the purpose of saving space, no detailed description will be given.
  • FIG. 6 is another schematic diagram for describing the exposure timing of the first and second cameras, and is used for introducing the second adjustment strategy.
  • the content of FIG. 6 is similar to that of FIG. 5 , the difference is that the exposure time of the first camera is earlier than that of the second camera.
  • the advance time is less than one exposure period, that is: time period [t15, t16] ⁇ time period [t17, t18].
  • the upper pixel bar in frame 216 is affected by fill light 1 and fill light 3; while the pixel bar above frame 217 is affected by fill light 2, fill light 3 and fill light 4.
  • the effect of the fill light 1 on the frame 216 is the same as the effect of the fill light 2 on the frame 217, and the light input of the fill light 3 to the sensor is less than the light input of the pixel bar above when the fill light sensor exposes the frame 217.
  • the sensor exposes the frame 216, the amount of light entering the upper pixel bar (for a detailed analysis, refer to the description of FIG. 3 and FIG. 5 above), so the brightness of the pixel bar above the frame 216 is greater than that of the frame 217.
  • FIG. 7 is another schematic diagram for introducing the exposure timing of the first and second cameras, and is used for introducing the third adjustment strategy.
  • the content of FIG. 7 is similar to that of FIG. 5 , the difference is that: comparing the exposure time points of frame 210 and frame 215 (frame 215 corresponds to 210 ), the exposure time of the first camera is earlier than that of the second camera.
  • the length of time in advance is greater than one exposure period and less than 1.5 exposure periods (due to the periodicity of exposure, you can also choose to use the exposure time points of frame 220 and frame 215 for corresponding comparison, then the exposure of the first camera is delayed after the second camera.
  • the delay time length is: more than one exposure period, less than 1.5 exposure periods). That is: time period [t25, t26] ⁇ time period [t23, t24] ⁇ 1.5* time period [t25, t26].
  • the upper pixel strip is affected by fill light 1 and fill light 5; in frame 217, the upper pixel strip is affected by fill light 2 and fill light 3; and, fill light 5 affects frame 216.
  • the duration is longer than the duration of the effect of fill light 3 on frame 217. Therefore, it can be concluded that (1) the brightness of the pixel strip above the frame 216 is greater than the brightness of the pixel strip above the frame 217 .
  • the pixel bar below the frame 216 is affected by the fill light 5 and the fill light 1; the pixel bar below the frame 217 is affected by the fill light 2 and the fill light 3; and the effect of the fill light 5 on the frame 216 is longer than the fill light 3 pair.
  • the duration of the influence of frame 217 it can therefore be concluded that (2) the brightness of the pixel strip below frame 216 is less than the brightness of the pixel strip below frame 217.
  • the pixel bars corresponding to frame 216 and frame 217 are used for comparison (eg, the first row of pixel bars of frame 216 is compared with the first row of pixel bars of frame 217, eg, the second row of pixel bars of frame 216 is compared with the first row of pixel bars of frame 217.
  • the above rules can be summarized as the third ⁇ calculation method: when the adjacent frames of the same type of the first camera (such as two adjacent color frames, or two adjacent black and white frames): the pixel bar above the previous frame.
  • the brightness of the pixel strip above the next frame is greater than the brightness of the pixel strip above the next frame; and the brightness of the pixel strip below the previous frame is less than the brightness of the pixel strip below the subsequent frame; and, the number of pixel strips in the previous frame higher than the brightness of the subsequent frame ⁇
  • the previous frame is lower than the subsequent frame.
  • FIG. 8 is another schematic diagram for introducing the exposure timing of the first and second cameras, and is used for introducing the fourth adjustment strategy.
  • the content of FIG. 8 is similar to that of FIG. 5 , the difference is that: comparing the exposure time points of frame 210 and frame 215 , the exposure time of the first camera lags behind that of the second camera.
  • the time length of the lag is greater than one exposure period and less than 1.5 exposure periods. That is: time period [t29, t30] ⁇ time period [t27, t28] ⁇ 1.5* time period [t29, t30].
  • the upper pixel strip in frame 216 is affected by fill light 1 and fill light 4; the pixel strip above frame 217 is only affected by fill light 2, so it can be concluded that: (1) the brightness of the pixel strip above frame 216 is greater than that of frame 216 The brightness of the pixel bar above 217.
  • the pixel bar below frame 216 is only affected by fill light 1 and fill light 4, while the pixel bar below frame 217 is jointly affected by fill light 2 and fill light 6.
  • the length of time that fill light 4 illuminates the pixel bar below frame 216 is less than The length of time that the fill light 6 illuminates the pixel bar below the frame 217 , so it can be concluded that (2) the brightness of the pixel bar below the frame 216 is smaller than that of the pixel bar below the frame 217 .
  • the fourth ⁇ calculation method when the adjacent frames of the same type of the first camera (for example, two adjacent color frames, or two adjacent black and white frames): the pixel bar above the previous frame.
  • the brightness of the pixel strip above the next frame is greater than the brightness of the pixel strip above the next frame; and the brightness of the pixel strip below the previous frame is less than the brightness of the pixel strip below the post frame; and, the number of pixel strips in the previous frame that is higher than the brightness of the latter frame> the previous frame is lower than the latter frame.
  • Table 2 summarizes the correspondence between the above-mentioned brightness changes of adjacent frames and the phase difference ⁇ of the first camera relative to the second camera. After obtaining ⁇ according to the brightness variation law, the corresponding phase adjustment can be performed. It should be noted that these four situations are independent of each other and have no dependencies on each other, so for a specific camera, the exposure time can be adjusted based on only one of the formulas.
  • these four formulas are exemplified by taking 3 frames as a shooting cycle in the embodiment described in FIG. 5-FIG. 8, when the shooting cycle includes more frames (for example, 2 consecutive color frames + 2 consecutive black and white frames) ), the above four formulas for calculating ⁇ are still valid.
  • FIG. 9 is used to exemplarily describe the brightness relationship between the previous frame and the subsequent frame in the above four strategies.
  • Frame 31 is an example of frame 216 in the first adjustment strategy;
  • frame 32 is an example of frame 216 in the first adjustment strategy;
  • frame 33 is an example of frame 216 in the first adjustment strategy, where h ⁇ i;
  • frame 34 is an example of frame 216 in the first adjustment strategy, where j>k.
  • the introduction is made based on the detection of the black and white frames affected by the fill light when adjacent frames of the same type are used.
  • the brightness of the color frame is also affected by the infrared fill light/visible light fill light in the environment during exposure, so when the exposure period of the color frame is not synchronized with the ambient fill light, there will also be semi-brightness and semi-darkness.
  • the method provided by the embodiment of the present invention is also applicable to the exposure time adjustment based on color frames. By comparing the brightness of the two color frames before and after, the law of the phase difference can also be judged, so that the exposure time of the color frame is adjusted to be the same as the period in the environment.
  • the filling time of the supplementary light is consistent, avoiding the appearance of color frames with uneven brightness, and avoiding the phenomenon of flickering.
  • the judgment and adjustment methods based on color frames are the same as those based on black and white frames.
  • the present invention also provides another adjustment method: instead of comparing the brightness changes of the two frames before and after, directly adjust the exposure time of the first camera in any direction with a certain step size (for example, a fixed value of 20ms), until the first camera generates Stop the adjustment when the video does not flicker, the adjustment speed of this method will be slower.
  • a certain step size for example, a fixed value of 20ms
  • the comparison of brightness, the calculation of the phase difference of the exposure period between the two cameras, and the adjustment of the exposure time of the first camera, etc. can all be performed by the CPU of the camera.
  • the frames in the same shooting cycle can be fused to generate color frames.
  • the CPU fuses 2 black and white frames and 1 color frame in the same cycle to generate 2 color frames; fuses 2 black and white frames and 2 color frames in the same cycle to generate 2 color frames.
  • the present invention provides an embodiment of a method for adjusting the exposure time of a camera, for adjusting the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, The 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than the first camera.
  • the method includes: step S11, comparing the brightness of two adjacent frames of the same type in the same shooting cycle of the first camera, wherein the frame of the same type refers to a black and white frame, or The type is color frame; Step S22, adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is within a single fill light period of the first camera .
  • the optional step S23 may be included to fuse the frames in the same shooting cycle to generate a color frame.
  • the present invention further provides an embodiment of an exposure time adjustment device, which is used for performing the above method to adjust the exposure time of the first camera.
  • Each shooting cycle of the first camera includes at least 3 frames, the 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and the cycle
  • Each supplementary light time period in the sexual supplementary light is shorter than the supplementary light period of the first camera.
  • the exposure time adjustment device may be the first camera, or a program running in the processor of the first camera.
  • the exposure time adjustment device 4 includes: a brightness contrast module 41 and an adjustment module 42 .
  • the brightness comparison module is used to compare the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames or color frames frame.
  • the adjustment module 42 is used to adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is within a single fill light period of the first camera. .
  • the adjustment module 42 adjusts the exposure start time of the first camera to the subsequent frames according to ⁇ , and advances the exposure start time of the first camera to the subsequent frames until each of the adjusted fill light time periods is located in the Within a single fill light cycle of the first camera. Wherein, the advance time does not exceed the exposure period of one black and white frame.
  • the present invention also provides a program product, the program product includes computer-readable code instructions, when these computer-readable code instructions are executed by the first camera, the first camera can execute the foregoing method embodiments.
  • One or more of the above modules or units may be implemented in software, hardware or a combination of both.
  • the software exists in the form of computer program instructions and is stored in the memory, and the processor can be used to execute the program instructions and implement the above method flow.
  • the processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or artificial intelligence Processors and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing.
  • the processor can be built in a SoC (system on chip) or an application specific integrated circuit (ASIC), or can be an independent semiconductor chip.
  • SoC system on chip
  • ASIC application specific integrated circuit
  • the internal processing of the processor may further include necessary hardware accelerators, such as field programmable gate array (FPGA), PLD (Programmable Logic Device) , or a logic circuit that implements dedicated logic operations.
  • FPGA field programmable gate array
  • PLD Programmable Logic Device
  • a logic circuit that implements dedicated logic operations.
  • the hardware can be CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, dedicated digital circuit, hardware accelerator or non-integrated discrete device Any one or any combination, which may or may not run the necessary software to perform the above method flow.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

A camera exposure time adjustment technique, comprising: for multiple cameras that are located in the same scene, when the interference of a light-supplementing lamp of a primary camera on the exposure of a secondary camera causes shading unevenness or flickering in a video image, the brightness of two adjacent black-and-white image frames generated by the secondary camera is compared, and the exposure time of the secondary camera is adjusted according to the comparison result, so that each fill-supplementing duration is located within a single light-supplementing period of the secondary camera, thus reducing the flickering of the video image captured by the secondary camera.

Description

一种调整摄像机曝光时间的方法、装置以及程序产品Method, device and program product for adjusting camera exposure time 技术领域technical field
本发明涉及摄像机领域,尤其有关于一种调整摄像机曝光时间的技术。The invention relates to the field of cameras, in particular to a technology for adjusting the exposure time of cameras.
背景技术Background technique
夜晚的环境光照强度比白天大大降低。摄像机在低照情况的所拍摄的图像变得模糊不清,以至于对图像的识别率也急剧下降。为了让摄像机在夜晚也能拍摄出高清晰度的彩色图像,一种常见的做法是,在摄像机拍摄视频时,使用补光灯给摄像机提供额外的照明,提高图像拍摄效果。The ambient light intensity at night is much lower than during the day. The image captured by the camera in low light conditions becomes blurred, so that the recognition rate of the image drops sharply. In order to allow the camera to shoot high-definition color images at night, a common practice is to use a fill light to provide additional lighting to the camera when the camera shoots video to improve the image shooting effect.
一种摄像机方案是采用单传感器单镜头的架构,通过对传感器分时复用的方式,分别产生可见光信号和红外光信号,然后将可见光信号和红外光信号在时域上做配准和融合。这种方案不仅成本低廉,而且易于大规模生产制造。One camera solution is to use a single sensor and single lens architecture, and to generate visible light signals and infrared light signals respectively by time-multiplexing the sensors, and then register and fuse the visible light signals and infrared light signals in the time domain. This solution is not only low cost, but also easy to manufacture on a large scale.
是这种分时补光方案也面临一个问题,当同一个场景下有多个摄像机时,某一个摄像机的补光会对周围其他摄像机的成像造成干扰。例如,当摄像机A对黑白帧进行逐行曝光时,位于摄像机A附近的摄像机B正在使用红外补光灯进行补光,摄像机A所拍摄的图像受到摄像机B的补光灯的影响,导致摄像机A拍摄的帧出现明暗不均匀的情况。It is this time-sharing fill light scheme that also faces a problem. When there are multiple cameras in the same scene, the fill light of a certain camera will interfere with the imaging of other surrounding cameras. For example, when camera A is exposing black and white frames line by line, camera B near camera A is using an infrared fill light for fill light, and the image captured by camera A is affected by the fill light of camera B, resulting in camera A The captured frame has uneven brightness and darkness.
发明内容SUMMARY OF THE INVENTION
第一方面,本发明提供一种调整摄像机曝光时间方法的实施例,用于对第一摄像机的曝光时间进行调整,其中:所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期,所述方法包括:对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧指类型为黑白帧,或者类型为彩色帧;根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。In a first aspect, the present invention provides an embodiment of a method for adjusting the exposure time of a camera, which is used to adjust the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, so The 3 frames include color frames and black and white frames, and the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than that of the first camera. Filling light period, the method includes: comparing the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames or color frames. ; Adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each adjusted light-filling time period is within a single fill-light period of the first camera.
应用该方法,可以对第一摄像机的曝光时间进行调整,调整之前,来自于环境中的周期性补光(例如来自于第二摄像机的周期性补光)对同一帧上下部分的影响不同,以至于出现半明半暗的帧。调整之后,每个所述补光时间段位于所述第一摄像机的单个补光周期之内,帧在曝光过程中不同部分受到的周期性补光的影响相同,减少了第一摄像机拍摄的图像明暗不均匀的情况。Using this method, the exposure time of the first camera can be adjusted. Before the adjustment, the periodic fill light from the environment (for example, the periodic fill light from the second camera) has different effects on the upper and lower parts of the same frame, so that the As for frames that appear half-light and half-dark. After adjustment, each of the fill light time periods is within a single fill light period of the first camera, and different parts of the frame are equally affected by the periodic fill light during the exposure process, reducing the image captured by the first camera. Uneven light and dark conditions.
第一方面第一种可能实现方式中,所述第一摄像机包括:镜头,用于采集包括所述周期性补光在内的光线;传感器,用于根据所述镜头采集的光线,在不同时刻生成所述彩色帧和所述黑白帧。In a first possible implementation manner of the first aspect, the first camera includes: a lens for collecting light including the periodic supplementary light; a sensor for collecting light at different times according to the light collected by the lens The color frame and the black and white frame are generated.
该方案介绍了第一摄像机的硬件结构,本方案使用的传感器是既能感应可见光生成彩色帧又能感应非可见光(例如红外光)生成黑白帧,彩色帧和黑白帧在不同时刻生成。This scheme introduces the hardware structure of the first camera. The sensor used in this scheme can sense both visible light to generate color frames and non-visible light (such as infrared light) to generate black and white frames. Color frames and black and white frames are generated at different times.
第一方面第二种可能实现方式中,所述周期性补光是非可见光,调整后的每个所述补光时间段对应一个黑白帧,并且每个所述补光时间段位于的对应黑白帧的补光周期之中。In the second possible implementation manner of the first aspect, the periodic fill light is non-visible light, each of the adjusted fill light time periods corresponds to a black and white frame, and each of the fill light time periods is located in a corresponding black and white frame. in the fill light cycle.
该方案中,具体说明了收到环境中周期性补光影响的是黑白帧。In this scheme, it is specified that the black and white frames are affected by the periodic fill light in the environment.
第一方面第三种可能实现方式中,所述第一摄像机的拍摄周期中帧的总数是3个帧,其中,所述3个帧包括:1个黑白帧和连续2个彩色帧,或者,1个彩色帧和连续2个黑白 帧。In a third possible implementation manner of the first aspect, the total number of frames in the shooting period of the first camera is 3 frames, wherein the 3 frames include: 1 black and white frame and 2 consecutive color frames, or, 1 color frame and 2 consecutive black and white frames.
该方案限定了帧周期中帧的数量为3帧,并且有2个同类型帧是连续的。使用相邻的、同类型的帧,更方便进行亮度的对比。This scheme limits the number of frames in the frame period to 3 frames, and 2 frames of the same type are consecutive. Using adjacent frames of the same type makes it easier to compare brightness.
第一方面的第四种可能的实现方式中,所述黑白帧与彩色帧的曝光周期相同。In a fourth possible implementation manner of the first aspect, the black and white frame and the color frame have the same exposure period.
第一方面的第五种可能的实现方式中,所述周期性补光来自于第二摄像机的补光灯。In a fifth possible implementation manner of the first aspect, the periodic fill light comes from a fill light of the second camera.
该方案介绍了周期性补光的一种常见的来源。This protocol introduces a common source of periodic fill light.
第一方面的第六种可能的实现方式中,所述周期性补光来自于第二摄像机的补光灯,并且所述第二摄像机与第一摄像机位于同一个拍摄环境,第一摄像机与第一摄像机的拍摄周期相同、补光规律相同。In a sixth possible implementation manner of the first aspect, the periodic fill light comes from a fill light of the second camera, and the second camera and the first camera are located in the same shooting environment, and the first camera and the first camera are located in the same shooting environment. The shooting cycle of a camera is the same, and the fill light rule is the same.
该方案介绍了第一摄像机与第二摄像机的相同之处。This scheme describes the commonality of the first camera and the second camera.
第一方面的第七种可能的实现方式中,所述拍摄周期中包括多个黑白帧,所述补光周期包括多个补光时间段,且补光时间段的数量与所述拍摄周期中包括的黑白帧的数量一致。In the seventh possible implementation manner of the first aspect, the shooting period includes a plurality of black and white frames, the supplementary light period includes a plurality of supplementary light time periods, and the number of supplementary light time periods is the same as that in the shooting period. The number of black and white frames included is the same.
可选的,每个补光时间段的补光强度也相同。Optionally, the supplementary light intensity of each supplementary light time period is also the same.
该方案中,每个黑白帧都会受到环境中周期性补光的影响,因此前后两个黑白帧的亮度相近。减少了前后视频中两种亮度差别过大而引起的闪烁现象。In this scheme, each black and white frame will be affected by the periodic fill light in the environment, so the brightness of the two black and white frames before and after is similar. Reduced the flickering phenomenon caused by the large difference between the two brightnesses in the front and rear videos.
第一方面的第八种可能的实现方式中,当所述相邻的2个同类型帧中,亮度变化满足前帧的下方像素条的亮度大于后帧下方的像素条的亮度时,所述第一摄像机与第二摄像机的拍摄周期相位差是△φ=φ 1+2n*π,-φ 帧周期<φ 1<0°,n是整数,所述相位差△φ用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。 In the eighth possible implementation manner of the first aspect, when the brightness change in the two adjacent frames of the same type satisfies that the brightness of the pixel strip below the previous frame is greater than the brightness of the pixel strip below the subsequent frame, the The phase difference of the shooting period of the first camera and the second camera is Δφ=φ 1 +2n*π, -φ frame period1 <0°, n is an integer, and the phase difference Δφ is used to adjust the Parameter of exposure start time of subsequent frames of the first camera.
该方案示例性的介绍一种具体的比较亮度的算法。这里的前帧和后帧是摄像机在不同时刻生成的2个帧,前帧先生成,后帧后生成。This solution exemplarily introduces a specific algorithm for comparing brightness. The front frame and the back frame here are 2 frames generated by the camera at different times. The front frame is generated first, and the latter frame is generated later.
第二方面,本发明提供一种摄像机的实施例,摄像机包括:镜头,用于采集光线,所述镜头所接收的光线包括来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述摄像机的补光周期;传感器,用于把所述镜头采集的光信号转换电信号,每个拍摄周期生成至少3个帧,所述3个帧包括彩色帧与黑白帧;处理器,用于:对比同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧为黑白帧,或者彩色帧;根据对比结果调整所述摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述摄像机的单个补光周期之内。In a second aspect, the present invention provides an embodiment of a camera, the camera includes a lens for collecting light, the light received by the lens includes periodic supplementary light from the environment, each of the periodic supplementary light The fill light time period is shorter than the fill light period of the camera; the sensor is used to convert the light signal collected by the lens into an electrical signal, and each shooting period generates at least 3 frames, and the 3 frames include color frames and black and white frames. frame; a processor for: comparing the brightness of two adjacent frames of the same type in the same shooting period, wherein the frames of the same type are black and white frames, or color frames; adjusting the brightness of the subsequent frames of the camera according to the comparison result The exposure start time, until each adjusted fill-light time period is within a single fill-light period of the camera.
该方案与第一方面类似,具有相似的技术效果。This solution is similar to the first aspect and has similar technical effects.
对应于第一方面的各种可能实现方式,第二方面也支持对应的可能实现方式,并具有相应的技术效果。Corresponding to various possible implementations of the first aspect, the second aspect also supports corresponding possible implementations and has corresponding technical effects.
第三方面,本发明提供一种曝光时间调整装置,用于对第一摄像机的曝光时间进行调整,其中:所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期,其特征在于,所述装置包括:亮度对比模块,用于对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧指类型为黑白帧,或者类型为彩色帧;调整模块,用于根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。In a third aspect, the present invention provides an exposure time adjustment device for adjusting the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, and the 3 frames Including color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than the fill light period of the first camera, It is characterized in that, the device includes: a brightness comparison module for comparing the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames. , or the type is color frame; the adjustment module is used to adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is located in a single complement of the first camera. within the photoperiod.
该方案与第一方面类似,具有相似的技术效果。This solution is similar to the first aspect and has similar technical effects.
对应于第一方面的各种可能实现方式,第三方面也支持对应的可能实现方式,并具有相应的技术效果。Corresponding to various possible implementations of the first aspect, the third aspect also supports corresponding possible implementations and has corresponding technical effects.
第四方面,本发明还提供一种程序产品的实施例,该程序产品包含计算机可读代码指令,当这些计算机可读代码指令被第一摄像机运行的时候,使得该第一摄像机能够执行第一方面以及第一方面各种可能的实现方式。并拥有相应的技术效果。In a fourth aspect, the present invention also provides an embodiment of a program product, the program product includes computer-readable code instructions, when the computer-readable code instructions are executed by the first camera, the first camera can execute the first camera. aspects and various possible implementations of the first aspect. And have the corresponding technical effect.
附图说明Description of drawings
图1展示了一种摄像机拓扑结构的实施方式。Figure 1 shows an embodiment of a camera topology.
图2展示了对本发明对帧的曝光顺序的实施例。FIG. 2 illustrates an embodiment of the exposure sequence of frames to the present invention.
图3展示了一种曝光不均匀的帧。Figure 3 shows a frame with uneven exposure.
图4A展示了一种曝光不均匀的帧。Figure 4A shows a frame with uneven exposure.
图4B展示了一种曝光均匀的帧。Figure 4B shows a uniformly exposed frame.
图5展示了两个摄像机所拍摄的帧在曝光时序上的关系。Figure 5 shows the relationship between the exposure timing of the frames captured by the two cameras.
图6展示了两个摄像机所拍摄的帧在曝光时序上的关系。Figure 6 shows the relationship between the exposure timing of the frames captured by the two cameras.
图7展示了两个摄像机所拍摄的帧在曝光时序上的关系。Figure 7 shows the relationship between the exposure timing of the frames captured by the two cameras.
图8展示了两个摄像机所拍摄的帧在曝光时序上的关系。Figure 8 shows the relationship between the exposure timing of the frames captured by the two cameras.
图9示例性的对以上四种策略中前帧相对于后帧的亮度关系进行了描述。FIG. 9 exemplarily describes the brightness relationship of the previous frame relative to the subsequent frame in the above four strategies.
图10是一种曝光时间调整方法的可选实施例。FIG. 10 is an alternative embodiment of an exposure time adjustment method.
图11是一种曝光时间调整装置的可选实施例。Figure 11 is an alternative embodiment of an exposure time adjustment device.
具体实施方式detailed description
本发明实施例用于调整摄像机的曝光时间,例如在一个场景中有2个以上的摄像机进行持续的拍摄,这些摄像机在拍摄时各自为自己所拍摄的帧进行补光,这些补光除了对本摄像机的拍摄提供便利之外,还可能对周期其他摄像机造成影响。这种影响往往是不利的,例如造成帧的亮度不均匀,本发明可以对其中一个或者多个摄像机的曝光时间进行调整,减少这种影响造成的摄像机生成的帧的视觉效果劣化。这2个以上的摄像机可以拥有:相同拍摄周期,每个拍摄周期所拍摄的帧的数量相同;每个拍摄周期所拍摄的帧类型的顺序也相同,例如每个帧周期中都是先拍摄一个彩色帧,然后连续拍摄2个黑白帧;相同的补光规律,例如:对自身所拍摄的每个黑白帧进行补光,并且对每个黑白帧的补光时长相同。The embodiment of the present invention is used to adjust the exposure time of the camera. For example, in a scene, there are more than two cameras for continuous shooting. These cameras each fill light for the frames they shoot during shooting. In addition to the convenience of shooting, it may also affect other cameras in the cycle. This effect is often unfavorable, such as causing uneven brightness of the frames. The present invention can adjust the exposure time of one or more cameras to reduce the visual deterioration of the frames generated by the cameras caused by this effect. These two or more cameras can have: the same shooting period, the number of frames shot in each shooting period is the same; the sequence of the types of frames shot in each shooting period is also the same, for example, in each frame period, one is shot first Color frames, and then shoot 2 black and white frames in succession; the same fill light rule, for example: fill light for each black and white frame shot by itself, and the fill light time for each black and white frame is the same.
如图1所示,摄像机11包括:镜头111,传感器(sensor)112、片上芯片(system on chip,SOC)113,以及补光灯114。根据设计的不同,补光灯12可以是摄像机的一部分;补光灯12也可以独立于摄像机,从而可以不属于摄像机的一部分。As shown in FIG. 1 , the camera 11 includes a lens 111 , a sensor 112 , a system on chip (SOC) 113 , and a fill light 114 . Depending on the design, the fill light 12 may be a part of the camera; the fill light 12 may also be independent of the camera, and thus may not be part of the camera.
镜头111,用于采集来自被拍摄对象的光线。镜头111通常是由多块光学玻璃(或者塑料)组成的透镜组,可以由凹透镜、凸透镜,M型透镜等透镜或透镜的组合组成。镜头111可以采用球面镜也可以采用非球面镜。图1中的摄像机11仅有一个镜头,因此称为单目摄像机。The lens 111 is used to collect the light from the photographed object. The lens 111 is usually a lens group composed of multiple pieces of optical glass (or plastic), and may be composed of a concave lens, a convex lens, an M-type lens, etc., or a combination of lenses. The lens 111 can be a spherical mirror or an aspherical mirror. The camera 11 in FIG. 1 has only one lens, so it is called a monocular camera.
传感器112接收来自镜头的光线,通过曝光进行光电转换,生成黑白帧(grayscale frame)和彩色帧(color frame)。黑白帧也可以称为灰度图像或者灰度帧;彩色帧也可以称为彩色图像。传感器内部设置有控制逻辑,按照这个逻辑交替对可见光和非可见光(例如红外光)进行曝光,从而单个传感器可以交替生成黑白帧和彩色帧。以视频的帧率为25帧/秒 为例,那么获得一个黑白帧和一个彩色帧总共需要的曝光时长是1/25秒。平均一个帧的曝光时长是1/50秒。从而不断生成黑白帧和彩色帧。黑白帧可以提供亮度信息,可见光帧可以提供颜色信息和亮度信息。当摄像机11所拥有的传感器数量是1个,这个摄像机11又称为单传感器摄像机。可选的,在镜头和传感器之间还可以有滤光片(未图示)。The sensor 112 receives light from the lens, performs photoelectric conversion through exposure, and generates a black and white frame (grayscale frame) and a color frame (color frame). Black and white frames may also be referred to as grayscale images or grayscale frames; color frames may also be referred to as color images. Inside the sensor is control logic that alternately exposes visible and non-visible light (such as infrared light), so that a single sensor can alternately generate black-and-white and color frames. Taking the video frame rate of 25 frames/second as an example, the total exposure time required to obtain a black and white frame and a color frame is 1/25 of a second. The average exposure time for a frame is 1/50 of a second. As a result, black and white frames and color frames are continuously generated. Black and white frames can provide brightness information, and visible light frames can provide color information and brightness information. When the number of sensors possessed by the camera 11 is one, the camera 11 is also called a single-sensor camera. Optionally, there may also be a filter (not shown) between the lens and the sensor.
片上系统113,是一个集成电路芯片。片上系统113可以集成图像信号处理器(image signal processor,ISP),数字信号处理器,CPU以及编码器等。其中数字信号处理器摄像机对电信号进行放大和校正;ISP拥有对帧进行优化处理;CPU(例如
Figure PCTCN2021113951-appb-000001
处理器)可以对黑白帧和彩色帧进行融合生成融合图像,还可以控制补光灯114,例如通过曝光控制电路(未图示)对补光灯的补光开始时间、截止时间进行调整;编码器用于对CPU处理后的帧进行JPEG、H.264、H.265等协议进行编码,以便于帧的传输和保存。在其他实施例中,ISP,数字信号处理器,CPU以及编码器中的一个或者多个可以是独立的物理模块,不集成在SOC中。
The system-on-chip 113 is an integrated circuit chip. The system-on-chip 113 may integrate an image signal processor (ISP), a digital signal processor, a CPU, an encoder, and the like. The digital signal processor camera amplifies and corrects the electrical signal; the ISP has the ability to optimize the frame; the CPU (such as
Figure PCTCN2021113951-appb-000001
The processor) can fuse black and white frames and color frames to generate a fusion image, and can also control the fill light 114, such as adjusting the fill light start time and cut-off time of the fill light through an exposure control circuit (not shown); coding; The device is used to encode the frames processed by the CPU with protocols such as JPEG, H.264, and H.265, so as to facilitate the transmission and preservation of the frames. In other embodiments, one or more of the ISP, digital signal processor, CPU, and encoder may be separate physical modules, not integrated in the SOC.
补光灯114,用于对被拍摄的物体提供补光。例如在传感器112对红外光进行曝光时,补光灯114进行红外光补光,从而提高黑白帧的成像效果。补光灯114可以是摄像机11的一部分,也可以是不属于摄像机11的外部装置。The fill light 114 is used to provide fill light for the object being photographed. For example, when the sensor 112 exposes infrared light, the fill light 114 performs infrared light fill light, thereby improving the imaging effect of the black and white frame. The fill light 114 may be a part of the camera 11 , or may be an external device not belonging to the camera 11 .
下面对本发明实施例涉及的概念进行解释。The concepts involved in the embodiments of the present invention are explained below.
环境补光:除了本摄像机的内置/外置补光灯之外,本摄像机所处的环境中发生的补光。这种补光可以是有固定周期规律的。例如:在本摄像机所在的环境中的其他摄像机发出的周期性补光、周期性开关的灯光、周期性闪烁的警报灯等。Ambient fill light: In addition to the built-in/external fill light of the camera, the fill light that occurs in the environment where the camera is located. This fill light may have a fixed periodicity. For example: periodic supplementary light from other cameras in the environment where the camera is located, periodic lights on and off, periodic flashing alarm lights, etc.
曝光周期:摄像机的传感器拍摄单个帧所需要的时间。Exposure period: The time it takes for the camera's sensor to capture a single frame.
拍摄周期:摄像机的传感器以多个帧为一个周期进行循环拍摄,例如2个黑白帧+2个彩色帧为一个循环反复进行拍摄,或者1个彩色帧+2个黑白帧为一个循环,每个循环需要的时间就是一个拍摄周期。可以对同一个拍摄周期内的帧进行融合,生成彩色帧。例如:对同一个周期的2个黑白帧与1个彩色帧融合,生成2个彩色帧;对同一个周期的2个黑白帧与2个彩色帧融合,生成2个彩色帧。Shooting cycle: The sensor of the camera shoots cyclically with multiple frames as a cycle, such as 2 black and white frames + 2 color frames as a cycle to shoot repeatedly, or 1 color frame + 2 black and white frames as a cycle, each The time required for a loop is one shooting cycle. Frames within the same capture cycle can be fused to generate color frames. For example, fuse 2 black and white frames with 1 color frame in the same cycle to generate 2 color frames; fuse 2 black and white frames with 2 color frames in the same cycle to generate 2 color frames.
像素条:一个帧由多行像素组成,帧的一行(或者多行)像素称为一个像素条。对于逐像素条曝光的传感器(例如逐行曝光传感器)而言,像素条是个单独的曝光单位。每个像素条的起始曝光时间不同,传感器先对位于上方的像素条曝光,后对位于下方的像素条曝光。Pixel strip: A frame consists of multiple rows of pixels, and a row (or multiple rows) of pixels of a frame is called a pixel strip. For sensors that expose pixel-by-pixel strips (eg, row-by-line exposure sensors), a pixel strip is a single exposure unit. The initial exposure time of each pixel strip is different, and the sensor first exposes the pixel strip located above, and then exposes the pixel strip located below.
补光周期:用于描述所有像素条均处于曝光状态的时间段的长度。例如:从一个帧的最下方的像素条曝光开始,到这个帧最上方的像素条曝光结束为止,所需要花费的时间。Fill light period: used to describe the length of the time period during which all pixel strips are in the exposed state. For example: the time it takes from the exposure of the bottom pixel bar of a frame to the end of the exposure of the top pixel bar of this frame.
在传感器(例如逐行曝光传感器)通过曝光生成帧的过程中,并不是同时开始对整个帧进行曝光。而是依照一定的顺序逐渐曝光。具体而言,是先通过曝光生成帧的顶部,然后逐渐向下曝光,直至最终生成帧的底部,完成整个帧的曝光。在其他实施例中,可以先通过曝光生成帧的底部像素条,然后逐渐向上曝光,直至通过曝光生成帧的顶部像素条。During the generation of a frame by a sensor (eg, a progressive exposure sensor) from exposure, exposure of the entire frame is not initiated at the same time. Rather, it is exposed gradually in a certain order. Specifically, the top of the frame is first generated by exposure, and then gradually exposed downward until the bottom of the final frame is generated, and the exposure of the entire frame is completed. In other embodiments, the bottom pixel bar of the frame may be generated by exposure first, and then gradually exposed upward until the top pixel bar of the frame is generated by exposure.
假设在同一个环境中有第一摄像机和第二摄像机。第一摄像机的第一补光灯生成第一补光;第二摄像机的第二补光灯生成第二补光,第一摄像机通过曝光生成帧P。Suppose there is a first camera and a second camera in the same environment. The first fill light of the first camera generates the first fill light; the second fill light of the second camera generates the second fill light, and the first camera generates the frame P through exposure.
如果第二补光灯的补光时间段和第一补光的补光时间段不一致,那么帧P的曝光可能会受到第二补光灯的干扰。如图2描述了对帧P的曝光过程,帧P由P1至P8共8个像素 (pixel)条组成,P1位于最顶端,P8位于最底端,每个像素条是一行像素(如果传感器能够同时启动对多行像素曝光,则每个像素条可以是多行像素)。If the fill light time period of the second fill light is inconsistent with the fill light time period of the first fill light, the exposure of the frame P may be disturbed by the second fill light. Figure 2 describes the exposure process of frame P. Frame P consists of 8 pixel strips from P1 to P8, with P1 at the top and P8 at the bottom. Each pixel strip is a row of pixels (if the sensor can If multiple rows of pixels are exposed at the same time, each pixel bar can be multiple rows of pixels).
第一补光、第二补光对帧P的曝光过程造成影响在图2中用阴影部分标记。在A1时刻,所述第一摄像机开始对P1进行曝光(A1也是帧P的曝光开始时刻),A2时刻所述第一摄像机开始对P2进行曝光……而A5时刻是P1曝光结束的时刻,A8时刻是P8曝光结束的时刻(同时也是帧P结束曝光的时刻)。第一补光时长和第二补光的时长可以相同。时间段A1-A5是像素条P1的曝光时间段,时间段A1-A8是第一摄像机的曝光周期,时间段A9-A5是第一摄像机的补光周期。The effects of the first supplementary light and the second supplementary light on the exposure process of the frame P are marked with hatched parts in FIG. 2 . At time A1, the first camera starts to expose P1 (A1 is also the exposure start time of frame P), and at time A2, the first camera starts to expose P2... and time A5 is the time when the exposure of P1 ends, A8 The time is the time at which the exposure of P8 ends (and also the time at which the exposure of frame P ends). The duration of the first supplementary light and the duration of the second supplementary light may be the same. The time period A1-A5 is the exposure time period of the pixel bar P1, the time period A1-A8 is the exposure period of the first camera, and the time period A9-A5 is the fill light period of the first camera.
帧的明亮程度,受到传感器生成帧的时候所曝光程度的影响,而曝光程度由传感器的进光量决定。进光量越多,则被转换成电子的光子越多,所生成的帧的亮度越大。进光量由光照强度和光照时长共同决定,光照强度越大则进光量越多,光照时间越长则进光量越多。传感器的每一行对应帧P的一行像素,传感器逐行进行曝光。进光量多的行,生成的像素条相对明亮;进光量少的行,生成的像素条相对昏暗。帧P在曝光过程中,进光量包括三个来源:第一补光、第二补光以及环境中除了第一补光、第二补光之外的其他光线(例如环境中的自然光线)。由于自然光线对不同想像素条的影响是一样的,因此不会带来视频闪烁等问题。为了方便描述,本发明实施例中在没有特别说明的情况下,把自然光线对曝光的影响不做单独介绍。类似的,由于第一摄像机的补光灯受到第一摄像机的控制,因此第一摄像机的补光周期可以容易的实现与本摄像机补光时间段的同步。The brightness of the frame is affected by the exposure level when the sensor generates the frame, and the exposure level is determined by the amount of light entering the sensor. The more light that comes in, the more photons are converted into electrons and the brighter the resulting frame. The amount of incoming light is determined by both the light intensity and the light duration. Each row of the sensor corresponds to a row of pixels in frame P, and the sensor performs exposure row by row. Rows with a large amount of light input produce relatively bright pixel bars; rows with less light input produce relatively dim pixel bars. During the exposure process of frame P, the amount of incoming light includes three sources: the first supplementary light, the second supplementary light, and other light in the environment other than the first supplementary light and the second supplementary light (eg, natural light in the environment). Since the impact of natural light on different pixel strips is the same, it will not cause problems such as video flickering. For the convenience of description, in the embodiment of the present invention, the influence of natural light on exposure is not introduced separately unless otherwise specified. Similarly, since the fill light of the first camera is controlled by the first camera, the fill light period of the first camera can be easily synchronized with the fill light period of the camera.
下面对第一摄像机的补光时间段与第二摄像机的补光周期不同步所引起的问题进行介绍。The following introduces the problem caused by the non-synchronization of the fill light period of the first camera and the fill light period of the second camera.
在图2的帧P中,由于第一补光的起、止时间点(A3、A4)跨越了P1、P2、P3、P4、P5、P6、P7以及P8,因此P1-P8的曝光都会受到第一补光的影响。从时间点A6开始,第二补光对帧的曝光产生影响,到A7为止,第二补光对帧P的影响结束。在第二补光发挥影响时,P1-P2已经完成曝光,因此P1、P2不会受到第二补光的影响;而P3-P8正在曝光的过程中,因此P3-P8均会受到第二补光的影响。也就是说P1-P2仅受到第一补光的影响;而P3-P8既受到第一补光的影响也受到第二补光的影响。因此,不同像素条的曝光量不一样,这会导致在曝光完成的帧P中在亮度上呈现出明暗不均匀的现象。In the frame P of FIG. 2, since the start and end time points (A3, A4) of the first fill light span across P1, P2, P3, P4, P5, P6, P7 and P8, the exposures of P1-P8 will be affected by The effect of the first fill light. From the time point A6, the second fill light affects the exposure of the frame, and until A7, the effect of the second fill light on the frame P ends. When the second fill light is exerting its influence, P1-P2 has already been exposed, so P1 and P2 will not be affected by the second fill light; while P3-P8 are in the process of being exposed, so P3-P8 will be affected by the second fill light. effect of light. That is to say, P1-P2 are only affected by the first supplementary light; while P3-P8 are affected by both the first supplementary light and the second supplementary light. Therefore, the exposure amounts of different pixel strips are not the same, which will cause uneven brightness in the exposed frame P.
P1和P2的曝光未受到第二补光的影响。P3-P6受到第二补光的部分影响,其中:P3与第二补光重叠的部分是201,P4与第二补光重叠的部分是202,区域202的面积大于区域201的面积,因此,第二补光对P4曝光的影响大于第二补光对P3曝光的影响;类似的,P5、P6的曝光受到第二补光的影响逐渐增大。而P7、P8所受到第二补光的影响比P5、P6更大。于是,在帧P整体上呈现出“上暗下明”的效果。偏上的像素条(P1-P2)相对较暗,P2下方的像素条(P3-P6)亮度逐渐增加,最下面的像素条(P7、P8)的亮度最高。图3是这种由于补光不均匀而造成“上暗下亮”的示例帧,从图中可以看出,照片中的行人下半身比较明亮,而上半身非常暗,几乎看不清楚。The exposure of P1 and P2 is not affected by the second fill light. P3-P6 are partially affected by the second supplementary light, wherein: the overlapping part of P3 and the second supplementary light is 201, the overlapping part of P4 and the second supplementary light is 202, and the area of the area 202 is larger than the area of the area 201. Therefore, The influence of the second fill light on the exposure of P4 is greater than that of the second fill light on the exposure of P3; similarly, the exposure of P5 and P6 is gradually increased by the influence of the second fill light. However, P7 and P8 are more affected by the second supplementary light than P5 and P6. Therefore, the frame P as a whole presents the effect of "upper dark and lower bright". The upper pixel bars (P1-P2) are relatively dark, the pixel bars (P3-P6) below P2 gradually increase in brightness, and the lowest pixel bars (P7, P8) have the highest brightness. Figure 3 is an example frame of "upper dark and lower bright" due to uneven fill light. It can be seen from the picture that the lower body of the pedestrian in the photo is brighter, while the upper body is very dark and can hardly be seen clearly.
图4A的帧与图3相反,帧中出现的行人表现出“上明下暗”的视觉效果,上半身亮度较高,而腿部由于太暗以至于看不清楚。图4A产生的原因是:帧上方的部分,在曝光时除了受到自然光的影响外,还受到2个补光灯(第一补光灯和第二补光灯)的影响,传感器得到总的进光量比较多;而帧中下方的部分在曝光时除了受到自然光的影响外,仅受到 1个补光灯(第一补光灯)的影响,传感器的进光量比较少。The frame of Fig. 4A is opposite to that of Fig. 3. The pedestrians appearing in the frame show the visual effect of "light on the top and dark on the bottom", the upper body is brighter, and the legs are too dark to be seen clearly. The reason for the generation of Fig. 4A is: the part above the frame is not only affected by natural light, but also affected by 2 fill lights (the first fill light and the second fill light) during exposure, and the sensor obtains the total input The amount of light is relatively large; while the lower part of the frame is only affected by natural light during exposure, and is only affected by one fill light (the first fill light), and the amount of light entering the sensor is relatively small.
图4B是图4A的相邻前帧,该帧的各个像素条受到光照是相同的,因此图4B在视觉上明暗均匀。在视频中,当图4B与图4A这种“不均匀-均匀”这种变化在视频中反复出现,在视觉上会产生“闪烁”的效果,引起用户不适。当摄像机A正在进行彩色图像的曝光,而摄像机B正在进行红外光补光,那么摄像机A生成的视频(全部或者部分)会产生闪烁或者偏色。FIG. 4B is the adjacent previous frame of FIG. 4A , and each pixel strip of the frame is illuminated the same, so the light and shade of FIG. 4B are visually uniform. In the video, when the “uneven-uniform” change as shown in FIG. 4B and FIG. 4A appears repeatedly in the video, a “flickering” effect will appear visually, causing discomfort to the user. When camera A is exposing a color image and camera B is filling in infrared light, the video (full or partial) generated by camera A will flicker or color cast.
由此可以看出,对于逐像素条曝光的传感器而言,当来自于外界的补光灯(或者来自环境中的其他周期性补光)与本摄像机的补光周期不一致时:会造成本摄像机所生成的单帧图像半明半暗;还会造成相邻图像明暗差别较大,形成视频的闪烁现象。这两种影响对本摄像机的拍摄都是不利的,属于对本摄像机的“干扰”。It can be seen from this that, for the sensor exposed pixel by pixel, when the fill light from the outside (or other periodic fill light from the environment) is inconsistent with the fill light period of the camera: the camera will The generated single-frame image is half-bright and half-dark; it will also cause a large difference in the brightness and darkness of adjacent images, resulting in a flickering phenomenon in the video. Both of these effects are unfavorable to the shooting of this camcorder and belong to the "interference" to this camcorder.
本发明实施例中,通过对摄像机所拍摄的相邻帧的亮度进行对比,调整所述第一摄像机后续帧的曝光起始时间。例如:按照帧曝光过程中被环境中来自非本摄像机的、有周期规律的补光(例如非本摄像机的补光灯)所干扰的规律,调整本摄像机的曝光时间(或者补光时间和曝光时间一起调整),使得本摄像机在对帧曝光过程中,同一个帧的所有像素条都受到相同的周期性补光的影响(或者同一个所有像素条都不受到环境补光的影响),从而实现整个帧的亮度均匀。避免了在同一个帧的曝光周期中,不同像素条受到环境补光影响不一致,以至于出现“半明半暗”的帧;也避免了前后帧亮度不同引起的闪烁现象。In the embodiment of the present invention, the exposure start time of the subsequent frames of the first camera is adjusted by comparing the brightness of adjacent frames captured by the camera. For example: Adjust the exposure time of the camera (or the fill light time and the exposure time according to the law that the frame exposure process is disturbed by the periodic supplementary light from the non-camera in the environment (such as the supplementary light of the non-camera). time), so that during the exposure process of the camera, all the pixel strips of the same frame are affected by the same periodic fill light (or all the same pixel strips are not affected by the ambient fill light), thus Achieves uniform brightness throughout the frame. In the exposure period of the same frame, different pixel strips are not affected by the ambient fill light inconsistently, so that a "half-light and half-dark" frame appears; it also avoids the flickering phenomenon caused by the difference in brightness between the front and rear frames.
这里的相邻帧是同类型的帧,例如是2个相邻黑白帧,或者2个相邻彩色帧。需要说明的是,本发明实施例关注的是本摄像机的曝光是否受到环境补光的干扰,至于本摄像机自己的补光可以不予考虑,也就是说第一摄像机开启补光灯或者关闭补光灯都不会影响本发明实施例的实施。环境中补光是周期性的,可以来自于不同于所述第一摄像机的其他摄像机,也可以来自于其他周期性发光设备。The adjacent frames here are frames of the same type, for example, two adjacent black and white frames, or two adjacent color frames. It should be noted that, in this embodiment of the present invention, what is concerned is whether the exposure of the camera is disturbed by the ambient supplementary light, and the supplementary light of the camera itself may not be considered, that is to say, the first camera turns on the supplementary light or turns off the supplementary light. None of the lights affect the implementation of embodiments of the present invention. The supplementary light in the environment is periodic, and can come from other cameras different from the first camera, or from other periodic lighting devices.
具体而言,本发明实施例比较的是同一个摄像机相邻的两个帧中相同位置的亮度。例如前一帧最上方的一个像素条的平均亮度与第二帧最上方的一个像素条的亮度进行比较;或者,用前一帧最上方的三个像素条的平均亮度值,与后一帧最上方的三个像素条的平均亮度值进行比较;或者,用前一帧下方1/5部分的平均亮度值(例如算术平均值),与后一帧下方1/5平均亮度值进行比较。摄像机可以定期进行亮度值比较,或者在摄像机管理员的控制箱启动亮度值比较。Specifically, the embodiments of the present invention compare the brightness of the same position in two adjacent frames of the same camera. For example, compare the average brightness of the uppermost pixel strip of the previous frame with the brightness of the uppermost pixel strip of the second frame; The average luminance value of the top three pixel bars is compared; alternatively, the average luminance value (eg arithmetic mean) of the lower 1/5 part of the previous frame is compared with the average luminance value of the lower 1/5 of the following frame. The camera can periodically compare the brightness values, or start the brightness value comparison in the camera administrator's control box.
参见图5,在同一个区域中存在第一摄像机和第二摄像机,这两个摄像机都是单传感器摄像机,均可以既生成彩色帧又生成黑白帧。黑白帧和彩色帧的曝光时长相同,这个曝光时长称为曝光周期。此外,这两个摄像机均以三帧为一个周期进行拍摄,这个周期称为拍摄(shot)周期。每个拍摄周期中包括:1个彩色帧和2个黑白帧。第二摄像机曝光生成帧210、帧211、帧212、帧213和帧214,其中帧210和帧213是彩色帧,帧211和帧212是黑白帧,黑白帧在曝光的过程中使用了补光。第一摄像机曝光生成帧215、帧216、帧217、帧218和帧219,其中帧215和帧218是彩色帧,帧216、帧217和帧219是黑白帧,黑白帧在曝光的过程中使用了补光。帧210与帧215对应,帧211与帧216对应,帧212与帧217对应。按照帧的先后关系,帧215先于帧216生成,因此帧215是帧216的前帧,帧216是帧215的后帧。Referring to FIG. 5 , there are a first camera and a second camera in the same area, both of which are single-sensor cameras, both of which can generate both color frames and black and white frames. The exposure time for black and white frames and color frames is the same, and this exposure time is called the exposure period. In addition, both cameras shoot in a period of three frames, which is called a shot period. Included in each shooting cycle: 1 color frame and 2 black and white frames. The second camera exposure generates frames 210, 211, 212, 213 and 214, wherein frames 210 and 213 are color frames, frames 211 and 212 are black and white frames, and the black and white frames use fill light during the exposure process . The first camera exposure generates frame 215, frame 216, frame 217, frame 218 and frame 219, wherein frame 215 and frame 218 are color frames, frame 216, frame 217 and frame 219 are black and white frames, and black and white frames are used in the process of exposure fill light. Frame 210 corresponds to frame 215 , frame 211 corresponds to frame 216 , and frame 212 corresponds to frame 217 . According to the sequence relationship of the frames, the frame 215 is generated before the frame 216 , so the frame 215 is the frame before the frame 216 , and the frame 216 is the frame after the frame 215 .
需要说明的是,本实施例以对黑白帧进行使用红外补光灯进行补光为例进行介绍。除 了对黑白帧进行补光,还可以对彩色帧曝光过程中进行可见光的补光,还可以对彩色帧曝光过程中使用红外补光灯进行补光,是否在彩色帧曝光过程中使用补光灯,不影响本发明实施例的实施。It should be noted that this embodiment is described by taking an example of using an infrared fill light to fill light for a black and white frame. In addition to fill light for black and white frames, it can also fill light with visible light during exposure of color frames, and can also fill light with infrared fill lights during exposure of color frames. Whether to use fill lights during exposure of color frames , does not affect the implementation of the embodiments of the present invention.
下面的表1对图5所展示的摄像机在不同时间段的运行情况进行了介绍。Table 1 below describes the operation of the cameras shown in Figure 5 at different time periods.
时间段period 摄像机运行功能Camera operation function
t1-t8t1-t8 帧216曝光(曝光周期)Frame 216 exposures (exposure period)
t2-t4t2-t4 第二摄像机补光(补光3)The second camera fill light (fill light 3)
t3-t5t3-t5 第一摄像机补光(补光1)The first camera fill light (fill light 1)
t6-t12t6-t12 帧217曝光(曝光周期)Frame 217 exposure (exposure period)
t7-t10t7-t10 第二摄像机补光(补光4)The second camera fill light (fill light 4)
t9-t11t9-t11 第一摄像机补光(补光2)The first camera fill light (fill light 2)
t13-t14t13-t14 第一摄像机曝光滞后于第二摄像机的时间差The time difference between the exposure of the first camera and the lag of the second camera
表1Table 1
结合图5和表1中,对:当第一摄像机滞后于第二摄像机的曝光,并且滞后的时间长度小于一个曝光周期(也就是时间段[t2,t8]>时间段[t13,t14])的情况下,曝光生成的帧的特征进行介绍。Combining Figure 5 and Table 1, right: when the first camera lags behind the exposure of the second camera, and the time length of the lag is less than one exposure period (that is, the time period [t2, t8] > the time period [t13, t14]) In the case of exposure, the characteristics of the resulting frame are introduced.
帧216的曝光情况如下。The exposure of frame 216 is as follows.
(1)在t3-t5时间段,第一摄像机的补光1对帧216的曝光产生影响,而且帧216的所有像素条收到的影响相同。(1) During the time period from t3 to t5, the fill light 1 of the first camera has an impact on the exposure of the frame 216, and all the pixel bars of the frame 216 have the same impact.
(2)在t2-t4时间段,补光3会对帧216的像素条曝光造成影响。其中,位于帧216上方的像素条,比位于像素条216下方的像素条受到的影响更大。(2) During the time period from t2 to t4, the fill light 3 will affect the exposure of the pixel strips of the frame 216. Among them, the pixel strips located above the frame 216 are more affected than the pixel strips located below the pixel strip 216 .
(3)在t7时刻,第二摄像机的补光4开始工作,此时帧216上方的像素条已经曝光完成,因此不会受到补光4的影响。帧216的下方像素条仍然处于曝光的过程之中,因此会受到补光4的影响。因此,曝光完成之后的帧216会表现出上暗下明的特征,类似于附图3的情形。(3) At time t7, the fill light 4 of the second camera starts to work. At this time, the pixel bar above the frame 216 has been exposed, so it will not be affected by the fill light 4. The lower pixel bar of the frame 216 is still in the process of exposure, so it will be affected by the fill light 4 . Therefore, the frame 216 after the exposure is completed will exhibit a feature of being dark on the top and bright on the bottom, similar to the situation in FIG. 3 .
在第一摄像机对帧217进行曝光过程中,除了会接收到来自第一摄像机的补光2外,还会受到第二摄像对补光4的影响。曝光完成之后的帧217会表现出上明下暗的特点。During the exposure of the frame 217 by the first camera, in addition to receiving the supplementary light 2 from the first camera, the supplementary light 4 is also affected by the second camera. The frame 217 after exposure is completed will show the characteristics of upper light and lower dark.
图5中,曝光完成的帧216中位于下方的像素条的亮度值高于帧217中位于下方像素条的亮度值。这里以帧216最底端的像素条和帧217最底端的像素条为例进行对比:帧216最底端的像素条,它的形成一共受到三个补光的影响,分别是:t3-t4时间段的补光3,完整的补光1(t3-t5时间段),t7-t8时间段的补光4。帧217最底端的像素条,它的形成一共受到2个补光的影响,分别是:t9-t10时间段的补光4,完整的补光2(t9-t11时间段)。前者在曝光的过程中受到补光灯影响的总时长大于后者,因此曝光得到的像素的亮度值更高,也就是帧216最底端的像素条的亮度大于帧217最底端的像素条。In FIG. 5 , the luminance value of the lower pixel bar in frame 216 after exposure is completed is higher than the luminance value of the lower pixel bar in frame 217 . Here is a comparison between the pixel strip at the bottom of frame 216 and the pixel strip at the bottom of frame 217 as an example: the formation of the pixel strip at the bottom of frame 216 is affected by three fill lights, which are: t3-t4 time period The fill light 3, the complete fill light 1 (t3-t5 time period), the fill light 4 of the t7-t8 time period. The formation of the pixel bar at the bottom of the frame 217 is affected by a total of 2 fill lights, namely: fill light 4 in the time period t9-t10, and complete fill light 2 (time period t9-t11). The total duration of the former affected by the fill light during the exposure process is greater than that of the latter, so the brightness value of the pixels obtained by exposure is higher, that is, the brightness of the pixel bar at the bottom of frame 216 is greater than that of the pixel bar at the bottom of frame 217.
在图5所描述的3帧为一个周期的场景中,虽然图5仅展示了一种特定的示例,然而,根据反复实验验证和统计,可以发现:只要第一摄像机对帧的曝光滞后于第二摄像机对帧的曝光,并且滞后的程度少于一个曝光周期,都会符合这样的结论:第一摄像机的前帧下方像素条的亮度高于后帧下方像素条的亮度。也就是在播放这两帧时,视觉上存在闪烁的现象。并且经过反复验证,把这个结论反过来也成立,也就是:当第一摄像机的相邻同样 类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中,前帧下方像素条的亮度高于后帧下方像素条的亮度。因此可以得到第一调整策略:第一摄像机对帧的曝光相较于第二摄像机对帧的曝光存在相位的滞后,滞后的相位少于一个帧的相位。In the scene with 3 frames as one cycle described in Figure 5, although Figure 5 only shows a specific example, according to repeated experimental verification and statistics, it can be found that as long as the exposure of the first camera to the frame lags behind the first camera The exposure of the frame by the two cameras, and the degree of lag is less than one exposure period, will conform to the conclusion that the brightness of the pixel bar below the front frame of the first camera is higher than the brightness of the pixel bar below the back frame. That is, when these two frames are played, there is a visual flickering phenomenon. And after repeated verification, this conclusion is also true in reverse, that is: when the adjacent frames of the same type of the first camera (for example, two adjacent color frames, or two adjacent black and white frames), the lower part of the previous frame is The brightness of the pixel bar is higher than the brightness of the pixel bar below the back frame. Therefore, a first adjustment strategy can be obtained: the exposure of the frame by the first camera has a phase lag compared with the exposure of the frame by the second camera, and the lag phase is less than the phase of one frame.
考虑到第一、第二摄像机均是以3帧作为一个拍摄周期,因此彩色帧、黑白帧会反复出现。每当第二摄像机开始对彩色帧曝光不久之后,第二摄像机开始对彩色帧进行曝光,这两个曝光时间的时间差值少于一个曝光周期。也就是说,第一摄像机滞后于第二摄像机对相同类型帧的拍摄,如果在坐标系中以时间为轴描述第一、第二摄像机所拍摄的帧的不同。就形成2个周期性的波形,这两个波形之间存在相位差。这个相位差命名为△φ,也就是△φ=第一摄像机的相位-第二摄像机的相位,那么△φ=φ 1+2n*π,其中-φ 帧周期<φ 1<0°,φ 帧周期是一个曝光周期所对应的相位。其中-φ 帧周期中的符号“-”表示第一摄像机的相位滞后于第二摄像机的相位。由于相位具有周期性,因此本发明各实施例中的“滞后”与“提前”是个相对概念。例如:第一摄像机的拍摄周期滞后于第二摄像机的拍摄周期,滞后的相位差值是φ 1;这等效于:第一摄像机的拍摄周期与第二摄像机的拍摄周期的相位存在偏差,提前的相位差值是φ 1+2π。 Considering that the first and second cameras both use 3 frames as a shooting cycle, color frames and black and white frames will appear repeatedly. Shortly after the second camera starts exposing the color frame, the second camera starts exposing the color frame, and the time difference between the two exposure times is less than one exposure period. That is to say, the first camera lags behind the shooting of the same type of frames by the second camera, if the difference between the frames shot by the first and second cameras is described in the coordinate system with time as the axis. Two periodic waveforms are formed, and there is a phase difference between the two waveforms. This phase difference is named Δφ, that is, Δφ = the phase of the first camera - the phase of the second camera, then Δφ = φ 1 +2n*π, where -φ frame period1 <0°, φ frame Period is the phase corresponding to one exposure period. The symbol "-" in the -φ frame period indicates that the phase of the first camera lags behind the phase of the second camera. Since the phase is periodic, "lag" and "advance" in various embodiments of the present invention are relative concepts. For example: the shooting period of the first camera lags behind the shooting period of the second camera, and the delayed phase difference value is φ 1 ; The phase difference value of is φ 1 +2π.
示例:当第一摄像机的拍摄周期一共有3个帧,每个帧的曝光时长相同,则每个曝光周期曝光周期对应的相位是360°/3=120°;那么-120°<φ 1<0°;于是,△φ=φ 1+2n*π。按照φ 1+2n*π调整第一相机的曝光时间,就可以实现与第二摄像机的拍摄周期同步,例如把第一摄像机的后续帧的曝光起始时间提前,被提前的时间长度如果用相位来描述,相当于把第一相机的曝光周期的相位调整φ 1Example: When the shooting period of the first camera has a total of 3 frames, and the exposure time of each frame is the same, the phase corresponding to the exposure period of each exposure period is 360°/3=120°; then -120°<φ 1 < 0°; thus, Δφ=φ 1 +2n*π. By adjusting the exposure time of the first camera according to φ 1 +2n*π, it can be synchronized with the shooting cycle of the second camera. For example, the exposure start time of the subsequent frames of the first camera can be advanced. To describe, it is equivalent to adjusting the phase of the exposure period of the first camera by φ 1 .
需要说明的是,让第一摄像机和第二摄像机保持曝光时间的完全一致不是必须的,只需要第二摄像机的每个补光时间段位于所述第一摄像机的单个补光周期之内即可。因此被实际调整的相位可以不是一个固定值而是一个相位范围。由于△φ给出了调整的方向和调整的范围,因此在得到△φ之后就可以快速的完成调整。It should be noted that it is not necessary to keep the exposure time of the first camera and the second camera exactly the same, as long as each fill light period of the second camera is within a single fill light period of the first camera. . Therefore the actually adjusted phase may not be a fixed value but a phase range. Since Δφ gives the direction of adjustment and the range of adjustment, the adjustment can be completed quickly after obtaining Δφ.
当把第一摄像机对黑白帧的曝光起始时间提前,可以让第一摄像机的相位适当向前调整,减小第一摄像机与第二摄像机之间补光起始时间的差值,使得:补光3对黑白帧216所有像素条的曝光造成的影响相同,以及使得补光4对黑白帧217所有像素条的曝光造成的影响相同,从而实现第二摄像机的补光提前实现二者的曝光一致。例如:假设第一摄像机的曝光周期是200ms,拍摄周期是600ms;第一摄像机对彩色帧的曝光时间晚于第二摄像机40ms,那么把第一摄像机的曝光时间稍微提前,可以把第一摄像机的曝光时间提前40ms+n*600ms,n是包括0在内的任意整数。由于第一摄像机以第二摄像机的补光时间为依据调整自身的曝光时间,因此可以认为二者之间存在主-从的关系,第二摄像机是主摄像机,第一摄像机是从摄像机。When the exposure start time of the first camera to the black and white frame is advanced, the phase of the first camera can be adjusted forward appropriately, and the difference between the start time of the fill light between the first camera and the second camera can be reduced, so that: Light 3 has the same impact on the exposure of all pixel strips in the black and white frame 216, and makes the fill light 4 have the same impact on the exposure of all pixel strips in the black and white frame 217, so that the fill light of the second camera is achieved in advance to achieve the same exposure of the two . For example: Suppose the exposure period of the first camera is 200ms, and the shooting period is 600ms; the exposure time of the first camera to the color frame is 40ms later than that of the second camera, then the exposure time of the first camera The exposure time is advanced by 40ms+n*600ms, where n is any integer including 0. Since the first camera adjusts its own exposure time based on the fill light time of the second camera, it can be considered that there is a master-slave relationship between the two. The second camera is the master camera and the first camera is the slave camera.
需要说明的是,上面的调整可能无法一次到位,如果首次调整没有达到目的,可以反复进行调整,直至拍摄出的黑白帧不出现“半明半暗”的情况为止,调整的范围始终在△φ之内。例如:-120°<△φ<0°,曝光周期是200ms,△φ是负值,因此调整的方向是把第一摄像机的曝光时间提前,每一次调整把曝光时间提前10ms。每一次调整结束后,如果第一摄像机得到的黑白帧仍然存在亮度不均匀则再次把曝光时间提前10ms,通过多次调整之后就可以实现第一摄像机采集到的黑白帧的亮度均匀。200ms/10ms=20,因此总共的调整次数不会超过20次;如果每次调整20ms,则总共的调整次数不超过200ms/10ms,也就 是10次。It should be noted that the above adjustment may not be in place at one time. If the first adjustment fails to achieve the purpose, the adjustment can be repeated until the black and white frame captured does not appear "half-bright and half-dark", and the adjustment range is always within △φ. within. For example: -120°<△φ<0°, the exposure period is 200ms, and △φ is a negative value, so the adjustment direction is to advance the exposure time of the first camera, and advance the exposure time by 10ms for each adjustment. After each adjustment, if the black and white frames obtained by the first camera still have uneven brightness, advance the exposure time by 10ms again. After multiple adjustments, the brightness of the black and white frames collected by the first camera can be uniform. 200ms/10ms=20, so the total adjustment times will not exceed 20 times; if each adjustment is 20ms, the total adjustment times will not exceed 200ms/10ms, that is, 10 times.
本实施例中,第一摄像机和第二摄像机的补光时间段可以相同,也就是:补光时间段1=补光时间段2=补光时间段3=补光时间段4。In this embodiment, the fill light time periods of the first camera and the second camera may be the same, that is: fill light time period 1 = fill light time period 2 = fill light time period 3 = fill light time period 4 .
上述的结论可以总结为第一个△φ计算方法:当第一摄像机的相邻同样类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中,前帧下方像素条的亮度高于后帧下方像素条的亮度,则:第一摄像机曝光生成帧的波形相较于第二摄像机曝光生成帧的波形之间存在相位的滞后,滞后的相位少于一个帧的相位,也就是公式△φ=φ 1+2n*π曝光周期。按照△φ调整第一摄像机对后续帧的曝光起始时间,把第一摄像机对后续帧的曝光起始时间提前,提前的时间不超过一个黑白帧的曝光周期,可以实现来自于第二摄像机的每个补光时间段均位于所述第一摄像机的补光周期之内。 The above conclusions can be summarized as the first Δφ calculation method: when the adjacent frames of the same type of the first camera (for example, two adjacent color frames, or two adjacent black and white frames), the pixel bar below the previous frame is The brightness of the frame is higher than the brightness of the pixel bar below the subsequent frame, then: there is a phase lag between the waveform of the frame generated by the exposure of the first camera and the waveform of the frame generated by the exposure of the second camera, and the lag phase is less than the phase of one frame, That is, the formula Δφ=φ 1 +2n*π exposure period. Adjust the exposure start time of the first camera to the subsequent frames according to Δφ, advance the exposure start time of the first camera to the subsequent frames, and the advance time does not exceed the exposure period of one black and white frame, which can realize the Each fill light time period is within the fill light period of the first camera.
上面对第一调整策略的推导过程进行了详细的介绍。下面对第二调整策略、第三调整策略以及第四调策略进行介绍,由于推导的过程和原理与第一调整策略相似,出于节约篇幅的目的,不再做具体说明。The derivation process of the first adjustment strategy is described in detail above. The second adjustment strategy, the third adjustment strategy and the fourth adjustment strategy will be introduced below. Since the derivation process and principle are similar to the first adjustment strategy, for the purpose of saving space, no detailed description will be given.
图6是另外一个用于描述第一、第二摄像机曝光时序的示意图,用于对第二调整策略进行介绍。图6的内容与图5类似,所不同之处在于:第一摄像机的曝光时间提前于第二摄像机。提前的时间小于一个曝光周期,也就是:时间段[t15,t16]<时间段[t17,t18]。FIG. 6 is another schematic diagram for describing the exposure timing of the first and second cameras, and is used for introducing the second adjustment strategy. The content of FIG. 6 is similar to that of FIG. 5 , the difference is that the exposure time of the first camera is earlier than that of the second camera. The advance time is less than one exposure period, that is: time period [t15, t16] < time period [t17, t18].
可以看出:帧216中位于上方的像素条受到补光1和补光3的影响;而帧217上方的像素条受到补光2、补光3以及补光4的影响。其中:补光1带给帧216的影响与补光2对帧217的影响相同,补光3带给传感器的进光量少于补光传感器对帧217曝光时上方的像素条的进光量大于传感器对帧216曝光时上方的像素条的进光量(具体分析参见上面对图3、图5的介绍),因此帧216上方的像素条的亮度大于帧217上方的像素条的亮度。It can be seen that the upper pixel bar in frame 216 is affected by fill light 1 and fill light 3; while the pixel bar above frame 217 is affected by fill light 2, fill light 3 and fill light 4. Among them: the effect of the fill light 1 on the frame 216 is the same as the effect of the fill light 2 on the frame 217, and the light input of the fill light 3 to the sensor is less than the light input of the pixel bar above when the fill light sensor exposes the frame 217. When the sensor exposes the frame 216, the amount of light entering the upper pixel bar (for a detailed analysis, refer to the description of FIG. 3 and FIG. 5 above), so the brightness of the pixel bar above the frame 216 is greater than that of the frame 217.
上述的结论可以总结为第二个△φ计算方法:当第一摄像机的相邻同样类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中,前帧上方像素条的亮度大于后帧上方像素条的亮度。则:第一摄像机生成的帧相较于第二摄像机生成的帧之间存在相位的滞后,滞后的相位少于一个帧的相位,也就是公式△φ=φ 2+2n*π,其中0°<φ2<φ 帧周期曝光周期。 The above conclusion can be summarized as the second Δφ calculation method: when the adjacent frames of the same type of the first camera (for example, two adjacent color frames, or two adjacent black and white frames), the pixel bar above the previous frame is is greater than the brightness of the pixel bar above the back frame. Then: there is a phase lag between the frame generated by the first camera and the frame generated by the second camera, and the lag phase is less than the phase of one frame, that is, the formula Δφ=φ 2 +2n*π, where 0° <φ2<φ frame period exposure period.
图7是另外一个用于介绍第一、第二摄像机曝光时序的示意图,用于对第三调整策略进行介绍。图7的内容与图5类似,所不同之处在于:以帧210和帧215(帧215与210对应)的曝光时间点进行比较,第一摄像机的曝光时间提前于第二摄像机。提前的时间长度大于一个曝光周期,少于1.5个曝光周期(由于曝光的周期性,也可以选择用帧220和帧215的曝光时间点进行对应比较,那么第一摄像机曝光延后于第二摄像机,延后的时间长度是:大于一个曝光周期,少于1.5个曝光周期)。也就是:时间段[t25,t26]<时间段[t23,t24]<1.5*时间段[t25,t26]。FIG. 7 is another schematic diagram for introducing the exposure timing of the first and second cameras, and is used for introducing the third adjustment strategy. The content of FIG. 7 is similar to that of FIG. 5 , the difference is that: comparing the exposure time points of frame 210 and frame 215 (frame 215 corresponds to 210 ), the exposure time of the first camera is earlier than that of the second camera. The length of time in advance is greater than one exposure period and less than 1.5 exposure periods (due to the periodicity of exposure, you can also choose to use the exposure time points of frame 220 and frame 215 for corresponding comparison, then the exposure of the first camera is delayed after the second camera. , the delay time length is: more than one exposure period, less than 1.5 exposure periods). That is: time period [t25, t26] < time period [t23, t24] < 1.5* time period [t25, t26].
帧216中,位于上方的像素条受到补光1和补光5的影响;帧217中,位于上方的像素条受到补光2、补光3的影响;并且,补光5对帧216影响的持续时间长于补光3对帧217影响的持续时间。因此可以得出:(1)帧216上方的像素条的亮度大于帧217上方的像素条的亮度。帧216下方的像素条受到补光5和补光1的影响;帧217下方的像素条受到补光2、补光3的影响;并且补光5对帧216影响的持续时间长于补光3对帧217影响的持续时间,因此可以得出:(2)帧216下方像素条的亮度小于帧217下方像素条的亮度。 此外,用帧216和帧217相对应的像素条进行比较(例如帧216的第一行像素条与帧217的第一行像素条比较,例如帧216的第二行像素条与帧217的第二行像素条比较),可以得出:(3)帧216比帧217更亮的像素条位于帧216的上方,帧216比帧217更暗的像素条位于帧216的下方,并且帧216比帧217更亮的像素条占帧216的总像素条中的少数。In frame 216, the upper pixel strip is affected by fill light 1 and fill light 5; in frame 217, the upper pixel strip is affected by fill light 2 and fill light 3; and, fill light 5 affects frame 216. The duration is longer than the duration of the effect of fill light 3 on frame 217. Therefore, it can be concluded that (1) the brightness of the pixel strip above the frame 216 is greater than the brightness of the pixel strip above the frame 217 . The pixel bar below the frame 216 is affected by the fill light 5 and the fill light 1; the pixel bar below the frame 217 is affected by the fill light 2 and the fill light 3; and the effect of the fill light 5 on the frame 216 is longer than the fill light 3 pair. The duration of the influence of frame 217, it can therefore be concluded that (2) the brightness of the pixel strip below frame 216 is less than the brightness of the pixel strip below frame 217. In addition, the pixel bars corresponding to frame 216 and frame 217 are used for comparison (eg, the first row of pixel bars of frame 216 is compared with the first row of pixel bars of frame 217, eg, the second row of pixel bars of frame 216 is compared with the first row of pixel bars of frame 217. Comparison of two rows of pixel bars), it can be concluded that (3) the pixel bars of frame 216 that are brighter than frame 217 are located above frame 216, the pixel bars of frame 216 that are darker than frame 217 are located below frame 216, and frame 216 is lighter than frame 216. The brighter pixel bars of frame 217 are a minority of the total pixel bars of frame 216 .
上述的规律可以总结为第三个△φ计算方法:当第一摄像机的相邻同类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中:前帧上方像素条的亮度大于后帧上方像素条的亮度;并且,前帧下方像素条的亮度小于后帧下方像素条的亮度;并且,前帧中高于后帧亮度的像素条数目<前帧中低于后帧亮度的像素条数目,则:第一摄像机生成的帧相较于第二摄像机生成的帧之间存在相位的提前,提前的相位的值在一个曝光周期相位和1.5个曝光周期相位之间,也就是公式△φ=φ 3+2n*π,其中φ 帧周期<φ2<1.5*φ 帧周期曝光周期曝光周期。 The above rules can be summarized as the third △φ calculation method: when the adjacent frames of the same type of the first camera (such as two adjacent color frames, or two adjacent black and white frames): the pixel bar above the previous frame. The brightness of the pixel strip above the next frame is greater than the brightness of the pixel strip above the next frame; and the brightness of the pixel strip below the previous frame is less than the brightness of the pixel strip below the subsequent frame; and, the number of pixel strips in the previous frame higher than the brightness of the subsequent frame < The previous frame is lower than the subsequent frame. The number of pixel bars of brightness, then: the frame generated by the first camera has a phase advance compared with the frame generated by the second camera, and the value of the advanced phase is between the phase of one exposure period and the phase of 1.5 exposure periods, and also It is the formula Δφ=φ 3 +2n*π, where φ frame period <φ2<1.5*φ frame period exposure period exposure period.
图8是另外一个用于介绍第一、第二摄像机曝光时序的示意图,用于对第四调整策略进行介绍。图8的内容与图5类似,所不同之处在于:以帧210和帧215的曝光时间点进行比较,第一摄像机的曝光时间滞后于第二摄像机。滞后的时间长度大于一个曝光周期,少于1.5个曝光周期。也就是:时间段[t29,t30]<时间段[t27,t28]<1.5*时间段[t29,t30]。FIG. 8 is another schematic diagram for introducing the exposure timing of the first and second cameras, and is used for introducing the fourth adjustment strategy. The content of FIG. 8 is similar to that of FIG. 5 , the difference is that: comparing the exposure time points of frame 210 and frame 215 , the exposure time of the first camera lags behind that of the second camera. The time length of the lag is greater than one exposure period and less than 1.5 exposure periods. That is: time period [t29, t30] < time period [t27, t28] < 1.5* time period [t29, t30].
帧216中位于上方的像素条受到补光1和补光4的影响;帧217上方的像素条仅受到补光2影响,因此可以得出:(1)帧216上方的像素条的亮度大于帧217上方的像素条的亮度。帧216下方像素条仅受到补光1、补光4的影响,而帧217下方的像素条受到补光2和补光6共同的影响,补光4照射帧216下方像素条的时间长度要小于补光6照射帧217下方像素条的时间长度,因此可以得出:(2)帧216下方像素条的亮度小于帧217下方像素条的亮度。此外,用帧216和帧217想对应的像素条进行比较,可以得出:(3)帧216中比帧217亮的像素条位于帧216的上方,帧216中比帧217暗的像素条位于帧216的下方,并且帧216比帧217更亮的像素条占帧216的总像素条中的多数。The upper pixel strip in frame 216 is affected by fill light 1 and fill light 4; the pixel strip above frame 217 is only affected by fill light 2, so it can be concluded that: (1) the brightness of the pixel strip above frame 216 is greater than that of frame 216 The brightness of the pixel bar above 217. The pixel bar below frame 216 is only affected by fill light 1 and fill light 4, while the pixel bar below frame 217 is jointly affected by fill light 2 and fill light 6. The length of time that fill light 4 illuminates the pixel bar below frame 216 is less than The length of time that the fill light 6 illuminates the pixel bar below the frame 217 , so it can be concluded that (2) the brightness of the pixel bar below the frame 216 is smaller than that of the pixel bar below the frame 217 . In addition, comparing the pixel bars corresponding to frame 216 and frame 217, it can be concluded that (3) the pixel bars in frame 216 that are brighter than frame 217 are located above frame 216, and the pixel bars in frame 216 that are darker than frame 217 are located at the top of frame 216. Below frame 216, and where frame 216 is brighter than frame 217, constitutes the majority of frame 216's total pixel bars.
上述的结论可以总结为第四个△φ计算方法:当第一摄像机的相邻同样类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中:前帧上方像素条的亮度大于后帧上方像素条的亮度;并且,前帧下方像素条的亮度小于后帧下方像素条的亮度;并且,前帧中高于后帧亮度的像素条数目>前帧中低于后帧亮度的像素条数目,则:第一摄像机生成的帧相较于第二摄像机生成的帧之间存在相位的滞后,滞后的相位的值介意一个曝光周期相位和1.5个曝光周期相位之间,也就是公式△φ=φ 4+2n*π。-1.5*φ 帧周期<φ 4<-φ 帧周期The above conclusion can be summarized as the fourth △φ calculation method: when the adjacent frames of the same type of the first camera (for example, two adjacent color frames, or two adjacent black and white frames): the pixel bar above the previous frame. The brightness of the pixel strip above the next frame is greater than the brightness of the pixel strip above the next frame; and the brightness of the pixel strip below the previous frame is less than the brightness of the pixel strip below the post frame; and, the number of pixel strips in the previous frame that is higher than the brightness of the latter frame> the previous frame is lower than the latter frame. The number of pixel bars of brightness, then: there is a phase lag between the frame generated by the first camera and the frame generated by the second camera, and the value of the lag phase is between the phase of one exposure cycle and the phase of 1.5 exposure cycles, also It is the formula Δφ=φ 4 +2n*π. -1.5*φ frame period4 <-φ frame period .
表2归纳了上文中提及的相邻帧的亮度变化与第一摄像机相对于第二摄像机的相位差△φ之间的对应关系。在根据亮度变化规律得到△φ之后,就可以进行相应的相位调整。需要说明的是,这四种情况是相互独立,互相没有依赖关系,因此对于某个具体的摄像机而言,可以只基于其中一个公式实现曝光时间的调整。Table 2 summarizes the correspondence between the above-mentioned brightness changes of adjacent frames and the phase difference Δφ of the first camera relative to the second camera. After obtaining Δφ according to the brightness variation law, the corresponding phase adjustment can be performed. It should be noted that these four situations are independent of each other and have no dependencies on each other, so for a specific camera, the exposure time can be adjusted based on only one of the formulas.
Figure PCTCN2021113951-appb-000002
Figure PCTCN2021113951-appb-000002
Figure PCTCN2021113951-appb-000003
Figure PCTCN2021113951-appb-000003
表2Table 2
此外,这四个公式在图5-图8所描述的实施例中以3帧为一个拍摄周期进行示例,当拍摄周期中包括更多帧时(例如2个连续彩色帧+2个连续黑白帧),以上4个计算△φ的公式仍然成立。In addition, these four formulas are exemplified by taking 3 frames as a shooting cycle in the embodiment described in FIG. 5-FIG. 8, when the shooting cycle includes more frames (for example, 2 consecutive color frames + 2 consecutive black and white frames) ), the above four formulas for calculating Δφ are still valid.
为了方便对表2的理解,使用图9示例性的对以上四种策略中前帧相对于后帧的亮度关系进行了描述。帧31是对第一种调整策略中的帧216的示例;帧32是对第一种调整策略中的帧216的示例;帧33是对第一种调整策略中的帧216的示例,其中h<i;帧34是对第一种调整策略中的帧216的示例,其中j>k。In order to facilitate the understanding of Table 2, FIG. 9 is used to exemplarily describe the brightness relationship between the previous frame and the subsequent frame in the above four strategies. Frame 31 is an example of frame 216 in the first adjustment strategy; frame 32 is an example of frame 216 in the first adjustment strategy; frame 33 is an example of frame 216 in the first adjustment strategy, where h <i; frame 34 is an example of frame 216 in the first adjustment strategy, where j>k.
在上面所描述的实施例中,以相邻的同类型帧是基于对黑白帧受到补光灯的影响进行检测进行了介绍。实际上,彩色帧的亮度也会受到曝光时环境中红外补光/可见光补光的影响,因此当彩色帧的曝光周期与环境补光不同步时,也会出现半明半暗的情况。本发明实施例提供的方法同样适用于基于彩色帧的曝光时间调整,通过比较前后两个彩色帧的亮度,同样可以判断出相位差的规律,从而将彩色帧的曝光时间调整为与环境中周期性补光的补光时间相一致,避免出现亮度不均匀的彩色帧,以及避免出现闪烁现象。基于彩色帧的判断、调整方法和基于黑白帧的判断、调整方法相一致。In the above-described embodiments, the introduction is made based on the detection of the black and white frames affected by the fill light when adjacent frames of the same type are used. In fact, the brightness of the color frame is also affected by the infrared fill light/visible light fill light in the environment during exposure, so when the exposure period of the color frame is not synchronized with the ambient fill light, there will also be semi-brightness and semi-darkness. The method provided by the embodiment of the present invention is also applicable to the exposure time adjustment based on color frames. By comparing the brightness of the two color frames before and after, the law of the phase difference can also be judged, so that the exposure time of the color frame is adjusted to be the same as the period in the environment. The filling time of the supplementary light is consistent, avoiding the appearance of color frames with uneven brightness, and avoiding the phenomenon of flickering. The judgment and adjustment methods based on color frames are the same as those based on black and white frames.
此外,本发明还提供另外一种调整办法:不对比前后两帧的亮度变化,直接以一定的步长(例如固定值20ms),以任意方向调整第一摄像机的曝光时间,直到第一摄像机产生的视频没有闪烁时停止调整,这种方法的调整速度会比较慢。例如亮度的比较、两个摄像机之间曝光周期相位差的计算,以及第一摄像机曝光时间的调整等操作,均可以由所述摄像机的CPU来执行。In addition, the present invention also provides another adjustment method: instead of comparing the brightness changes of the two frames before and after, directly adjust the exposure time of the first camera in any direction with a certain step size (for example, a fixed value of 20ms), until the first camera generates Stop the adjustment when the video does not flicker, the adjustment speed of this method will be slower. For example, the comparison of brightness, the calculation of the phase difference of the exposure period between the two cameras, and the adjustment of the exposure time of the first camera, etc., can all be performed by the CPU of the camera.
在调整可以对同一个拍摄周期内的帧进行融合,生成彩色帧。例如:CPU对同一个周期的2个黑白帧与1个彩色帧融合,生成2个彩色帧;对同一个周期的2个黑白帧与2个彩色帧融合,生成2个彩色帧。In the adjustment, the frames in the same shooting cycle can be fused to generate color frames. For example, the CPU fuses 2 black and white frames and 1 color frame in the same cycle to generate 2 color frames; fuses 2 black and white frames and 2 color frames in the same cycle to generate 2 color frames.
参见图10,本发明提供一种调整摄像机曝光时间的方法的实施例,用于对第一摄像机的曝光时间进行调整,其中:所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期,所述方法包括:步骤S11,对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型 帧指类型为黑白帧,或者类型为彩色帧;步骤S22,根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。在完成调整之后,可选的还可以包括步骤S23,对同一个拍摄周期内的帧进行融合,生成彩色帧。例如:对于2个黑白帧+1个彩色帧为一个拍摄周期的摄像机,对同一个周期的2个黑白帧分别与同1个彩色帧融合,生成2个彩色帧;对于2个彩色帧+1个黑白帧为一个拍摄周期的摄像机,对同一个周期的2个彩色帧分别与同一个黑白帧融合,生成2个彩色帧;对于4帧一个拍摄周期的摄像机,对同一个周期的2个黑白帧与2个彩色帧融合,生成2个彩色帧。Referring to FIG. 10 , the present invention provides an embodiment of a method for adjusting the exposure time of a camera, for adjusting the exposure time of a first camera, wherein: each shooting cycle of the first camera includes at least 3 frames, The 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and each fill light time period in the periodic fill light is shorter than the first camera. , the method includes: step S11, comparing the brightness of two adjacent frames of the same type in the same shooting cycle of the first camera, wherein the frame of the same type refers to a black and white frame, or The type is color frame; Step S22, adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is within a single fill light period of the first camera . After the adjustment is completed, the optional step S23 may be included to fuse the frames in the same shooting cycle to generate a color frame. For example: for a camera with 2 black and white frames + 1 color frame as one shooting cycle, 2 black and white frames in the same cycle are fused with the same color frame to generate 2 color frames; for 2 color frames + 1 For a camera with a shooting cycle of 4 black and white frames, 2 color frames in the same cycle are fused with the same black and white frame to generate 2 color frames; for a camera with 4 frames in one shooting cycle, 2 black and white frames in the same cycle The frame is fused with 2 color frames, resulting in 2 color frames.
参见图11,本发明还提供一种曝光时间调整装置的实施例,用于执行上述的方法,对第一摄像机的曝光时间进行调整。所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期。曝光时间调整装置可以是第一摄像机,或者第一摄像机的处理器中所运行的程序。Referring to FIG. 11 , the present invention further provides an embodiment of an exposure time adjustment device, which is used for performing the above method to adjust the exposure time of the first camera. Each shooting cycle of the first camera includes at least 3 frames, the 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and the cycle Each supplementary light time period in the sexual supplementary light is shorter than the supplementary light period of the first camera. The exposure time adjustment device may be the first camera, or a program running in the processor of the first camera.
曝光时间调整装置4包括:亮度对比模块41和调整模块42。其中,所述亮度对比模块,用于对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧指类型为黑白帧,或者类型为彩色帧。所述调整模块42,用于根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。The exposure time adjustment device 4 includes: a brightness contrast module 41 and an adjustment module 42 . Wherein, the brightness comparison module is used to compare the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames or color frames frame. The adjustment module 42 is used to adjust the exposure start time of the subsequent frames of the first camera according to the comparison result, until each of the adjusted fill light time periods is within a single fill light period of the first camera. .
例如:所述亮度对比模块41检测出:第一摄像机的相邻同样类型帧(例如相邻的2个彩色帧,或者相邻的2个黑白帧)中,前帧下方像素条的亮度高于后帧下方像素条的亮度。则得出结论:第一摄像机生成的帧相较于第二摄像机生成的帧之间存在相位的滞后,滞后的相位少于一个帧的相位,也就是公式△φ=φ 1+2n*π,-φ 帧周期<φ 1<0°,本实施例中-120°<φ 1<0°。 For example, the brightness comparison module 41 detects that: in the adjacent frames of the same type (for example, two adjacent color frames, or two adjacent black and white frames) of the first camera, the brightness of the pixel bar below the previous frame is higher than that of the previous frame. The brightness of the pixel bar below the back frame. Then it is concluded that there is a phase lag between the frames generated by the first camera and the frames generated by the second camera, and the lag phase is less than the phase of one frame, that is, the formula Δφ=φ 1 +2n*π, -φ frame period1 <0°, in this embodiment -120°<φ 1 <0°.
所述调整模块42按照△φ调整第一摄像机对后续帧的曝光起始时间,把第一摄像机对后续帧的曝光起始时间提前,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。其中,提前的时间不超过一个黑白帧的曝光周期。The adjustment module 42 adjusts the exposure start time of the first camera to the subsequent frames according to Δφ, and advances the exposure start time of the first camera to the subsequent frames until each of the adjusted fill light time periods is located in the Within a single fill light cycle of the first camera. Wherein, the advance time does not exceed the exposure period of one black and white frame.
本发明还提供一种程序产品,该程序产品包含计算机可读代码指令,当这些计算机可读代码指令被第一摄像机执行的时候,使得该第一摄像机能够执行前述的方法实施例。The present invention also provides a program product, the program product includes computer-readable code instructions, when these computer-readable code instructions are executed by the first camera, the first camera can execute the foregoing method embodiments.
以上模块或单元的一个或多个可以软件、硬件或二者结合来实现。当以上任一模块或单元以软件实现的时候,所述软件以计算机程序指令的方式存在,并被存储在存储器中,处理器可以用于执行所述程序指令并实现以上方法流程。所述处理器可以包括但不限于以下至少一种:中央处理单元(central processing unit,CPU)、微处理器、数字信号处理器(DSP)、微控制器(microcontroller unit,MCU)、或人工智能处理器等各类运行软件的计算设备,每种计算设备可包括一个或多个用于执行软件指令以进行运算或处理的核。该处理器可以内置于SoC(片上系统)或专用集成电路(application specific integrated circuit,ASIC),也可是一个独立的半导体芯片。该处理器内处理用于执行软件指令以进行运算或处理的核外,还可进一步包括必要的硬件加速器,如现场可编程门阵列(field programmable gate array,FPGA)、PLD(可编程逻辑器件)、或者实现专用逻辑运算的逻辑电路。One or more of the above modules or units may be implemented in software, hardware or a combination of both. When any of the above modules or units are implemented in software, the software exists in the form of computer program instructions and is stored in the memory, and the processor can be used to execute the program instructions and implement the above method flow. The processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or artificial intelligence Processors and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor can be built in a SoC (system on chip) or an application specific integrated circuit (ASIC), or can be an independent semiconductor chip. In addition to the core for executing software instructions for operation or processing, the internal processing of the processor may further include necessary hardware accelerators, such as field programmable gate array (FPGA), PLD (Programmable Logic Device) , or a logic circuit that implements dedicated logic operations.
当以上模块或单元以硬件实现的时候,该硬件可以是CPU、微处理器、DSP、MCU、 人工智能处理器、ASIC、SoC、FPGA、PLD、专用数字电路、硬件加速器或非集成的分立器件中的任一个或任一组合,其可以运行必要的软件或不依赖于软件以执行以上方法流程。When the above modules or units are implemented in hardware, the hardware can be CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, dedicated digital circuit, hardware accelerator or non-integrated discrete device Any one or any combination, which may or may not run the necessary software to perform the above method flow.

Claims (29)

  1. 一种调整摄像机曝光时间的方法,用于对第一摄像机的曝光时间进行调整,其中:A method for adjusting the exposure time of a camera, which is used to adjust the exposure time of a first camera, wherein:
    所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期,其特征在于,所述方法包括:Each shooting cycle of the first camera includes at least 3 frames, the 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and the cycle Each supplementary light time period in the sexual supplementary light is shorter than the supplementary light period of the first camera, wherein the method includes:
    对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧指类型为黑白帧,或者类型为彩色帧;Compare the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to black and white frames or color frames;
    根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。The exposure start time of subsequent frames of the first camera is adjusted according to the comparison result, until each adjusted light-filling time period is within a single fill-light period of the first camera.
  2. 根据权利要求1所述的曝光时间调整方法,其特征在于,所述第一摄像机包括:The exposure time adjustment method according to claim 1, wherein the first camera comprises:
    镜头,用于采集包括所述周期性补光在内的光线;a lens for collecting light including the periodic fill light;
    传感器,用于根据所述镜头采集的光线,在不同时刻生成所述彩色帧和所述黑白帧。The sensor is configured to generate the color frame and the black and white frame at different moments according to the light collected by the lens.
  3. 根据权利要求1所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to claim 1, is characterized in that:
    所述周期性补光是非可见光,调整后的每个所述补光时间段对应一个黑白帧,并且每个所述补光时间段位于的对应黑白帧的补光周期之中。The periodic supplementary light is non-visible light, each of the adjusted supplementary light time periods corresponds to a black and white frame, and each of the supplementary light time periods is located in the supplementary light period of the corresponding black and white frame.
  4. 根据权利要求1所述的曝光时间调整方法,其特征在于,所述第一摄像机的拍摄周期中帧的总数是3个帧,其中,所述3个帧包括:The exposure time adjustment method according to claim 1, wherein the total number of frames in the shooting period of the first camera is 3 frames, wherein the 3 frames include:
    1个黑白帧和2个连续的彩色帧,或者,1个彩色帧和2个连续的黑白帧。1 black and white frame and 2 consecutive color frames, or, 1 color frame and 2 consecutive black and white frames.
  5. 根据权利要求1所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to claim 1, is characterized in that:
    所述黑白帧与彩色帧的曝光周期相同。The black and white frame has the same exposure period as the color frame.
  6. 根据权利要求1所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to claim 1, is characterized in that:
    所述周期性补光来自于第二摄像机的补光灯。The periodic fill light comes from a fill light of the second camera.
  7. 根据权利要求6所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to claim 6, wherein:
    所述第二摄像机与第一摄像机位于同一个拍摄环境,第一摄像机与第一摄像机的拍摄周期相同、补光规律相同。The second camera and the first camera are located in the same shooting environment, and the first camera and the first camera have the same shooting period and the same fill light rule.
  8. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to any one of claims 1-6, wherein:
    所述拍摄周期中包括多个黑白帧,所述补光周期包括多个补光时间段,且补光时间段的数量与所述拍摄周期中包括的黑白帧的数量一致。The shooting period includes a plurality of black and white frames, the supplementary light period includes a plurality of supplementary light time periods, and the number of the supplementary light time periods is consistent with the number of black and white frames included in the shooting period.
  9. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to any one of claims 1-6, wherein:
    当所述相邻的2个同类型帧中,亮度变化满足前帧的下方像素条的亮度大于后帧下方的像素条的亮度时,所述第一摄像机与第二摄像机的拍摄周期相位差是
    Figure PCTCN2021113951-appb-100001
    n是整数,所述相位差
    Figure PCTCN2021113951-appb-100002
    用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。
    When in the two adjacent frames of the same type, the brightness change satisfies that the brightness of the lower pixel strip of the previous frame is greater than the brightness of the pixel strip below the subsequent frame, the phase difference of the shooting period between the first camera and the second camera is
    Figure PCTCN2021113951-appb-100001
    n is an integer, the phase difference
    Figure PCTCN2021113951-appb-100002
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the first camera.
  10. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to any one of claims 1-6, wherein:
    当所述相邻的2个同类型帧中,亮度变化满足前帧的上方方像素条的亮度小于后帧上方的像素条的亮度时,所述第一摄像机与第二摄像机的拍摄周期相位差
    Figure PCTCN2021113951-appb-100003
    n是整数,所述相位差
    Figure PCTCN2021113951-appb-100004
    用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。
    When the brightness changes in the two adjacent frames of the same type satisfy that the brightness of the pixel bar above the previous frame is less than the brightness of the pixel bar above the next frame, the phase difference between the shooting periods of the first camera and the second camera is
    Figure PCTCN2021113951-appb-100003
    n is an integer, the phase difference
    Figure PCTCN2021113951-appb-100004
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the first camera.
  11. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to any one of claims 1-6, wherein:
    当所述相邻的2个同类型帧中,亮度变化满足:前帧上方像素条的亮度大于后帧上方像素条的亮度;并且,前帧下方像素条的亮度小于后帧下方像素条的亮度;并且,前帧中高于后帧亮度的像素条数目小于前帧中低于后帧亮度的像素条数;In the two adjacent frames of the same type, the brightness change satisfies: the brightness of the pixel strip above the previous frame is greater than the brightness of the pixel strip above the rear frame; and the brightness of the pixel strip below the previous frame is smaller than the brightness of the pixel strip below the rear frame ; And, the number of pixels in the previous frame that is higher than the brightness of the rear frame is less than the number of pixels in the previous frame that is lower than the brightness of the rear frame;
    则:所述第一摄像机与第二摄像机的拍摄周期相位差是
    Figure PCTCN2021113951-appb-100005
    Figure PCTCN2021113951-appb-100006
    所述相位差
    Figure PCTCN2021113951-appb-100007
    用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。
    Then: the phase difference of the shooting period of the first camera and the second camera is
    Figure PCTCN2021113951-appb-100005
    Figure PCTCN2021113951-appb-100006
    the phase difference
    Figure PCTCN2021113951-appb-100007
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the first camera.
  12. 根据权利要求1-6任一项所述的曝光时间调整方法,其中:The exposure time adjustment method according to any one of claims 1-6, wherein:
    当所述相邻的2个同类型帧中,亮度变化满足:前帧上方像素条的亮度大于后帧上方像素条的亮度;并且,前帧下方像素条的亮度小于后帧下方像素条的亮度;并且,前帧中高于后帧亮度的像素条数目大于前帧中低于后帧亮度的像素条数;In the two adjacent frames of the same type, the brightness change satisfies: the brightness of the pixel strip above the previous frame is greater than the brightness of the pixel strip above the rear frame; and the brightness of the pixel strip below the previous frame is smaller than the brightness of the pixel strip below the rear frame ; And, the number of pixel bars higher than the brightness of the rear frame in the previous frame is greater than the number of pixels lower than the brightness of the rear frame in the previous frame;
    所述第一摄像机与第二摄像机的拍摄周期相位差
    Figure PCTCN2021113951-appb-100008
    Figure PCTCN2021113951-appb-100009
    所述相位差
    Figure PCTCN2021113951-appb-100010
    用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。
    The phase difference between the shooting periods of the first camera and the second camera
    Figure PCTCN2021113951-appb-100008
    Figure PCTCN2021113951-appb-100009
    the phase difference
    Figure PCTCN2021113951-appb-100010
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the first camera.
  13. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于,还包括:The exposure time adjustment method according to any one of claims 1-6, characterized in that, further comprising:
    对同一个周期内的彩色帧与黑白帧进行融合,生成融合彩色帧。The color frames and black and white frames in the same cycle are fused to generate fused color frames.
  14. 根据权利要求1-6任一项所述的曝光时间调整方法,其特征在于:The exposure time adjustment method according to any one of claims 1-6, wherein:
    所述第一摄像机中生成所述至少3个帧的传感器是逐行曝光传感器。The sensor in the first camera that generates the at least 3 frames is a progressive exposure sensor.
  15. 一种摄像机,包括:A video camera comprising:
    镜头,用于采集光线,所述镜头所接收的光线包括来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述摄像机的补光周期;a lens for collecting light, the light received by the lens includes periodic supplementary light from the environment, and each supplementary light time period in the periodic supplementary light is shorter than the supplementary light period of the camera;
    传感器,用于把所述镜头采集的光信号转换电信号,每个拍摄周期生成至少3个帧,所述3个帧包括彩色帧与黑白帧;a sensor, configured to convert the optical signal collected by the lens into an electrical signal, and generate at least 3 frames per shooting cycle, and the 3 frames include color frames and black and white frames;
    处理器,用于:processor for:
    对比同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧为黑白帧,或者彩色帧;Compare the brightness of two adjacent frames of the same type in the same shooting period, wherein the frames of the same type are black and white frames, or color frames;
    根据对比结果调整所述摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述摄像机的单个补光周期之内。The exposure start time of the subsequent frames of the camera is adjusted according to the comparison result, until each of the adjusted light fill time periods is within a single fill light period of the camera.
  16. 根据权利要求15所述的摄像机,其特征在于,所述传感器用于:The camera of claim 15, wherein the sensor is used to:
    在不同时刻生成所述彩色帧和所述黑白帧。The color frame and the black and white frame are generated at different times.
  17. 根据权利要求15所述的摄像机,其特征在于:The camera of claim 15, wherein:
    所述周期性补光是非可见光,所述处理器用于:The periodic supplementary light is invisible light, and the processor is used for:
    把每个所述补光时间段调整为与一个黑白帧对应,并且每个所述补光时间段位于的对应黑白帧的补光周期之中。Each of the fill light time periods is adjusted to correspond to a black and white frame, and each of the fill light time periods is located in the fill light period of the corresponding black and white frame.
  18. 根据权利要求15所述的摄像机,其特征在于,所述摄像机的拍摄周期中帧的总数是3个帧,其中,所述3个帧包括:The camera according to claim 15, wherein the total number of frames in the shooting period of the camera is 3 frames, wherein the 3 frames include:
    1个黑白帧和连续2个彩色帧,或者,1个彩色帧和连续2个黑白帧。1 black and white frame and 2 consecutive color frames, or, 1 color frame and 2 consecutive black and white frames.
  19. 根据权利要求15所述的摄像机,其特征在于:The camera of claim 15, wherein:
    所述周期性补光来自于不同于所述摄像机的另一摄像机的补光灯。The periodic fill light comes from a fill light of another camera different from the camera.
  20. 根据权利要求19所述的摄像机,其特征在于:The camera of claim 19, wherein:
    所述摄像机与另一摄像机位于同一个拍摄环境,第一摄像机与第一摄像机的拍摄周期相同、补光规律相同。The camera and the other camera are located in the same shooting environment, and the first camera and the first camera have the same shooting period and the same fill light rule.
  21. 根据权利要求15-19任一项所述的摄像机,其特征在于:The camera according to any one of claims 15-19, characterized in that:
    所述拍摄周期中包括多个黑白帧,所述补光周期包括多个补光时间段,且补光时间段的数量与所述拍摄周期中包括的黑白帧的数量一致。The shooting period includes a plurality of black and white frames, the supplementary light period includes a plurality of supplementary light time periods, and the number of the supplementary light time periods is consistent with the number of black and white frames included in the shooting period.
  22. 根据权利要求15-19任一项所述的摄像机,其特征在于:The camera according to any one of claims 15-19, characterized in that:
    当所述相邻的2个同类型帧中,亮度变化满足前帧的下方像素条的亮度大于后帧下方的像素条的亮度时,所述摄像机与第二摄像机的拍摄周期相位差是
    Figure PCTCN2021113951-appb-100011
    n是整数,所述相位差
    Figure PCTCN2021113951-appb-100012
    用于作为调整所述摄像机后续帧的曝光起始时间的参数。
    When in the two adjacent frames of the same type, the brightness change satisfies that the brightness of the lower pixel strip of the previous frame is greater than the brightness of the pixel strip below the subsequent frame, the phase difference of the shooting period between the camera and the second camera is
    Figure PCTCN2021113951-appb-100011
    n is an integer, the phase difference
    Figure PCTCN2021113951-appb-100012
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the camera.
  23. 根据权利要求15-19任一项所述的摄像机,其特征在于:The camera according to any one of claims 15-19, characterized in that:
    所述传感器是逐行曝光传感器。The sensor is a progressive exposure sensor.
  24. 一种曝光时间调整装置,用于对第一摄像机的曝光时间进行调整,其特征在于:An exposure time adjustment device for adjusting the exposure time of a first camera, characterized in that:
    所述第一摄像机的每个拍摄周期中包括至少3个帧,所述3个帧包括彩色帧与黑白帧,所述第一摄像机在拍摄时接收来自环境中的周期性补光,所述周期性补光中每个补光时间段短于所述第一摄像机的补光周期,其特征在于,所述装置包括:Each shooting cycle of the first camera includes at least 3 frames, the 3 frames include color frames and black and white frames, the first camera receives periodic fill light from the environment when shooting, and the cycle Each supplementary light time period in the sexual supplementary light is shorter than the supplementary light period of the first camera, and it is characterized in that, the device includes:
    亮度对比模块,用于对比所述第一摄像机的同一个拍摄周期内相邻的2个同类型帧的亮度,其中,所述同类型帧指类型为黑白帧,或者类型为彩色帧;A brightness comparison module, configured to compare the brightness of two adjacent frames of the same type in the same shooting period of the first camera, wherein the frames of the same type refer to a black and white frame or a color frame;
    调整模块,用于根据对比结果调整所述第一摄像机后续帧的曝光起始时间,直到调整后的每个所述补光时间段位于所述第一摄像机的单个补光周期之内。An adjustment module, configured to adjust the exposure start time of subsequent frames of the first camera according to the comparison result, until each adjusted light-filling time period is within a single fill-light period of the first camera.
  25. 根据权利要求24所述的装置,其特征在于:The device of claim 24, wherein:
    所述周期性补光是非可见光,调整后的每个所述补光时间段与一个黑白帧对应,并且每个所述补光时间段位于的对应黑白帧的补光周期之中。The periodic supplementary light is non-visible light, each of the adjusted supplementary light time periods corresponds to a black and white frame, and each of the supplementary light time periods is located in the supplementary light period of the corresponding black and white frame.
  26. 根据权利要求24所述的装置,其特征在于,所述第一摄像机的拍摄周期中帧的总数是3个帧,其中,所述3个帧包括:The apparatus according to claim 24, wherein the total number of frames in the shooting period of the first camera is 3 frames, wherein the 3 frames include:
    1个黑白帧和连续2个彩色帧,或者,1个彩色帧和连续2个黑白帧。1 black and white frame and 2 consecutive color frames, or, 1 color frame and 2 consecutive black and white frames.
  27. 根据权利要求24-26任一项所述的装置,其特征在于:The device according to any one of claims 24-26, characterized in that:
    所述拍摄周期中包括多个黑白帧,所述补光周期包括多个补光时间段,且补光时间段的数量与所述拍摄周期中包括的黑白帧的数量一致。The shooting period includes a plurality of black and white frames, the supplementary light period includes a plurality of supplementary light time periods, and the number of the supplementary light time periods is consistent with the number of black and white frames included in the shooting period.
  28. 根据权利要求24-26任一项所述的装置,其特征在于:The device according to any one of claims 24-26, characterized in that:
    当所述相邻的2个同类型帧中,亮度变化满足前帧的下方像素条的亮度大于后帧下方的像素条的亮度时,所述第一摄像机与第二摄像机的相位差是
    Figure PCTCN2021113951-appb-100013
    其中,
    Figure PCTCN2021113951-appb-100014
    -曝光周期的相位,n是整数,所述相位差
    Figure PCTCN2021113951-appb-100015
    用于作为调整所述第一摄像机后续帧的曝光起始时间的参数。
    When in the two adjacent frames of the same type, the brightness change satisfies that the brightness of the lower pixel strip of the previous frame is greater than the brightness of the pixel strip below the subsequent frame, the phase difference between the first camera and the second camera is
    Figure PCTCN2021113951-appb-100013
    in,
    Figure PCTCN2021113951-appb-100014
    - the phase of the exposure period, n is an integer, the phase difference
    Figure PCTCN2021113951-appb-100015
    It is used as a parameter for adjusting the exposure start time of subsequent frames of the first camera.
  29. 一种程序产品,该程序产品包含计算机可读代码指令,当这些计算机可读代码指令被第一摄像机运行的时候,使得该第一摄像机能够执行权利要求1-14中的任一方法。A program product comprising computer readable code instructions which, when executed by a first camera, enable the first camera to perform any of the methods of claims 1-14.
PCT/CN2021/113951 2020-09-04 2021-08-23 Camera exposure time adjustment method, device and program product WO2022048465A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010920768 2020-09-04
CN202010920768.6 2020-09-04
CN202011337796.1 2020-11-25
CN202011337796.1A CN114143470A (en) 2020-09-04 2020-11-25 Method, device and program product for adjusting exposure time of camera

Publications (1)

Publication Number Publication Date
WO2022048465A1 true WO2022048465A1 (en) 2022-03-10

Family

ID=80438563

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113951 WO2022048465A1 (en) 2020-09-04 2021-08-23 Camera exposure time adjustment method, device and program product

Country Status (2)

Country Link
CN (1) CN114143470A (en)
WO (1) WO2022048465A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827403A (en) * 2022-04-07 2022-07-29 安徽蔚来智驾科技有限公司 Vehicle-mounted image acquisition system, control method, vehicle and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098438A (en) * 2009-12-15 2011-06-15 索尼公司 Image capturing apparatus and image capturing method
US20160006937A1 (en) * 2013-03-13 2016-01-07 Ricoh Imaging Company, Ltd. Photographing apparatus and photographing control system
CN106973239A (en) * 2016-01-13 2017-07-21 三星电子株式会社 Image capture device and the method for operating the image capture device
US20170280042A1 (en) * 2014-08-27 2017-09-28 Sony Corporation Image capturing device and method of controlling image capturing device
US20190215434A1 (en) * 2016-06-15 2019-07-11 Sony Corporation Imaging control device, imaging control method, and program
CN110445952A (en) * 2019-07-15 2019-11-12 浙江大华技术股份有限公司 Film flicker processing method, device, equipment and the storage medium of camera
CN111064899A (en) * 2019-12-06 2020-04-24 成都华为技术有限公司 Exposure parameter adjusting method and device
CN111259715A (en) * 2018-12-03 2020-06-09 联咏科技股份有限公司 Sensing device and flicker noise reduction method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098438A (en) * 2009-12-15 2011-06-15 索尼公司 Image capturing apparatus and image capturing method
US20160006937A1 (en) * 2013-03-13 2016-01-07 Ricoh Imaging Company, Ltd. Photographing apparatus and photographing control system
US20170280042A1 (en) * 2014-08-27 2017-09-28 Sony Corporation Image capturing device and method of controlling image capturing device
CN106973239A (en) * 2016-01-13 2017-07-21 三星电子株式会社 Image capture device and the method for operating the image capture device
US20190215434A1 (en) * 2016-06-15 2019-07-11 Sony Corporation Imaging control device, imaging control method, and program
CN111259715A (en) * 2018-12-03 2020-06-09 联咏科技股份有限公司 Sensing device and flicker noise reduction method
CN110445952A (en) * 2019-07-15 2019-11-12 浙江大华技术股份有限公司 Film flicker processing method, device, equipment and the storage medium of camera
CN111064899A (en) * 2019-12-06 2020-04-24 成都华为技术有限公司 Exposure parameter adjusting method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827403A (en) * 2022-04-07 2022-07-29 安徽蔚来智驾科技有限公司 Vehicle-mounted image acquisition system, control method, vehicle and storage medium
CN114827403B (en) * 2022-04-07 2024-03-05 安徽蔚来智驾科技有限公司 Vehicle-mounted image acquisition system, control method, vehicle and storage medium

Also Published As

Publication number Publication date
CN114143470A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
US11758279B2 (en) WDR imaging with LED flicker mitigation
WO2021077963A1 (en) Image fusion method and apparatus, electronic device, and readable storage medium
US8896625B2 (en) Method and system for fusing images
CN108401118A (en) Control the iris collection device and method of infrared lamp lighting time
WO2019174494A1 (en) Image capture method, device and storage medium
US8964083B2 (en) CMOS image sensor, timing control method and exposure method thereof
CN102892008A (en) Dual image capture processing
US10609265B2 (en) Methods and apparatus for synchronizing camera flash and sensor blanking
WO2022048465A1 (en) Camera exposure time adjustment method, device and program product
WO2020034702A1 (en) Control method, device, electronic equipment and computer readable storage medium
WO2019084806A1 (en) Flashlight brightness compensation method, unmanned aerial vehicle and storage medium
CN106550227B (en) A kind of image saturation method of adjustment and device
WO2016082347A1 (en) Brightness compensation method and device, and computer storage medium
CN104683780B (en) The auto white balance method of a kind of video monitoring camera and device
JP2017184265A (en) Image processing method of removing flicker and image processing device
US20100271538A1 (en) Imaging apparatus
CN103428522B (en) Method for improving image quality at low illumination level of web camera
CN112738410A (en) Imaging method and device and endoscope equipment
CN109040618A (en) Video generation method and device, storage medium, electronic equipment
CN114158156B (en) PWM (pulse-width modulation) adjusting method, device, equipment and storage medium of light supplementing lamp
WO2021175211A1 (en) Exposure control-based video capture method and apparatus
CN114630009A (en) Noise and tailing removing method for pulse sequence type image sensor
CN110418066A (en) Image processing method, device, equipment and storage medium
CN113630586A (en) Single-light-source full-color camera
CN116452475B (en) Image processing method and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21863532

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863532

Country of ref document: EP

Kind code of ref document: A1