Configuration Method, Device, Equipment and Medium for Multi-Channel Cameras Applied to Vehicles
By generating camera feature configuration files and channel information files, and automatically parsing id values and encoded camera information, the problems of cumbersome configuration of multiple cameras and difficulty in abnormal positioning are solved, and debugging efficiency is improved.
Patent Information
- Application Number
- CN202211585227.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-12-09
AI Technical Summary
In the prior art, the configuration of multiple cameras is complicated, and the ID value needs to be configured in advance, and the camera cannot be quickly positioned when abnormal, resulting in large commissioning and after-sales workloads.
Generate camera feature configuration files based on the current grouping of the camera, detect the number and position of the camera, analyze the id value through the camera channel information file, call the data flow encoding component for automatic configuration, and flexibly adjust the camera parameters.
It realizes flexible configuration of multi-channel cameras, reduces repeated modification work, quickly locates abnormal cameras, and improves debugging efficiency.
Smart Images

Figure CN116156150B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle-mounted cameras, and in particular to a configuration method, device, equipment and medium for a multi-channel camera applied to vehicles. Background Art
[0002] When configuring multi-channel cameras in vehicles, it is necessary to define in advance the number of cameras to be connected and the connection positions. Then, according to the number of cameras and connection positions defined in advance, set the corresponding ID values and pass them to the camera image sensor (camera sensor) driver for configuration operations, and create a fixed Lua file to encode the information of the cameras that need to be configured. In the existing configuration method, the ID values need to be configured in advance. Every time the number of cameras to be connected or the connection positions are changed, the ID values must be recalculated, and then the program needs to be modified to change the ID values, modify the camera configuration file and the camera feature configuration file (Lua file), and reconfigure the encoded camera information, which is cumbersome and inconvenient. In addition, in the existing configuration method, during the use of multi-channel cameras, when one camera has an abnormality, the ID values do not match the actual camera situation, and the Lua file does not match the actual camera situation, resulting in all cameras being unusable, and it is very difficult to determine which camera has an abnormality, greatly increasing the workload of the debugging process and subsequent after-sales service. Summary of the Invention
[0003] In view of this, this application provides a configuration method, device, equipment and medium for a multi-channel camera applied to vehicles, which solves the problems in the prior art, realizes the flexible configuration of multi-channel cameras, and improves the debugging efficiency of cameras.
[0004] A flexible configuration method for a multi-channel camera applied to vehicles provided by this application adopts the following technical solutions:
[0005] A configuration method for a multi-channel camera applied to vehicles includes:
[0006] According to different grouping situations of the multi-channel cameras in the vehicle, generate a camera feature configuration file for each grouping situation, and obtain a plurality of the camera feature configuration files, where the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation;
[0007] According to the current grouping situation of the multi-channel cameras, detect the number of cameras in each camera group and the position information of each camera, and form a camera channel information file;
[0008] Parse the ID values required for installing the driver according to the camera channel information file, and install the corresponding driver program for each camera according to the ID values;
[0009] Call the camera data stream encoding component according to the camera channel information file, and encode the information of each camera through the camera data stream encoding component;
[0010] According to the camera channel information file, determine the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras from several camera feature configuration files, and configure the relevant parameters of each camera according to the determined camera feature configuration file.
[0011] Optionally, detect the number of cameras in each camera group and the position information of each camera, and form a camera channel information file, including:
[0012] Generate the corresponding number of multi-channel camera detection programs according to the number of camera groups included in the current grouping situation of the multi-channel cameras. Detect the number of cameras in one camera group and the position of each camera through one multi-channel camera detection program, and output one camera channel information file.
[0013] Optionally, it further includes:
[0014] Stitch multiple camera channel information files into a camera channel information combined file.
[0015] Optionally, detecting the position of each camera in one camera group through one multi-channel camera detection program includes:
[0016] The camera detection program initializes the power-on of the image sensor of each camera, and obtains the camera channel information of each camera by checking the connection locking state of the deserializer connected to each camera. The camera detection program de-initializes the power-off of the image sensor of each camera.
[0017] Optionally, parsing out the id value required for installing the driver according to the camera channel information file includes:
[0018] Parse out the id value required for installing the driver from the camera channel information file through the id parsing component.
[0019] Optionally, according to the camera channel information file, determining the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras from several camera feature configuration files includes:
[0020] Generate a program for obtaining the camera feature configuration file. The program for obtaining the camera feature configuration file takes the camera channel information file as input and outputs the name of the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras;
[0021] Read the camera feature configuration file corresponding to the current grouping situation of the multi-channel camera according to the said name.
[0022] On the one hand, the present application also discloses a configuration device for a multi-channel camera applied to vehicles, adopting the following technical solutions:
[0023] A configuration device for a multi-channel camera applied to vehicles, comprising:
[0024] A configuration file generation module, configured to generate a camera feature configuration file for each grouping situation according to different grouping situations of the multi-channel camera in the vehicle, obtaining a plurality of the camera feature configuration files, wherein the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation;
[0025] A channel information file generation module, configured to detect the number of cameras in each camera group and the position information of each camera according to the current grouping situation of the multi-channel camera, and form a camera channel information file;
[0026] A driver installation module, configured to parse the id value required for installing the driver according to the camera channel information file, and install the corresponding driver program for each camera according to the id value;
[0027] A data stream encoding module, configured to call a camera data stream encoding component according to the camera channel information file, and encode the information of each camera through the camera data stream encoding component;
[0028] A parameter configuration module, configured to determine the camera feature configuration file corresponding to the current grouping situation of the multi-channel camera from a plurality of the camera feature configuration files according to the camera channel information file, and configure the relevant parameters of each camera according to the determined camera feature configuration file.
[0029] Optionally, the channel information file generation module is configured to generate a corresponding number of multi-channel camera detection programs according to the number of camera groups included in the current grouping situation of the multi-channel camera, detect the number of cameras in a camera group and the position of each camera through one of the multi-channel camera detection programs, and output one of the camera channel information files.
[0030] On the one hand, the present application also discloses a computer device, adopting the following technical solutions:
[0031] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned configuration method for a multi-channel camera applied to a vehicle.
[0032] On the one hand, the present application also discloses a computer-readable storage medium, adopting the following technical solution:
[0033] A computer-readable storage medium stores a computer program that executes the above-mentioned configuration method for a multi-channel camera applied to a vehicle.
[0034] In summary, the present application includes the following beneficial technical effects:
[0035] The id value is automatically obtained according to the actually detected camera situation without prior configuration.
[0036] Flexible configuration of the camera feature configuration file without the need to modify the camera feature configuration file again.
[0037] Automatically configure the camera information to be encoded according to the actually detected camera situation.
[0038] During the debugging stage, production stage, and after-sales stage, it can quickly locate whether the multi-channel camera is working properly. If there is an abnormality, it can be known which channel camera has an abnormality by observing the image, greatly improving the debugging efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is a flowchart of the configuration information of a 7-channel camera based on Ambarella cv2 in the prior art;
[0041] Figure 2 It is a flowchart of the configuration method for a multi-channel camera applied to a vehicle in the present application;
[0042] Figure 3 It is 17 lua files in the embodiments of the present application;
[0043] Figure 4 It is a structural block diagram of the configuration device for a multi-channel camera applied to a vehicle in the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0045] The following specific examples illustrate the implementation manners of the present application. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0046] It should be noted that the following describes various aspects of the embodiments within the scope of the appended claims. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is illustrative only. Based on the present application, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. Additionally, this device and / or this method can be implemented using other structures and / or functions in addition to one or more of the aspects described herein.
[0047] It should also be noted that the drawings provided in the following embodiments only schematically illustrate the basic concept of the present application. The drawings only show the components related to the present application and are not drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and proportion of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0048] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0049] The embodiments of the present application provide a flexible configuration method for multiple cameras applied to vehicles.
[0050] As Figure 1 and Figure 2 shown, a flexible configuration method for multiple cameras applied to vehicles includes the following steps:
[0051] According to different grouping situations of multiple in-vehicle cameras, a camera feature configuration file is generated for each grouping situation, and several camera feature configuration files are obtained. Among them, the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation.
[0052] According to the current grouping situation of multiple cameras, detect the number of cameras in each camera group and the position information of each camera, and form a camera channel information file.
[0053] Parse out the id value required for installing the driver according to the camera channel information file, and install the corresponding driver program for each camera according to the id value.
[0054] Call the camera data stream encoding component according to the camera channel information file, and encode the information of each camera through the camera data stream encoding component; among them, when the camera data stream encoding component encodes, it needs to know some feature information of the camera, so the special diagnosis information of each camera is parsed out through the valid camera channel information file (valid_chan) for camera data stream encoding, and the special diagnosis information is, for example, the resolution of the camera.
[0055] According to the camera channel information file, determine the camera feature configuration file corresponding to the current grouping situation of multiple cameras from several camera feature configuration files, and configure the relevant parameters of each camera according to the determined camera feature configuration file.
[0056] This application is based on Ambarella cv2, and a set of programs can be compatible with multiple combinations of multiple cameras on the program, which improves the software flexibility. During the debugging stage, production stage, and after-sales stage, it can quickly locate whether multiple cameras are working properly. If there is an abnormality, it can be known which channel camera has an abnormality by observing the image, which greatly improves the debugging efficiency.
[0057] Especially in the after-sales stage, due to the particularity of the vehicle-mounted industry, it is difficult to remove and detect abnormal vehicle-mounted cameras after mass production. As Figure 1 shown, taking 7-channel cameras as an example, the 7-channel cameras are divided into three groups. The data of the 7-channel cameras passes through the corresponding serializer (ser0-7). The 7 serializers are divided into three groups and respectively correspond to three deserializers (der0-3). The data of the three deserializers goes into the Ambarella cv2 system. The current Ambarella solution is that if one channel camera has an abnormality, all 7-channel cameras are abnormal. If there is a camera abnormality, it is necessary to remove the 7-channel cameras on the vehicle, and the workload is quite large. After adopting the flexible camera configuration method of this solution, it can accurately locate which channels and which positions of the cameras have abnormalities, and can accurately replace the abnormal cameras, which greatly improves the work efficiency.
[0058] AsFigure 3 As shown, in one embodiment, taking 7-channel cameras and two types of cameras as an example, a camera feature configuration file (Lua file) for each possible multi-channel camera situation enumerated is created, with a total of 17 Lua files.
[0059] In one embodiment, according to the number of camera groups included in the current grouping situation of the multi-channel cameras, the corresponding number of multi-channel camera detection programs des0-detect.sh, des1-detect.sh, des2-detect.sh,... are generated. One multi-channel camera detection program is used to detect the number of cameras and the position of each camera in a camera group, and a camera channel information file (valid_chanx) is output. The camera channel information file contains camera information (number and position); several multi-channel camera detection programs output multiple valid camera channel information files, such as: valid_chan0, valid_chan1, valid_chan2,....
[0060] To detect the position of each camera in a camera group through one multi-channel camera detection program, it includes: the camera detection program initializes the power supply of each camera's image sensor, and obtains the camera channel information of each camera by checking the connection lock status (linklock status) of the deserializer (des) connected to each camera. The camera detection program de-initializes the power supply of each camera's image sensor.
[0061] In one embodiment, multiple camera channel information files are spliced into a combined camera channel information file. A master control program is made to call the valid_chan splicing component to splice valid_chan0, valid_chan1, valid_chan2 into a valid combined camera channel information file. The id value required for installing the driver is parsed from the valid combined camera channel information file, and the corresponding driver program is installed for each camera according to the id value; the camera data stream encoding component is called according to the data in the valid combined camera channel information file, and the information of each camera is encoded through the camera data stream encoding component; according to the combined camera channel information file, the camera feature configuration file corresponding to the current grouping situation of the multiple cameras is determined from several camera feature configuration files, and the relevant parameters of each camera are configured according to the determined camera feature configuration file. Merging multiple camera channel information files into one file reduces the number of inputs in the subsequent usage process, reduces the input volume of the process of parsing the id value required for installing the driver, the process of calling the camera data stream encoding component to automatically configure the camera information to be encoded and perform encoding, and the process of obtaining the correct camera feature configuration file name, and improves the operation speed.
[0062] In one embodiment, parsing the id value required for installing the driver from the camera channel information file includes: parsing the id value required for installing the driver from the camera channel information file through the id parsing component, and then the camera image sensor driver installation component installs the corresponding driver program.
[0063] In one embodiment, determining the camera feature configuration file corresponding to the current grouping situation of the multiple cameras from several camera feature configuration files according to the camera channel information file includes: generating a program (getluaname.sh) for obtaining the camera feature configuration file. The program for obtaining the camera feature configuration file takes the camera channel information file (valid_chan) as input and outputs the name (lua_file_name) of the camera feature configuration file corresponding to the current grouping situation of the multiple cameras; the camera feature configuration file corresponding to the current grouping situation of the multiple cameras is read according to the name.
[0064] Specifically, the total control program uses the valid camera channel information file (valid_chan) as a parameter to call getluaname.sh to obtain the correct lua file name, and then calls the lua file configuration component to obtain the correct lua file and configure this lua file. getluaname.sh matches the correct lua file through the valid camera channel information file (valid_chan) for the lua file configuration component to perform correct camera configuration.
[0065] In this embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned arbitrary data storage method is implemented.
[0066] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.
[0067] In this embodiment, a computer-readable storage medium is provided, and the computer-readable storage medium stores a computer program for executing the above-mentioned arbitrary data storage method.
[0068] Specifically, the computer-readable storage medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media do not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0069] Based on the same inventive concept, an embodiment of the present invention further provides a configuration device for a multi-channel camera applied to a vehicle. As in the following embodiments. Since the principle of the configuration device for a multi-channel camera applied to a vehicle to solve problems is similar to that of the configuration method for a multi-channel camera applied to a vehicle, the implementation of the configuration device for a multi-channel camera applied to a vehicle can refer to the implementation of the configuration method for a multi-channel camera applied to a vehicle, and the repeated parts will not be described again. As used hereinafter, the term "unit" or "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0070] Figure 4 It is a structural block diagram of a configuration device for a multi-channel camera applied to a vehicle according to an embodiment of the present invention.
[0071] As Figure 4 shown, a configuration device for a multi-channel camera applied to a vehicle includes: a configuration file generation module, a channel information file generation module, a driver installation module, a data stream encoding module, and a parameter configuration module.
[0072] The configuration file generation module is used to generate a camera feature configuration file for each grouping situation according to different grouping situations of the multi-channel cameras in the vehicle, and obtain a plurality of camera feature configuration files, where the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation.
[0073] The channel information file generation module is used to detect the number of cameras in each camera group and the position information of each camera according to the current grouping situation of the multi-channel cameras, and form a camera channel information file; the channel information file generation module is used to generate a corresponding number of multi-channel camera detection programs according to the number of camera groups included in the current grouping situation of the multi-channel cameras, detect the number of cameras in a camera group and the position of each camera through one multi-channel camera detection program, and output a camera channel information file. A plurality of camera channel information files are combined into a camera channel combination file through a splicing component. In this embodiment, three camera groups are taken as an example.
[0074] The driver installation module is used to parse the id value required for installing the driver according to the camera channel information file, and install the corresponding driver program for each camera according to the id value. Specifically, the driver installation module includes an id parsing component and a driver installation component. The id parsing component is used to parse the id value required for installing the driver according to the camera channel information file, and the driver installation component installs the corresponding driver program for each camera according to the id value.
[0075] The data stream encoding module is used to call the camera data stream encoding component according to the camera channel information file, and encode the information of each camera through the camera data stream encoding component.
[0076] The parameter configuration module is used to determine the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras from several camera feature configuration files according to the camera channel information file, and configure the relevant parameters of each camera according to the determined camera feature configuration file.
[0077] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A configuration method for a multi-channel camera applied to a vehicle, characterized in that, Including: According to different grouping situations of on-vehicle multi-channel cameras, a camera feature configuration file is generated for each grouping situation, and a number of the camera feature configuration files are obtained, where the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation; According to the current grouping situation of the multi-channel cameras, the number of cameras in each camera group and the position information of each camera are detected to form a camera channel information file; The id value required for installing the driver is parsed from the camera channel information file, and the corresponding driver program is installed for each camera according to the id value; The camera data stream encoding component is called according to the camera channel information file, and the information of each camera is encoded by the camera data stream encoding component; According to the camera channel information file, the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras is determined from a number of the camera feature configuration files, and the relevant parameters of each camera are configured according to the determined camera feature configuration file.
2. The configuration method of the multi-channel camera applied to vehicles according to claim 1, wherein, Detecting the number of cameras in each camera group and the position information of each camera to form a camera channel information file includes: According to the number of camera groups included in the current grouping situation of the multi-channel cameras, a corresponding number of multi-channel camera detection programs are generated, and the number of cameras in a camera group and the position of each camera are detected by one of the multi-channel camera detection programs, and one camera channel information file is output.
3. The configuration method of the multi-channel camera applied to vehicles according to claim 2, wherein Also including: A plurality of the camera channel information files are spliced into a camera channel information combined file.
4. The configuration method of the multi-channel camera applied to a vehicle according to claim 2, wherein, Detecting the position of each camera in a camera group by one of the multi-channel camera detection programs includes: The camera detection program initializes the power supply of the image sensor of each camera, and obtains the camera channel information of each camera by checking the connection locking state of the deserializer connected to each camera, and the camera detection program de-initializes the power supply of the image sensor of each camera.
5. The configuration method of the multi-channel camera applied to vehicles according to any one of claims 1 to 4, characterized in that Parsing the id value required for installing the driver from the camera channel information file includes: The id value required for installing the driver is parsed from the camera channel information file by an id parsing component.
6. The configuration method of the multi-channel camera applied to vehicles according to any one of claims 1 to 4, characterized in that, Determining the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras from a number of the camera feature configuration files according to the camera channel information file includes: A program for obtaining the camera feature configuration file is generated, and the program for obtaining the camera feature configuration file takes the camera channel information file as an input and outputs the name of the camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras; The camera feature configuration file corresponding to the current grouping situation of the multi-channel cameras is read according to the name.
7. An configuration device for a multi-channel camera applied to a vehicle, characterized in that, Including: A configuration file generation module, which is used to generate a camera feature configuration file corresponding to each grouping situation according to different grouping situations of multiple on-vehicle cameras, and obtain a plurality of the camera feature configuration files, wherein the camera feature configuration file includes relevant configuration parameters for configuring each camera in the corresponding grouping situation; A channel information file generation module, which is used to detect the number of cameras in each camera group and the position information of each camera according to the current grouping situation of the multiple cameras, and form a camera channel information file; A driver installation module, which is used to parse the id value required for installing the driver according to the camera channel information file, and install the corresponding driver program for each camera according to the id value; A data stream encoding module, which is used to call a camera data stream encoding component according to the camera channel information file, and encode the information of each camera through the camera data stream encoding component; A parameter configuration module, which is used to determine the camera feature configuration file corresponding to the current grouping situation of the multiple cameras from a plurality of the camera feature configuration files according to the camera channel information file, and configure the relevant parameters of each camera according to the determined camera feature configuration file.
8. The configuration device for a multi-channel camera applied to a vehicle according to claim 7, characterized in that The channel information file generation module is used to generate a corresponding number of multiple camera detection programs according to the number of camera groups included in the current grouping situation of the multiple cameras, detect the number of cameras in a camera group and the position of each camera through one of the multiple camera detection programs, and output one of the camera channel information files.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the configuration method for multiple on-vehicle cameras according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program for executing the configuration method for multiple on-vehicle cameras according to any one of claims 1 to 6.
Citation Information
Patent Citations
Camera multi-drive dynamic configuration method, loading method and related device
CN113286090A
Configuration parameter sending and receiving method and device
WO2014169582A1