[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116939356A - Camera starting method, device and storage medium - Google Patents

Camera starting method, device and storage medium Download PDF

Info

Publication number
CN116939356A
CN116939356A CN202210326936.8A CN202210326936A CN116939356A CN 116939356 A CN116939356 A CN 116939356A CN 202210326936 A CN202210326936 A CN 202210326936A CN 116939356 A CN116939356 A CN 116939356A
Authority
CN
China
Prior art keywords
camera
initialization
configuration parameters
terminal
sensor hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210326936.8A
Other languages
Chinese (zh)
Inventor
朱晓颖
芦泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210326936.8A priority Critical patent/CN116939356A/en
Publication of CN116939356A publication Critical patent/CN116939356A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The disclosure relates to a camera starting method, a camera starting device and a storage medium. The camera starting method is applied to the terminal, and comprises the following steps: determining that a camera application of the terminal is triggered and started; synchronously initializing configuration parameters and sensor hardware resources; in response to determining that the initialization is complete, a camera application is launched. According to the method and the device, the starting speed of the camera application in the terminal can be improved.

Description

Camera starting method, device and storage medium
Technical Field
The disclosure relates to the technical field of terminals, and in particular relates to a camera starting method, a camera starting device and a storage medium.
Background
With the wide popularization and application of terminal devices, the requirements of people on the realization of functions of the terminals are increasing. For example, there is an increasing demand for a use experience for camera applications in terminals.
The speed of the camera application starting process is improved, and the method is a mode for improving the use experience of a user. The conventional camera application starting process is generally as follows: the user clicks the camera application icon to trigger the camera application to start, the terminal initializes the camera application, for example, initializes the configuration parameters, and initializes the sensor hardware after the initialization of the configuration parameters is completed. After the terminal completes initialization, the terminal performs a processing request of the preview data and outputs the preview data. Wherein the initialization of the camera application process takes a long time, resulting in a slow start of the camera application.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a camera startup method, apparatus, and storage medium.
According to a first aspect of embodiments of the present disclosure, there is provided a camera starting method, applied to a terminal, the camera starting method including: determining that a camera application of the terminal is triggered to start; synchronously initializing configuration parameters and sensor hardware resources; the camera application is launched in response to determining that initialization is complete.
In one embodiment, the synchronizing initialization configuration parameters and sensor hardware resources includes: creating an asynchronous channel, and asynchronously initializing sensor hardware resources through the asynchronous channel; in the process of asynchronously initializing sensor hardware resources, configuration parameters are synchronously initialized.
In yet another embodiment, the method further comprises: in response to determining that the initialization is complete, the image preview request is processed and a preview image is output.
In yet another embodiment, the determining that initialization is complete includes: if the initialization of the configuration parameters is completed, but the initialization of the sensor hardware resources is not completed, waiting for the completion of the initialization of the sensor hardware resources, and determining that the initialization is completed.
In yet another embodiment, the method further comprises: if the asynchronous channel is failed to be established, the configuration parameters are initialized preferentially, and after the initialization of the configuration parameters is completed, the sensor hardware resources are initialized.
In yet another embodiment, the initializing configuration parameters includes: calling a preloaded dynamic library resource;
and initializing configuration parameters based on the preloaded dynamic library resources.
In yet another embodiment, the dynamic library resources are preloaded in the following manner: and preloading the dynamic library resources into the memory of the terminal when the terminal is initialized and started.
According to a second aspect of the embodiments of the present disclosure, there is provided a camera starting apparatus, applied to a terminal, the camera starting apparatus including: a determining unit, configured to determine that a camera application of the terminal is triggered to be started; the initialization unit is used for synchronously initializing configuration parameters and sensor hardware resources; and the starting unit is used for starting the camera application under the condition that the initialization is determined to be completed.
In one embodiment, the initialization unit synchronizes the initialization configuration parameters and the sensor hardware resources as follows:
creating an asynchronous channel, and asynchronously initializing sensor hardware resources through the asynchronous channel; in the process of asynchronously initializing sensor hardware resources, configuration parameters are synchronously initialized.
In a further embodiment, the starting unit is further configured to: in response to determining that the initialization is complete, the image preview request is processed and a preview image is output.
In yet another embodiment, the initiation unit determines that initialization is complete in the following manner:
if the initialization of the configuration parameters is completed, but the initialization of the sensor hardware resources is not completed, waiting for the completion of the initialization of the sensor hardware resources, and determining that the initialization is completed.
In yet another embodiment, the initialization unit is further configured to: if the asynchronous channel is failed to be established, the configuration parameters are initialized preferentially, and after the initialization of the configuration parameters is completed, the sensor hardware resources are initialized.
In yet another embodiment, the initializing unit initializes the configuration parameters in the following manner:
calling a preloaded dynamic library resource; and initializing configuration parameters based on the preloaded dynamic library resources.
In yet another embodiment, the initialization unit preloads the dynamic library resources as follows: and preloading the dynamic library resources into the memory of the terminal when the terminal is initialized and started.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the camera activation method of the first aspect or any implementation manner of the first aspect is performed.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium having stored therein instructions which, when executed by a processor of a terminal, enable the terminal including the processor to perform the camera start method described in the first aspect or any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: when the camera application of the terminal is triggered to be started, the configuration parameters and the sensor hardware resources are synchronously initialized, and the sensor hardware resources are initialized after the initialization of the relative configuration parameters is completed, so that the time consumption of the camera application initialization process can be reduced, the starting speed of the camera is improved, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a schematic diagram of a camera start-up procedure shown in an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a camera start method in a terminal according to an exemplary embodiment.
Fig. 3 is a schematic diagram illustrating a camera startup procedure according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a camera startup method according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a camera start method in a terminal according to an exemplary embodiment.
FIG. 6 is a flowchart illustrating a method of initializing configuration parameters, according to an exemplary embodiment.
Fig. 7 is a schematic diagram of a camera startup process shown in accordance with an exemplary embodiment.
Fig. 8 is a schematic diagram of a camera startup process shown in accordance with an exemplary embodiment.
Fig. 9 is a block diagram illustrating a camera activation apparatus in a terminal according to an exemplary embodiment.
Fig. 10 is a block diagram illustrating an apparatus for camera startup according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure.
The camera starting method provided by the embodiment of the disclosure is applied to a scene shot by a user by using a camera application installed in a terminal, and particularly relates to the scene of starting the camera application by the terminal.
The terminal starts the camera application, which is usually triggered by an operation instruction sent by a user, for example, the user clicks an application icon of the camera application to trigger the camera application to start. After the terminal determines that the camera application is triggered and started, the terminal performs an initialization configuration process of the camera application, such as initializing configuration parameters, and performs sensor hardware resource initialization after the initialization configuration parameters are completed. After the terminal is initialized, the terminal can process the preview data and output the preview data. In the process of initializing configuration parameters, a plurality of algorithm related dynamic library resources need to be loaded, the sensor hardware resources need to be powered on in the process of initializing the sensor hardware resources, the configuration parameters of an initial picture need to be issued, and the time consumption can be tens to hundreds of milliseconds according to different sensors. Both the process of initializing configuration parameters and initializing sensor hardware resources is time consuming, resulting in a slow camera start-up speed. However, the camera start-up speed is slow, which may cause the user to miss shooting the instant scene, affecting the user experience. Therefore, in order to better meet the use requirement of the user on the camera application, the use experience of the user is improved, and the improvement of the starting speed of the camera is particularly important.
Fig. 1 shows a schematic diagram of a camera start-up procedure shown in an exemplary embodiment of the present disclosure. Referring to fig. 1, the camera-initiated process mainly refers to a process from when a user clicks a camera application icon to when a camera application outputs a preview image. The process of clicking the camera application by the user and outputting the preview image by the camera may be understood as being performed by the camera application part of the application layer, and the process of starting and initializing the camera and performing the preview data processing may be understood as being performed by the camera driving part. In the embodiment of the disclosure, the processing procedure of the camera driving part is optimized to shorten the time period from clicking the application icon by the user to outputting the preview image. The processing procedure of the camera driving part comprises three parts of camera starting, camera initializing and executing processing request. As described above, the initialization of the camera includes both the initialization of the configuration parameters and the initialization of the sensor hardware resources, which are time consuming, and thus the embodiments of the present disclosure are optimized for the camera initialization process.
Referring to fig. 1, after a camera application is triggered and started in the conventional technology, a dynamic library is required to be loaded to initialize configuration parameters. After the initialization of the configuration parameters is completed, the sensor hardware resource is initialized. That is, initializing the configuration parameters and initializing the sensor hardware resources is a process that is performed serially, and based on the foregoing, it can be known that both the configuration parameter initialization and the sensor hardware resource initialization are relatively time-consuming, so that initializing in a serial manner will result in a longer time-consuming process of initializing the camera application, and further increase the time-consuming process of starting the camera.
In view of this, an embodiment of the present disclosure provides a camera startup method, in which, for an initialization process, configuration parameter initialization and sensor hardware resource initialization are performed synchronously, so as to reduce the time consumption of a camera application initialization process, further shorten the duration of the camera startup process, and improve the camera startup speed.
Fig. 2 is a flowchart illustrating a camera starting method according to an exemplary embodiment, as shown in fig. 1, which is applied to a terminal, wherein the camera starting method includes the following steps.
In step S101, it is determined that the camera application of the terminal is triggered to start.
In one embodiment of the present disclosure, the user triggers the start of the camera application of the terminal by clicking on the camera icon of the terminal.
In step S102, configuration parameters and sensor hardware resources are initialized synchronously.
In step S103, in response to determining that the initialization is completed, the camera application is started.
In the embodiment of the disclosure, after the user clicks the camera icon in the terminal to trigger the camera to start, the configuration parameters and the sensor hardware resources are synchronously initialized, so that the starting speed of the camera is improved, and the time consumption for starting the camera is reduced.
Fig. 3 is a schematic diagram illustrating a camera startup procedure according to an exemplary embodiment. Referring to fig. 3 and fig. 1, in a camera starting process according to an embodiment of the present disclosure, after a camera is started, in fig. 3, an initialization configuration parameter and a sensor hardware resource initialization process are synchronously executed, so that the initialization configuration parameter and the sensor hardware resource initialization process are synchronously executed, and a serial execution process of the initialization configuration parameter process and the sensor hardware resource initialization process in fig. 1 in the camera starting process is changed to a process of parallel execution of the initialization configuration parameter process and the sensor hardware resource initialization process, so that time consumption of a camera application initialization process can be reduced, a duration of the camera starting process is shortened, and a camera starting speed is increased.
In one embodiment of the present disclosure, the steps of the asynchronous channel mainly include three steps: a hardware session is initialized, the sensor is powered up and initial configuration parameters are issued. The initial configuration parameters issued include clock, frame length, image size, etc. The initialization configuration parameters and the sensor hardware initialization process are synchronously performed when the camera in the terminal is started through the creation of the asynchronous channel, so that the time consumption of the camera starting process is reduced.
Wherein, because the initial configuration of the sensor hardware resources in the terminal camera is not changed, the asynchronous initialization operation of the sensor hardware resources can be performed. In an embodiment of the present disclosure, after a user clicks on a camera icon and triggers a camera to start, an asynchronous channel may be created to synchronously initialize configuration parameters and sensor hardware resources.
Fig. 4 is a flowchart illustrating a camera startup method according to an exemplary embodiment, as shown in fig. 4, including the steps of:
in step S201, an asynchronous channel is created, through which the sensor hardware resources are asynchronously initialized.
In the disclosed embodiments, after a user clicks on a camera icon, an asynchronous channel is created at camera start-up to initialize sensor hardware resources through the out-of-channel.
The asynchronous initialization of the sensor hardware resources through the asynchronous channel mainly comprises the following steps: the hardware session is initialized, the sensor is powered up, and initial configuration parameters (including clock, frame length, image size, etc.) are issued.
In step S202, configuration parameters are synchronously initialized in the process of asynchronously initializing sensor hardware resources.
In an embodiment of the disclosure, when the camera is started, the hardware of the camera sensor is initialized through the asynchronous channel, the main flow executes the initialization configuration parameters at the same time, so that the camera starting speed is effectively improved by changing the serial execution processes of configuration parameter initialization and sensor hardware resource initialization into synchronous parallel execution.
And triggering a processing request of the camera to the preview data after the camera is initialized, so that the camera outputs a preview image.
Fig. 5 is a flowchart illustrating a method for starting up a camera in a terminal according to an exemplary embodiment, and as shown in fig. 5, the method for starting up a camera further includes:
in step S301, it is determined that the camera application of the terminal is triggered to be started.
In step S302, configuration parameters and sensor hardware resources are initialized synchronously.
In step S303, in response to determining that the initialization is completed, an image preview request is processed, and a preview image is output.
In one embodiment of the present disclosure, after the camera initialization process is completed, the camera is triggered to process the image preview request so as to output a preview image, and the camera is started.
In the process of synchronously and parallelly executing the initialization of the configuration parameters and the initialization of the sensor hardware resources, if one of the initialization processes is completed, the initialization completion can be determined only by waiting for the initialization completion of the other process.
Wherein the process of initializing the sensor hardware resources is generally more time consuming than the process of initializing the configuration parameters. Therefore, when the sensor hardware initialization process is faster, the processing request of the preview image is executed after the initialization configuration parameter process is completed, and the main process of camera startup is not affected generally. However, when the speed of the sensor hardware initialization process is slower, the initialization configuration parameters need to be waited for after the initialization of the sensor hardware is finished, the initialization can be determined to be completed, then the processing process of the reserved image processing request is executed, and finally the preview image is output.
In the embodiment of the disclosure, the configuration parameter initialization and the sensor hardware resource initialization process can be synchronously and parallelly executed based on the above.
In an embodiment of the present disclosure, if the asynchronous channel is successfully created, the configuration parameter initialization and the sensor hardware resource initialization process may be executed synchronously and in parallel, so that two serial execution time-consuming processes of initializing the configuration parameter and initializing the sensor hardware are changed into synchronous and parallel execution, the time-consuming process of camera startup is optimized, and the camera startup speed is improved.
In an embodiment of the present disclosure, if the asynchronous channel creation fails, in order to ensure that the camera startup will not fail, the camera initialization process will execute the flow of the conventional camera startup method, that is: and after the camera icon is clicked by a user to trigger the camera to start, carrying out the camera initialization configuration parameters, and after the camera initialization configuration parameter process is finished, carrying out sensor hardware initialization, and after the initialization process is completely finished, executing a preprocessing request by the camera, and outputting a preview image, thereby ensuring that the camera cannot fail to start.
The diversity of the camera usage scenario determines that a large number of algorithms are processed when the camera is started, and the initialization configuration parameter process loads a large number of dynamic library resources related to the algorithms, the dynamic library resources are loaded into the memory from the camera disk, and the dynamic library loading process needs to traverse specific paths for searching the dynamic library, so that a large number of input and output paths are included in the paths, and the time consumption for starting the camera is increased.
In one implementation of the disclosed embodiments, the configuration parameter initialization process may be optimized to reduce the time consumption of the camera application initialization process.
In one embodiment of the present disclosure, to address the problem of increased camera startup time due to dynamic library loading, add startup time is reduced by invoking preloaded dynamic library resources. For example, when we start the terminal, the whole terminal system is initialized, the necessary related system services of the terminal are started, including camera services. Because the algorithm library is not changed, in the process of starting the camera service, the related library resources of the algorithm can be preloaded, namely, the library resources are loaded from a disk to a memory in advance, and then the preloaded dynamic library resources are directly called in the process of initializing the configuration parameters of the camera application.
Fig. 6 is a flowchart illustrating a method of initializing configuration parameters according to an exemplary embodiment, and as shown in fig. 6, a process of initializing configuration parameters by a camera in a terminal includes:
in step S601, a preloaded dynamic library resource is invoked;
in step S602, configuration parameters are initialized based on preloaded dynamic library resources.
In an embodiment of the disclosure, the dynamic library resource is preloaded in advance when the camera is started, when a user clicks a camera icon of the terminal, and the camera is started to perform an initialization process, the configuration parameters can be directly initialized based on the preloaded dynamic library, so that time consumption for initializing the configuration parameters in the camera starting process is reduced. For example, when a user turns on a camera, when the dynamic library resources are loaded in the process of initializing configuration parameters, the library resources can be quickly fetched from the cache directly at this time because the preloading already loads the library resources from the disk into the memory in advance.
In one embodiment of the present disclosure, the process of preloading the dynamic library in the camera initialization configuration parameters is: when the terminal is initialized and started, the dynamic library resources are preloaded into the memory of the terminal.
Fig. 7 is a schematic diagram of a camera startup process shown in accordance with an exemplary embodiment. Referring to fig. 7, when the terminal is initialized to be started, the system of the terminal is initialized. Wherein, the necessary related system service related in the terminal needs to be started in the system initialization process. Wherein the related system services include camera services. Since the algorithm library of the dynamic library resources of the camera service is not changed, the dynamic library resources of the camera application are preloaded in the starting process of the camera service, namely, the library resources are loaded from a disk to a memory in advance. Triggering the initialization of the configuration parameters after the camera application is started by clicking the camera application icon in the terminal by the user. When the dynamic library resource is loaded in the process of initializing the configuration parameters, the library resource is already loaded from the disk to the memory in advance by the preloading, so that the dynamic library resource can be directly and quickly fetched from the cache at the moment, the time for loading the dynamic library resource is saved, and the starting speed is improved.
Based on the camera starting method provided by the above examples of the present disclosure, in the camera starting method provided by the embodiments of the present disclosure, an initialization process of a sensor hardware resource of a camera may be optimized, and a configuration parameter initialization process of the camera may also be optimized. That is, in the method for starting the camera provided in the embodiments of the present disclosure, when the terminal system is started to perform terminal initialization, the dynamic resource library is preloaded, and the sensor hardware resource is asynchronously initialized through the asynchronous channel. And synchronously initializing configuration parameters in the process of asynchronously initializing the sensor hardware resources. And when the configuration parameters are initialized synchronously, calling the preloaded dynamic library resources, and initializing the configuration parameters based on the preloaded dynamic library resources.
Fig. 8 is a schematic diagram of a camera startup process shown in accordance with an exemplary embodiment. Referring to fig. 8, when the terminal starts the system and starts the camera service, the dynamic library resources of the camera application are preloaded, i.e. the library resources are loaded from the disk to the memory in advance. When the user clicks the camera application icon in the terminal to trigger the camera application to start, the camera is triggered to start. After the camera is started, the initialization configuration parameters and the sensor hardware resource initialization process are synchronously executed, so that the initialization configuration parameters and the sensor hardware resource initialization process are synchronously and parallelly executed, the time consumption of the camera application initialization process can be reduced, the duration of the camera starting process is further shortened, and the camera starting speed is improved. When the dynamic library resources are loaded in the process of initializing the configuration parameters, the library resources are already loaded from the disk to the memory in advance by the preloading, so that the dynamic library resources can be directly and quickly fetched from the cache at the moment, the time for loading the dynamic library resources is saved, the time for the camera application initialization process can be further reduced, the time of the camera starting process is further shortened, and the camera starting speed is improved.
According to the camera starting method, when the terminal starts the system and starts the camera service, the preloaded dynamic library resources of the camera application are preloaded, and the preloaded dynamic library resources are called in the initialization process of the configuration parameters, so that the starting speed of the camera can be accelerated. The optimized lifting of the starting speed of the camera can be 30-150 ms according to the difference of the current memory pressure.
According to the camera starting method provided by the embodiment of the disclosure, the sensor hardware resource is initialized asynchronously, so that the configuration parameter initialization and the synchronous parallel initialization of the sensor hardware resource are realized, and the camera starting speed can be accelerated. Wherein, according to different sensors selected by different terminal cameras, the optimization and the promotion of 80-250 ms can be brought.
By the camera starting method, the camera starting speed can be improved, and the user experience is improved.
Based on the same conception, the embodiment of the disclosure also provides a camera starting device.
It can be understood that, in order to implement the above functions, the camera starting device in the terminal provided by the embodiments of the present disclosure includes a hardware structure and/or a software module that perform each function. The disclosed embodiments may be implemented in hardware or a combination of hardware and computer software, in combination with the various example elements and algorithm steps disclosed in the embodiments of the disclosure. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present disclosure.
Fig. 9 is a block diagram of a camera starting apparatus in a terminal, which is applied to the terminal, according to an exemplary embodiment. Referring to fig. 9, the camera starting apparatus 100 includes a determination unit 101, an initialization unit 102, and a starting unit 103.
A determining unit 101, configured to determine that a camera application of the terminal is triggered to be started; an initialization unit 102, configured to synchronize initialization configuration parameters and sensor hardware resources; a starting unit 103, configured to start the camera application if it is determined that the initialization is completed.
In one embodiment, the initialization unit 102 synchronizes the initialization configuration parameters and the sensor hardware resources as follows:
creating an asynchronous channel, and asynchronously initializing sensor hardware resources through the asynchronous channel; in the process of asynchronously initializing sensor hardware resources, configuration parameters are synchronously initialized.
In yet another embodiment, the starting unit 103 is further configured to: in response to determining that the initialization is complete, the image preview request is processed and a preview image is output.
In yet another embodiment, the starting unit 103 determines that the initialization is completed in the following manner:
if the initialization of the configuration parameters is completed, but the initialization of the sensor hardware resources is not completed, waiting for the completion of the initialization of the sensor hardware resources, and determining that the initialization is completed.
In yet another embodiment, the initialization unit 102 is further configured to: if the asynchronous channel is failed to be established, the configuration parameters are initialized preferentially, and after the initialization of the configuration parameters is completed, the sensor hardware resources are initialized.
In yet another embodiment, the initializing unit 102 initializes configuration parameters in the following manner:
calling a preloaded dynamic library resource; and initializing configuration parameters based on the preloaded dynamic library resources.
In yet another embodiment, the initialization unit 102 preloads the dynamic library resources as follows: and preloading the dynamic library resources into the memory of the terminal when the terminal is initialized and started.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 10 is a block diagram illustrating an apparatus for camera startup according to an exemplary embodiment. The apparatus 100 for camera activation may be provided as a terminal. For example, apparatus 200 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 10, the apparatus 200 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.
The processing component 202 generally controls overall operation of the apparatus 200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 202 can include one or more modules that facilitate interactions between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
The memory 204 is configured to store various types of data to support operations at the apparatus 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phonebook data, messages, pictures, videos, and the like. The memory 204 may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk.
The power component 206 provides power to the various components of the device 200. The power components 206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 200.
The multimedia component 208 includes a screen between the device 200 and the user that provides an output interface. 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 a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 200 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 210 is configured to output and/or input audio signals. For example, the audio component 210 includes a Microphone (MIC) configured to receive external audio signals when the device 200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, audio component 210 further includes a speaker for outputting audio signals.
The I/O interface 212 provides an interface between the processing assembly 202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 214 includes one or more sensors for providing status assessment of various aspects of the apparatus 200. For example, the sensor assembly 214 may detect the on/off state of the device 200, the relative positioning of the components, such as the display and keypad of the device 200, the sensor assembly 214 may also detect a change in position of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration/deceleration of the device 200, and a change in temperature of the device 200. The sensor assembly 214 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 214 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 214 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 216 is configured to facilitate communication between the apparatus 200 and other devices in a wired or wireless manner. The device 200 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 216 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 200 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 elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 204, including instructions executable by processor 220 of apparatus 200 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It is understood that the term "plurality" in this disclosure means two or more, and other adjectives are similar thereto. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It is further understood that the terms "first," "second," and the like are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the expressions "first", "second", etc. may be used entirely interchangeably. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that the terms "center," "longitudinal," "transverse," "front," "rear," "upper," "lower," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like, as used herein, refer to an orientation or positional relationship based on that shown in the drawings, merely for convenience in describing the present embodiments and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operate in a particular orientation.
It will be further understood that "connected" includes both direct connection where no other member is present and indirect connection where other element is present, unless specifically stated otherwise.
It will be further understood that although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims (16)

1. A camera activation method, applied to a terminal, the camera activation method comprising:
determining that a camera application of the terminal is triggered to start;
synchronously initializing configuration parameters and sensor hardware resources;
the camera application is launched in response to determining that initialization is complete.
2. The camera startup method of claim 1, wherein the synchronizing initialization configuration parameters and sensor hardware resources comprises:
creating an asynchronous channel, and asynchronously initializing sensor hardware resources through the asynchronous channel;
in the process of asynchronously initializing sensor hardware resources, configuration parameters are synchronously initialized.
3. The camera activation method according to claim 1 or 2, characterized in that the method further comprises:
in response to determining that the initialization is complete, the image preview request is processed and a preview image is output.
4. A camera start-up method as claimed in claim 3, wherein the determining initialization is complete, comprising:
if the initialization of the configuration parameters is completed, but the initialization of the sensor hardware resources is not completed, waiting for the completion of the initialization of the sensor hardware resources, and determining that the initialization is completed.
5. The camera activation method of claim 2, wherein the method further comprises:
if the asynchronous channel is failed to be established, the configuration parameters are initialized preferentially, and after the initialization of the configuration parameters is completed, the sensor hardware resources are initialized.
6. The camera startup method according to claim 1, wherein initializing configuration parameters comprises:
calling a preloaded dynamic library resource;
and initializing configuration parameters based on the preloaded dynamic library resources.
7. The camera startup method of claim 6, wherein the dynamic library resources are preloaded in the following manner:
and preloading the dynamic library resources into the memory of the terminal when the terminal is initialized and started.
8. A camera activation device, applied to a terminal, said camera activation device comprising:
a determining unit, configured to determine that a camera application of the terminal is triggered to be started;
the initialization unit is used for synchronously initializing configuration parameters and sensor hardware resources;
and the starting unit is used for starting the camera application under the condition that the initialization is determined to be completed.
9. The camera startup device according to claim 8, wherein the initialization unit synchronizes initialization configuration parameters and sensor hardware resources in the following manner:
creating an asynchronous channel, and asynchronously initializing sensor hardware resources through the asynchronous channel;
in the process of asynchronously initializing sensor hardware resources, configuration parameters are synchronously initialized.
10. The camera activation device of claim 8 or 9, wherein the activation unit is further configured to:
in response to determining that the initialization is complete, the image preview request is processed and a preview image is output.
11. The camera startup device according to claim 10, wherein the startup unit determines that initialization is completed by:
if the initialization of the configuration parameters is completed, but the initialization of the sensor hardware resources is not completed, waiting for the completion of the initialization of the sensor hardware resources, and determining that the initialization is completed.
12. The camera activation apparatus of claim 9, wherein the initialization unit is further configured to:
if the asynchronous channel is failed to be established, the configuration parameters are initialized preferentially, and after the initialization of the configuration parameters is completed, the sensor hardware resources are initialized.
13. The camera startup device according to claim 8, wherein the initialization unit initializes the configuration parameters in such a manner that:
calling a preloaded dynamic library resource;
and initializing configuration parameters based on the preloaded dynamic library resources.
14. The camera activation apparatus of claim 13, wherein the initialization unit preloads the dynamic library resources by:
and preloading the dynamic library resources into the memory of the terminal when the terminal is initialized and started.
15. A camera activation device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: a camera start-up method as claimed in any one of claims 1 to 7.
16. A storage medium having instructions stored therein which, when executed by a processor of a terminal, enable the terminal to perform the camera activation method of any one of claims 1 to 7.
CN202210326936.8A 2022-03-30 2022-03-30 Camera starting method, device and storage medium Pending CN116939356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210326936.8A CN116939356A (en) 2022-03-30 2022-03-30 Camera starting method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210326936.8A CN116939356A (en) 2022-03-30 2022-03-30 Camera starting method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116939356A true CN116939356A (en) 2023-10-24

Family

ID=88386562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210326936.8A Pending CN116939356A (en) 2022-03-30 2022-03-30 Camera starting method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116939356A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221713A (en) * 2023-11-09 2023-12-12 荣耀终端有限公司 Parameter loading method and electronic equipment
CN117955839A (en) * 2024-03-25 2024-04-30 杭州海康威视数字技术股份有限公司 Video recorder resource allocation method and video recorder
CN117998195A (en) * 2024-04-03 2024-05-07 荣耀终端有限公司 Camera starting method, electronic equipment and readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221713A (en) * 2023-11-09 2023-12-12 荣耀终端有限公司 Parameter loading method and electronic equipment
CN117221713B (en) * 2023-11-09 2024-05-17 荣耀终端有限公司 Parameter loading method and electronic equipment
CN117955839A (en) * 2024-03-25 2024-04-30 杭州海康威视数字技术股份有限公司 Video recorder resource allocation method and video recorder
CN117955839B (en) * 2024-03-25 2024-05-31 杭州海康威视数字技术股份有限公司 Video recorder resource allocation method and video recorder
CN117998195A (en) * 2024-04-03 2024-05-07 荣耀终端有限公司 Camera starting method, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN113032030B (en) Camera starting method, device, terminal equipment and storage medium
EP3382520B1 (en) Method and apparatus for operating a display of a mobile terminal
CN116939356A (en) Camera starting method, device and storage medium
CN110134532A (en) A kind of information interacting method and device, electronic equipment and storage medium
US11366569B2 (en) Interactive interface display method, apparatus and storage medium
US20220159336A1 (en) Method and system for displaying screen
CN105912204B (en) Method and device for starting application interface
CN104616241A (en) Video screen-shot method and device
CN107371222B (en) Virtual card disabling method and device
CN110221813B (en) Application data connection establishment method and device, storage medium and electronic equipment
CN109491655B (en) Input event processing method and device
CN112821515B (en) Charging method, device and system
CN113220134B (en) Input method, device and device for inputting
CN111610856B (en) Vibration feedback method, vibration feedback device and storage medium
CN112083981B (en) Page view component creation method and device
CN113238887A (en) Data processing method, device and storage medium
CN111240757B (en) Quick application control method, device and storage medium
CN112423373B (en) Manual network searching method, manual network searching device and storage medium
CN113360341B (en) Front-end application maintenance and loading method and device
CN115733913B (en) Continuous photographing method and device and storage medium
CN113535242B (en) Pin configuration method, pin configuration device and storage medium
CN111857396B (en) Signal scanning method, device, terminal and storage medium
CN112738876B (en) Terminal network synchronization method and device
CN118828224A (en) Image processing method and device, electronic equipment and storage medium
CN115576718A (en) Communication method, communication device, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination