Camera calibration method, camera calibration device and storage medium
The target process calls the service loading interface of the camera daemon process, and camera calibration can be realized without restarting the terminal, solving the problem of restarting in the existing technology and improving calibration verification efficiency.
Patent Information
- Application Number
- CN202011566166.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2040-12-25
AI Technical Summary
In the prior art, the camera calibration verification process requires restarting the terminal, resulting in large time consumption and affecting verification efficiency, especially when the restart fails, the efficiency loss is serious.
The target process calls the service loading interface of the camera daemon of the terminal to control the camera calibration file to take effect, so that the camera calibration can be performed without restarting the terminal.
The verification efficiency of the calibration verification station for camera calibration is improved, the time to wait for the terminal to restart is reduced, and the ability to respond in case of restart failure is enhanced.
Smart Images

Figure CN114677445B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of camera calibration, and in particular to a camera calibration method, a camera calibration device and a storage medium. Background Art
[0002] With the continuous development of terminal technology, the penetration rate of terminals is getting higher and higher, and users are using terminals more and more frequently in their daily lives. As an important part of the current terminals, cameras play an indispensable role in more and more application scenarios.
[0003] It can be known from relevant technologies that in order to ensure that the performance of the camera is fully utilized, one of the indispensable links is to calibrate the camera. At present, the camera is often calibrated at the calibration station on the production line, and the calibration results of the calibration station are verified by the calibration verification station. At present, the calibration station needs to restart the terminal to realize the calibration verification of the calibration verification station. Since a lot of time will be consumed in the process of restarting the terminal, which will affect the verification efficiency of the camera calibration by the calibration verification station, especially when the terminal fails to restart, it will greatly affect the verification efficiency of the calibration verification station. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a camera calibration method, a camera calibration device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a camera calibration method is provided. The camera calibration method is applied to a terminal, and the camera calibration method comprises: if it is determined that a calibration verification station needs to perform calibration verification on the camera of the terminal, calling a service loading interface of a camera daemon process of the terminal through a target process, wherein the target process is a process different from an initialization process; and controlling a camera calibration file in the terminal to take effect through the service loading interface of the camera daemon process.
[0006] In one embodiment of the present disclosure, calling the service loading interface of the terminal camera daemon process through the target process includes: adopting a preset inter-process communication mechanism to call the service loading interface of the terminal camera daemon process through the target process; the preset inter-process communication mechanism includes at least one of a client / server communication mechanism, a message queue mechanism, a shared memory mechanism and a socket mechanism.
[0007] In another embodiment of the present disclosure, the preset inter-process communication mechanism includes a client / server communication mechanism, and the client / server communication mechanism between the target process and the camera daemon process is pre-created in the following manner: adding a hardware abstraction layer interface definition language interface; taking the target process as the client and the camera daemon process as the server, and creating a client / server communication mechanism for inter-process communication based on the hardware abstraction layer interface definition language interface.
[0008] In another embodiment of the present disclosure, determining that a calibration verification station needs to perform calibration verification on the camera of the terminal includes: in response to the target process detecting that the camera calibration file is generated, determining that a calibration verification station needs to perform calibration verification on the camera of the terminal.
[0009] In yet another embodiment of the present disclosure, the target process includes a calibration tool process for importing the camera calibration file into the terminal.
[0010] According to a second aspect of an embodiment of the present disclosure, a camera calibration device is provided. The camera calibration device is applied to a terminal, and the camera calibration device comprises: a calling module, if it is determined that the calibration verification station needs to perform calibration verification on the camera of the terminal, calling the service loading interface of the camera daemon process of the terminal through a target process, wherein the target process is a process different from the initialization process; and a processing module, for controlling the camera calibration file in the terminal to take effect through the service loading interface of the camera daemon process.
[0011] In one embodiment of the present disclosure, the calling module calls the service loading interface of the terminal camera daemon process through the target process in the following manner: a preset inter-process communication mechanism is adopted to call the service loading interface of the terminal camera daemon process through the target process; the preset inter-process communication mechanism includes at least one of a client / server communication mechanism, a message queue mechanism, a shared memory mechanism and a socket mechanism.
[0012] In another embodiment of the present disclosure, the preset inter-process communication mechanism includes a client / server communication mechanism, and the calling module pre-creates the client / server communication mechanism between the target process and the camera daemon process in the following manner: adding a hardware abstraction layer interface definition language interface; taking the target process as the client and the camera daemon process as the server, and creating a client / server communication mechanism for inter-process communication based on the hardware abstraction layer interface definition language interface.
[0013] In another embodiment of the present disclosure, the calling module determines that the calibration verification station needs to perform calibration verification on the camera of the terminal in the following manner: in response to the target process detecting the generation of the camera calibration file, determining that the calibration verification station needs to perform calibration verification on the camera of the terminal.
[0014] In yet another embodiment of the present disclosure, the target process includes a calibration tool process for importing the camera calibration file into the terminal.
[0015] According to a third aspect of an embodiment of the present disclosure, a camera calibration device is provided, comprising a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions to execute the camera calibration method described in the first aspect of the present disclosure or any embodiment of the first aspect.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the camera calibration method described in the first aspect of the present disclosure or any embodiment of the first aspect.
[0017] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: calling the service loading interface of the terminal's camera daemon process through the target process, and controlling the camera calibration file in the terminal to take effect through the service loading interface of the camera daemon process, and realizing the calibration of the camera without restarting the terminal, thereby improving the verification efficiency of the calibration verification station.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] Figure 1 A schematic diagram of camera calibration and verification based on a calibration station and a calibration verification station is shown.
[0021] Figure 2 The present invention is a flowchart of a camera calibration method according to an exemplary embodiment.
[0022] Figure 3 A flowchart of pre-creating a Binder mechanism between a target process and a camera daemon process is shown.
[0023] Figure 4 The figure is a flow chart of another camera calibration method according to an exemplary embodiment.
[0024] Figure 5 A schematic diagram showing a camera calibration method implemented by the present disclosure is shown.
[0025] Figure 6 The invention is a block diagram of a camera calibration device according to an exemplary embodiment.
[0026] Figure 7 The invention is a block diagram of a device for camera calibration according to an exemplary embodiment. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0028] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0029] With the continuous development of terminal technology, the penetration rate of terminals is getting higher and higher, and users are using terminals more and more frequently in their daily lives. As an important part of the current terminals, cameras play an indispensable role in more and more application scenarios.
[0030] The imaging process of a camera is essentially a coordinate system conversion process. First, the point in space is converted from the world coordinate system to the camera coordinate system, and then it is projected onto the imaging plane to obtain the image coordinate system, and finally the image coordinate system on the imaging plane is converted to the pixel coordinate system. The camera calibration process is essentially a process of solving the conversion parameters. Therefore, in order to ensure that the performance of the camera is fully utilized, an indispensable part is to calibrate the camera. In related technologies, the camera is often calibrated at a calibration station on the production line, and the generated camera calibration file is stored in the terminal. Among them, the camera calibration file is a calibration file about the camera, and the camera calibration parameters are recorded in the camera calibration file.
[0031] Figure 1A schematic diagram of camera calibration and verification based on a calibration station and a calibration verification station is shown.
[0032] like Figure 1 As shown, in the process of calibrating the camera, the calibration station needs to load the camera calibration file, and the calibration verification station obtains the loaded camera calibration file and verifies the camera calibration file to complete the camera calibration. It should be noted that in the process of calibrating the camera, it is often necessary to restart the terminal to achieve it. That is to say, in the related art, the calibration station needs to restart the terminal to achieve the calibration verification of the calibration verification station.
[0033] Since a lot of time will be consumed in the process of restarting the terminal, the verification efficiency of the camera calibration by the calibration verification station will be affected, especially when the terminal restart fails, which will greatly affect the verification efficiency of the calibration verification station.
[0034] A camera calibration method provided by an embodiment of the present disclosure calls the service loading interface of the camera daemon process of the terminal through a target process, and controls the camera calibration file in the terminal to take effect through the service loading interface of the camera daemon process, thereby realizing camera calibration without restarting the terminal, thereby improving the verification efficiency of the calibration verification station.
[0035] A first aspect of an embodiment of the present disclosure provides a camera calibration method. The camera calibration method can be applied to a terminal, and the terminal includes a camera module. The terminal may include a smart mobile terminal or a tablet computer, etc., and in the present disclosure, the terminal is not specifically limited.
[0036] Figure 2 The present invention is a flowchart of a camera calibration method according to an exemplary embodiment.
[0037] In an exemplary embodiment of the present disclosure, Figure 2 As shown, the camera calibration method includes step S11 and step S12, and each step will be introduced below.
[0038] In step S11, if it is determined that the calibration and verification station needs to calibrate and verify the camera of the terminal, the service loading interface of the camera daemon process of the terminal is called through the target process, where the target process is a process different from the initialization process.
[0039] In one embodiment, when it is detected that the calibration verification station needs to verify the camera calibration file in the terminal, the service loading interface of the terminal camera daemon process can be called through the target process. Among them, the target process is a process different from the initialization process (also known as the init process), the target process can be other processes installed in the terminal, and the target process can also communicate with the terminal camera daemon process. It can be understood that the target process can be adjusted according to actual conditions, and in this disclosure, the target process is not specifically limited.
[0040] In one embodiment, the target process may be a calibration tool process for importing a camera calibration file into a terminal. It is understandable that, during the application process, when the calibration station generates a camera calibration file for a terminal, the calibration tool process installed in the terminal may be used to import the camera calibration file into the terminal so as to load the camera calibration file through the camera daemon process in the terminal. The calibration verification station obtains the loaded camera calibration file and verifies the camera calibration file. In this embodiment, directly using the camera calibration tool process to call the service loading interface of the terminal camera daemon process can reduce the time of restarting other target processes and using other target processes to call the service loading interface of the terminal camera daemon process, laying a foundation for improving the verification efficiency of the calibration verification station for camera calibration.
[0041] It should be noted that the service loading interface of the terminal camera daemon is the service loading interface used to load the camera calibration file in the camera daemon. The camera daemon is a special process that runs in the background of the terminal and is used to perform the system task of loading the camera calibration file. It is understandable that the camera daemon can be started when the system boots and runs until the system is shut down. In one embodiment, the camera daemon can be a camera supply daemon (also known as a camera provider daemon).
[0042] In step S12, the camera calibration file in the control terminal is made effective through the service loading interface of the camera daemon process.
[0043] In one implementation, the camera calibration file can be loaded through the service loading interface of the camera daemon process to make the camera calibration file effective. Furthermore, the calibration verification station can obtain the loaded camera calibration file and verify the camera calibration file to verify the camera calibration; for example, the calibration verification station can directly obtain the camera calibration file and verify the camera calibration file. In the disclosed embodiment, since the service loading interface of the camera daemon process is called by the target process instead of loading the camera calibration file based on the terminal startup, in the process of verifying the camera calibration file at the calibration verification station, the time of waiting for the terminal to restart to realize the camera daemon process to load the camera calibration file is reduced, thereby improving the verification efficiency of the camera calibration at the calibration verification station.
[0044] In the camera calibration method provided in the embodiment of the present disclosure, the service loading interface of the camera daemon process of the terminal is called by the target process, and the camera calibration file in the terminal is controlled to take effect through the service loading interface of the camera daemon process, and the camera calibration can be achieved without restarting the terminal, thereby improving the verification efficiency of the calibration verification station.
[0045] It is understandable that the service loading interface of the camera daemon process of the terminal based on the target process has an important impact on the implementation of the camera calibration method described in the embodiment of the present disclosure. The present disclosure will illustrate the process of calling the service loading interface of the camera daemon process of the terminal through the target process through the following embodiment.
[0046] In an exemplary embodiment of the present disclosure, calling the service loading interface of the camera daemon process of the terminal through the target process may be implemented in the following manner.
[0047] The preset inter-process communication mechanism is adopted to call the service loading interface of the camera daemon process of the terminal through the target process. The preset inter-process communication mechanism includes at least one of the client / server communication mechanism (also known as the Binder mechanism), the message queue mechanism, the shared memory mechanism and the socket mechanism.
[0048] In the application process, in order to ensure that the service loading interface of the terminal camera daemon process can realize the loading of the camera calibration file without restarting the terminal, in one embodiment, the service loading interface of the terminal camera daemon process can be called by the target process, and the loading of the camera calibration file can be realized based on the service loading interface of the terminal camera daemon process, thereby controlling the camera calibration file in the terminal to take effect. In the application process, the target process can call the service loading interface of the terminal camera daemon process by establishing an inter-process communication mechanism between the target process and the terminal camera daemon process. Among them, the inter-process communication mechanism can be pre-set, and in the present disclosure, the pre-set preset inter-process communication mechanism cannot be specifically limited.
[0049] In one embodiment, during the application process, inter-process communication can be established between the target process and the terminal camera daemon based on the Binder mechanism, and the target process can call the service loading interface of the terminal camera daemon through the Binder communication mechanism established between the target process and the terminal camera daemon. It can be understood that the Binder communication mechanism can perform communication transmission based on the Client-Server communication mode, and only one copy of the data is required during the transmission process, thereby improving the communication transmission efficiency. In addition, the Binder communication mechanism can also add a UID / PID identity for the sender, supporting both real-name Binder and anonymous Binder, thereby improving the security of communication data transmission.
[0050] In another embodiment, during the application process, inter-process communication can also be established between the target process and the terminal camera daemon process based on the message queue mechanism, and the target process can call the service loading interface of the terminal camera daemon process through the message queue communication mechanism established between the target process and the terminal camera daemon process. It can be understood that the message queue communication mechanism is a communication transmission method from application to application. The message queue communication mechanism is a typical representative of the consumer-producer model. During the application process, one end of the communication transmission can continuously write messages to the message queue, while the other end can read messages from the message queue. Based on the writing and reading of messages respectively performed at both ends of the communication transmission, the transmission of communication data at both ends of the communication transmission can be realized. It should be noted that the use of the message queue communication mechanism to implement the call of the service loading interface of the terminal camera daemon process by the target process requires two data copies, which will occupy system resources to a certain extent.
[0051] In another embodiment, during the application process, inter-process communication can also be established between the target process and the terminal camera daemon process based on a shared memory mechanism, and the target process can call the service loading interface of the terminal camera daemon process through the shared memory mechanism established between the target process and the terminal camera daemon process. It can be understood that the shared memory mechanism allows two unrelated processes to access the same logical memory, and shared memory can be a very effective way to share and transfer data between two running processes. It should be noted that the use of a shared memory mechanism to implement the target process's call to the service loading interface of the terminal camera daemon process also requires additional synchronization tools to solve synchronization problems.
[0052] In another embodiment, during the application process, inter-process communication can also be established between the target process and the terminal camera daemon process based on the socket mechanism, and the target process can call the service loading interface of the terminal camera daemon process through the socket mechanism established between the target process and the terminal camera daemon process. It can be understood that the socket mechanism can be regarded as an endpoint for two-way communication between processes of different hosts, and can constitute a programming interface within a single host and across the entire network. Among them, the socket communication mechanism can realize communication between different local area networks or different machines to increase the communication transmission range.
[0053] It can be understood that, by establishing inter-process communication between the target process and the terminal camera daemon process based on the Binder mechanism, and implementing the target process's call to the terminal camera daemon process's service loading interface through the Binder communication mechanism established between the target process and the terminal camera daemon process, on the one hand, the communication transmission efficiency can be improved, and on the other hand, the security of communication data transmission can be improved. In one embodiment, the Binder communication mechanism can be used to call the terminal camera daemon process's service loading interface through the target process.
[0054] The present disclosure will illustrate the process of pre-creating the Binder mechanism between the target process and the camera daemon process through the following embodiments.
[0055] Figure 3 A flowchart of pre-creating a Binder mechanism between a target process and a camera daemon process is shown.
[0056] In an exemplary embodiment of the present disclosure, Figure 3 As shown, the Binder mechanism between the target process and the camera daemon process is pre-created, including step S21 and step S22. Each step will be introduced below.
[0057] In step S21, a hardware abstraction layer interface definition language (HAL interface definition language, HIDL) interface is added.
[0058] In one implementation, a HIDL interface may be added between the target process and the camera daemon process. The HIDL interface may use a Binder mechanism to implement inter-process communication. In this embodiment, communication between the target process and the camera daemon process may be implemented based on the HIDL interface.
[0059] In step S22, the target process is used as the client, and the camera daemon process is used as the server, and a Binder mechanism for inter-process communication based on the HIDL interface is created.
[0060] In one embodiment, after adding a HIDL interface between the target process and the camera daemon process, the target process can be used as the client (Client side), the camera daemon process as the server (Service side), and a Binder mechanism based on the HIDL interface for inter-process communication is created. In the application process, since the client / service structure (C / S structure) can make full use of the advantages of the hardware environment at both ends, the tasks can be reasonably allocated to the Client side and the Service side to achieve, thereby reducing the communication overhead of the system. In this embodiment, the target process is used as the client, the camera daemon process is used as the server, and a Binder mechanism based on the HIDL interface for inter-process communication is created to achieve communication between the target process and the camera daemon process, so as to effectively reduce the communication overhead and improve the efficiency of the target process calling the service loading interface of the terminal camera daemon process, thereby laying a foundation for improving the verification efficiency of the calibration verification station for camera calibration.
[0061] This disclosure will illustrate the process of another camera calibration method through the following embodiments.
[0062] Figure 4 The figure is a flow chart of another camera calibration method according to an exemplary embodiment.
[0063] In an exemplary embodiment of the present disclosure, Figure 4 As shown, the camera calibration method includes steps S31 to S33, wherein step S33 is the same as step S12 described above. For the specific implementation and beneficial effects of step S33, please refer to the previous description, which will not be repeated in the present embodiment. Step S31 and step S32 will be described in detail below.
[0064] In step S31, in response to the target process detecting that a camera calibration file is generated, it is determined that the calibration verification station needs to perform calibration verification on the camera of the terminal.
[0065] In one embodiment, when the target process detects that a camera calibration file is generated, it can be determined that the calibration verification station needs to verify the camera calibration file in the terminal, that is, it is determined that the calibration verification station needs to calibrate and verify the camera of the terminal. It can be understood that before the calibration verification station needs to verify the camera calibration file of the terminal, the camera daemon process of the terminal needs to complete the loading of the camera calibration file. During the application process, in order to realize the loading of the camera calibration file by calling the service loading interface of the camera daemon process of the terminal through the target process, it can first be detected based on the target process whether a camera calibration file is generated. If the target process detects that a camera calibration file is generated, that is, it is determined that the calibration verification station needs to verify the camera calibration file in the terminal, then the service loading interface of the terminal camera daemon process can be called through the target process.
[0066] In step S32, the service loading interface of the terminal camera daemon process is called by the target process.
[0067] In one embodiment, the service loading interface of the terminal camera daemon is called by the target process, and the camera calibration file is loaded based on the service loading interface of the camera daemon. For example, the calibration verification station can directly obtain the loaded camera calibration file to realize the verification of the camera calibration file by the calibration verification station. In the embodiment of the present disclosure, since the service loading interface of the camera daemon is called by the target process instead of loading the camera calibration file based on the terminal restart, during the verification process of the camera calibration file by the calibration verification station, the time of waiting for the terminal restart to realize the camera daemon process to load the camera calibration file is reduced, thereby improving the verification efficiency of the camera calibration by the calibration verification station.
[0068] The present disclosure will illustrate a process of a camera calibration method implemented by the present disclosure through the following embodiments.
[0069] Figure 5 A schematic diagram showing a camera calibration method implemented by the present disclosure is shown.
[0070] In one embodiment of the present disclosure, Figure 5 As shown, when the calibration station generates a camera calibration file for the terminal, the camera calibration file can be imported into the terminal using the calibration tool process installed in the terminal, and the camera calibration file can be loaded through the camera daemon process in the terminal. The calibration verification station can directly obtain the loaded camera calibration file and verify the camera calibration file.
[0071] During the application process, a hardware abstraction layer interface definition language (HAL interface definition language, HIDL) interface can be added between the calibration tool process and the camera daemon process. Among them, the HIDL interface can use the Binder mechanism to realize inter-process communication. In this embodiment, communication between the target process and the camera daemon process can be realized based on the HIDL interface. In one example, the camera daemon process can be a camera provider daemon process.
[0072] In one embodiment, after adding a HIDL interface between the calibration tool process and the camera daemon process, the calibration tool process can be used as a client (Client end) and the camera daemon process as a server (Service end), and a Binder mechanism for inter-process communication based on the HIDL interface is created. For example, inter-process communication can be established between the calibration tool process and the terminal camera daemon process based on the Binder mechanism. And the calibration tool process calls the service loading interface of the terminal camera daemon process through the Binder communication mechanism established between the calibration tool process and the terminal camera daemon process, and loads the camera calibration file based on the service loading interface of the camera daemon process. For example, the calibration verification station can directly obtain the loaded camera calibration file to realize the verification of the camera calibration file by the calibration verification station. In the embodiment of the present disclosure, since the calibration verification station realizes the verification of the camera calibration file in the process of verifying the camera calibration file, the time of waiting for the terminal to restart to realize the camera daemon process to load the camera calibration file is reduced, thereby improving the verification efficiency of the calibration verification station for camera calibration.
[0073] According to the above description, in the camera calibration method provided in the embodiment of the present disclosure, the service loading interface of the camera daemon process of the terminal is called by the target process, and the camera calibration file in the terminal is controlled to take effect through the service loading interface of the camera daemon process, and the camera calibration can be achieved without restarting the terminal, thereby improving the verification efficiency of the calibration verification station.
[0074] Based on the same concept, a second aspect of an embodiment of the present disclosure also provides a camera calibration device.
[0075] It is understandable that in order to achieve the above functions, the camera calibration device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0076] Figure 6 The invention is a block diagram of a camera calibration device according to an exemplary embodiment.
[0077] In an exemplary embodiment of the present disclosure, Figure 6 As shown, the camera calibration device is applied to a terminal. The terminal may include a smart mobile terminal or a tablet computer. In the present disclosure, the terminal is not specifically limited. In one example, the camera calibration device includes a calling module 110 and a processing module 120. Each module will be described below.
[0078] The calling module 110 may be configured to: if it is determined that the calibration verification station needs to calibrate and verify the camera of the terminal, call the service loading interface of the camera daemon process of the terminal through a target process, where the target process is a process different from the initialization process.
[0079] The processing module 120 may be configured to: control the camera calibration file in the terminal to take effect through the service loading interface of the camera daemon process.
[0080] In an exemplary embodiment of the present disclosure, the calling module 110 can call the service loading interface of the terminal camera daemon process through the target process in the following manner: adopt a preset inter-process communication mechanism to call the service loading interface of the terminal camera daemon process through the target process; the preset inter-process communication mechanism includes at least one of a client / server communication mechanism, a message queue mechanism, a shared memory mechanism, and a socket mechanism.
[0081] In an exemplary embodiment of the present disclosure, the preset inter-process communication mechanism includes a client / server communication mechanism. The calling module 110 can pre-create the client / server communication mechanism between the target process and the camera daemon process in the following manner: add a hardware abstraction layer interface definition language (HAL interface definition language, HIDL) interface; use the target process as the client and the camera daemon process as the server to create a client / server communication mechanism for inter-process communication based on the HIDL interface.
[0082] In an exemplary embodiment of the present disclosure, the calling module 110 may determine that the calibration verification station needs to perform calibration verification on the terminal's camera in the following manner: in response to the target process detecting the generation of a camera calibration file, determining that the calibration verification station needs to perform calibration verification on the terminal's camera.
[0083] In an exemplary embodiment of the present disclosure, the target process includes a calibration tool process for importing a camera calibration file into a terminal.
[0084] Based on the same concept, a third aspect of an embodiment of the present disclosure also provides a device for camera calibration.
[0085] Figure 7 2 is a block diagram of a camera calibration device 200 according to an exemplary embodiment. For example, the camera calibration device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0086] Reference Figure 7 The device 200 for camera calibration may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0087] The processing component 202 generally controls the overall operation of the apparatus 200 for camera calibration, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to complete all or part of the steps of the camera calibration method described above. In addition, the processing component 202 may also include one or more modules to facilitate the interaction between the processing component 202 and other components. For example, the processing component 202 may also include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.
[0088] The memory 204 may be configured to store various types of data to support the operation of the apparatus 200 for camera calibration. Examples of such data include instructions for any application or method that may be used to operate on the apparatus 200 for camera calibration, contact data, phone book data, messages, pictures, videos, etc. The memory 204 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0089] The power component 206 can provide power to various components of the apparatus 200 for camera calibration. The power component 206 can also include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 200 for camera calibration.
[0090] The multimedia component 208 may include a screen that provides an output interface between the device 200 for camera calibration and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel may include one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 may include a front camera and / or a rear camera. When the device 200 for camera calibration is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0091] The audio component 210 may be configured to output and / or input audio signals. For example, the audio component 210 may include a microphone (MIC), and when the device 200 for camera calibration is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone may be configured to receive an external audio signal. The received audio signal may be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 may also include a speaker for outputting an audio signal.
[0092] I / O interface 212 can provide an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0093] The sensor assembly 214 may include one or more sensors for providing various aspects of status assessment for the device 200 for camera calibration. For example, the sensor assembly 214 may detect the open / closed state of the device 200 for camera calibration, the relative positioning of components, such as the display and keypad of the device 200 for camera calibration, the sensor assembly 214 may also detect the position change of the device 200 for camera calibration or a component of the device 200 for camera calibration, the presence or absence of user contact with the device 200 for camera calibration, the orientation or acceleration / deceleration of the device 200 for camera calibration, and the temperature change of the device 200 for camera calibration. The sensor assembly 214 may include a proximity sensor, which may be configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0094] The communication component 216 can be configured to facilitate wired or wireless communication between the apparatus 200 for camera calibration and other devices. The apparatus 200 for camera calibration can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 can receive a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 may also include a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0095] In an exemplary embodiment, the device 200 for camera calibration can also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned camera calibration method.
[0096] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the apparatus 200 for camera calibration to complete the above-mentioned camera calibration method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0097] It is to be understood that in the present disclosure, "plurality" may refer to two or more than two, and other quantifiers are similar thereto. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0098] It is further understood that the terms "first", "second", etc. can be used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0099] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.
[0100] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described above with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings.
[0101] It can be further understood that, unless otherwise specified, “connection” may include a direct connection without other components between the two, or an indirect connection with other components between the two.
[0102] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0103] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0104] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A camera calibration method, characterized in that: Applied to a terminal, the camera calibration method includes: If it is determined that the calibration and verification station needs to perform calibration and verification on the camera of the terminal, a preset inter-process communication mechanism is adopted to call the service loading interface of the camera daemon process of the terminal through a target process, wherein the target process is a process different from the initialization process; The camera calibration file is loaded through the service loading interface of the camera daemon process to control the camera calibration file in the terminal to take effect.
2. The camera calibration method according to claim 1, characterized in that: The preset inter-process communication mechanism includes at least one of a client / server communication mechanism, a message queue mechanism, a shared memory mechanism and a socket mechanism.
3. The camera calibration method according to claim 2, characterized in that: The preset inter-process communication mechanism includes a client / server communication mechanism, and the client / server communication mechanism between the target process and the camera daemon process is pre-created in the following manner: Added hardware abstraction layer interface definition language interface; The target process is used as a client, and the camera daemon process is used as a server, to create a client / server communication mechanism for inter-process communication based on the hardware abstraction layer interface definition language interface.
4. The camera calibration method according to any one of claims 1 to 3, characterized in that: Determine that the calibration and verification station needs to calibrate and verify the camera of the terminal, including: In response to the target process detecting that the camera calibration file is generated, it is determined that a calibration verification station needs to perform calibration verification on the camera of the terminal.
5. The camera calibration method according to claim 1, characterized in that: The target process includes a calibration tool process for importing the camera calibration file into the terminal.
6. A camera calibration device, characterized in that: Applied to a terminal, the camera calibration device comprises: The calling module, if it is determined that the calibration verification station needs to perform calibration verification on the camera of the terminal, uses a preset inter-process communication mechanism to call the service loading interface of the camera daemon process of the terminal through a target process, wherein the target process is a process different from the initialization process; The processing module is used to load the camera calibration file through the service loading interface of the camera daemon process to control the camera calibration file in the terminal to take effect.
7. The camera calibration device according to claim 6, characterized in that: The calling module calls the service loading interface of the terminal camera daemon process through the target process in the following manner: Using a preset inter-process communication mechanism, the target process calls the service loading interface of the terminal camera daemon process; The preset inter-process communication mechanism includes at least one of a client / server communication mechanism, a message queue mechanism, a shared memory mechanism and a socket mechanism.
8. The camera calibration device according to claim 7, characterized in that: The preset inter-process communication mechanism includes a client / server communication mechanism, and the calling module pre-creates the client / server communication mechanism between the target process and the camera daemon process in the following manner: Added hardware abstraction layer interface definition language interface; The target process is used as a client, and the camera daemon process is used as a server, to create a client / server communication mechanism for inter-process communication based on the hardware abstraction layer interface definition language interface.
9. The camera calibration device according to any one of claims 6 to 8, characterized in that: The calling module determines that the calibration verification station needs to perform calibration verification on the camera of the terminal in the following manner: In response to the target process detecting that the camera calibration file is generated, it is determined that a calibration verification station needs to perform calibration verification on the camera of the terminal.
10. The camera calibration device according to claim 6, characterized in that: The target process includes a calibration tool process for importing the camera calibration file into the terminal.
11. A camera calibration device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the camera calibration method described in any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute the camera calibration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
A Camera parameter calculating method and a method for determining vehicle body posture with cameras
CN103593836A
Remote calibration method and apparatus of a panoramic camera, computer device and storage medium
CN109166151A