Camera shooting automatic focusing method and system for automatic driving of vehicle
By preprocessing and depth estimating the image data collected by the camera equipment during autonomous driving of the vehicle, obtaining the focus parameters, and achieving automatic focus of the camera equipment, the driving safety problems caused by the fixed focal length in the prior art are solved, and the environmental adaptability and safety reliability of the autonomous driving car are improved.
Patent Information
- Application Number
- CN202411891091.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, the focal length parameters of the camera equipment are fixed values and cannot be optimized, resulting in the impact of driving safety during autonomous driving.
By preprocessing the original image data acquired by at least two camera devices, a focus image sequence is obtained and a stereo matching algorithm mathematical model is input to obtain the focus depth map. Then, the target area image data of the sensitive distance range from the vehicle is intercepted according to the focus depth map, and the focus convolutional neural network mathematical model is input to obtain the first focus parameter to realize automatic focus of the camera device.
The automatic focus function for autonomous driving is realized, improving the environmental adaptability and safety and reliability of autonomous vehicles.
Smart Images

Figure CN119603436A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a camera automatic focusing method and system for vehicle automatic driving. Background Art
[0002] Intelligent assisted driving technology for autonomous driving, also known as Advanced Driver Assistance Systems (ADAS), is a technology that uses various sensors installed on the car to sense the surrounding environment at any time during the driving process, collect data, and identify static and dynamic objects. It is an important part of autonomous driving technology, but it belongs to a lower level of autonomous driving technology, mainly playing an auxiliary role to help the driver better control and drive the car. Intelligent assisted driving technology can include a variety of functions, such as adaptive cruise control system (ACC), automatic emergency braking (AEB), adaptive headlight system (AFS) and active adjustment headlight system (ADB). These systems provide assistance to the driver by real-time monitoring and analysis of the environment around the vehicle, such as maintaining a safe distance from the vehicle in front, automatic braking in an emergency, and automatic adjustment of lights according to road conditions, thereby improving driving safety and comfort.
[0003] In the prior art, cameras are used as the main sensors for intelligent assisted driving, but the focal length parameters of the cameras are all preset fixed values. Although the detection distance of cameras with large focal lengths is far, the field of view is narrow, and although the field of view of cameras with small focal lengths is wide, the detection distance is short. Therefore, how to optimize the automatic focusing function of cameras is particularly important for the driving safety of autonomous driving. Summary of the invention
[0004] The technical problem to be solved by the present application is how to optimize the automatic focusing function of a camera used for automatic driving of a vehicle.
[0005] According to the first aspect, an embodiment provides a method for automatic focusing of a camera for automatic driving of a vehicle, comprising: Preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence; Inputting the focus image sequence into a preset stereo matching algorithm mathematical model to obtain a focus depth map output by the stereo matching algorithm mathematical model; intercepting image data of a target area in a sensitive distance interval from the vehicle in at least one of the original image data according to the focus depth map; Inputting the target area image data into a preset focusing convolutional neural network mathematical model, and obtaining a first focusing parameter output by the focusing convolutional neural network mathematical model; Automatically focus the camera device according to the first focusing parameter.
[0006] In one embodiment, the starting distance and the interval range of the sensitive distance interval are positively correlated with the current speed of the vehicle.
[0007] In one embodiment, the step of preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence includes: The two camera devices that acquire the original image data form a binocular camera system, and one of each set of original image data is used as a left image, and the other is used as a right image.
[0008] In one embodiment, the automatically focusing the camera device according to the first focusing parameter includes: Setting initial focusing parameters of each of the camera devices according to the current speed of the vehicle, and acquiring the original image data according to the initial focusing parameters; wherein the focal length setting value in the initial focusing parameters is positively correlated with the current speed of the vehicle; The initial focusing parameter and the first focusing parameter are compared, and the camera device is automatically focused according to the comparison result.
[0009] In one embodiment, the automatic focusing of the camera device according to the comparison result includes: When the difference between the initial focusing parameter and the first focusing parameter is less than a preset comparison value, automatically focusing the camera device according to the first focusing parameter; When the difference between the initial focusing parameter and the first focusing parameter is not less than the preset comparison value, the camera device is automatically focused according to the initial focusing parameter.
[0010] In one embodiment, the automatic focusing method for video recording further includes: Inputting the target area image data into a preset recognition convolutional neural network mathematical model, and obtaining the recognition information of the traffic participants in the vehicle pre-travel interval output by the recognition convolutional neural network mathematical model; According to the identification information of the traffic participant and the focusing depth map, the visual field obstruction area of each traffic participant is estimated to obtain the distance of the traffic participant in the sensitive distance interval from the vehicle; A second focusing parameter is acquired according to the distance between the traffic participant and the vehicle, and the camera device is automatically focused according to the second focusing parameter.
[0011] In one embodiment, the automatic focusing method for video recording further includes: The lighting mode of the vehicle is set according to the focal length setting value of the camera device; the lighting mode includes a low beam mode and a high beam mode.
[0012] According to the second aspect, an embodiment provides a computer-readable storage medium, on which a program is stored. The program can be executed by a processor to implement the automatic focusing method for video recording as described in the first aspect.
[0013] According to the third aspect, an embodiment provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements the automatic camera focusing method as described in the first aspect.
[0014] According to a fourth aspect, an embodiment provides a camera automatic focusing system for vehicle automatic driving, which is used to apply the camera automatic focusing method as described in the first aspect, and the camera automatic focusing system includes: A raw data acquisition unit, used for preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence; A depth map acquisition unit, used for inputting the focus image sequence into a preset stereo matching algorithm mathematical model to acquire a focus depth map output by the stereo matching algorithm mathematical model; A target area division unit, configured to intercept target area image data in a sensitive distance interval from the vehicle in at least one of the original image data according to the focus depth map; A focusing parameter acquisition unit, used for inputting the target area image data into a preset focusing convolutional neural network mathematical model, and acquiring a first focusing parameter output by the focusing convolutional neural network mathematical model; A focusing unit is used to automatically focus the camera device according to the first focusing parameter.
[0015] According to the automatic focusing method for video recording in the above-mentioned embodiment, a stereo matching algorithm is applied to obtain a focusing depth map to analyze the original image data in real time, and traffic participants displayed in a sensitive distance interval in the original image data are taken as focusing objects based on the estimated scene depth to obtain a first focusing parameter for automatic focusing, thereby realizing an automatic focusing function for autonomous driving, thereby improving the environmental adaptability and safety reliability of autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a process flow of an automatic focusing method for video recording in an embodiment; Figure 2 The structure block diagram of the automatic focusing system of a camera in an embodiment is shown in FIG. DETAILED DESCRIPTION
[0017] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0018] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0019] The serial numbers assigned to the components herein, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0020] As a key sensor of the vehicle perception system, the image quality of the camera equipment is crucial to safety and the reaction speed is crucial to the safe driving of autonomous driving. At present, the main reasons why vehicle-mounted camera equipment adopts a fixed focal length design are: 1) Reasons of environmental complexity.
[0021] In the driving environment of autonomous driving, the near and far views switch frequently. How to select the appropriate focus in real time in fast dynamic scenes is a technical difficulty. 2) Limited hardware resources.
[0022] Real-time focusing has high requirements on computing hardware resources and power consumption, and traditional focusing algorithms are not sufficiently applicable in vehicle-mounted scenarios.
[0023] 3) Difficulty in judging occlusion.
[0024] Depth estimation may be inaccurate in complex scenes (such as full or partial occlusion), further affecting the reliability and stability of focusing. 4) System integration barriers.
[0025] Deeply integrating the focusing function with subsystems such as autonomous driving navigation and target detection requires higher-performance adapter connection interfaces and efficient information interaction communication protocols.
[0026] The above-mentioned practical technical problems limit the application of camera autofocus function in the field of autonomous driving technology.
[0027] In an embodiment of the present application, an efficient depth estimation algorithm is used to obtain near-view and far-view information during vehicle driving. In one embodiment, an occlusion processing strategy is also combined to solve the technical problem of difficult automatic focusing in complex environments.
[0028] Embodiment 1: Please refer to Figure 1 , is a flow chart of a method for automatic focusing of a camera in an embodiment, the method for automatic focusing of a camera is used for automatic driving of a vehicle, and specifically includes: Step 101: Acquire a focus image sequence.
[0029] At least one set of raw image data collected simultaneously by at least two camera devices is preprocessed to obtain a focused image sequence. In one embodiment, the two camera devices that obtain the raw image data constitute a binocular camera system, and one of each set of raw image data is used as a left image and the other is used as a right image. In one embodiment, the preprocessing process is to perform denoising and / or enhancement processing on each raw image data to obtain an image element in the focused image sequence. The denoising process is used to remove the noise generated during the raw image data collection process, and the enhancement process is used to apply data enhancement technology to flip, crop, scale and / or adjust the illumination of the area of interest in the raw image data.
[0030] Step 102: Obtain a focus depth map.
[0031] The focusing image sequence is input into a preset stereo matching algorithm mathematical model to obtain the focusing depth map output by the stereo matching algorithm mathematical model. The focusing depth map is obtained by applying binocular stereo matching technology, and is used to record the depth information of the objects in the scene from the camera. First, the left and right viewpoint images of the same scene are obtained; then the stereo matching algorithm is used to obtain the disparity map, which reflects the position difference of the objects in the scene on the imaging surfaces of the left and right cameras; finally, the depth information (distance information) map reflecting the distance of the objects in the scene from the camera can be further calculated based on the disparity map. The depth information map can be used in measurement, three-dimensional reconstruction, synthesis of virtual viewpoints and other fields. In autonomous driving, the depth map can help the vehicle judge the distance from other objects.
[0032] Step 103: capture the target area image data.
[0033] According to the focus depth map, target area image data of the sensitive distance interval from the vehicle is intercepted in at least one original image data. In one embodiment, the starting distance and the interval range of the sensitive distance interval are positively correlated with the current speed of the vehicle. The faster the speed, the farther the starting distance from the vehicle is set, and the larger the set interval range is. For example, in the original image data, the images formed by the traffic participants within the sensitive distance interval from the vehicle are divided out (target area images) according to the focus depth map.
[0034] Step 104: Obtain a first automatic focusing setting parameter.
[0035] The target area image data is input into a preset focusing convolutional neural network mathematical model, and a first focusing parameter output by the focusing convolutional neural network mathematical model is obtained. The focusing convolutional neural network mathematical model is used to extract the spatial features of each traffic participant in each target area image, and obtain the first focusing parameter based on the spatial features. In one embodiment, the parameter types of the first focusing parameter include exposure factor, aperture factor, shutter speed factor and / or noise control factor. In one embodiment, the focusing convolutional neural network mathematical model is pre-trained based on the edges, textures and object shapes of image elements in the historical target area image data.
[0036] Step 105, perform automatic focusing.
[0037] The camera device is automatically focused according to the first focusing parameter. In one embodiment, the initial focusing parameter of each camera device is set according to the current speed of the vehicle, and the original image data is acquired according to the initial focusing parameter, wherein the focal length setting value in the initial focusing parameter is positively correlated with the current speed of the vehicle (the faster the speed, the farther the preset initial focal length is set, generally not less than the safety distance specified for the vehicle to travel).
[0038] In one embodiment, the process of performing automatic focusing includes: The initial focus parameter and the first focus parameter are compared, and the camera device is automatically focused according to the comparison result. When the difference between the initial focus parameter and the first focus parameter is less than a preset comparison value, the camera device is automatically focused according to the first focus parameter. When the difference between the initial focus parameter and the first focus parameter is not less than the preset comparison value, the camera device is automatically focused according to the initial focus parameter.
[0039] The purpose of setting a preset comparison value is to prevent focusing too far. For example, the safe driving distance ahead is set to 10 meters at the current vehicle speed, and the focal length of the currently acquired first focusing parameter is 20 meters, which obviously does not meet the current driving requirements (the distance is too far), so the focal length cannot be set according to the acquired first focusing parameter.
[0040] In one embodiment, the automatic focusing method for video recording further includes: Step 106, fine-tuning the focus parameters.
[0041] When there are multiple traffic participants within the sensitive distance interval from the vehicle, the traffic participant closest to the vehicle is preferentially selected as the main object of automatic focusing, so as to achieve further fine-tuning of automatic focusing, including: Firstly, the target area image data is input into a preset recognition convolutional neural network mathematical model, and the recognition information of the traffic participants in the vehicle's pre-travel interval output by the recognition convolutional neural network mathematical model is obtained; then, based on the recognition information of the traffic participants and the focusing depth map, the field of view obstruction area of each traffic participant is estimated to obtain the distance of the traffic participants in the sensitive distance interval from the vehicle; finally, the second focusing parameter is obtained according to the distance between the traffic participant and the vehicle, and the camera device is automatically focused according to the second focusing parameter.
[0042] In one embodiment, the automatic focusing method for video recording further includes: Step 107, vehicle light association control.
[0043] The vehicle light mode is set according to the focal length setting value of the camera device, wherein the light mode includes a low beam mode and a high beam mode. When the focal length setting value of the camera device is less than a first preset value, the low beam mode is turned on, and when it is greater than a second preset value, the high beam mode is turned on. In one example, the vehicle light mode also includes a variable distance mode, and the illumination distance of the vehicle light is dynamically associated with the focal length setting value of the camera device and is in direct proportion.
[0044] Please refer to Figure 2 , is a structural block diagram of a camera automatic focusing system in an embodiment. In an embodiment of the present application, a camera automatic focusing system is also disclosed for applying the camera automatic focusing method as described above, specifically comprising a raw data acquisition unit 10, a depth map acquisition unit 20, a target area division unit 30, a focus parameter acquisition unit 40 and a focus unit 50. The raw data acquisition unit 10 is used to pre-process at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence. The depth map acquisition unit 20 is used to input the focus image sequence into a preset stereo matching algorithm mathematical model to obtain a focus depth map output by the stereo matching algorithm mathematical model. The target area division unit 30 is used to intercept the target area image data of the sensitive distance interval from the vehicle in at least one raw image data according to the focus depth map. The focus parameter acquisition unit 40 is used to input the target area image data into a preset focus convolution neural network mathematical model and obtain the first focus parameter output by the focus convolution neural network mathematical model. The focus unit 50 is used to automatically focus the camera device according to the first focus parameter.
[0045] In the automatic focusing method for video recording disclosed in the embodiment of the present application, at least one group of raw image data collected simultaneously by at least two camera devices is first preprocessed to obtain a focusing image sequence. The focusing image sequence is then input into a stereo matching algorithm mathematical model to obtain a focusing depth map. Then, according to the focusing depth map, the image data of the target area in the sensitive distance interval from the vehicle is intercepted in the raw image data. Finally, the image data of the target area is input into a focusing convolutional neural network mathematical model to obtain a first focusing parameter. The raw image data is analyzed in real time by applying a stereo matching algorithm to obtain a focusing depth map, and the traffic participants displayed in the sensitive distance interval in the raw image data are used as focusing objects according to the estimated scene depth to obtain a first focusing parameter for automatic focusing, thereby realizing an automatic focusing function for autonomous driving, thereby improving the environmental adaptability and safety reliability of autonomous driving vehicles.
[0046] The following describes the application of the automatic focusing method for video recording disclosed in the present application through a specific embodiment, which specifically includes: 1. Image data acquisition.
[0047] High-resolution cameras (such as Sony IMX490 or Omnivision OS02C10 sensors) installed on self-driving cars collect image data in front of and around the vehicle in real time at a frame rate of 30 FPS. The image resolution is 1920×1080 (Full HD) and is transmitted to the on-board computing unit (NVIDIA Jetson Orin NX) through a high-speed data interface (such as MIPI CSI2).
[0048] 2. Scene depth information analysis.
[0049] Stereo matching technology (such as PASMNet) is used for depth estimation, and the focusing parameters are estimated based on the pre-trained CNN Monodepth2 mathematical model.
[0050] a). The parameters of the Monodepth2 mathematical model include: Network architecture: ResNet18 as the backbone network, followed by a decoder module to generate depth maps; Input size: 640×192 pixels; Loss function: reprojection loss + Smooth L1 loss; Training data: KITTI dataset (dynamic objects are removed during preprocessing); Inference time: 30ms / frame (based on NVIDIA Jetson Orin NX test); Output range: Depth value range is 0.1m to 80m.
[0051] b). The parameters of the PASMNet stereo matching mathematical model specifically include: Backbone network: Based on binocular image input, it uses spatial and frequency domain mixed convolution modules to extract features; Parallax range: up to 256 pixels; Accuracy: mean absolute error (MAE) < 2.5 pixels; Inference time: 40ms / frame.
[0052] c). Strategies involving occlusion handling: Full occlusion: When the confidence of the depth estimation is lower than 0.5, the focus parameter automatically falls back to the default value (2.5 meters); Semi-occlusion: Use the depth value of the non-occluded area to weight the focus position. 3. How to implement automatic focusing operation. Combine the depth estimation result with the preset focus adjustment strategy to automatically adjust the focus position of the camera. The focus module uses an automatic focus unit driven by a stepper motor. The specific parameters are as follows: Focusing range: 0.1m to infinity; Focusing speed: 5 mm / s; Control algorithm: PID control, with proportional gain \( K_p = 1.2 \), integral gain \( K_i = 0.1 \) and differential gain \(K_d = 0.05 \); The focus priority sorting mechanism dynamically adjusts the focus area according to the environmental scene: High-speed driving (>60 km / h): Prioritize adjustment to the distant view area (>10 meters); Low speed driving (<30 km / h): Prioritize the near-view area (<5 meters); Parking state: Use the default focal length value (2.5 meters).
[0053] 4. Integration with autonomous driving system.
[0054] (1) The focusing function is combined with the navigation system (such as the path planning module based on the Apollo Cyber RT platform) to dynamically adjust the camera focus and optimize the navigation system.
[0055] For example, at the entrance of a highway ramp, the focus is adjusted to the distant area based on depth estimation to provide a clear view for the navigation path. When stopping at a red light at a city intersection, the focus is switched to the near-field area to support the pedestrian detection module.
[0056] Object detection and obstacle avoidance: The optimized depth estimation and focus function provide high-quality image input for object detection models (such as YOLOv8 or EfficientDet). In one embodiment, the YOLOv8 model parameters are: Model version: YOLOv8Small; Input size: 640×640 pixels; Inference time: 15ms / frame; Accuracy: mAP (0.5)>90%.
[0057] (2) Improved detection accuracy.
[0058] Reduce the missed detection rate due to blur by about 20% in dynamic scenes. (3) Lighting linkage.
[0059] Linked with the vehicle headlight control system, the focus distance information is used to dynamically adjust the lighting mode, including: When the focus distance is >20 meters, it automatically switches to high beam mode; When the focus distance is less than 10 meters, switch to low beam mode; When driving at night, the focus distance and light intensity are adjusted in conjunction to ensure the best lighting effect.
[0060] The automatic focusing method of the camera in the embodiment of the present application involves the acquisition and analysis of scene depth information and identification information of traffic participants. The scene depth information is extracted in real time by a pre-trained stereo matching algorithm, and then the traffic participants in the area of interest around the vehicle are identified according to the convolutional neural network mathematical model to support the robust processing of fully occluded and semi-occluded scenes. When there is occlusion in the scene, the algorithm preferentially selects the unoccluded area for focus adjustment through a dynamic weighting strategy. For example, the depth estimation result distinguishes the near view (less than 5 meters) and the far view (greater than 5 meters) areas, and dynamically adjusts the depth estimation update frequency according to the vehicle speed to ensure the accuracy of focus switching. Among them, the implementation of the automatic focusing mechanism is to dynamically optimize the camera focus through a preset focus adjustment strategy combined with real-time depth information. For example, when driving at high speed, priority is given to the far view focus, and in low speed or parking scenes, the near view focus is paid attention to to ensure the clarity of the key areas of the image. In one embodiment, a focus priority sorting mechanism is introduced to ensure the optimal focus selection in occluded scenes. In addition, the automatic focusing function can be expanded and optimized for other functions used for vehicle automatic driving, such as: 1. Navigation optimization. The automatic focus function is combined with the navigation system to adjust the focus in real time under complex road conditions (such as curves, ramps, and tunnel entrances), providing clear visual support for path planning.
[0061] 2. Detection and obstacle avoidance of objects of interest.
[0062] By optimizing the input image quality of the object detection algorithm, the accuracy and response speed of pedestrian and obstacle recognition can be improved. For example, missed detection or false detection caused by image blur can be avoided.
[0063] 3. Vehicle lighting linkage.
[0064] The focusing mechanism is linked with the vehicle's headlight control system to dynamically adjust the lighting mode (high beam or low beam) according to the focal distance, improving the safety of nighttime driving. The embodiment of the present application provides an efficient, real-time and complex scene-based automatic camera focusing method for autonomous driving, which not only improves the reliability of environmental perception, but also optimizes the deep integration capability with the autonomous driving system. In actual tests, the automatic camera focusing method has the following advantages: 1. Strong environmental adaptability.
[0065] It is suitable for various scenarios such as highways, urban roads, and night driving, and can significantly improve the camera's image acquisition capabilities.
[0066] 2. High real-time performance.
[0067] The depth estimation and focusing mechanism adopts a lightweight model design, supports millisecond-level response time, and meets the needs of dynamic driving scenarios.
[0068] 3. The system is easy to integrate and optimize.
[0069] Through deep integration with the autonomous driving system, navigation optimization, target detection improvement and night lighting assistance are achieved, comprehensively enhancing driving safety and user experience.
[0070] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0071] The above specific examples are used to illustrate the present invention, which are only used to help understand the present invention and are not used to limit the present invention. For those skilled in the art to which the present invention belongs, some simple deductions, modifications or substitutions can be made according to the idea of the present invention.
Claims
1. A method for automatic focusing of a camera for automatic driving of a vehicle, characterized in that: include: Preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence; Inputting the focus image sequence into a preset stereo matching algorithm mathematical model to obtain a focus depth map output by the stereo matching algorithm mathematical model; intercepting image data of a target area in a sensitive distance interval from the vehicle in at least one of the original image data according to the focus depth map; Inputting the target area image data into a preset focusing convolutional neural network mathematical model, and obtaining a first focusing parameter output by the focusing convolutional neural network mathematical model; Automatically focus the camera device according to the first focusing parameter.
2. The automatic focusing method for video recording as claimed in claim 1, characterized in that: The starting distance and the interval range of the sensitive distance interval are positively correlated with the current speed of the vehicle.
3. The automatic focusing method for video recording as claimed in claim 1, characterized in that: The step of preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence comprises: The two camera devices that acquire the original image data form a binocular camera system, and one of each set of original image data is used as a left image, and the other is used as a right image.
4. The automatic focusing method for video recording as claimed in claim 1, characterized in that: The automatically focusing the camera device according to the first focusing parameter includes: Setting initial focusing parameters of each of the camera devices according to the current speed of the vehicle, and acquiring the original image data according to the initial focusing parameters; wherein the focal length setting value in the initial focusing parameters is positively correlated with the current speed of the vehicle; The initial focusing parameter and the first focusing parameter are compared, and the camera device is automatically focused according to the comparison result.
5. The automatic focusing method for video recording as claimed in claim 4, characterized in that: The automatically focusing the camera device according to the comparison result includes: When the difference between the initial focusing parameter and the first focusing parameter is less than a preset comparison value, automatically focusing the camera device according to the first focusing parameter; When the difference between the initial focusing parameter and the first focusing parameter is not less than the preset comparison value, the camera device is automatically focused according to the initial focusing parameter.
6. The automatic focusing method for video recording as claimed in claim 1, characterized in that: Also includes: Inputting the target area image data into a preset recognition convolutional neural network mathematical model, and obtaining the recognition information of the traffic participants in the vehicle pre-travel interval output by the recognition convolutional neural network mathematical model; According to the identification information of the traffic participant and the focusing depth map, the visual field obstruction area of each traffic participant is estimated to obtain the distance of the traffic participant in the sensitive distance interval from the vehicle; A second focusing parameter is acquired according to the distance between the traffic participant and the vehicle, and the camera device is automatically focused according to the second focusing parameter.
7. The automatic focusing method for video recording as claimed in claim 1, characterized in that: Also includes: The lighting mode of the vehicle is set according to the focal length setting value of the camera device; the lighting mode includes a low beam mode and a high beam mode.
8. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by the processor, the automatic focusing method for video recording according to any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium, characterized in that: The medium stores a program, and the program can be executed by a processor to implement the automatic focusing method for video recording as described in any one of claims 1 to 7.
10. A camera automatic focusing system for vehicle automatic driving, characterized in that: Used to apply the automatic camera focusing method according to any one of claims 1 to 7, the automatic camera focusing system comprising: A raw data acquisition unit, used for preprocessing at least one set of raw image data collected simultaneously by at least two camera devices to obtain a focus image sequence; A depth map acquisition unit, used for inputting the focus image sequence into a preset stereo matching algorithm mathematical model to acquire a focus depth map output by the stereo matching algorithm mathematical model; A target area division unit, configured to intercept target area image data in a sensitive distance interval from the vehicle in at least one of the original image data according to the focus depth map; A focusing parameter acquisition unit, used for inputting the target area image data into a preset focusing convolutional neural network mathematical model, and acquiring a first focusing parameter output by the focusing convolutional neural network mathematical model; A focusing unit is used to automatically focus the camera device according to the first focusing parameter.