Camera application processing method and device, storage medium and program product
By creating multiple parts of the camera function module in parallel, the problem of time-consuming initialization during the startup of the camera application is solved, and the display speed of the preview screen is improved.
Patent Information
- Application Number
- CN202410035109.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-01-09
AI Technical Summary
The initialization of existing camera applications takes a long time during startup, resulting in slow display of the preview screen.
By dividing the initialization process of the camera function module into multiple parts and creating each part of the module in parallel, ensuring that the dependency relationship is satisfied and then creating the part of the dependent module, thereby improving the initialization speed.
Reduces the time-consuming process of initializing camera functions and improves the display speed of camera shooting preview screen.
Smart Images

Figure CN119255088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and in particular to a camera application processing method, device, storage medium and program product. Background Art
[0002] With the development of terminal electronic devices such as mobile phones, there are more and more scenarios for using camera applications, such as taking photos, recording videos, or scanning codes. In these scenarios, the camera application will be started, and after the camera application is started, the preview interface will be entered, and the preview screen taken by the camera will be displayed on the preview interface. However, the initialization process of the current camera application takes a long time, which leads to the problem that the preview screen cannot be displayed in time. Summary of the invention
[0003] In view of this, the present application provides a camera application processing method, device, storage medium and program product, which can reduce the time consumption of camera function initialization, thereby improving the display speed of the preview picture taken by the camera.
[0004] In a first aspect, an embodiment of the present application provides a camera application processing method, including executing a camera function initialization process, the camera function initialization process comprising: in a first stage, creating a first part of a first function module and a first part of a second function module in parallel; in a second stage after the first stage, creating a second part of the first function module, the second part of the first function module being dependent on the first part of the second function module.
[0005] The camera application processing method in the embodiment of the present application divides the creation process of each functional module during the initialization process into the creation process of different parts, and can create parts of multiple functional modules in a parallel manner without creating another functional module after a certain functional module is completely created, thereby improving the initialization speed of the functional modules, and for the second part of the first functional module, the creation is performed after the creation of the first part of the second functional module on which it depends is completed, so as to ensure that the required dependency relationship is met between the multiple functional modules in the process of creating multiple functional modules in parallel. The camera application processing method can reduce the time consumption of camera function initialization, thereby improving the display speed of the preview screen shot by the camera.
[0006] In a possible implementation, the camera function initialization process includes: creating multiple function modules in multiple stages in sequence, each function module includes multiple parts, the multiple function modules include a first function module and a second function module, and the multiple stages include a first stage and a second stage; in each stage, creating a part of at least one function module in parallel; the multiple stages include n stages, and the parts that any part created in the i-th stage of the n stages depends on are all created before the i-th stage, n>1, and the value of i is 2, 3, ..., n. By dividing each function module into multiple parts and executing the creation of different function modules in parallel, the initialization speed of the function module can be improved, thereby improving the display speed of the preview screen.
[0007] In a possible implementation, at least one part that any part created in the i-th stage of the n stages depends on is created in the j-th stage, where j=i-1, and j is an integer less than i. The part is created in the next adjacent stage after all the dependent parts are created, which can further improve the overall initialization processing efficiency.
[0008] In a possible implementation, the multiple functional modules are respectively created by multiple threads, and the multiple functional modules correspond to the multiple threads one-to-one.
[0009] In a possible implementation, each functional module includes a first part, and the first part in each functional module is created in the first stage of the n stages. In the initial stage, the parts of all functional modules that can be created without relying on other parts are created in parallel to improve the overall initialization processing efficiency.
[0010] In a possible implementation, the plurality of functional modules include a module for generating image data, a module for receiving image data, a module for synchronizing image data, and a module for performing image processing.
[0011] In a possible implementation, the method includes: executing a camera function initialization process when a camera application is started or a mode of the camera application is switched.
[0012] In a second aspect, an electronic device is provided, including: a processor and a memory, the memory being used to store at least one program, and when the program is executed by the processor, the electronic device executes the above method.
[0013] According to a third aspect, a readable storage medium is provided, comprising a program or an instruction. When the program or the instruction is run on an electronic device, the above method is executed.
[0014] According to a fourth aspect, a program product is provided. The program product includes a program. When the program is executed on an electronic device, the electronic device executes the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 This is a structural block diagram of an electronic device in an embodiment of the present application;
[0017] Figure 2 A software structure block diagram of an electronic device according to an embodiment of the present application;
[0018] Figure 3 This is a schematic diagram showing that a plurality of functional modules are divided into a plurality of parts in an embodiment of the present application;
[0019] Figure 4 A timing diagram of creating multiple functional modules in an embodiment of the present application;
[0020] Figure 5 A schematic diagram of a thread pool and loading transfer in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0022] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0023] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0024] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0025] Before describing the embodiments of the present application, the related art and its technical problems are described first. In the related art, the camera application performs the corresponding functions through the function feature module. Therefore, during the startup process of the camera application, or during the mode switching process of the camera application, the camera application function initialization will be performed. The mode switching is, for example, switching the camera, etc. During the initialization process, multiple function modules related to the camera application are created so that the corresponding functions can be performed through the created function modules later. The relationship between multiple function modules is a directed acyclic graph, which is composed of vertices and edges connecting these vertices. Each edge has a direction from one vertex to another vertex. The graph is a directed graph. The road in the directed graph is a series of edges, and the end point of each edge in the series is the starting point of the next edge. If the starting point of a path is the end point of this path, then this path is a ring. A directed acyclic graph is a directed graph without a ring. That is, in graph theory, if a directed graph cannot start from a vertex and return to the point through several edges, then the graph is a directed acyclic graph. Each of the multiple functional modules related to the camera application is a plurality of vertices in a directed acyclic graph, that is, there is a certain dependency relationship between the various functional modules. Therefore, during the initialization process, each functional module will be created in sequence based on the dependency relationship between the various functional modules. Only after all the functional modules are created can the camera application be started or the mode switched to display the preview image taken by the camera.
[0026] Figure 1 A schematic structural diagram of an electronic device 100 is shown.
[0027] The electronic device 100 may include a processor 110 , an internal memory 121 , a camera 193 , a display screen 194 , and the like.
[0028] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0029] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0030] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0031] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0032] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0033] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0034] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0035] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0036] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0037] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0038] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
[0039] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0040] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0041] The application layer can include a series of application packages.
[0042] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0043] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0044] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0045] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0046] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0047] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0048] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0049] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0050] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0051] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0052] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0053] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0054] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0055] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0056] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0057] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0058] A 2D graphics engine is a drawing engine for 2D drawings.
[0059] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver and camera driver.
[0060] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0061] When the touch sensor receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation, and other information). The original input event is stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch single-click operation, and the control corresponding to the single-click operation as the control of the camera application icon as an example, the camera application calls the interface of the application framework layer, starts the camera application, and then starts the camera driver by calling the kernel layer, and captures a static image or video through the camera 193. In the process of starting the camera application, the electronic device will execute the subsequent camera application processing method in the embodiment of the present application.
[0062] The present application embodiment provides a camera application processing method, which can be applied to the above electronic device, and the method includes executing a camera function initialization process, such as Figure 3 and Figure 4As shown, for example, the camera application has multiple function modules M1 to M7, and there is a dependency relationship between the seven function modules M1 to M7. According to the dependency relationship between the function modules, the creation process of each function module during the initialization process is divided into the creation process of different parts, that is, each function module is divided into multiple parts, for example, each function module is divided into a first part A, a second part B and a third part C, and the dependency relationship between different parts is different. The camera function initialization process includes:
[0063] Step 101, in the first stage, a first part A of a first functional module and a first part A of a second functional module are created in parallel. Assume that the first functional module is M1, the second functional module is M2, and the first stage is t1, that is, in stage t1, the first parts A of the two functional modules M1 and M2 are created in parallel;
[0064] Step 102, in the second stage after the first stage, the second part of the first functional module is created, and the second part B of the first functional module M1 depends on the first part A of the second functional module M2. Assume that the second stage is t3, that is, in stage t3, the second part B of the first functional module M1 is created depending on the first part A of the second functional module M2 that has been created.
[0065] The camera application processing method in the embodiment of the present application divides the creation process of each functional module during the initialization process into the creation process of different parts, and can create parts of multiple functional modules in a parallel manner without creating another functional module after a certain functional module is completely created, thereby improving the initialization speed of the functional modules, and for the second part of the first functional module, the creation is performed after the creation of the first part of the second functional module on which it depends is completed, so as to ensure that the required dependency relationship is met between the multiple functional modules in the process of creating multiple functional modules in parallel. The camera application processing method can reduce the time consumption of camera function initialization, thereby improving the display speed of the preview screen shot by the camera.
[0066] In some embodiments, the camera function initialization process includes: creating multiple function modules in multiple stages in sequence, each function module includes multiple parts, the multiple function modules include a first function module and a second function module, and the multiple stages include a first stage and a second stage; in each stage, creating a part of at least one function module in parallel; the multiple stages include n stages, and the parts on which any part created in the i-th stage of the n stages depends are all created before the i-th stage, n>1, and the value of i is 2, 3,..., n.
[0067] Specifically, Figure 4As shown, for example, the initialization process includes four stages, namely, the first stage t1, the second stage t2, the third stage t3 and the fourth stage t4, in sequence, n=4. The first stage here is not consistent with the description of the first stage mentioned above, and the two can represent the same stage or different stages. Similarly, the second stage is not consistent with the description of the second stage mentioned above, and the two can represent the same stage or different stages. The first stage t1 is the starting stage of the initialization process. In the first stage t1, the first part A of the first functional module M1 to the seventh functional module M7 is created in parallel. The first part A of each functional module can be a part that does not depend on other functional modules, so these parts can be directly created in parallel at the beginning of the initialization process; in the second stage t2, the second part B of the fourth functional module M4, the sixth functional module M6 and the seventh functional module M7 is created in parallel. The parts on which the second parts B of these three functional modules depend are all created in the first stage t1, so the second parts of these three functional modules can be created in the second stage t2; in the third stage t3, the second part B of the first functional module M1 and the second part B of the second functional module M2 are created in parallel. , the second part B of the third functional module M3, the third part C of the fourth functional module M4, the second part B of the fifth functional module M5, the third part C of the sixth functional module M6 and the third part C of the seventh functional module M7, the parts on which these parts depend are all created in the first stage t1 and the second stage t2, so these parts can be created in the third stage t3; in the fourth stage t4, the third part C of the first functional module M1, the third part C of the second functional module M2, the third part C of the third functional module M3 and the third part C of the fifth functional module M5 are created in parallel, the parts on which these parts depend are all created in the first stage t1, the second stage t2 and the third stage t3, so these parts can be created in the fourth stage t4. In other words, the dependencies between different parts of the same functional module are different. If there are multiple parts that have satisfied the dependencies, multiple parts that have satisfied the dependencies are created in parallel. In this way, the camera function initialization process, that is, the creation process of multiple functional modules, is completed. By dividing each functional module into multiple parts and executing the creation of different functional modules in parallel, the initialization speed of the functional modules can be improved, thereby improving the display speed of the preview screen.
[0068] It should be noted that Figure 3 In the example shown, each functional module is divided into three parts: A, B, and C. This division method is only an example. In other possible implementations, the number of parts into which different functional modules are divided may be different. The functional modules may be divided into more than three parts or less than three parts, which can be determined specifically based on the dependency relationship.
[0069] In some embodiments, at least one portion on which any portion created in the i-th phase of the n phases depends is created in the j-th phase, where j=i-1, and j is an integer less than i.
[0070] Specifically, for example, Figure 4 As shown, the second part B of the third functional module M3 created in the third stage t3 relies on at least one of the second parts B of the fourth functional module M4, the sixth functional module M6 and the seventh functional module M7 created in the second stage t2. Because only in this case, it is necessary to set the creation process of the second part B of the third functional module M3 in the third stage t3 to improve the overall processing efficiency. If the second part B of the third functional module M3 does not need to rely on the parts created in the second stage t2, the second part B of the third functional module M3 can be set to be created in the second stage t2 to further improve the overall processing efficiency.
[0071] In some embodiments, Figure 5 As shown, multiple functional modules are created by multiple threads respectively, and the multiple functional modules correspond to the multiple threads one by one.
[0072] Specifically, in the process of creating multiple functional modules in multiple stages in sequence, multiple threads in the thread pool are used to execute the creation of multiple functional modules in parallel. Each thread executes tasks in multiple stages in sequence. Each task executed is to create the part corresponding to the current stage, and then the part corresponding to the next stage is executed in the next stage, thereby realizing the parallel creation of multiple functional modules based on multi-threading. Figure 4 The timing shown, that is, the correspondence between each stage and the part of the functional module to be created, can be preset, determined and stored in the electronic device. During each execution of the camera function initialization, the pre-stored correspondence between each stage and the part of the functional module to be created is obtained, and then multiple functional modules are created in multiple stages in sequence based on the correspondence.
[0073] In some embodiments, each functional module includes a first part A, and the first part A in each functional module is created in the first stage t1 of the n stages. Since the first stage t1 is the beginning stage of the camera function initialization process, the part without dependency can be directly created in this stage, and the part without dependency here refers to the part that can be created without relying on other parts. This method can improve the overall processing efficiency.
[0074] In some embodiments, the plurality of functional modules include a module for generating image data, a module for receiving image data, a module for synchronizing image data, and a module for performing image processing.
[0075] Specifically, for example, the module for generating image data may be a first functional module M1, specifically RealTimeMCX, which can generate image data by controlling hardware; the module for receiving image data may be a second functional module M2, specifically MultiCameraReprocessRealTime, which can perform functions such as receiving data and allocating memory to cache data; the module for synchronizing image data may include a third functional module M3 and a fourth functional module M4, the third functional module M3 may be Mux, and the fourth functional module M4 may be AnchorSync; the module for performing image processing may include a fifth functional module M5, a sixth functional module M6, and a seventh functional module M7, the fifth functional module M5 may be Bayer2Yuv, which is used for image processing that converts the Bayer Bayer format into the Yuv format, the sixth functional module M6 may be Jpeg, which is used to implement the processing of Jpeg format images, and the seventh functional module M7 may be RawSIT, which is used to implement the processing of Raw format images. It should be noted that the above-mentioned functional modules are only examples, and the corresponding modules can be set according to the actual needs of the camera application. When the camera application has more functions, there may be more functional modules, and when the camera application requires fewer functions, there may also be fewer functional modules.
[0076] In some embodiments, the above method includes: executing the above camera function initialization process when the camera application is started or the mode of the camera application is switched.
[0077] Specifically, the camera application is started, for example, by the user clicking the camera icon to start the camera application. At this time, the electronic device will execute the above-mentioned camera function initialization process. After the initialization is completed, the preview image captured by the camera will be displayed on the preview interface; the camera application mode is switched, for example, by the user clicking the flip camera icon in the camera application interface to switch between the front and rear cameras. At this time, the electronic device will execute the above-mentioned camera function initialization process. After the initialization is completed, the preview image captured by the switched camera will be displayed on the preview interface.
[0078] The present application also provides an electronic device, including: a processor and a memory, the memory is used to store at least one instruction, when the instruction is loaded and executed by the processor, the electronic device executes the method of any of the above embodiments. The specific process and principle of the method are the same as those of the above embodiments, and will not be repeated here. The electronic device can specifically Figure 2 Electronic device shown.
[0079] The electronic devices involved in this application may be smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, and any other products.
[0080] An embodiment of the present application further provides a computer-readable storage medium, including a program or an instruction. When the program or the instruction runs on a computer, the method in any of the above embodiments is executed.
[0081] The embodiments of the present application also provide a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the method in any of the above embodiments.
[0082] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.
[0083] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0084] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A camera application processing method, characterized in that: The process includes executing a camera function initialization process, wherein the camera function initialization process includes: In the first stage, a first part of a first functional module and a first part of a second functional module are created in parallel; In a second phase subsequent to the first phase, a second part of the first functional module is created, the second part of the first functional module being dependent on the first part of the second functional module.
2. The method according to claim 1, characterized in that The camera function initialization process includes: Creating a plurality of functional modules in a plurality of stages in sequence, each of the functional modules comprising a plurality of parts, the plurality of functional modules comprising the first functional module and the second functional module, and the plurality of stages comprising the first stage and the second stage; In each of the stages, a portion of at least one of the functional modules is created in parallel; The multiple stages include n stages, and the parts on which any part created in the i-th stage of the n stages depends are all created before the i-th stage, n>1, and the value of i is 2, 3, ..., n.
3. The method according to claim 2, characterized in that At least one part on which any part created in the i-th stage of the n stages depends is created in the j-th stage, where j=i-1, and j is an integer less than i.
4. The method according to claim 2, characterized in that: The multiple functional modules are created by multiple threads respectively, and the multiple functional modules correspond to the multiple threads one by one.
5. The method according to claim 2, characterized in that: Each of the functional modules includes a first part, and the first part in each of the functional modules is created in the first stage of the n stages.
6. The method according to claim 2, characterized in that The plurality of functional modules include a module for generating image data, a module for receiving the image data, a module for synchronizing image data, and a module for performing image processing.
7. The method according to any one of claims 1 to 6, characterized in that include: The camera function initialization process is performed when the camera application is started or the mode of the camera application is switched.
8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store at least one program, and when the program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The method comprises a program or an instruction, and when the program or the instruction is run on an electronic device, the method according to any one of claims 1 to 7 is executed.
10. A program product, characterized in that The program product includes a program, and when the program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Electronic device and controlling method thereof
CN101193207A
Android App (Application) starting method and related components
CN110908724A
Application starting method and electronic equipment
CN112527403A
Camera starting method and device, terminal equipment and storage medium
CN113032030A
Camera starting method and related apparatus
CN113366819A
