Video image acquisition method and automobile
By installing control equipment on the car, using radar and camera acquisition distance and relative speed, the camera is automatically controlled to collect images, and the problem of difficulty in comprehensively collecting traffic accident video images in the existing technology is solved, and the timeliness and accuracy of traffic accident responsibility determination is achieved.
Patent Information
- Application Number
- CN202210190483.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-02-28
AI Technical Summary
It is difficult for the prior art to fully collect video images of the accident process when a traffic accident occurs, which affects the determination of responsibility for traffic accidents.
By installing control equipment on the car, using radar and camera to collect the distance and relative speed between the car and the target object, determine whether the image acquisition conditions are met, and automatically control the camera to collect images.
It realizes the timely collection of video images of vehicles or pedestrians with accidents when a traffic accident occurs, ensuring the completeness and accuracy of the determination of responsibility for traffic accidents.
Smart Images

Figure CN114537403B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the automotive field, and in particular to a video image acquisition method and an automobile. Background Art
[0002] With the continuous improvement of people's living standards, cars have become the main means of transportation for people to travel, but with the increasing number of vehicles on the road, traffic accidents are also gradually increasing. When a traffic accident occurs, it is usually necessary to obtain video images of the accident process from the monitoring equipment or driving recorder of the section where the traffic accident occurred, and determine the responsibility of the traffic accident based on the obtained video images. However, it is impossible for the monitoring equipment to cover all sections of the road, and the driving recorder can only collect video images in front of the car. In this way, it is possible that the complete video image of the accident process cannot be obtained, which in turn affects the determination of responsibility for the traffic accident. Based on this, it is urgent to provide a method to collect video images of vehicles or pedestrians that may collide with the vehicle during driving, so that when a traffic accident occurs, the responsibility of the traffic accident can be quickly determined. Summary of the invention
[0003] The embodiment of the present application provides a video image acquisition method and a vehicle, which can timely acquire video images of vehicles or pedestrians that may collide with the vehicle during driving. The technical solution is as follows:
[0004] On the one hand, a video image acquisition method is provided, which is applied to a control device in a car, where a camera application runs on the control device, and the method includes:
[0005] Acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment;
[0006] If the first distance and the first relative speed meet a start condition of a camera application, allocating a first memory space to the camera application, and running the camera application based on the first memory space;
[0007] Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment;
[0008] If the second distance and the second relative speed meet the image acquisition condition, the camera of the car is controlled by the camera application to perform image acquisition, and the image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
[0009] Optionally, the startup conditions of the camera application include that the first distance is less than a first distance threshold, the first relative speed is not greater than a first speed threshold, and the ratio of the first distance to the first relative speed is less than a first duration threshold, the first duration threshold is n times the startup duration of the camera application, and n is not less than 2.
[0010] Optionally, allocating a first memory space to the camera application includes:
[0011] If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, then based on the size of the memory space required by the camera application, a second memory space is released from the allocated memory space, the allocated memory space refers to the memory space allocated for each application currently running, the sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the spaces and the size of the first memory space is not less than a reference threshold.
[0012] Optionally, before acquiring the first distance and the first relative speed between the vehicle and the target object collected at the first moment, the method further includes:
[0013] Acquire a third relative speed between the vehicle and the target object collected at a third moment;
[0014] If the third relative speed is greater than a second speed threshold, the camera application is driven and initialized, and the second speed threshold is less than the first speed threshold.
[0015] Optionally, the image acquisition conditions include that the second distance is less than a second distance threshold, the second relative speed is not greater than a third speed threshold, and the ratio of the second distance to the second relative speed is less than a second duration threshold, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold.
[0016] Optionally, at least one radar is configured on the left side, right side, front end and rear end of the automobile, each radar is used to detect the distance and relative speed between the automobile and a target object in a direction corresponding to the corresponding radar, each radar corresponds to a camera, and if the second distance and the second relative speed meet the image acquisition condition, the camera of the automobile is controlled by the camera application to acquire the image, including:
[0017] If the second distance and the second relative speed collected by the first radar meet the image collection condition, the camera corresponding to the first radar is controlled by the camera application to collect the image, wherein the duration of the image collection is the first duration.
[0018] Optionally, after controlling the camera corresponding to the first radar to collect images through the camera application, the method further includes:
[0019] Acquire a third distance and a fourth relative speed between the vehicle and the target object collected by the first radar at a fourth moment;
[0020] If the third distance and the fourth relative speed do not satisfy the image acquisition condition, controlling the camera corresponding to the first radar to stop image acquisition through the camera application;
[0021] If the third distance and the fourth relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the duration of image acquisition is the first duration.
[0022] Optionally, the method further comprises:
[0023] Acquire a fourth distance and a fifth relative speed between the vehicle and the target object collected by each radar at a fifth moment;
[0024] If the fourth distance and the fifth relative speed collected by each radar at the fifth moment both meet the closing condition of the camera application, the camera application is closed, and the first memory space allocated to the camera application is released.
[0025] In another aspect, a control device is provided, on which a camera application is running, the control device is a control device on a car, and the control device includes a processor, and the processor is used to:
[0026] Acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment;
[0027] If the first distance and the first relative speed meet a start condition of a camera application, allocating a first memory space to the camera application, and running the camera application based on the first memory space;
[0028] Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment;
[0029] If the second distance and the second relative speed meet the image acquisition condition, the camera of the car is controlled by the camera application to perform image acquisition, and the image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
[0030] Optionally, the startup conditions of the camera application include that the first distance is less than a first distance threshold, the first relative speed is not greater than a first speed threshold, and the ratio of the first distance to the first relative speed is less than a first duration threshold, the first duration threshold is n times the startup duration of the camera application, and n is not less than 2.
[0031] Optionally, the processor is configured to:
[0032] If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, then based on the size of the memory space required by the camera application, a second memory space is released from the allocated memory space, the allocated memory space refers to the memory space allocated for each application currently running, the sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the spaces and the size of the first memory space is not less than a reference threshold.
[0033] Optionally, the processor is configured to:
[0034] Before acquiring the first distance and the first relative speed between the vehicle and the target object collected at the first moment, the method further includes:
[0035] Acquire a third relative speed between the vehicle and the target object collected at a third moment;
[0036] If the third relative speed is greater than a second speed threshold, the camera application is driven and initialized, and the second speed threshold is less than the first speed threshold.
[0037] Optionally, the image acquisition conditions include that the second distance is less than a second distance threshold, the second relative speed is not greater than a third speed threshold, and the ratio of the second distance to the second relative speed is less than a second duration threshold, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold.
[0038] Optionally, at least one radar is configured on the left side, right side, front end and rear end of the automobile, each radar is used to detect the distance and relative speed between the automobile and a target object in a direction corresponding to the corresponding radar, each radar corresponds to a camera, and the processor is used to:
[0039] If the second distance and the second relative speed collected by the first radar meet the image collection condition, the camera corresponding to the first radar is controlled by the camera application to collect the image, wherein the duration of the image collection is the first duration.
[0040] Optionally, the processor is configured to:
[0041] Acquire a third distance and a fourth relative speed between the vehicle and the target object collected by the first radar at a fourth moment;
[0042] If the third distance and the fourth relative speed do not satisfy the image acquisition condition, controlling the camera corresponding to the first radar to stop image acquisition through the camera application;
[0043] If the third distance and the fourth relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the duration of image acquisition is the first duration.
[0044] Optionally, the processor is configured to:
[0045] Acquire a fourth distance and a fifth relative speed between the vehicle and the target object collected by each radar at a fifth moment;
[0046] If the fourth distance and the fifth relative speed collected by each radar at the fifth moment both meet the closing condition of the camera application, the camera application is closed, and the first memory space allocated to the camera application is released.
[0047] On the other hand, a video image acquisition device is provided, which is configured in a control device on a car, and a camera application is running on the control device, and the device includes:
[0048] A first acquisition module, used to acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment;
[0049] a starting module, configured to allocate a first memory space to the camera application and run the camera application based on the first memory space if the first distance and the first relative speed meet a starting condition of the camera application;
[0050] A second acquisition module, used to acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment;
[0051] An acquisition module is used to control the camera of the automobile to acquire images through the camera application if the second distance and the second relative speed meet an image acquisition condition, wherein the image acquisition condition refers to a condition for triggering image acquisition when there is a risk of collision between the automobile and the target object.
[0052] Optionally, the startup conditions of the camera application include that the first distance is less than a first distance threshold, the first relative speed is not greater than a first speed threshold, and the ratio of the first distance to the first relative speed is less than a first duration threshold, the first duration threshold is n times the startup duration of the camera application, and n is not less than 2.
[0053] Optionally, the startup module is mainly used for:
[0054] If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, then based on the size of the memory space required by the camera application, a second memory space is released from the allocated memory space, the allocated memory space refers to the memory space allocated for each application currently running, the sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the spaces and the size of the first memory space is not less than a reference threshold.
[0055] A third acquisition module, used to acquire a third relative speed between the vehicle and the target object collected at a third moment;
[0056] An initialization module is used to drive and initialize the camera application if the third relative speed is greater than a second speed threshold, and the second speed threshold is less than the first speed threshold.
[0057] Optionally, the image acquisition conditions include that the second distance is less than a second distance threshold, the second relative speed is not greater than a third speed threshold and the ratio of the second distance to the second relative speed is less than a second duration threshold, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold.
[0058] Optionally, at least one radar is configured on the left side, right side, front end and rear end of the vehicle, each radar is used to detect the distance and relative speed between the vehicle and a target object in a direction corresponding to the corresponding radar, each radar corresponds to a camera, and the acquisition module is mainly used to:
[0059] If the second distance and the second relative speed collected by the first radar meet the image collection condition, the camera corresponding to the first radar is controlled by the camera application to collect the image, wherein the duration of the image collection is the first duration.
[0060] Optionally, the acquisition module is further used for:
[0061] Acquire a third distance and a fourth relative speed between the vehicle and the target object collected by the first radar at a fourth moment;
[0062] If the third distance and the fourth relative speed do not satisfy the image acquisition condition, controlling the camera corresponding to the first radar to stop image acquisition through the camera application;
[0063] If the third distance and the fourth relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the duration of image acquisition is the first duration.
[0064] Optionally, the acquisition module is further used for:
[0065] Acquire a fourth distance and a fifth relative speed between the vehicle and the target object collected by each radar at a fifth moment;
[0066] If the fourth distance and the fifth relative speed collected by each radar at the fifth moment both meet the closing condition of the camera application, the camera application is closed, and the first memory space allocated to the camera application is released.
[0067] In another aspect, a car is provided, the car comprising a control device, a camera application running on the control device, the control device being used to:
[0068] Acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment;
[0069] If the first distance and the first relative speed meet a start condition of a camera application, allocating a first memory space to the camera application, and running the camera application based on the first memory space;
[0070] Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment;
[0071] If the second distance and the second relative speed meet the image acquisition condition, the camera of the car is controlled by the camera application to perform image acquisition, and the image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
[0072] Optionally, the car further comprises a plurality of radars and a plurality of cameras, the plurality of radars are deployed around the car, and at least one radar is deployed on the left side, right side, front end and rear end of the car, and each radar corresponds to one of the plurality of cameras;
[0073] The radar is used to collect the distance and relative speed between the car and the target object according to a preset period;
[0074] The control device is used to obtain the distance and relative speed between the car and the object collected by each radar at each moment; if the first distance and the first relative speed between the car and the target object collected by the first radar at the first moment meet the start-up condition of the camera application, a first memory space is allocated to the camera application, and the camera application is run based on the first memory space, and the first radar is any radar among the multiple radars; obtain the second distance and the second relative speed between the car and the target object collected by the first radar at the second moment, and the second moment is later than the first moment; if the second distance and the second relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to perform image acquisition.
[0075] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a computer, the steps of the above-mentioned video image acquisition method are implemented.
[0076] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the above-mentioned video image acquisition method.
[0077] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0078] In the embodiment of the present application, the control device first determines whether the start-up conditions of the camera application are met by the distance and relative speed between the target object and the car collected at the first moment, and starts the camera application if the start-up conditions of the camera application are met. After starting the camera application, it is determined whether there is a risk of collision between the car and the target object based on the distance and relative speed between the car and the target object collected at the second moment, and whether image acquisition is required. If image acquisition is required, the camera can be immediately controlled to perform image acquisition through the camera application that has been started at the first moment, thereby ensuring the timeliness of image acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0080] Figure 1 is a structural schematic diagram of a car provided in an embodiment of the present application;
[0081] Figure 2 is a flow chart of a video image acquisition method provided by an embodiment of the present application;
[0082] Figure 3 is a structural schematic diagram of a video image acquisition device provided in an embodiment of the present application;
[0083] Figure 4 It is a structural schematic diagram of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0085] Before explaining the embodiments of the present application in detail, the system architecture involved in the embodiments of the present application is first introduced.
[0086] Figure 1 Schematic diagram of a car structure provided by an embodiment of the present application. Figure 1 As shown, the car includes a control device 101, multiple radars 102 and multiple cameras 103. The multiple radars 102 are deployed around the car, and at least one radar 102 is deployed on the left side, right side, front end and rear end of the car. Each radar 102 corresponds to one of the multiple cameras 103.
[0087] Exemplarily, there may be one or more radars 102 deployed on the left side of the car. If there is only one radar 102 deployed on the left side of the car, the radar 102 may be installed on the left side of the car near the rearview mirror. If there are multiple radars 102 deployed on the left side of the car, one radar 102 may be installed on the left side of the car near the rearview mirror and above the front and rear wheels of the car. Multiple radars 102 may also be installed at other suitable locations on the left side of the car. This embodiment of the present application is not limited to this.
[0088] The number and installation positions of the radars 102 deployed on the right side of the car can refer to the number and installation positions of the radars 102 deployed on the left side of the car, and the embodiments of the present application will not be repeated here.
[0089] The number of radars 102 deployed at the front end of the car can also be one or more. If there is one radar 102 deployed at the front end of the car, the radar 102 can be installed in the middle of the front bumper of the car. If there are multiple radars 102 deployed at the front end of the car, one radar 102 can be installed in the middle of the front bumper of the car and on the left and / or right side of the front bumper. Multiple radars 102 can also be installed at other suitable positions at the front end of the car, which is not limited in the embodiments of the present application.
[0090] The number and position of the radars 102 deployed at the rear end of the car can refer to the number and position of the radars 102 deployed at the front end of the car, and the embodiments of the present application will not be repeated here.
[0091] In addition, a camera 103 can be deployed on the left side, right side, front end and rear end of the car. Among them, the camera 103 deployed on the left side of the car can be installed at a position near the rearview mirror on the left side of the car, and one or more radars 102 installed on the left side of the car correspond to the camera 103 installed on the left side of the car. The camera 103 deployed on the right side of the car can be installed at a position near the rearview mirror on the right side of the car, and one or more radars 102 installed on the right side of the car correspond to the camera 103 installed on the right side of the car. The camera 103 deployed at the front end of the car can be installed in the middle of the front end of the car, for example, above the license plate, and one or more radars 102 installed at the front end of the car correspond to the camera 103 installed at the front end of the car, and the camera 103 deployed at the rear end of the car can be installed in the middle of the rear end of the car, for example, above the license plate, and one or more radars 102 installed at the rear end of the car correspond to the camera 103 installed at the rear end of the car. The above-mentioned cameras 103 deployed on the left side, right side, front end and rear end of the car can also be installed at other suitable positions on the left side, right side, front end and rear end of the car, respectively, and the embodiments of the present application are not limited to this.
[0092] It should be noted that the above is only one deployment method of radar and camera shown in the embodiment of the present application. In some possible situations, the number of radars and cameras deployed on the car can be more or less. For example, radar and camera can be deployed at the front and rear ends of the car, but not at the left and right sides, or can be deployed at the left and right sides of the car, but not at the front and rear ends, etc. The embodiment of the present application does not limit this.
[0093] In the embodiment of the present application, the radar 102 is used to collect the distance and relative speed between the car and the target object according to a preset period. For example, the radars 102 deployed in various directions of the car can be used to collect the distance and relative speed between the car and the target object in the direction corresponding to the corresponding radar 102 according to a preset period. For example, the radar 102 deployed on the right side of the car can be used to collect the distance and relative speed between the car and the target object located on the right side of the car according to a preset period.
[0094] The control device 101 is used to obtain the distance and relative speed between the car and the object collected by each radar 102 at each moment; if the first distance and the first relative speed between the car and the target object collected by the first radar at the first moment meet the start-up condition of the camera application, a first memory space is allocated to the camera application, and the camera application is run based on the first memory space, and the first radar is any radar among the multiple radars 102; the second distance and the second relative speed between the car and the target object collected by the first radar at the second moment are obtained, and the second moment is later than the first moment; if the second distance and the second relative speed meet the image acquisition condition, the camera 103 corresponding to the first radar is controlled by the camera application to perform image acquisition.
[0095] The control device 101 in the embodiment of the present application may be a vehicle-mounted terminal on a vehicle, or may be other control devices deployed in a vehicle. The radar may be a millimeter wave radar, a laser radar, or other types of radars, which are not limited in the embodiment of the present application.
[0096] Next, the video image acquisition method provided in the embodiment of the present application is introduced.
[0097] Figure 2 A video image acquisition method provided in an embodiment of the present application can be applied to the control device included in the video image acquisition system introduced in the above embodiment. Figure 2 As shown, the method comprises the following steps:
[0098] Step 201: Acquire a first distance and a first relative speed between a car and a target object collected at a first moment.
[0099] From the above introduction, we can see that at least one radar is deployed on the left side, right side, front end and rear end of the car. Due to the limited radiation range of radar waves, the radar in each direction is used to collect the distance and relative speed between the target object detected in the corresponding direction and the car. Therefore, the target objects detected by each radar may be different.
[0100] Optionally, when a large number of radars are deployed on a car, the radiation ranges of radar waves between two radars that are located close to each other may overlap, and therefore, the target objects detected by each radar may be the same.
[0101] In an embodiment of the present application, each radar can collect the distance and relative speed between the target object that may exist in the direction corresponding to itself and the car according to a preset period, and send the collected distance and relative speed between the car and the target object to the control device in real time through the CAN (Controller Area Network) bus. Based on this, after each radar collects the distance and relative speed between the car and the target object that may exist in the direction corresponding to itself at the first moment, the collected distance and relative speed between the car and the target object in the corresponding direction at the first moment can be sent to the control device. Correspondingly, the control device receives the distance and relative speed between the car and the target object in the corresponding direction at the first moment collected by each radar, and uses the distance and relative speed collected by each radar at the first moment as the first distance and first relative speed corresponding to the corresponding radar. In this way, when there are multiple radars that collect the distance and relative speed at the first moment, the first distance and first relative speed obtained by the control device at the first moment are multiple. Among them, one radar corresponds to one first distance and one first relative speed.
[0102] The preset period may be 100ms, 150ms or other values, which are not limited in the present embodiment. The first moment may be any collection moment in the process of the radar collecting data according to the preset period.
[0103] After obtaining the first distance and the first relative speed collected by each radar, the control device compares the first distance collected by each radar with the first distance threshold, compares the first relative speed with the first speed threshold, and compares the ratio between the first distance and the corresponding first relative speed with the first duration threshold, so as to determine whether the first distance and the first relative speed meet the start-up condition of the camera application. If the first distance corresponding to any radar is less than the first distance threshold, the first relative speed is not greater than the first speed threshold, and the ratio between the first distance and the corresponding first relative speed is less than the first duration threshold, it means that the first distance and the first relative speed meet the start-up condition of the camera application. If the first distance corresponding to each radar is not less than the first distance threshold, the first relative speed is greater than the first speed threshold, or the ratio between the first distance and the corresponding first relative speed is not less than the first duration threshold, it means that the first distance and the first relative speed do not meet the start-up condition of the camera application.
[0104] It should be noted that the first distance corresponding to the radar is less than the first distance threshold and the first relative speed is less than the first speed threshold, indicating that the distance between the target object detected by the radar and the car is relatively close, and because the relative speed between the two is lower than the first distance threshold, the target object may actively collide with the vehicle. If the ratio between the first distance and the first relative speed is less than the first duration threshold, it means that the estimated duration of the target object colliding with the vehicle is less than the first duration threshold set to obtain the image in time. In this case, in order to avoid the inability to obtain the video image in time due to the startup of the camera application, the camera application needs to be started, that is, at this time, it is time to start the camera application. Therefore, it can be determined that the first distance and the first relative speed meet the startup conditions of the camera application.
[0105] In addition, since the distance between vehicles is small and the speed is low in crowded roads, there is a greater possibility of collision between vehicles or accidental collision. Therefore, in the embodiment of the present application, the first distance threshold can be set to any value not greater than 30m, for example, 28m or 26m. The first speed threshold is set to any value not greater than 30km / h, for example, 28km / h or 25mkm / h. On this basis, by comparing the first distance between the vehicle and the target object collected by the radar with the first distance threshold, and comparing the first relative speed between the vehicle and the target object collected by the radar with the first speed threshold, it is determined whether there is a possibility that a vehicle or pedestrian will actively collide with the vehicle, and the accuracy of the judgment can be improved.
[0106] In addition, the first duration threshold may be n times the startup duration of the camera application, and n is not less than 2. For example, n may be 3, 4 or other values, which are not limited in the embodiments of the present application. In this way, sufficient time may be reserved for the camera application to start up, so as to avoid the situation where the video image cannot be captured due to the failure of the camera application to start up in time. The startup duration of the camera application is generally 800ms-1.2s.
[0107] Step 202: If the first distance and the first relative speed meet the start-up condition of the camera application, a first memory space is allocated to the camera application, and the camera application is run based on the first memory space.
[0108] If the control device determines that the first distance and the first relative speed meet the start condition of the camera application in the manner described above, the control device may allocate the first memory space for the camera application and run the camera application based on the first memory space. Otherwise, the control device does not start the camera application.
[0109] After determining that the first distance and the corresponding first relative speed sent by any of the received multiple radars meet the start-up conditions of the camera application, the control device can first drive and initialize the camera application. After that, the control device determines whether the size of the currently unallocated memory space is larger than the size of the memory space required by the camera application. If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, based on the size of the memory space required by the camera application, the second memory space is released from the allocated memory space, and the allocated memory space refers to the memory space allocated for each currently running application. The sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the spaces and the size of the first memory space is not less than the reference threshold.
[0110] Exemplarily, if the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, then the unused memory space in the memory space allocated for each currently running application is released, and if the size of the unallocated memory space after the release is larger than the size of the memory space required by the camera application, the first memory space is allocated to the camera application from the unallocated memory space after the release. The size of the first memory space is larger than the size of the memory space required by the camera application.
[0111] Exemplarily, the control device may determine the size of the memory space required for the camera application according to the number of cameras deployed on the car and the resolution of each camera. Afterwards, the size of the currently unallocated memory space is counted, and the size of the currently unallocated memory space is compared with the size of the memory space required to start the camera application. If the size of the currently unallocated memory space is larger than the size of the memory space required to start the camera application, the required memory space may be directly allocated to the camera application. If the size of the currently unallocated memory space is not larger than the size of the memory space required to start the camera application, the unused memory space in the memory space of each currently running application may be released by executing the echo3> / proc / sys / vm / drop_caches command, and after each application releases the unused memory space, the size of the unallocated memory space is counted again, and if the size of the unallocated memory space after release is larger than the size of the memory space required to start the camera application, the first memory space is allocated to the camera application from the unallocated memory space after release.
[0112] If the size of the unallocated memory space after release is not larger than the size of the memory space required by the camera application, it means that the required memory space cannot be allocated to the camera application for its startup and operation. In this case, the control device can determine at least one target application based on the activity of each currently running application and the size of the memory space required by the camera application; close at least one target application and release the memory space occupied by at least one target application; and allocate a first memory space to the camera application from the unallocated memory space after release.
[0113] For example, if the size of the unallocated memory space after release is still not larger than the size of the memory space required to start the camera application, the control device can determine the difference between the size of the memory space required by the camera application and the size of the currently unallocated memory space, and the difference is the minimum memory space that the control device needs to release. Afterwards, the activity of each currently running application is ranked, and the memory space occupied by each application is counted. Then, based on the difference calculated above and the size of the memory space occupied by each application, the target application to be closed is determined from the applications with the lower activity ranking, and the target application is closed to release the memory space occupied by the target application. Afterwards, the first memory space is allocated to the camera application from the unallocated memory space after release.
[0114] For example, assuming that the memory space required by the camera application is 20M, and the size of the currently unallocated memory space is 4M, it can be determined that at least 16M of memory space needs to be released. At this time, assuming that the number of currently running applications is 10, the control device can rank the 10 running applications according to the activity, and count the memory space occupied by each running application. Assuming that the memory space occupied by the first application with the lowest activity from low to high is 7M, the memory space occupied by the second application is 10M, and the memory space occupied by the third application is 8M. Since the memory space required by the camera application is 20M, the control device can determine the first application and the second application with the lowest activity ranking as the target application, and close the first application and the second application to release the memory space occupied by the first application and the second application. Since closing the first application and the second application can release 17M of memory space, the unallocated memory space is 21M, and the control device can allocate a memory space of not less than 20M to the camera application.
[0115] Optionally, from the above introduction, it can be seen that the startup time of the camera application is generally 800ms-1.2s, of which about 200ms is used to initialize the driver of the camera application. Therefore, in the embodiment of the present application, the control device can also initialize the driver of the camera application in advance before allocating memory space for the camera application and running the camera application.
[0116] Exemplarily, the control device may obtain a third relative speed between the vehicle and the target object collected at a third moment before the first moment; if the third relative speed is greater than a second speed threshold, the camera application is driven and initialized, and the second speed threshold is less than the first speed threshold. The third speed threshold may be any value greater than zero.
[0117] Among them, at the third moment, the control device can compare the third relative speed collected by each radar with the second speed threshold. When the third relative speed collected by any radar is greater than the second speed threshold, it means that the target object and the car are approaching each other and there is a possibility of collision. At this time, the control device can control the camera application to perform driver initialization. After the camera application completes the driver initialization, when the control device receives the distance and relative speed collected by each radar again, this moment can be taken as the first moment, and the distance received at this moment can be taken as the first distance, and the relative speed can be taken as the first relative speed. Then, the method introduced in this step is used to determine whether the camera application meets the startup condition, so as to allocate the first memory space for the camera application, and run the camera application based on the first memory space. Since the camera application has completed the driver initialization at this time, when the control device determines that the first distance and the first relative speed meet the startup condition of the camera application and starts the camera application, the startup time of the camera application can be shortened.
[0118] Step 203: Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment.
[0119] As can be seen from the above introduction, at least one radar is configured on the left side, right side, front end and rear end of the car, and each radar corresponds to a camera. After starting the camera application, the control device can continue to receive the distance and relative speed between the car and the target object sent by each radar. When the control device receives the distance and relative speed between the car and the target object collected by each radar at the second moment, the distance between the car and the target object received at the second moment sent by each radar is used as the second distance corresponding to the corresponding radar, and the relative speed between the car and the target object received at the second moment sent by each radar is used as the second relative speed of the corresponding radar. Afterwards, for each radar, the control device can determine whether the second distance and the second relative speed collected by the corresponding radar meet the image acquisition condition. Among them, the image acquisition condition refers to the condition that triggers image acquisition when the car and the target object have a collision risk. That is, the image acquisition condition refers to the condition that the control device determines that the car and the target object may collide based on the second distance and the second relative speed collected by a certain radar. The second moment is later than the first moment. For example, the second moment can be the next radar data acquisition moment of the first moment.
[0120] Exemplarily, taking the first radar as an example, the control device compares the second distance collected by the first radar with the second distance threshold, compares the second relative speed collected by the first radar with the third speed threshold, and compares the ratio of the second distance to the second relative speed of the first radar with the second duration threshold. If the second distance of the first radar is less than the second distance threshold, the second relative speed is not greater than the third speed threshold, and the ratio of the second distance to the second relative speed is less than the second duration threshold, it means that the second distance and the second relative speed collected by the first radar meet the image acquisition condition. If the second distance collected by the first radar is not less than the second distance threshold, or the second relative speed is greater than the third speed threshold, or the ratio of the second distance to the second relative speed is not less than the second duration threshold, it means that the second distance and the second relative speed collected by the first radar do not meet the image acquisition condition.
[0121] Among them, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold. Since the second distance is the distance between the car and the target object collected by the radar after the camera is turned on, when the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold, if the second distance of the first radar is less than the second distance threshold, the second relative speed is not greater than the third speed threshold, and the ratio of the second distance to the second relative speed is less than the second duration threshold, it means that the distance between the car and the target object is further shortened, that is, the possibility of collision between the car and the target object is further increased, and therefore, it is necessary to immediately collect the video image. That is, the second distance and the second relative speed collected by the first radar have met the image collection conditions. In this case, the control device can perform image collection through the following step 204.
[0122] Step 204: If the second distance and the second relative speed meet the image acquisition condition, the camera of the vehicle is controlled by the camera application to acquire the image.
[0123] When it is determined through the above method that the second distance and the second relative speed collected by any radar meet the image collection condition, the control device can control the camera corresponding to the corresponding radar to collect images through the camera application.
[0124] Still taking the first radar as an example, after determining that the second distance and the second relative speed collected by the first radar meet the image acquisition condition, the control device can control the camera corresponding to the first radar through the camera application to collect images. The duration of image acquisition is the first duration. For example, the first duration can be 10s or other durations, which is not limited in the embodiments of the present application.
[0125] Exemplarily, the control device can control the camera corresponding to the first radar to capture video images through a camera application, and start timing when the camera starts capturing video images. When the capture time reaches a first time length, the camera corresponding to the first radar is controlled to stop capturing video images.
[0126] Optionally, the control device may also continue to receive the distance and relative speed between the car and the target object collected by the first radar after the acquisition time of the video image collected by the camera corresponding to the first radar reaches the first time length. After receiving the third distance and the third relative speed between the car and the target object collected by the first radar at the fourth moment, the control device may refer to the aforementioned method to continue to determine whether the third distance and the fourth relative speed still meet the image acquisition condition. If the third distance and the fourth relative speed still meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the image acquisition time length is still the first time length. If the third distance and the fourth relative speed do not meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to stop image acquisition. The fourth moment may be the first radar data acquisition moment after the video image of the first time length is collected from the second moment.
[0127] In addition, while the control device controls the camera corresponding to the first radar to collect images through the camera application, it continues to receive the distance and relative speed between the car and the target object sent by the first radar, and counts the speed of the vehicle during the time period. After the camera corresponding to the first radar stops collecting images, each frame of video image collected by the camera corresponding to the first radar is stored in correspondence with the distance between the car and the target object, the relative speed, the speed of the vehicle, and the radar number of the first radar when the corresponding video image is collected.
[0128] Each frame of video image captured by the camera corresponding to the first radar may include a watermark, which may indicate the acquisition time of the frame of image. For example, the format of the watermark may be 2021 / 9 / 6 11:40:35.
[0129] Optionally, before storing the video images collected by the camera corresponding to the first radar, it can be determined whether the unused storage space on the control device is greater than the first storage threshold. If the unused storage space is not greater than the first storage threshold, the video image with the earliest storage time among the saved video images is deleted, and then the video images collected by the camera corresponding to the first radar are stored. If the unused storage space is greater than the first storage threshold, the video images collected by the camera corresponding to the first radar are directly stored.
[0130] When storing the first video image, the first video image may be named using a file naming method such as front_cam_20210906-11:40:35.mp4. This allows the user to quickly find the first video image when using the first video image in the future.
[0131] After determining that the camera corresponding to the first radar stops acquiring images, the control device can obtain the fourth distance and fifth relative speed between the car and the target object collected by each radar at the fifth moment; if the fourth distance and fifth relative speed collected by each radar at the fifth moment meet the shutdown condition of the camera application, the camera application is closed and the first memory space allocated for the camera application is released.
[0132] Exemplarily, the control device may use the distance between the car and the target object sent by each radar received at the fifth moment as the fourth distance corresponding to the corresponding radar, and use the relative speed between the car and the target object sent by each radar received at the fifth moment as the fifth relative speed. The fifth moment may be any moment after the fourth moment, or the fifth moment and the fourth moment may be the same moment. Afterwards, the fourth distance sent by each radar received is compared with the fourth distance threshold, the fifth relative speed sent by each radar received is compared with the fourth speed threshold, and the ratio of the fourth distance sent by each radar received to the corresponding fifth relative speed is compared with the fourth duration threshold. If the fourth distances sent by all radars received are not less than the fourth distance threshold, and the ratio between the fourth distances sent by all radars received and the corresponding fifth relative speed is not less than the fourth duration threshold, or the fifth relative speeds sent by all radars received are greater than the fourth speed threshold, it means that the fourth distance and the fifth relative speed meet the closing condition of the camera application. At this time, the camera application can be closed and the first memory space allocated for the camera application is released.
[0133] If the fourth distance received from any radar is less than the fourth distance threshold, or the ratio of the fourth distance received from any radar to the corresponding fifth relative speed is less than the fourth duration threshold, or the fifth relative speed received from any radar is not greater than the fourth speed threshold, it means that the fourth distance and the fifth relative speed do not meet the closing condition of the camera application. At this time, the camera application continues to be kept on.
[0134] Among them, the fourth distance threshold is greater than the first distance threshold, the fourth speed threshold is greater than the first speed threshold, and the fourth duration threshold is greater than the first duration threshold.
[0135] Exemplarily, the first distance threshold may be any value greater than the first distance threshold, for example, 40m. If the fourth distances sent by all radars received by the control device are not less than the fourth distance threshold, and the ratios between the fourth distances sent by all radars received and the corresponding fifth relative speeds are not less than the fourth duration threshold, or the fifth relative speeds sent by all radars received are greater than the fourth speed threshold, it means that the car and the target object have changed from a close state to a distant state, and a collision is no longer possible, so the camera application can be closed.
[0136] Optionally, after determining that the camera corresponding to the first radar stops collecting images, the control device may first detect the status of the cameras corresponding to the various radars. If it is detected that the cameras corresponding to all radars deployed on the vehicle are not collecting images, it is then determined whether the fourth distance and the fifth relative speed collected by the various radars at the fifth moment meet the closing condition of the camera application. If it is detected that the camera corresponding to any radar deployed on the vehicle is collecting video images, it means that the closing condition of the camera application is not met. At this time, it is not necessary to determine whether the fourth distance and the fifth relative speed collected by the various radars at the fifth moment meet the closing condition of the camera application.
[0137] In the embodiment of the present application, the control device first determines whether the start-up conditions of the camera application are met by the distance and relative speed between the target object and the car collected at the first moment, and starts the camera application if the start-up conditions of the camera application are met. After starting the camera application, it is determined whether there is a risk of collision between the car and the target object based on the distance and relative speed between the car and the target object collected at the second moment, and whether image acquisition is required. If image acquisition is required, the camera can be immediately controlled to perform image acquisition through the camera application that has been started at the first moment, thereby ensuring the timeliness of image acquisition.
[0138] Next, the video image acquisition device provided in the embodiment of the present application is introduced.
[0139] See also Figure 3 The embodiment of the present application provides a video image acquisition device 300, which is configured in a control device on a car, and a camera application is running on the control device. The device 300 includes:
[0140] A first acquisition module 301 is used to acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment;
[0141] A starting module 302, configured to allocate a first memory space to the camera application and run the camera application based on the first memory space if the first distance and the first relative speed meet a starting condition of the camera application;
[0142] A second acquisition module 303 is used to acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment;
[0143] The acquisition module 304 is used to control the camera of the car to acquire images through the camera application if the second distance and the second relative speed meet the image acquisition condition. The image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
[0144] Optionally, the startup conditions of the camera application include that the first distance is less than a first distance threshold, the first relative speed is not greater than a first speed threshold, and the ratio between the first distance and the first relative speed is less than a first duration threshold, and the first duration threshold is n times the startup duration of the camera application, and n is not less than 2.
[0145] Optionally, the startup module 302 is mainly used for:
[0146] If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, the second memory space is released from the allocated memory space based on the size of the memory space required by the camera application, the allocated memory space refers to the memory space allocated for each application currently running, the sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the space and the size of the first memory space is not less than a reference threshold.
[0147] Optionally, the device 300 further includes:
[0148] A third acquisition module, used to acquire a third relative speed between the vehicle and the target object collected at a third moment;
[0149] The initialization module is used to drive and initialize the camera application if the third relative speed is greater than a second speed threshold, and the second speed threshold is less than the first speed threshold.
[0150] Optionally, the image acquisition conditions include that the second distance is less than a second distance threshold, the second relative speed is not greater than a third speed threshold and the ratio of the second distance to the second relative speed is less than a second duration threshold, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold.
[0151] Optionally, at least one radar is configured on the left side, right side, front end and rear end of the car, each radar is used to detect the distance and relative speed between the car and a target object in the direction corresponding to the corresponding radar, each radar corresponds to a camera, and the acquisition module 304 is mainly used to:
[0152] If the second distance and the second relative speed collected by the first radar meet the image collection condition, the camera corresponding to the first radar is controlled by the camera application to collect the image, wherein the duration of the image collection is the first duration.
[0153] Optionally, the acquisition module 304 is further used for:
[0154] Acquire a third distance and a fourth relative speed between the vehicle and the target object collected by the first radar at a fourth moment;
[0155] If the third distance and the fourth relative speed do not meet the image acquisition condition, controlling the camera corresponding to the first radar to stop image acquisition through the camera application;
[0156] If the third distance and the fourth relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the duration of the image acquisition is the first duration.
[0157] Optionally, the acquisition module 304 is further used for:
[0158] Obtaining a fourth distance and a fifth relative speed between the vehicle and the target object collected by each radar at a fifth moment;
[0159] If the fourth distance and the fifth relative speed collected by each radar at the fifth moment both meet the closing condition of the camera application, the camera application is closed, and the first memory space allocated for the camera application is released.
[0160] In summary, in the embodiment of the present application, the control device first determines whether the start-up conditions of the camera application are met by the distance and relative speed between the target object and the car collected at the first moment, and starts the camera application if the start-up conditions of the camera application are met. After starting the camera application, it is determined whether there is a risk of collision between the car and the target object based on the distance and relative speed between the car and the target object collected at the second moment, and image acquisition is required. If image acquisition is required, the camera can be immediately controlled to acquire the image through the camera application that has been started at the first moment, thereby ensuring the timeliness of image acquisition.
[0161] It should be noted that the video image acquisition device provided in the above embodiment only uses the division of the above functional modules as an example when performing video image acquisition. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the video image acquisition device provided in the above embodiment and the video image acquisition method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0162] Figure 4 4 is a block diagram of a control device 400 according to an exemplary embodiment. The video image acquisition in the above embodiment can be realized by the control device 400. The control device 400 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a vehicle terminal, etc.
[0163] Typically, the control device 400 includes a processor 401 and a memory 402 .
[0164] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0165] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, wherein the at least one instruction is used to be executed by the processor 401 to implement the video image acquisition method provided in the method embodiment of the present application.
[0166] In some embodiments, the control device 400 may further optionally include: a peripheral device interface 403 and at least one peripheral device. The processor 401, the memory 402 and the peripheral device interface 403 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 403 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 404, a display screen 405, an audio circuit 407, and a power supply 409.
[0167] The peripheral device interface 403 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 401 and the memory 402. In some embodiments, the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402, and the peripheral device interface 403 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0168] The radio frequency circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 404 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 404 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 404 can communicate with other control devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 404 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0169] The display screen 405 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to collect touch signals on the surface or above the surface of the display screen 405. The touch signal can be input to the processor 401 as a control signal for processing. At this time, the display screen 405 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 405 can be one, and the front panel of the control device 400 is set; in other embodiments, the display screen 405 can be at least two, which are respectively set on different surfaces of the control device 400 or are folded; in some other embodiments, the display screen 405 can be a flexible display screen, which is set on the curved surface or folded surface of the control device 400. Even, the display screen 405 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 405 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode). It should be noted that, in the embodiment of the present application, when the control device 400 is a horizontal screen control device, the aspect ratio of the display screen of the control device 400 is greater than 1, for example, the aspect ratio of the display screen of the control device 400 may be 16:9 or 4:3. When the control device 400 is a vertical screen control device, the aspect ratio of the display screen of the control device 400 is less than 1, for example, the aspect ratio of the display screen of the control device 400 may be 9:18 or 3:4, etc.
[0170] The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 401 for processing, or input them into the radio frequency circuit 404 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the control device 400. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 407 may also include a headphone jack.
[0171] The power supply 409 is used to power the various components in the control device 400. The power supply 409 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 409 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0172] In some embodiments, the control device 400 further includes one or more sensors 410 , including but not limited to: an acceleration sensor 411 , a gyroscope sensor 412 , a pressure sensor 413 , a fingerprint sensor 414 , an optical sensor 415 , and a proximity sensor 416 .
[0173] The acceleration sensor 411 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the control device 400. For example, the acceleration sensor 411 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 401 can control the display screen 405 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 can also be used to collect game or user motion data.
[0174] The gyro sensor 412 can detect the body direction and rotation angle of the control device 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D action on the control device 400. The processor 401 can implement the following functions based on the data collected by the gyro sensor 412: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0175] The pressure sensor 413 can be set on the side frame of the control device 400 and / or the lower layer of the display screen 405. When the pressure sensor 413 is set on the side frame of the control device 400, it can detect the user's holding signal of the control device 400, and the processor 401 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is set on the lower layer of the display screen 405, the processor 401 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 405. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0176] The fingerprint sensor 414 is used to collect the user's fingerprint, and the processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 401 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 414 can be set on the front, back, or side of the control device 400. When a physical button or a manufacturer logo is set on the control device 400, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer logo.
[0177] The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 can control the display brightness of the display screen 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the display screen 405 is increased; when the ambient light intensity is low, the display brightness of the display screen 405 is decreased. In another embodiment, the processor 401 can also control the display brightness of the display screen 405 according to the ambient light intensity collected by the optical sensor 415.
[0178] The proximity sensor 416, also called a distance sensor, is usually disposed on the front panel of the control device 400. The proximity sensor 416 is used to collect the distance between the user and the front of the control device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the control device 400 is gradually decreasing, the processor 401 controls the display screen 405 to switch from the screen-on state to the screen-off state; when the proximity sensor 416 detects that the distance between the user and the front of the control device 400 is gradually increasing, the processor 401 controls the display screen 405 to switch from the screen-off state to the screen-on state.
[0179] That is, the embodiment of the present application not only provides a control device, including a processor and a memory for storing processor executable instructions, wherein the processor is configured to execute Figure 2 The video image acquisition method shown in the embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it can achieve Figure 2 The video image acquisition method shown.
[0180] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above Figure 2 The illustrated embodiment provides a method for capturing video images.
[0181] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0182] The above description is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
[0183] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
Claims
1. A video image acquisition method, characterized in that: In a control device applied to a car, a camera application is running on the control device, and the method includes: Acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment; If the first distance and the first relative speed meet a start condition of a camera application, allocating a first memory space to the camera application, and running the camera application based on the first memory space; Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment; If the second distance and the second relative speed meet the image acquisition condition, the camera of the car is controlled by the camera application to perform image acquisition, and the image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
2. The method according to claim 1, characterized in that: The startup conditions of the camera application include that the first distance is less than a first distance threshold, the first relative speed is not greater than a first speed threshold, and the ratio of the first distance to the first relative speed is less than a first duration threshold, the first duration threshold is n times the startup duration of the camera application, and n is not less than 2.
3. The method according to claim 1, characterized in that The allocating a first memory space for the camera application includes: If the size of the currently unallocated memory space is not larger than the size of the memory space required by the camera application, then based on the size of the memory space required by the camera application, a second memory space is released from the allocated memory space, the allocated memory space refers to the memory space allocated for each application currently running, the sum of the second memory space and the currently unallocated memory space is larger than the size of the first memory space, and the difference between the sum of the spaces and the size of the first memory space is not less than a reference threshold.
4. The method according to claim 2, characterized in that: Before acquiring the first distance and the first relative speed between the vehicle and the target object collected at the first moment, the method further includes: Acquire a third relative speed between the vehicle and the target object collected at a third moment; If the third relative speed is greater than a second speed threshold, the camera application is driven and initialized, and the second speed threshold is less than the first speed threshold.
5. The method according to claim 2, characterized in that: The image acquisition conditions include that the second distance is less than a second distance threshold, the second relative speed is not greater than a third speed threshold, and the ratio of the second distance to the second relative speed is less than a second duration threshold, the second distance threshold is not greater than the first distance threshold, the third speed threshold is not greater than the first speed threshold, and the second duration threshold is less than the first duration threshold.
6. The method according to any one of claims 1 to 5, characterized in that: The left side, right side, front end and rear end of the automobile are each equipped with at least one radar, each radar is used to detect the distance and relative speed between the automobile and a target object in a direction corresponding to the corresponding radar, each radar corresponds to a camera, and if the second distance and the second relative speed meet the image acquisition condition, the camera of the automobile is controlled by the camera application to acquire an image, including: If the second distance and the second relative speed collected by the first radar meet the image acquisition conditions, the camera corresponding to the first radar is controlled by the camera application to perform image acquisition, wherein the duration of the image acquisition is a first duration, and the first radar is any one of at least one radar configured on the left side, right side, front end and rear end of the car.
7. The method according to claim 6, characterized in that After the camera application is used to control the camera corresponding to the first radar to collect images, the method further includes: Acquire a third distance and a fourth relative speed between the vehicle and the target object collected by the first radar at a fourth moment; If the third distance and the fourth relative speed do not satisfy the image acquisition condition, controlling the camera corresponding to the first radar to stop image acquisition through the camera application; If the third distance and the fourth relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to continue image acquisition, wherein the duration of image acquisition is the first duration.
8. The method according to claim 6, characterized in that The method further comprises: Obtaining a fourth distance and a fifth relative speed between the vehicle and the target object collected by each radar at a fifth moment; If the fourth distance and the fifth relative speed collected by each radar at the fifth moment both meet the closing condition of the camera application, the camera application is closed, and the first memory space allocated to the camera application is released.
9. A car, characterized in that: The automobile includes a control device, a camera application is running on the control device, and the control device is used to: Acquire a first distance and a first relative speed between the vehicle and the target object collected at a first moment; If the first distance and the first relative speed meet a start condition of a camera application, allocating a first memory space to the camera application, and running the camera application based on the first memory space; Acquire a second distance and a second relative speed between the vehicle and the target object collected at a second moment, where the second moment is later than the first moment; If the second distance and the second relative speed meet the image acquisition condition, the camera of the car is controlled by the camera application to perform image acquisition, and the image acquisition condition refers to the condition that triggers image acquisition when there is a risk of collision between the car and the target object.
10. The automobile according to claim 9, characterized in that: The car further includes a plurality of radars and a plurality of cameras, wherein the plurality of radars are deployed around the car, and at least one radar is deployed on the left side, the right side, the front end, and the rear end of the car, and each radar corresponds to one of the plurality of cameras; The radar is used to collect the distance and relative speed between the car and the target object according to a preset period; The control device is used to obtain the distance and relative speed between the car and the object collected by each radar at each moment; If a first distance and a first relative speed between the vehicle and the target object collected by the first radar at the first moment meet a start condition of the camera application, a first memory space is allocated to the camera application, and the camera application is run based on the first memory space, wherein the first radar is any one of the multiple radars; Acquire a second distance and a second relative speed between the vehicle and the target object collected by the first radar at a second moment, where the second moment is later than the first moment; If the second distance and the second relative speed meet the image acquisition condition, the camera corresponding to the first radar is controlled by the camera application to perform image acquisition.
Citation Information
Patent Citations
Vehicle automatic following system and method based on multi-sensor fusion
CN110329259A
Panoramic image control method, device and equipment and storage medium
CN111775951A