Method for outputting video stream in full-brightness scene based on binocular camera
By using a binocular camera system, the system automatically switches to the appropriate camera video stream, solving the image output problem of image recognition devices in different brightness scenarios and achieving efficient image recognition results.
Patent Information
- Application Number
- CN202410958139.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-01
AI Technical Summary
Existing image recognition devices struggle to achieve high-quality image output simultaneously in strong backlight and low-light environments, resulting in low recognition efficiency. Furthermore, frame breaks or broken frames are prone to occur when switching outputs between binocular cameras.
A dual-camera system is adopted, with camera A configured for normal brightness and wide dynamic range scenes, and camera B configured for low-light scenes. The image processor A acts as the main controller, automatically judging the scene brightness and switching the corresponding camera video stream to ensure synchronous exposure and output. Seamless switching is achieved by using a MIPI switching chip.
It outputs high-quality video streams under different brightness scenarios, avoiding broken or bad frames and improving the efficiency of the recognition system.
Smart Images

Figure CN118890420A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and mainly to a method for outputting a video stream of a full-brightness scene based on a binocular camera. Background Art
[0002] Image recognition equipment has been applied to more and more public places, such as airports, stations, entrances and exits of some places, etc. These places often have the following two scenarios:
[0003] 1) Strong backlight environment. In strong backlight, if the subject to be recognized enters the recognition range of the image recognition device, it will be a wide dynamic scene for the camera on the device. If the camera does not have good wide dynamic processing capabilities, the output video stream will show a very bright background and a very dark subject to be recognized, which is not conducive to the back-end recognition processing.
[0004] 2) Low-light environment. In this environment, it is a low-light scene for the camera on the device. If the camera does not have good low-light performance, the recognized subject will be very dark and motion blur is obvious. In order to obtain more light in low light, some cameras use dual-pass lenses or lenses with IR-CUT and add infrared fill lights. However, these methods will cause the color information of the image to be distorted or completely lack color information. For devices that need color information as a basis for recognition, such images have large defects or are completely unusable.
[0005] For a monocular camera, it is difficult to achieve good display effects in both wide dynamic scenes and low illumination scenes, because these two scenes have certain conflicts in hardware performance and process manufacturing requirements for an image sensor, there are certain conflicts in optical parameter requirements and process manufacturing for an optical lens, and there are certain conflicts in the focus of image optimization for an image processor (ISP).
[0006] The hardware devices in the prior art have the following defects:
[0007] 1) Image sensor: The pixel structure of low-light image sensors generally requires a large pixel size and a high fill factor to capture maximum light and improve sensitivity. Wide dynamic range is usually achieved by multiple exposures to capture details at different brightness levels, or by using specially designed pixel structures, such as split pixels or dual conversion gain, which can achieve different gain modes or exposure times in a single pixel, but usually reduce the photosensitive area.
[0008] Large pixel size and high fill factor limit the ability to achieve multiple exposures or complex structures in the same pixel, while complex pixel structures for wide dynamic range reduce the area of the photosensitive area and reduce low-light performance.
[0009] 2) Optical lens: The lens used for wide dynamic scenes needs to be able to handle a wide range of light intensities and have good anti-glare and anti-reflection properties. The lens used for low-light scenes needs to have a large aperture lens, and the lens material and coating need to have high transmittance. However, large apertures and high-transmittance coatings are prone to glare under strong light, so with limited costs, it is difficult to design lenses that take both scenarios into account.
[0010] 3) Image processor: In wide dynamic scenes and low illumination scenes, the contrast control, color control, gain control, noise and detail control of the image processor are usually in conflict, which increases the difficulty of image optimization for the image processor on the monocular camera. In particular, low illumination scenes need to control motion blur to provide clear images for recognition without severe smearing.
[0011] In the image recognition system of the prior art, the camera module generally transmits the video stream to the host of the recognition system by outputting it through a USB interface. If the camera module adopts a binocular form, in order to simplify the hardware and software design of the binocular camera, only a single-eye image can be output at the same time, which requires an operation to switch the binocular output. If the switching method is not ideal, the output image will be broken or damaged during the switching, which reduces the recognition efficiency of the backend.
[0012] When the recognition device is in the wide dynamic scene or low illumination scene mentioned above, if the binocular camera simply switches the output alternately, the back-end recognition host will still receive a large number of low-quality images per unit time, reducing the recognition efficiency. Summary of the invention
[0013] In view of the technical problems existing in the prior art, the present application proposes a method for outputting a video stream of a full-brightness scene based on a binocular camera.
[0014] According to one aspect of the present invention, a method for outputting a video stream of a full brightness scene based on a binocular camera is proposed, comprising:
[0015] Using a binocular camera to obtain image data of a scene, the binocular camera includes a camera A and a camera B, using a lens A and an image sensor A in the camera A to obtain image data A of the scene, and at the same time, using a lens B and an image sensor B in the camera B to obtain image data B of the scene;
[0016] The image data A and the image data B are respectively transmitted to the image processor A in the camera A and the image processor B in the camera B. The image processor A serves as the main control of the binocular camera to determine the brightness environment of the scene. If the scene is a normal brightness scene or a wide dynamic scene, the MIPI switching chip receives the image data A transmitted by the image processor A. If the scene is a dark brightness scene, the MIPI switching chip receives the image data B transmitted by the image processor B.
[0017] The MIPI switch chip inputs the received image data as a video stream into a USB encoder, and the USB encoder outputs the video stream to a backend host.
[0018] Furthermore, the binocular camera includes camera A and camera B, wherein camera A is composed of lens A, image sensor A and image processor A, and processes image data of normal brightness environment and wide dynamic scene; camera B is composed of lens B, image sensor B and image processor B, and processes image data of dark brightness scene.
[0019] The selection of lens A focuses on anti-glare and anti-reflection performance to avoid glare and ghosting caused by strong light. The selection of image sensor A focuses on wide dynamic range characteristics, and the image optimization of image processor A focuses on expanding the dynamic range through multi-frame synthesis technology, reducing the brightness of strong light in the picture, and enhancing the details of the recognized subject. Camera A can completely ignore the image effect under low illumination.
[0020] The selection of lens B focuses on large aperture and high transmittance to maximize the light transmission to the image sensor. The selection of image sensor B focuses on large pixel size, high fill factor, and high pixel sensitivity. The image optimization of image processor B focuses on maintaining low noise level and enhancing the details of the recognized subject under low illumination. Camera B can completely ignore the image effect in bright environment.
[0021] The image processor A in camera A serves as the main controller of the entire binocular camera. Its main tasks include: a. synchronizing the images of camera A and camera B; b. determining the brightness environment of the current binocular camera; c. operating the MIPI switching chip according to the brightness environment. In normal brightness environments or wide dynamic scenes, the video stream of camera A is switched. If it is determined that the current environment is a low-light scene, the video stream of camera B is switched.
[0022] Furthermore, the image data output by the camera A and the camera B have the same resolution and frame rate.
[0023] The video streams output by camera A and camera B have the same resolution and frame rate. The two video streams pass through a two-choice switching chip and then enter the USB encoding chip. The USB encoding chip will eventually output the video stream of camera A or camera B to the back-end host.
[0024] Furthermore, the image sensor A and the image sensor B have the functions of synchronous exposure and synchronous output when transmitting image data, and the specific steps are as follows:
[0025] The pulse width modulation of the image processor A is used as a synchronous time base signal, and the frame rate in the pulse width modulation is set to be consistent with the frame rate of the image data. The time base signal is transmitted as a frame synchronization input signal in two ways, one way is transmitted to the frame synchronization input pin of the image processor A, and the other way is transmitted to the frame synchronization input pin of the image processor B;
[0026] After receiving the frame synchronization input signal, the image processor A and the image processor B respectively combine the timing register configuration in the image sensor A and the image sensor B to control the exposure and output timing of the image sensor A and the image sensor B.
[0027] In order to achieve the overlap of the blanking periods of the image data of the two cameras, it is particularly important to first achieve synchronous exposure and synchronous output of the two image sensors.
[0028] Furthermore, after the image processor A and the image processor B receive the image data from their respective corresponding image sensors, they optimize the effect of the image data and then set a delayed output to achieve overlap of the blanking period of the output image data.
[0029] The MIPI switching chip switches the image data during the overlap of the blanking periods.
[0030] The blanking interval in the video stream refers to the period outside the actual image content (i.e., valid video data) in the analog or digital video signal. This period is mainly used for the process of the electron beam moving from one line to the next or from one field to the next, ensuring that no visual defects such as flicker or visible scan lines appear on the screen due to the movement of the electron beam.
[0031] Furthermore, the determining of the brightness environment of the scene specifically includes: the image processor A continuously detecting the ambient brightness in the scene, and the detection method includes: histogram calculation, reference to automatic exposure information or calculation of average brightness.
[0032] Since most of the scenes where the camera is located are in a normal brightness environment during the day, the MIPI switch chip mostly receives image data A. Therefore, camera A serves as the main control of the binocular camera;
[0033] As the master control, camera A is responsible for detecting the ambient brightness. When a low-light or dark-brightness scene is detected, it sends a signal to control the MIPI switching chip to receive the video stream of image data B.
[0034] According to a second aspect of the present invention, a computer-readable storage medium is provided, on which one or more computer programs are stored. When the one or more computer programs are executed by a computer processor, the above method is implemented.
[0035] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0036] The present invention uses a camera specifically designed for low-light scenes. The optical lens of the camera focuses on high light transmittance and large aperture, and does not need to consider anti-glare and anti-reflection performance; an image sensor with good low-light performance is used, and the corresponding image processor focuses on image optimization in low-light scenes. Since there is no need to balance the image effect of strong light or wide dynamic scenes, this camera will have better image effects in low-light scenes.
[0037] The present invention uses a camera with good wide dynamic performance, the optical lens of which focuses on anti-glare and anti-reflection performance; uses an image sensor with good wide dynamic performance, and the corresponding image processing focuses on image optimization in normal brightness environment and wide dynamic scene, without balancing the performance in low illumination. Therefore, this camera will have better image effects in wide dynamic scenes.
[0038] The present invention can automatically judge the current brightness conditions through a special software and hardware architecture, automatically switch the appropriate camera video stream to the USB encoding chip, and the USB encoding chip will then output the video stream to the back-end host. There are no bad frames or broken frames during the switching process, thereby improving the recognition efficiency of the recognition system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and are used together with the description to explain the principles of the present invention. It will be easy to recognize other embodiments and many expected advantages of the embodiments because they become better understood by reference to the following detailed description. The elements of the accompanying drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar parts.
[0040] Figure 1 A schematic diagram showing a full brightness scene output video stream based on a binocular camera according to an embodiment of the present invention is shown;
[0041] Figure 2A schematic diagram of a synchronous exposure and synchronous output process of two image sensors according to a specific embodiment of the present invention is shown;
[0042] Figure 3 A schematic diagram showing the overlapping and switching of blanking periods of two video streams according to a specific embodiment of the present invention is shown. DETAILED DESCRIPTION
[0043] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0044] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0045] Figure 1 FIG. 4 shows a schematic diagram of outputting a video stream of a full brightness scene based on a binocular camera according to an embodiment of the present invention, as shown in FIG. Figure 1 As shown:
[0046] In a specific embodiment, a binocular camera is used to obtain image data of a scene, wherein the binocular camera includes a camera A and a camera B, and a lens A and an image sensor A in the camera A are used to obtain image data A of the scene, and at the same time, a lens B and an image sensor B in the camera B are used to obtain image data B of the scene;
[0047] The binocular camera includes camera A and camera B, wherein camera A is composed of lens A, image sensor A and image processor A, and processes image data of normal brightness environment and wide dynamic scene; camera B is composed of lens B, image sensor B and image processor B, and processes image data of dark brightness scene.
[0048] Lens A + image sensor A + image processor A are combined into a camera A for normal brightness environment and wide dynamic scene. The selection of lens A focuses on anti-glare and anti-reflection performance to avoid glare and ghosting caused by strong light. The selection of image sensor A focuses on wide dynamic range characteristics. For example, you can choose an image sensor with dual conversion gain (DCG) pixel architecture and multiple exposure capabilities. The dynamic range of this type of image sensor can generally reach more than 120dB. The image optimization of image processor A focuses on expanding the dynamic range through multi-frame synthesis technology, lowering the brightness of the strong light in the picture, and enhancing the details of the recognized subject. Camera A can completely ignore the image effect under low illumination.
[0049] Lens B + image sensor B + image sensor B are combined into a camera B for low-light scenes. The selection of lens B focuses on large aperture and high transmittance to maximize the transmission of light to the image sensor. The selection of image sensor B focuses on large pixel size, high fill factor, and high pixel sensitivity. The image optimization of image processor B focuses on maintaining low noise levels and enhancing the details of the recognized subject in low light. Camera B can completely ignore the image effect in bright environments.
[0050] The video streams output by camera A and camera B have the same resolution and frame rate. The two video streams pass through a two-choice switching chip and then enter the USB encoding chip. The USB encoding chip will eventually output the video stream of camera A or camera B to the back-end host.
[0051] Figure 1 In the , RAW data refers to the original image data file captured by the camera sensor. This is a format that has not been processed or compressed and can be understood as a "digital negative". YUV data is a color encoding method
[0052] The image data A and the image data B are respectively transmitted to the image processor A in the camera A and the image processor B in the camera B. The image processor A serves as the main control of the binocular camera to determine the brightness environment of the scene. If the scene is a normal brightness scene or a wide dynamic scene, the MIPI switching chip receives the image data A transmitted by the image processor A. If the scene is a dark brightness scene, the MIPI switching chip receives the image data B transmitted by the image processor B.
[0053] The image processor A in camera A serves as the main controller of the entire binocular camera. Its main tasks include: a. synchronizing the images of camera A and camera B; b. determining the brightness environment of the current binocular camera; c. operating the MIPI switching chip according to the brightness environment. In normal brightness environments or wide dynamic scenes, the video stream of camera A is switched. If it is determined that the current environment is a low-light scene, the video stream of camera B is switched.
[0054] A blanking period occurs when the MIPI switching chip receives image data. The blanking period specifically refers to a process that occurs when the MIPI switching chip switches to receiving image data B (or image data A) after receiving image data A (or image data B).
[0055] As long as the blanking periods of the two camera video streams can overlap, then no valid image signals that should not appear will appear during the blanking period of the video stream, and the back-end host will not receive bad frames.
[0056] In order to achieve the overlap of the blanking periods of the two camera video streams, it is particularly important to first achieve synchronous exposure and synchronous output of the two image sensors.
[0057] The image sensor A and the image sensor B have the functions of synchronous exposure and synchronous output when transmitting image data. Figure 2 As shown, the specific steps are as follows:
[0058] The pulse width modulation (PWM) of the image processor A is used as a synchronous time base signal, and the frame rate in the pulse width modulation (PWM) is set to be consistent with the frame rate of the image data. The time base signal is transmitted as a frame synchronization input signal in two ways, one way is transmitted to the frame synchronization input pin of the image processor A, and the other way is transmitted to the frame synchronization input pin of the image processor B;
[0059] After receiving the frame synchronization input signal, the image processor A and the image processor B respectively combine the timing register configuration in the image sensor A and the image sensor B to control the exposure and output timing of the image sensor A and the image sensor B.
[0060] Furthermore, the blanking periods of the two video streams can be overlapped and switched during the blanking period:
[0061] After receiving the image data from their respective corresponding image sensors, the image processor A and the image processor B optimize the effect of the image data and then set a delayed output to achieve overlap of the blanking period of the output image data.
[0062] like Figure 3 As shown in the figure, the MIPI switching chip switches during this overlapping blanking period (the delay from switching to normal output of this switching chip is generally within 5us, which can be ignored), which can avoid the back-end USB decoder receiving abnormal display bad frames during the switching process. For the back-end USB decoding chip, no matter how the front-end signal source is switched, it always receives a video stream with a constant frame rate, stable timing, and no valid image signal during the blanking period.
[0063] The determining of the brightness environment of the scene specifically includes: the image processor A continuously detecting the ambient brightness in the scene, and the detection method includes: histogram calculation, reference to automatic exposure information or calculation of average brightness.
[0064] In this embodiment, the two cameras work continuously after being powered on. For the above-mentioned application scenarios, most of the time in a day is in a normal brightness environment and a wide dynamic scene, so the video stream of camera A is switched to by default.
[0065] At the same time, the image processor A in the camera A needs to continuously detect the brightness of the external environment to determine whether the current scene is a low-light scene. The detection methods are relatively mature at this stage, including: histogram calculation, reference to automatic exposure information, calculation of average brightness, etc.
[0066] When it is detected that the current scene is a low-light scene, image processor A outputs a switching signal to the MIPI switching chip to switch the video stream to the video stream of camera B. When it is detected that the current scene is no longer a low-light scene, the video stream is switched back to the video stream of camera A.
[0067] This detection and switching operation continues after power-on and does not require external intervention, as it is completed automatically within the unit.
[0068] In summary, the hardware framework of the present invention enables a camera with a single USB interface to output a video stream with high-quality effects in both wide dynamic scenes and low-light scenes.
[0069] The present invention implements a method for completing binocular camera synchronization within the machine without the need for intervention from external equipment.
[0070] The method for switching video streams in the present invention can ensure that no bad frames will occur in the output video streams.
[0071] The present invention implements a method for automatically switching a USB output to a suitable video stream according to the ambient brightness within the machine.
[0072] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0073] The modules involved in the embodiments of the present application may be implemented by software or by hardware.
[0074] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for outputting video streams of full brightness scenes based on a binocular camera, It is characterized in that The following steps are involved: Using a binocular camera to obtain image data of a scene, the binocular camera includes a camera A and a camera B, using a lens A and an image sensor A in the camera A to obtain image data A of the scene, and at the same time, using a lens B and an image sensor B in the camera B to obtain image data B of the scene; The image data A and the image data B are respectively transmitted to the image processor A in the camera A and the image processor B in the camera B. The image processor A serves as the main control of the binocular camera to determine the brightness environment of the scene. If the scene is a normal brightness scene or a wide dynamic scene, the MIPI switching chip receives the image data A transmitted by the image processor A. If the scene is a dark brightness scene, the MIPI switching chip receives the image data B transmitted by the image processor B. The MIPI switch chip inputs the received image data as a video stream into a USB encoder, and the USB encoder outputs the video stream to a backend host.
2. The method according to claim 1, Features: The binocular camera includes camera A and camera B, wherein camera A is composed of lens A, image sensor A and image processor A, and processes image data of normal brightness environment and wide dynamic scene; camera B is composed of lens B, image sensor B and image processor B, and processes image data of dark brightness scene.
3. The method according to claim 1, Features: The image data output by the camera A and the camera B have the same resolution and frame rate.
4. The method according to claim 1, Features: The image sensor A and the image sensor B have the functions of synchronous exposure and synchronous output when transmitting image data. The specific steps are as follows: The pulse width modulation of the image processor A is used as a synchronous time base signal, and the frame rate in the pulse width modulation is set to be consistent with the frame rate of the image data. The time base signal is transmitted as a frame synchronization input signal in two ways, one way is transmitted to the frame synchronization input pin of the image processor A, and the other way is transmitted to the frame synchronization input pin of the image processor B; After receiving the frame synchronization input signal, the image processor A and the image processor B respectively combine the timing register configuration in the image sensor A and the image sensor B to control the exposure and output timing of the image sensor A and the image sensor B.
5. The method according to claim 1, Features: After receiving the image data from their respective corresponding image sensors, the image processor A and the image processor B optimize the effect of the image data and then set a delayed output to achieve overlap of the blanking period of the output image data.
6. The method according to claim 5, Features: The MIPI switching chip switches the image data during the overlap of the blanking periods.
7. The method according to claim 1, Features: The determining of the brightness environment of the scene specifically includes: the image processor A continuously detecting the ambient brightness in the scene, and the detection method includes: histogram calculation, reference to automatic exposure information or calculation of average brightness.
8. A computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.
9. A computing system comprising a processor and a memory, wherein the processor is configured to execute the method according to any one of claims 1 to 7.
