Camera calling method, camera switching system and in-vehicle infotainment device
By obtaining the standard detection attributes and parameter information when the upper-level application calls the camera, the problem of the non-replaceable vehicle-mounted camera is solved, and the flexible use of the camera and efficient use of resources are achieved.
Patent Information
- Application Number
- CN202110250776.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-08
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2041-03-08
AI Technical Summary
In the prior art, the vehicle-mounted camera cannot be replaced, and the vehicle-mounted resources cannot be fully utilized, resulting in inconvenience in use.
By obtaining the camera's standard detection properties, acquiring parameter information and initializing resources when the upper-layer application calls the camera, the camera's replaceability is achieved.
The camera is replaceable, the camera's flexibility and resource utilization efficiency are improved, and unnecessary format detection time is reduced.
Smart Images

Figure CN115052099B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle electronics, in particular to a camera calling method, a camera switching system and an in-vehicle infotainment device. BACKGROUND
[0002] At present, with the rapid development of unmanned driving and assisted driving technology and the provision of more comfortable and convenient driving experience by the in-vehicle infotainment system, the demand for vehicle-mounted cameras is also higher, not only in quantity, but also in the degree of convenience of use.
[0003] Generally, for vehicle-mounted related camera application products, such as reversing image or dashcam, the terminal device and the camera are connected together, the camera cannot be replaced, and the existing resources of the vehicle cannot be fully utilized. SUMMARY
[0004] The technical problem solved by the present application is to provide a camera calling method, a camera switching system and an in-vehicle infotainment device, which can be applied to the scenario where the camera can be replaced.
[0005] In order to solve the above problems, the first aspect of the present application provides a camera calling method, which comprises: when an upper application calls the camera, obtaining the type detection attribute of the camera; based on the type detection attribute of the camera, obtaining the parameter information of the camera, and feeding back the obtained parameter information of the camera to the upper application; after the upper application obtains the parameter information of the camera, initializing the resources of the camera to realize the calling of the camera by the upper application.
[0006] In order to solve the above problems, the second aspect of the present application provides a camera switching system, which comprises a system platform, a camera interface, a memory and a processor which are coupled to each other; the camera interface is used to connect the camera; the upper application running in the system platform is used to call the camera; the processor is used to execute the program data stored in the memory to realize the camera calling method of the first aspect.
[0007] In order to solve the above problems, the third aspect of the present application provides an in-vehicle infotainment device comprising the camera switching system of the second aspect.
[0008] The beneficial effects of the present application are: different from the prior art, when the upper application calls the camera, the application first obtains the system detection attribute of the camera, based on the system detection attribute of the camera, obtains the parameter information of the camera in the camera configuration file, and feeds back the obtained parameter information of the camera to the upper application, after the upper application obtains the parameter information of the camera, the camera is initialized to realize the calling of the camera by the upper application. Because through the pre-set camera configuration file, when the upper application obtains and calls the camera each time, the acquisition mode of the parameter information of the camera can be determined according to the system detection attribute of the camera, so that the upper application can obtain the parameter information of the camera, and then the camera can be normally initialized, which can be applied to the replaceable camera scene. BRIEF DESCRIPTION OF DRAWINGS
[0009] Figure 1 is a flowchart of the first embodiment of the camera calling method of the present application;
[0010] Figure 2 is a flowchart of an application scenario of the camera calling method of the present application;
[0011] Figure 3 is a flowchart of the second embodiment of the camera calling method of the present application;
[0012] Figure 4 is a structural diagram of the main module of the camera of the present application;
[0013] Figure 5 is Figure 4 the schematic diagram of the camera bottom module reading the camera configuration file in
[0014] Figure 6 is a flowchart of the camera bottom module initialization when the system platform starts;
[0015] Figure 7 is a flowchart of obtaining the parameter information of the camera when the upper application calls the camera;
[0016] Figure 8 is a flowchart of the third embodiment of the camera calling method of the present application;
[0017] Figure 9 is a framework diagram of an embodiment of the terminal system of the present application;
[0018] Figure 10 is a framework diagram of an embodiment of the car machine equipment of the present application. DETAILED DESCRIPTION
[0019] The scheme of the embodiment of the present application will be described in detail in combination with the drawings of the specification.
[0020] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, interfaces, techniques, to provide a thorough understanding of the present application.
[0021] The terms "system" and "network" are often used interchangeably herein. The term "and / or", when used herein, merely means that there are three cases, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " herein generally means that the front and rear associated objects are in an "or" relationship. In addition, "multiple" herein means two or more than two.
[0022] Please refer to Figure 1 , Figure 1 is a flowchart of the first embodiment of the calling method of the camera of the present application. Specifically, it can include the following steps:
[0023] Step S11: When the camera is called by the upper layer application, the system detection attribute of the camera is obtained.
[0024] It can be understood that when the upper layer application needs to open the camera, the parameter information of the camera needs to be obtained first to perform the resource initialization operation. However, in the scenario where the camera can be replaced, the parameter information of the camera can change due to the replacement of the camera. Therefore, when the camera is called by the upper layer application, the system detection attribute of the camera needs to be obtained first to determine whether the system of the current camera needs to be detected first.
[0025] In an embodiment, when the camera is called by the upper layer application, the system detection attribute of the camera can be searched from the pre-set camera configuration file. The camera configuration file of the present application is used to describe the parameter information of the camera, which can include the system detection attribute of the camera, the output resolution, the output format, the output frame rate, the rotation angle, the orientation, and the camera state, and the like. It can be understood that in different implementation scenarios, the camera configuration file can describe the parameter information of the camera in different ways, for example, the parameter information of the camera can be stored in an XML file or a text file, a system attribute, a database, or a certain block of a system solid memory. Therefore, in the scenario where the camera can be replaced, the parameter information of the camera in the pre-set camera configuration file can change due to the replacement of the camera. Therefore, when the camera is called by the upper layer application, the system detection attribute of the camera needs to be searched from the pre-set camera configuration file first to determine whether the system of the current camera needs to be detected first.
[0026] For the replaceable camera scenario, the system mode detection flag in the camera configuration file is set, so that the system mode detection of the camera is automatically performed each time the camera is opened to ensure that the real camera parameter information can be obtained and the camera can operate normally. Although this way can ensure that the camera can operate normally after the camera is replaced, the system mode detection of the camera is needed each time the camera is opened, and if the camera is only occasionally replaced, the system mode detection in most cases is actually redundant. Therefore, in another embodiment, for the replaceable camera scenario, the system mode detection flag in the camera configuration file is not set, and a system mode detection interface is preset, and after the camera is replaced, the system mode detection attribute of the camera is obtained by actively calling the system mode detection interface by the user, so as to determine whether the system mode detection of the camera is needed. In this way, unnecessary system mode detection time can be saved.
[0027] Step S12: based on the system mode detection attribute of the camera, obtaining the parameter information of the camera, and feeding back the obtained parameter information of the camera to the upper application.
[0028] According to the system mode detection attribute of the camera, it can be determined whether the system mode detection of the camera is needed, and then the parameter information of the camera can be obtained, so that the parameter information of the camera can be fed back to the upper application.
[0029] Specifically, in an embodiment, the above step S12 can include: when the system mode detection attribute of the camera is a first attribute, querying the current parameter information of the camera, feeding back the current parameter information of the camera to the upper application and updating to the camera configuration file; when the system mode detection attribute of the camera is a second attribute, obtaining the parameter information of the camera from the camera configuration file and feeding back to the upper application. It can be understood that in the camera configuration file, each camera has its corresponding system mode detection attribute, and different logical operations can be performed according to the attribute values of the system mode detection attribute; when the system mode detection attribute of the camera is a first attribute, for example, the first attribute can be true or detection, at this time, it means that there may be a situation of replacing the camera, and the system mode detection of the camera is needed, so that the current parameter information of the camera can be further queried, and the current parameter information of the camera can be fed back to the upper application and updated to the camera configuration file; when the system mode detection attribute of the camera is a second attribute, for example, the first attribute can be false or no detection, at this time, it means that there is no situation of replacing the camera or replacing the camera of different system modes, so that the parameter information of the camera can be directly obtained from the preset camera configuration file and fed back to the upper application.
[0030] It can be understood that the change of the camera state does not need to be monitored in real time during the running of the system platform, but when the upper application needs to open the camera, the process of detecting the camera state is triggered to detect whether the camera is inserted. Compared with monitoring the camera state in real time, power consumption can be reduced by this way. The insertion of the camera is divided into the insertion of the original model camera and the insertion of different models of cameras, and the camera interface is divided into supporting the insertion of different models of cameras and not supporting the insertion of different models of cameras. It can be understood that if the system platform supports the insertion of different models of cameras, then when a camera is inserted, model detection is needed. If the system platform does not support the insertion of different models of cameras, then by default, model detection is not needed, because in the case that the system platform does not support the insertion of different models of cameras, only the same model of camera is allowed to be inserted. For example, when the external camera is replaced at the same interface, or the call of the camera by the upper application jumps from the front camera to the rear camera, the camera enabling process is executed. First, whether model detection is needed is judged according to the related flag bit written in the camera configuration file by the developer according to the actual situation. If the system platform supports different models of cameras, the flag bit needs to be set here, so that model detection needs to be performed once every time the upper application opens the camera, and the parameter information of the camera queried is updated to the camera configuration file and fed back to the upper application. If the system platform does not support different models of cameras, the flag bit does not need to be set, so that every time the upper application opens the camera, only the default parameters in the camera configuration file need to be fed back to the upper application. Then, the camera can transmit the collected image data frame to the upper application, that is, the call of the camera by the upper application is successful.
[0031] Step S13: After the upper application obtains the parameter information of the camera, resource initialization is performed on the camera to realize the call of the camera by the upper application.
[0032] After the upper application obtains the parameter information of the camera, resource preview, recording, configuration and other related resource initialization operations can be performed, and then the call of the camera by the upper application can be realized.
[0033] In an application scenario, when an upper application needs to open a certain camera, the upper application acquires information of the camera, judges whether the camera needs to be detected in the system, if not, directly reads parameter information of the camera in a camera configuration file, and feeds back the parameter information of the camera to the upper application, if yes, performs the system detection, acquires parameter information of the current camera, such as camera output width and height, frame rate, etc., then updates the detected parameter information of the current camera to the camera configuration file, and feeds back the parameter information of the camera to the upper application. After feeding back the parameter information of the camera to the upper application, the upper application can open the camera and configure related resources of the camera, such as recording, photographing, etc.
[0034] The above scheme can determine the acquisition mode of the parameter information of the camera according to the system detection attribute of the camera by acquiring the system detection attribute of the camera each time the upper application acquires and calls the camera, so that the upper application can acquire the parameter information of the camera, and then can normally initialize the resources of the camera. In the process of running the system platform, the pre-set camera configuration file can be updated according to the state of the camera, and can be suitable for the scenario where the camera can be replaced.
[0035] Referring to Figure 2 , Figure 2 is a flowchart of the first application scenario of the calling method of the camera of the present application. In an application scenario, when an upper application needs to open a certain camera, the upper application acquires information of the camera, judges whether the camera needs to be detected in the system, if not, directly reads parameter information of the camera in a camera configuration file, and feeds back the parameter information of the camera to the upper application, if yes, performs the system detection, acquires parameter information of the current camera, such as camera output width and height, frame rate, etc., then updates the detected parameter information of the current camera to the camera configuration file, and feeds back the parameter information of the camera to the upper application. After feeding back the parameter information of the camera to the upper application, the upper application can open the camera and configure related resources of the camera, such as recording, photographing, etc.
[0036] Referring to Figure 3 , Figure 3 is a flowchart of the second embodiment of the calling method of the camera of the present application. Specifically, it can include the following steps:
[0037] Step S31: When the system platform is started, read available attributes of all cameras from the camera configuration file.
[0038] It can be understood that when the system platform starts, the parameter information of the camera needs to be acquired to perform the related software initialization operation. In the existing scheme, the system platform does not feed back any information of a camera when the camera is not detected, that is, the system platform does not feel the existence of the camera. Since the software initialization process of the system platform for the camera depends on whether the camera exists, the system platform cannot perform the related software initialization operation for the camera. In an embodiment, by establishing a camera configuration file, the related information of the camera is stored in the camera configuration file in advance, so that even if the camera is not inserted, the available attributes of all cameras can be read from the camera configuration file; in another embodiment, for the scene of replaceable cameras, a property detection interface can be preset, and when the system platform starts, the available attributes of all cameras are acquired by the user actively calling the property detection interface; and according to the available attributes, it is determined which cameras are available, so that the information of the corresponding camera can be acquired, and then the related software initialization operation can be performed on the camera.
[0039] Step S32: Based on the available attributes of each camera, the number and parameter information of the cameras are reported to the system platform.
[0040] According to the available attributes of each camera, the number of available cameras can be determined, and then the parameter information of each camera can be obtained, so that the number and parameter information of the cameras can be reported to the system platform, and then the related software initialization operation can be performed on the camera.
[0041] Specifically, in an embodiment, the above step S32 can include: retaining the parameter information of each camera with a true available attribute in the camera configuration file, and reporting the number of all cameras with a true available attribute and the parameter information of each camera with a true available attribute to the system platform. It can be understood that in the camera configuration file, each camera has its corresponding available attribute, and different logical operations can be performed according to different attribute values of the available attribute; when the available attribute is false (false), it means that the camera is not available, and the system platform will not perform the related software initialization operation on the unavailable camera; when the available attribute of the camera is true (true), it means that the camera is available, and at this time, the number of all cameras with a true available attribute and the parameter information of each camera with a true available attribute need to be reported to the system platform, that is, the system platform performs the related software initialization operation on the camera during the startup process, which is mainly used to determine which cameras are available and the parameter information of the corresponding camera.
[0042] Step S33: When the camera is called by an upper layer application, the system platform obtains the system type detection attribute of the camera.
[0043] Step S34: based on the mode detection attribute of the camera, obtaining the parameter information of the camera, and feeding back the obtained parameter information of the camera to the upper-layer application.
[0044] Step S35: after the upper-layer application obtains the parameter information of the camera, performing resource initialization on the camera to realize the calling of the camera by the upper-layer application.
[0045] In this embodiment, steps S33-S35 are basically similar to steps S11-S13 in the above-mentioned embodiments of the application, and will not be described here again.
[0046] In an application scenario, when the system platform starts, the camera service starts and reads the camera configuration file. Specifically, the camera service retains the parameter information of each camera with available attributes as true in the camera configuration file, and reports the number of all cameras with available attributes as true and the parameter information of each camera with available attributes as true to the system platform. Thus, the system platform can obtain the number of cameras and the corresponding parameter information through the camera service, and then the system platform can perform relevant software initialization operation on the camera.
[0047] In this application, when the system platform starts, the camera can be subjected to relevant software initialization operation according to the relevant information read from the camera configuration file. By establishing the camera configuration file and storing the camera related information in the camera configuration file in advance, even if the camera is not inserted, the software initialization operation can be performed through the content of the camera configuration file. Moreover, during the platform running process, the camera configuration file can be updated according to the camera state to adapt to the replacement of the external camera.
[0048] In another embodiment, the initialization operation in the system platform startup stage mentioned above can also be performed in the stage of calling the camera by the upper-layer application. For example, in the system platform startup stage, the available attributes of all cameras are not obtained through reading the camera configuration file or the attribute detection interface, and the camera described in the camera configuration file is not subjected to relevant software initialization operation. Instead, in the stage of calling the camera by the upper-layer application, the system platform reads the parameter information of the camera from the camera configuration file or through the attribute detection interface when obtaining the parameter information of the camera, and performs initialization operation, so as to save the boot time of the system platform.
[0049] Please refer to Figure 4 and Figure 5 , wherein, Figure 4 is a structural schematic diagram of the main module of the camera in this application, Figure 5 is Figure 4 a schematic diagram of reading the camera configuration file by the camera bottom module in Figure 4As shown, the system platform runs the camera mainly has the following parts: Camera APP (camera application), Camera Framework (camera framework layer), CameraNative Module (camera bottom module), specifically, from Camera APP to Camera Native Module can be issued in turn control flow, and from Camera Native Module to Camera APP can be returned in turn data stream and signal information state. When the system platform starts, Camera Native Module reads Camera Configure file (camera configuration file), describes the parameter information of each camera, and if the available attribute of the camera is true (true), the parameter information of the camera will be saved, and when the Camera Framework obtains the number of cameras and the camera parameter information, the camera can be reported to the system platform.
[0050] Please combine Figure 4 to Figure 6 , wherein, Figure 6 is a flowchart of the initialization process of the camera bottom module when the system platform starts. In an application scenario, during the process of starting the system platform, the process of initializing Camera Native Module is needed, in this process, as shown in Figure 5 , Camera Native Module reads Camera Configure file and performs related configuration. Specifically, Camera Native Module can read all camera information in Camera Configure file, then check the information of each camera, judge whether the camera is available; if it is available, the parameter information of the camera can be retained in the camera configuration file, and the camera is initialized; if it is not available, further judge whether the camera is the last camera, if not, repeat the information checking of the next camera, if yes, the process of initializing Camera Native Module ends.
[0051] Please combine Figure 7 , Figure 7is a flowchart of a process of acquiring parameter information of a camera when an upper application calls the camera. In an application scenario, when an upper application opens a camera during the running of a system platform, in the case where the camera exists, the parameter information of the camera needs to be acquired first to perform preview, video recording, configuration and other related initialization operations. Specifically, the upper application needs to acquire the parameter information of the camera, first looks up the flag bit of the system detection attribute of the camera from the camera configuration file, judges whether the system detection attribute of the camera is true (true); if not, no system detection is needed, and the preset parameter information of the camera in the camera configuration file is directly fed back to the upper application, at this time, it indicates that the system platform supports the fixed system camera, or the system platform is physically connected with the camera and does not support the replacement of the camera, in this case, the manufacturer has determined the camera model used before shipment, and the configuration parameters are written into the camera configuration file, so that when the camera is initialized, the system detection can be skipped, and the parameters in the camera configuration file are directly used to initialize the camera, which can save time; if yes, it indicates that the system platform supports different system cameras, and the replacement of the camera may exist when used, the user can replace the camera of different system according to his own preference and the current environment, for example, high-definition or ultra-high-definition camera, low-speed or fast camera, so the system detection is needed, and therefore the related parameter information of the camera needs to be queried from the current camera sensor. Then, it is further judged whether the related parameter information of the camera queried from the current camera sensor is valid; if not, the system detection error of the camera is notified, which may be caused by the camera of the current model not being supported, so the preset parameter information of the camera in the camera configuration file can be directly fed back to the upper application; if yes, the related parameter information of the camera queried from the current camera sensor is updated to the camera configuration file, and the updated camera parameter information in the camera configuration file is fed back to the upper application.
[0052] Please refer to Figure 8 , Figure 8 is a flowchart of the third embodiment of the camera calling method of the present application. Specifically, on the basis of the first embodiment or the second embodiment, the camera calling method can further include the following steps:
[0053] Step S81: In the use process of the camera, the signal state of the camera is detected in real time.
[0054] Step S82: When it is detected that the signal state of the camera is lost, a signal loss message is fed back to the upper application, and a replacement data frame is filled in the video data stream.
[0055] Step S83: When the signal state of the camera is detected to be recovered, a signal recovery message is fed back to the upper layer application, and the actual data frame acquired by the camera is recovered to fill in the video data stream.
[0056] It can be understood that the signal state of the camera is detected during the use of the camera. If the camera is unplugged or the contact is poor, resulting in no signal, the camera bottom layer module feeds back a signal loss message to the application, and fills in a replacement data frame in the video data stream to ensure the normal operation of the data path, for example, filling in a black data frame. When the camera is plugged in, the signal recovery message is fed back to the application, and the actual data frame acquired by the camera is recovered to fill in the video data stream. In the above manner, the current video signal real state can be supported to be acquired by the application, and the camera hot plug operation can be supported. Since the data path is always running, the upper layer application is actually transparent to the data running of the bottom layer module, so the use of the upper layer application is not affected.
[0057] It can be understood that if the signal loss or signal recovery is found, the upper layer is notified. When the signal is lost, the Camera Native Module feeds back a signal loss message to the upper layer, and fills in a black screen image in the data stream, so that the data stream from the upper layer to the bottom layer is always running. When the bottom layer module detects signal recovery, the Camera Native Module feeds back a signal recovery message to the upper layer, and replaces the signal loss image with an actual image, so as to maintain transparency to the upper layer. The application does not need to do additional processing, and can make relevant reminders according to the signal state returned by the Camera Native Module. Therefore, the calling method of the camera provided in the application can be applied to a vehicle-mounted camera or other use scenarios of replaceable cameras or pluggable cameras.
[0058] As an implementable manner, in actual application, the software initialization operation in the platform startup stage can also be placed in the software initialization operation in the camera application startup stage in the platform running process, for example, the camera configuration file is not read in the platform startup stage, and the camera described in the camera configuration file is not initialized. When the camera information is actually used, the system platform reads the camera information described in the camera configuration file and performs initialization. In this way, the boot time can be saved.
[0059] In the above solution, for scenarios where cameras can be replaced, the camera configuration file's standard detection flag needs to be set. When the camera is turned on, the camera's standard detection is automatically performed to ensure that the actual camera standard is obtained, allowing the camera to operate normally. As an implementation method, if the system platform supports camera replacement, the standard detection flag in the camera configuration file can also be left unset. Instead, a set of standard detection interfaces can be provided. After the camera is replaced, the user or the system platform actively calls this standard detection interface and updates the relevant information of the replaced camera based on the detection results. In this way, unnecessary standard detection time when turning on the camera can be saved.
[0060] See also Figure 9 , Figure 9 The schematic diagram of the camera switching system of one embodiment of the present application is shown. The camera switching system 11 includes a system platform 110, a camera interface 113, a memory 111, and a processor 112, which are coupled to each other. Multiple camera interfaces 113 can be provided, each used to connect to a camera. Upper-layer applications running on the system platform 110 are used to call cameras. The processor 112 is used to execute program data stored in the memory 111 to implement any of the aforementioned camera call methods.
[0061] Specifically, the processor 112 can be called a CPU (Central Processing Unit). The processor 112 may be an integrated circuit chip with signal processing capabilities. The processor 112 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 112 can be implemented by an integrated circuit chip.
[0062] For details about the camera calling method implemented by the processor 112 of this application, please refer to the contents of the camera calling method embodiment described above, which will not be repeated here.
[0063] See also Figure 10 , Figure 10is a frame diagram of an embodiment of the vehicle machine device. The vehicle machine device 12 of the present application includes a camera switching system 120, which can be the camera switching system 11 described above.
[0064] In several embodiments provided in the present application, it should be understood that the disclosed methods, devices, apparatuses and systems can be implemented in other ways. For example, the above-described device implementation is only schematic, and the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, the units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0065] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place or can be distributed to network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0066] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0067] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
Claims
1. A camera calling method, characterized in that: The method comprises: When the upper layer application calls the camera, obtaining the camera's standard detection attribute; Based on the standard detection attribute of the camera, obtaining parameter information of the camera, and feeding back the obtained parameter information of the camera to the upper-layer application, including: when the standard detection attribute of the camera is a first attribute, querying the current parameter information of the camera, feeding back the current parameter information of the camera to the upper-layer application and updating the parameter information into the camera configuration file; when the standard detection attribute of the camera is a second attribute, obtaining the parameter information of the camera from the camera configuration file and feeding back the parameter information to the upper-layer application; After the upper layer application obtains the parameter information of the camera, the resources of the camera are initialized to enable the upper layer application to call the camera.
2. The method according to claim 1, characterized in that The obtaining of the camera's standard detection attribute includes: The standard detection attribute of the camera is searched from a preset camera configuration file, or the standard detection attribute of the camera is acquired by calling a preset standard detection interface.
3. The method according to claim 1, characterized in that Before the upper layer application calls the camera, the method further includes: When the system platform starts, obtain the available properties of all cameras; Based on the available attributes of each camera, the number and parameter information of the cameras are reported to the system platform.
4. The method according to claim 1, wherein During the process of the upper layer application calling the camera, the method further includes: When obtaining the parameter information of the camera, obtaining available properties of all cameras; Based on the available attributes of each camera, the number and parameter information of the cameras are reported to the system platform.
5. The method according to claim 3 or 4, characterized in that The number and parameter information of cameras are reported to the system platform based on the available attributes of each camera, including: The parameter information of each camera whose available attribute is true is retained in the camera configuration file, and the number of all cameras whose available attribute is true and the parameter information of each camera whose available attribute is true are reported to the system platform.
6. The method according to claim 1, characterized in that The method further comprises: During use of the camera, detecting the signal status of the camera in real time; When it is detected that the signal state of the camera is lost, a signal loss message is fed back to the upper layer application, and a replacement data frame is filled in the video data stream.
7. The method according to claim 6, characterized in that After feeding back the signal loss message to the upper layer application and filling the replacement data frame in the video data stream, the method further includes: When it is detected that the signal status of the camera is restored, a signal restoration message is fed back to the upper layer application, and the actual data frames acquired by the camera are restored and filled into the video data stream.
8. A camera switching system, characterized in that: It includes a system platform, a camera interface, a memory and a processor coupled to each other; the camera interface is used to connect to a camera; the upper layer application running in the system platform is used to call the camera; The processor is used to execute the program data stored in the memory to implement the camera calling method according to any one of claims 1 to 7.
9. A vehicle-mounted device, characterized in that: Includes the camera switching system described in claim 8.
Citation Information
Patent Citations
Video signal compensating method, device and system
CN102118619A
Display device, and method of controlling a camera of the display device
CN103891266A
Method and device for supporting hot plug function of camera, equipment and medium
CN111475347A