Camera startup method, device, terminal device and storage medium
By using sensor data initialization as the second process in parallel with the first process, the problem of long camera startup time in the existing technology is solved, the user experience is improved, and the competitiveness of the terminal device is enhanced.
Patent Information
- Application Number
- CN202110332270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-29
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-03-29
AI Technical Summary
In the existing technology, camera startup takes a long time, which is mainly spent on sensor data initialization, affecting user experience.
Initialize sensor data as the second process and proceed in parallel with the first process. The first process is responsible for initializing the camera hardware layer software and displaying data after the sensor data is initialized. The second process is responsible for initializing sensor data and auxiliary functions.
It greatly shortens the startup time of the camera, improves the user experience, enhances the market competitiveness of the terminal device, and avoids the auxiliary functions from increasing the startup time of the camera.
Smart Images

Figure CN113032030B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software technology, and in particular to a camera startup method, device, terminal equipment and storage medium. Background Art
[0002] The camera function has become one of the important functions required by mobile terminal devices such as mobile phones and tablets. The camera startup speed has become an important indicator affecting the user experience.
[0003] In the related art, when starting the camera, the impact of the camera hardware performance is not considered, and the startup time is mainly spent on the initialization of the camera at the bottom layer, the configuration of the camera bottom layer, and waiting for the sensor data to be initialized. As a result, after the user triggers the camera use request, it takes a long time to see the display screen, affecting the user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a camera startup method, apparatus, terminal device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a camera startup method is provided, which is applied to a terminal device, and the method includes:
[0006] Receive application startup information;
[0007] Executing a first process, wherein the first process is configured to start a camera and display the sensor data after the sensor data is initialized;
[0008] Determining auxiliary functions according to the type of target camera to be launched by the application;
[0009] executing a second process, the second process being configured to initialize the sensor data and the auxiliary function;
[0010] The first process and the second process are performed in parallel.
[0011] Optionally, the method further comprises:
[0012] The first process runs to a preset position and obtains status information of initialization of the sensor data;
[0013] When the status information indicates that the sensor data initialization fails, the second process is executed again.
[0014] Optionally, the second process is configured to initialize the sensor data and the auxiliary function, including:
[0015] The second process is configured to initialize the auxiliary function after completing initializing the sensor data.
[0016] Optionally, the method further comprises:
[0017] After starting to execute the first process for a preset time, starting to execute the second process;
[0018] The end time of the second process is earlier than or equal to the end time of the first process.
[0019] Optionally, the target camera is at least one of the front cameras or at least one of the rear cameras of the terminal device.
[0020] Optionally, the auxiliary functions include an optical image stabilization function and / or a video recording function.
[0021] According to a second aspect of an embodiment of the present disclosure, a camera activation device is provided, which is applied to a terminal device and includes:
[0022] The acquisition module is used to receive the startup information of the application;
[0023] An execution module, configured to execute a first process, wherein the first process is configured to start a camera and display the sensor data after the sensor data is initialized;
[0024] A determination module, used to determine an auxiliary function according to the type of the target camera to be started by the application;
[0025] The execution module is further used to execute a second process, wherein the second process is configured to initialize the sensor data and the auxiliary function;
[0026] The first process and the second process are performed in parallel.
[0027] Optionally, the acquisition module is further used to:
[0028] The first process runs to a preset position and obtains status information of initialization of the sensor data;
[0029] The execution module is also used for:
[0030] When the status information indicates that the sensor data initialization fails, the second process is executed again.
[0031] Optionally, the execution module is specifically used to:
[0032] After the sensor data is initialized, the auxiliary function is initialized.
[0033] Optionally, the execution module is specifically used to:
[0034] After starting to execute the first process for a preset time, starting to execute the second process;
[0035] The end time of the second process is earlier than or equal to the end time of the first process.
[0036] According to a third aspect of an embodiment of the present disclosure, a terminal device is provided, including:
[0037] processor;
[0038] a memory for storing processor-executable instructions;
[0039] Wherein, the processor is configured to execute the camera startup method as described in the first aspect.
[0040] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to execute the camera startup method as described in the first aspect.
[0041] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the camera startup method in the present disclosure uses the time-consuming sensor data initialization as the second process, and the first process and the second process are performed in parallel. Compared with the method of using a single process to start the camera in the related art, the camera startup time is greatly shortened, the user experience is improved, and the market competitiveness of the terminal device is enhanced.
[0042] In addition, the present disclosure also incorporates the initialization process of the auxiliary function into the second process to avoid increasing the camera startup time due to the auxiliary function.
[0043] 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
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] Figure 1 is a schematic diagram of a camera startup process shown in the related art.
[0046] Figure 2 is a schematic diagram of a camera startup process shown in the related art.
[0047] Figure 3 The figure is a flowchart of a camera startup method according to an exemplary embodiment.
[0048] Figure 4 is a schematic diagram of a camera startup method according to an exemplary embodiment.
[0049] Figure 5 is a schematic diagram showing a camera startup process according to an exemplary embodiment.
[0050] Figure 6 The invention is a block diagram of a camera activation device according to an exemplary embodiment.
[0051] Figure 7 It is a block diagram of a terminal device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] 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 invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0053] The camera function has become one of the important functions required by mobile terminal devices such as mobile phones and tablets. The camera startup speed has become an important indicator affecting the user experience.
[0054] In the related art, when starting the camera, the impact of the camera hardware performance is not considered, and the startup time is mainly spent on the initialization of the camera at the bottom layer, the configuration of the camera bottom layer, and waiting for the sensor data to be initialized. As a result, after the user triggers the camera use request, it takes a long time to see the display screen, affecting the user experience.
[0055] Reference Figure 1 As shown, a camera startup process in the related art is shown. During the camera startup process, the camera needs to call the open interface function of the camera hardware abstraction layer (hal) to start the camera, the configure_stream interface function to configure the data, and call the process_capture_request (PCR) interface function to receive the application's request, before the entire startup process can be completed. Among them, when calling the configure_stream interface function, that is, in the process of initializing the middle-layer software data, it is necessary to pass through multiple pipelines in sequence. Only when all the pipelines are initialized, can the application's request be accepted, the picture can be output, and then displayed on the display screen of the terminal device. As shown Figure 1As shown in , according to the default initialization sequence in the relevant technology, it takes 200ms to call the open interface function to start the camera; the data configuration process takes 200ms plus 300ms, a total of 500ms; it takes 100ms to accept the application request, and the entire camera application startup process takes a total of 800ms.
[0056] Among them, Figure 1 As shown in the figure, in the process of initializing the middle-layer software data, it has to go through the photo taking pipeline, the preview pipeline, and some other pipelines that are not shown in the figure. In the preview pipeline, the initialization process of the sensor data is involved. The entire preview pipeline takes 300ms, and the initialization process of the sensor data occupies 250ms of the 300ms. Figure 1 The longest time involved in the camera startup process shown in Figure 1 The entire working process shown in must be performed sequentially, resulting in the entire camera startup process taking a relatively long time.
[0057] like Figure 2 As shown, another camera startup process in the related art is shown. In this solution, in order to shorten the overall camera startup time, the sensor data initialization time is reduced to reduce the occupation of the entire camera startup time. The sensor data initialization process is separated from the preview pipeline, so that the sensor data initialization process is executed in parallel with other initialization processes in the preview pipeline. However, since the sensor data initialization process itself is time-consuming, the effect of this solution is limited, and the entire camera startup time is still limited by the duration of sensor data initialization, and the camera startup time cannot be effectively shortened.
[0058] In addition, as the camera configuration of terminal devices becomes higher and higher, the number of cameras increases, and the shooting and beautification functions become more and more, in addition to the existing startup process, an additional initialization process for executing related auxiliary functions is required, which makes the camera startup process take longer.
[0059] In order to solve the above problems, the present invention proposes a camera startup method, which uses the time-consuming sensor data initialization as the second process, and the first process and the second process are carried out in parallel. Compared with the method of using a single process to start the camera in the related art, the camera startup time is greatly shortened, the user experience is improved, and the market competitiveness of the terminal device is enhanced.
[0060] First, the application scenario of the camera startup method in this application is described. After the user triggers the instruction to use the camera function, the camera of the terminal device will perform hardware layer software initialization. After the initialization is completed, the user can see the preview screen obtained by the camera on the display interface of the terminal device. The camera startup method in this disclosure is applied in the camera hardware layer software initialization process.
[0061] According to an exemplary embodiment, the camera activation method in this embodiment is applied to a terminal device. The terminal device may be, for example, a mobile phone, a tablet computer, or other electronic device with a shooting function. Figure 3 As shown, the camera control method in this embodiment includes the following steps:
[0062] S110: Receive application startup information.
[0063] The application may be, for example, a camera application built into the terminal device, or a third-party application involving the use of a camera. The startup information may be triggered by touch information acting on the application, or by voice information used to start the camera. In one example, a user clicks on a camera icon to trigger a camera application, which is a built-in application of the terminal device's system, and a controller of the terminal device receives startup information of the application. In another example, a user is using a third-party application, and requests to use a video function in a third application through a voice function, and a controller of the terminal device receives startup information of the application.
[0064] S120, executing a first process, where the first process is configured to start a camera and display sensor data after the sensor data is initialized.
[0065] The first process involved in this step is basically the same as the process of starting the camera in the related art, which also requires calling the open interface function of the camera hardware abstraction layer (hal) to start the camera, the configure_stream interface function to configure the data, and calling the process_capture_request (PCR) interface function to receive the application's request, and then display the image. The specific content will not be repeated here.
[0066] The process of starting the camera involves, among other things, a hardware initialization process and a corresponding software initialization process.
[0067] S130: Determine an auxiliary function according to the type of the target camera to be started by the application.
[0068] According to different camera settings, the camera set on the terminal device includes at least a front camera and a rear camera. In order to achieve different shooting functions, such as long-range shooting, macro shooting, etc., the rear camera of the terminal device is usually equipped with multiple cameras. Different cameras can be started according to different camera needs of the user. Different cameras can be equipped with different auxiliary functions to obtain better shooting effects during use.
[0069] When an application needs to use a camera, the type of the target camera is determined according to the location of the camera that the application needs to use and the different functions that need to be used, such as the front camera, rear camera, macro camera, panoramic camera, etc.
[0070] For devices with multiple cameras, in different scenarios, the camera application can be called to start the corresponding camera according to needs or configurations. For example, directly click the system camera application icon, the system camera application defaults to the rear wide-angle lens, and the rear wide-angle lens can be used as the target camera. If the system camera application uses the camera that was in use when the application was last exited as the default camera, the default camera will be used as the target camera. For another example, when using chat tools such as WeChat, select the photo function, the camera to be started by the application can be the rear camera for taking photos; if the application accepts a video call request, the camera to be started can be the front camera.
[0071] Different types of cameras can have different auxiliary functions. For example, the front camera does not support the auxiliary function of zoom, while the rear camera supports the auxiliary function of zoom. When multiple cameras are set up, auxiliary functions such as lens switching are also required. Running auxiliary functions also requires calling related algorithm software, which takes a certain amount of time. In order to speed up the startup of the camera, the auxiliary function corresponding to the target camera is determined according to the type of the target camera, and the content of initializing the corresponding auxiliary function is added in the first process of the sensor data to avoid the additional auxiliary function initialization process from extending the camera startup time.
[0072] S140 , executing a second process, where the second process is configured to initialize sensor data and auxiliary functions.
[0073] The second process in this step is carried out in parallel with the first process in step S130. The parallel operation here can be understood as that when executing step S130 and step S140, the controller of the terminal device will allocate two computing and storage spaces for the first process and the second process respectively, and the second process does not need to be executed after the first process is executed. The second process may start to run after the first process has run for a period of time. The parallel mentioned in this step means that the time when the first process runs and the time when the second process runs are partially overlapped, that is, it can be understood as parallel.
[0074] When the second process is running, the sensor data and auxiliary functions need to be initialized. The two can be processed in sequence. The sensor data can be initialized first and then the auxiliary functions, or the auxiliary functions can be initialized first and then the sensor data. Just make sure that the second process ends before the first process ends.
[0075] The camera startup method disclosed in the present invention uses the time-consuming sensor data initialization as the second process, and the first process and the second process are carried out in parallel. Compared with the method of using a single process to start the camera in the related art, the camera startup time is greatly shortened, the user experience is improved, and the market competitiveness of the terminal device is enhanced. In addition, the present invention also incorporates the initialization process of the auxiliary function into the second process to avoid increasing the camera startup time due to the auxiliary function.
[0076] According to an exemplary embodiment, Figure 4 As shown, the camera startup method in this embodiment includes:
[0077] S210: Receive application startup information.
[0078] S220: Execute a first process, where the first process is configured to start a camera and display sensor data after the sensor data is initialized.
[0079] The implementation of steps S210 and S220 is the same as that of steps S110 to S120, and will not be described in detail herein.
[0080] S230: Determine an auxiliary function according to the type of the target camera to be started by the application.
[0081] The target camera determined in this step is at least one of the front cameras or at least one of the rear cameras of the terminal device.
[0082] In one example, if the application intends to open the default rear camera, the wide-angle camera, ultra-wide-angle camera, and ultra-telephoto camera in the rear camera will be initialized. For these cameras, in order to improve the visual effect, auxiliary functions will be set for these heads, such as smooth switching, optical image stabilization, zoom function, etc. Therefore, in the process of initializing the camera, the OIS device (i.e., optical image stabilization device) involved in the auxiliary function must also be initialized.
[0083] In another example, if the application needs to open the front camera, it only needs to initialize the front camera, and generally the front camera does not have an additional OIS device. Therefore, when initializing the front camera, it is not necessary to initialize the optical image stabilization function. When there are multiple front cameras, multiple front cameras can be initialized at the same time.
[0084] In another example, when an application needs to turn on the recording mode of a certain camera, the application needs to initialize the recording function while initializing the camera involved to meet the user's usage needs.
[0085] S240: Execute a second process, where the second process is configured to initialize sensor data and auxiliary functions.
[0086] In this step, the second process of this embodiment first initializes the sensor data, and then initializes the auxiliary functions after the sensor data is initialized. When the sensor data is initialized, it also involves the initialization process of the sensor hardware and the initialization process of the sensor data acquisition. Among them, the auxiliary functions to be initialized are determined by whether the camera that the application needs to use has the corresponding function.
[0087] The second process in this step runs simultaneously with the first process in step S220. In this embodiment, the simultaneous running can be understood as the overlap of the running time of the first process and the second process. The initialization phase of the sensor data in the second process needs to use some content in the first process, that is, the sensor data initialization process in the second process needs to rely on the first process. However, after research, it was found that the content that the sensor data initialization process in the second process relies on is at the beginning of the first process, that is, Figure 5 Therefore, as long as the Open phase starts to run for a period of time and the content required for sensor data initialization is prepared, the second process can be executed in parallel with the first process to shorten the camera startup time.
[0088] In one example, the first process starts running first. After the first process runs for a preset time, such as the Open phase runs for a preset time, the content required for sensor data initialization is ready, and then the second process can be started. The preset time can be 20ms, 15ms, etc.
[0089] Here, it should be noted that after the first process runs for a preset time, the second process runs. It must be ensured that the second process is completed before the first process is completed, so as to ensure that the sensor data has been initialized before the application's request is received, thereby reducing the camera startup time. After the user issues a request to use the camera, the picture feedback can be obtained in a very short time, thereby improving the user experience.
[0090] In addition, it should be noted that although the present embodiment adopts a technical solution of separating the sensor data initialization and the auxiliary function initialization from the existing single process and executing them as a second process in parallel with the first process, it can be understood that the sensor data initialization and the auxiliary function initialization can also be separated from the existing single process and executed as a second process in parallel with the first process. Figure 5 The other contents that need to be initialized in the photo taking pipeline and preview pipeline shown in the figure are separated from the single process and incorporated into the second process to be processed in parallel with the first process. For example, the M content initialization process in the photo taking pipeline is separated, and the M content initialization, sensor data initialization and auxiliary function initialization are taken as the contents of the second process and executed in parallel with the first process. For another example, the N content initialization process in the preview pipeline is separated, and the sensor data initialization is replaced by N content initialization, and the N content initialization is taken as the contents of the second process together with the auxiliary function initialization and executed in parallel with the first process.
[0091] S250: The first process runs to a preset position and obtains status information of sensor data initialization.
[0092] The purpose of setting this step is to confirm whether the second process runs normally, confirm whether the sensor data is initialized, and then execute subsequent steps according to the initialization result of the sensor data.
[0093] The preset position can be set by those skilled in the art according to the situation. Figure 1 , the setting position in this embodiment can be the moment when the sensor data is initialized in the related art, that is, Figure 1 The A position in .
[0094] The status information of the sensor data initialization in this step may be, for example, sensor data initialization completion or sensor data initialization incomplete; its expression form may be, for example, represented by a high-level signal or a low-level signal.
[0095] S260: When the status information indicates that the sensor data initialization fails, execute the second process again.
[0096] In this step, if the status information indicates that the sensor data initialization fails, it means that there is no image data that can be used for display. Therefore, in order to ensure that the camera function can be used normally, it is necessary to execute the second process again, that is, to re-initialize the sensor data to ensure the reliability of camera use.
[0097] like Figure 5 As shown, the first process in this embodiment is basically the same as the process of starting the camera in the related art. It is also necessary to call the open interface function of the camera hardware abstraction layer (hal) to start the camera, the configure_stream interface function to configure the data, and call the process_capture_request (PCR) interface function to receive the application request, and then display the image. Among them, it takes 200ms to call the open interface function to start the camera, the photo pipeline in the data configuration process takes 200ms, and the preview pipeline takes 50ms. At the preset time of the preview pipeline, the status information of the sensor data initialization is obtained at position B, and then it is determined whether the second process needs to be run again based on the status information. It takes 100ms to receive the application request. In summary, the first process takes a total of 550ms.
[0098] As for the second process that runs in parallel with the first process, even if the first process includes sensor data initialization and auxiliary function initialization, since the content required for sensor data initialization has been prepared at the beginning of the Open phase in the first process, the second process runs almost simultaneously with the first process, and the total time required for sensor data initialization and auxiliary function initialization is shorter than that of the first process, so it will inevitably be completed before the first process is completed. Therefore, the total time taken for the camera startup process in this embodiment is the time taken for the first process, that is, 550ms. Through the above analysis, it can be seen that using the camera startup method in this embodiment to start the camera is faster than Figure 1 The camera startup process shown in the figure reduces the time consumption by 250ms (800ms minus 550ms), greatly shortening the total camera startup time. This allows the user to quickly see the preview image after issuing a request to use the camera, thereby improving the user experience.
[0099] According to an exemplary embodiment, Figure 6 As shown, this embodiment provides a camera startup device, which is applied to a terminal device. The device is integrated in the terminal device and is used to implement the camera startup control method shown in the above embodiment. The camera startup device in this embodiment includes an acquisition module 100, a determination module 200, and an execution module 300 that are electrically connected to each other.
[0100] The acquisition module 100 is used to receive the startup information of the application. The determination module 100 is used to determine the auxiliary function according to the type of the target camera to be started by the application. The execution module 300 is used to execute the first process, which is configured to start the camera and display the sensor data after the sensor data is initialized. The execution module 300 is also used to execute the second process, which is configured to initialize the sensor data and the auxiliary function. When executing the first process and the second process, the execution module 300 controls the first process and the second process to be performed in parallel.
[0101] According to an exemplary embodiment, the acquisition module 100 is also used to acquire the status information of the initialization of the sensor data when the first process runs to a preset position; the execution module 300 is also used to execute the second process again when the status information indicates that the initialization of the sensor data fails, so as to implement steps S250 and S260 in the method embodiment. Among them, the execution module 300 is specifically used to initialize the auxiliary function after the initialization of the sensor data is completed. The execution module 300 is specifically used to start the execution of the second process after starting to execute the first process for a preset time.
[0102] like Figure 7 , which is a block diagram of a terminal device. The present disclosure also provides a terminal device, including a processor; a memory for storing executable instructions of the processor. The processor is configured to execute the above method. The device 500 can be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc. The terminal device can also be a photosensitive element, such as a light sensor.
[0103] Device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0104] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0105] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can 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.
[0106] Power component 506 provides power to various components of device 500. Power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 500.
[0107] The multimedia component 508 includes a screen that provides an output interface between the device 500 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 includes 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 508 includes a front camera and / or a rear camera. When the device 500 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.
[0108] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0109] I / O interface 512 provides an interface between processing component 502 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.
[0110] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0111] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 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 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes 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.
[0112] In an exemplary embodiment, the device 500 may 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 methods.
[0113] In another exemplary embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of a device 500 to perform the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc. When the instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to perform the above method.
[0114] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0115] It should be understood that the present invention is not limited to the exact construction that has 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 invention is limited only by the appended claims.
Claims
1. A camera startup method, applied to a terminal device, characterized in that: The method comprises: Receive application startup information; Executing a first process, wherein the first process is configured to start a camera and display the sensor data after the sensor data is initialized; Determining auxiliary functions according to the type of target camera to be launched by the application; executing a second process, the second process being configured to initialize the sensor data and the auxiliary function; wherein the first process and the second process are performed in parallel; The method further comprises: After starting to execute the first process for a preset time, starting to execute the second process; The end time of the second process is earlier than or equal to the end time of the first process.
2. The camera activation method according to claim 1, characterized in that: The method further comprises: The first process runs to a preset position and obtains status information of initialization of the sensor data; When the status information indicates that the sensor data initialization fails, the second process is executed again.
3. The camera activation method according to claim 1, characterized in that: The second process is configured to initialize the sensor data and the auxiliary function, including: The second process is configured to initialize the auxiliary function after completing initializing the sensor data.
4. The camera activation method according to claim 1, characterized in that: The target camera is at least one of the front cameras or at least one of the rear cameras of the terminal device.
5. The camera activation method according to claim 1, characterized in that: The auxiliary functions include an optical image stabilization function and / or a video recording function.
6. A camera activation device, applied to a terminal device, characterized in that: include: The acquisition module is used to receive the startup information of the application; An execution module, configured to execute a first process, wherein the first process is configured to start a camera and display the sensor data after the sensor data is initialized; A determination module, used to determine an auxiliary function according to the type of the target camera to be started by the application; The execution module is further used to execute a second process, wherein the second process is configured to initialize the sensor data and the auxiliary function; wherein the first process and the second process are performed in parallel; The execution module is specifically used for: After starting to execute the first process for a preset time, starting to execute the second process; The end time of the second process is earlier than or equal to the end time of the first process.
7. The camera activation device according to claim 6, characterized in that: The acquisition module is also used for: The first process runs to a preset position and obtains status information of initialization of the sensor data; The execution module is also used for: When the status information indicates that the sensor data initialization fails, the second process is executed again.
8. The camera activation device according to claim 6, characterized in that: The execution module is specifically used for: After the sensor data is initialized, the auxiliary function is initialized.
9. A terminal device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the camera startup method as described in any one of claims 1 to 5.
10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to execute the camera startup method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Camera starting method for mobile terminal and mobile terminal
CN105120112A
Application starting method and electronic equipment
CN112527403A
Method and device for starting application program
US20200125374A1
Optical image stabilization control method, mobile terminal, and computer readable storage medium
WO2018219197A1
