Camera application processing methods, devices, storage media and software products
By breaking down the camera function module initialization process into multiple parts, processing them in parallel and waiting for dependencies, the initialization delay problem when the camera application starts up is solved, and the speed of preview display is improved.
Patent Information
- Application Number
- CN202410035109.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-01-09
AI Technical Summary
The existing camera application takes a long time to initialize during startup, resulting in a delay in the display of the preview screen.
The initialization process of the camera function module is divided into multiple parts, and each part of the module is created in parallel. At the same time, the dependent modules are created only after the dependencies are satisfied, and multi-threaded parallel processing is adopted.
The camera function initialization speed has been improved, and the preview display time has been shortened.
Smart Images

Figure CN119255088B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, specifically to a camera application processing method, device, storage medium, and program product. Background Technology
[0002] With the development of mobile phones and other terminal electronic devices, there are more and more scenarios for using camera applications, such as taking photos, recording videos, or scanning QR codes. In these scenarios, the camera application will be launched and enter the preview interface after the camera application is launched, displaying the preview image taken by the camera. However, the initialization process of the current camera application takes a long time, which leads to the problem of not being able to display the preview image in time. Summary of the Invention
[0003] In view of this, this application provides a camera application processing method, device, storage medium, and program product that can reduce the time spent on camera function initialization, thereby improving the display speed of the preview screen captured by the camera.
[0004] In a first aspect, embodiments of this application provide a camera application processing method, including performing a camera function initialization process, the camera function initialization process including: in a first stage, creating a first part of a first functional module and a first part of a second functional module in parallel; in a second stage after the first stage, creating a second part of the first functional module, the second part of the first functional module depending on the first part of the second functional module.
[0005] The camera application processing method in this embodiment divides the creation process of each functional module during initialization into creation processes for different parts. This allows for the parallel creation of multiple functional module parts, eliminating the need to create one functional module completely before creating another, thus improving the initialization speed. Furthermore, for the second part of the first functional module, creation waits until the first part of the second functional module it depends on is completed before execution, ensuring that the required dependencies between multiple functional modules are met during the parallel creation process. This camera application processing method reduces the time spent on camera function initialization, thereby improving the display speed of the camera's preview image.
[0006] In one possible implementation, the camera function initialization process includes: sequentially creating multiple functional modules in multiple stages, each functional module comprising multiple parts, the multiple functional modules including a first functional module and a second functional module, and the multiple stages including a first stage and a second stage; in each stage, creating at least one part of at least one functional module in parallel; the multiple stages include n stages, where any part created in the i-th stage of the n stages depends on parts created before the i-th stage, where n > 1, and i takes the value 2, 3, ..., n. 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.
[0007] In one possible implementation, at least one component that any component created in the i-th stage of n stages depends on is created in the j-th stage, where j = i-1, and j is an integer less than i. Creating the dependent component in the next adjacent stage after all dependent components have been created can further improve the overall initialization efficiency.
[0008] In one possible implementation, multiple functional modules are created by multiple threads, with each functional module corresponding to one thread.
[0009] In one possible implementation, each functional module includes a first part, and the first part of each functional module is created in the first of n stages. Creating the parts of all functional modules that do not depend on other parts in parallel during the initial stage improves the overall initialization efficiency.
[0010] In one possible implementation, the multiple 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 one possible implementation, the method includes performing a camera function initialization process when the camera application is launched or when the camera application switches modes.
[0012] In a second aspect, an electronic device is provided, comprising: a processor and a memory, the memory being used to store at least one program, which, when executed by the processor, causes the electronic device to perform the methods described above.
[0013] Thirdly, a readable storage medium is provided, including a program or instructions, wherein the above-described method is executed when the program or instructions are run on an electronic device.
[0014] Fourthly, a program product is provided, which includes a program that, when executed on an electronic device, causes the electronic device to perform the methods described above. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a structural block diagram of an electronic device according to an embodiment of this application;
[0017] Figure 2 This is a software structure block diagram of an electronic device according to an embodiment of this application;
[0018] Figure 3 This is a schematic diagram illustrating how multiple functional modules are divided into multiple parts in an embodiment of this application;
[0019] Figure 4 This is a timing diagram illustrating the creation of multiple functional modules in an embodiment of this application.
[0020] Figure 5 This application provides an embodiment of a thread pool and a loading / transfer diagram. Detailed Implementation
[0021] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0022] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0023] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0024] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0025] Before describing the embodiments of this application, the relevant technologies and their technical problems will be explained first. In the relevant technologies, camera applications execute corresponding functions through feature modules. Therefore, during the startup process of the camera application, or during the mode switching process of the camera application, camera application function initialization will be performed. Mode switching is, for example, switching cameras. During the initialization process, multiple functional modules related to the camera application are created so that the corresponding functions can be executed through the created functional modules later. The relationship between multiple functional modules is a directed acyclic graph (graph). A graph consists of vertices and edges connecting these vertices. Each edge carries a direction from one vertex to another. A directed graph is a graph where the path is a series of edges, and the endpoint of each edge in the series is the starting point of the next edge. If the starting point of a path is the endpoint of the path, then this path is a cycle. A directed acyclic graph is a directed graph without cycles. That is, in graph theory, if a directed graph cannot return to a vertex by traversing several edges from a certain vertex, then this graph is a directed acyclic graph. Each of the multiple functional modules related to the camera application is a vertex in a directed acyclic graph. In other words, there are certain dependencies between the functional modules. Therefore, during the initialization process, each functional module is created sequentially based on the dependencies between them. Only after all functional modules have been created can the camera application be started or its mode switched to display the preview image captured by the camera.
[0026] Figure 1 A schematic diagram of the structure of the electronic device 100 is shown.
[0027] Electronic device 100 may include processor 110, internal memory 121, camera 193, display screen 194, etc.
[0028] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0029] Processor 110 may include one or more processing units, such as application processors (APs), graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0030] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0031] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0032] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0033] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0034] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0035] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0036] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0037] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0038] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0039] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.
[0040] A layered architecture divides software into several layers, each with a clear role and function. 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 libraries, 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 applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0043] The application framework layer provides application programming interfaces (APIs) and a programming framework for 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, content provider, view system, phone manager, resource manager, notification manager, etc.
[0045] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0046] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0047] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0048] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0049] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0050] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0051] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0052] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0053] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0054] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0055] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0056] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[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 graphics engine for 2D drawing.
[0059] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver and camera driver.
[0060] The following example, using a scene of capturing a photograph, illustrates the workflow of the software and hardware of the electronic device 100.
[0061] When the touch sensor receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a touch click as an example, where the click corresponds to the camera application icon, the camera application calls the interface of the application framework layer to launch the camera application, and then calls the kernel layer to launch the camera driver, capturing still images or videos through camera 193. During the process of launching the camera application, the electronic device executes the subsequent camera application processing methods described in this embodiment.
[0062] This application provides a camera application processing method, which can be applied to the aforementioned electronic device. The method includes performing a camera function initialization process, such as... Figure 3 and Figure 4As shown, for example, a camera application has multiple functional modules M1 to M7. These seven functional modules have dependencies on each other. Based on these dependencies, the creation process of each functional module during initialization is divided into the creation process of different parts. That is, each functional module is divided into multiple parts, for example, each functional module is divided into three parts: Part A, Part B, and Part C. The dependencies between these different parts are different. The camera function initialization process includes:
[0063] Step 101: In the first stage, the first part A of the first functional module and the first part A of the second functional module are created in parallel. Assume that the first functional module is M1 and the second functional module is M2. The first stage is t1. That is, in the t1 stage, the first parts A of the two functional modules M1 and M2 are created in parallel.
[0064] Step 102: In the second stage following the first stage, create the second part of the first functional module. The second part B of the first functional module M1 depends on the first part A of the second functional module M2. Assume the second stage is t3, that is, in the t3 stage, the second part B of the first functional module M1 is created based on the already created first part A of the second functional module M2.
[0065] The camera application processing method in this embodiment divides the creation process of each functional module during initialization into creation processes for different parts. This allows for the parallel creation of multiple functional module parts, eliminating the need to create one functional module completely before creating another, thus improving the initialization speed. Furthermore, for the second part of the first functional module, creation waits until the first part of the second functional module it depends on is completed before execution, ensuring that the required dependencies between multiple functional modules are met during the parallel creation process. This camera application processing method reduces the time spent on camera function initialization, thereby improving the display speed of the camera's preview image.
[0066] In some embodiments, the camera function initialization process includes: sequentially creating multiple functional modules in multiple stages, each functional module including multiple parts, the multiple functional modules including a first functional module and a second functional module, and the multiple stages including a first stage and a second stage; in each stage, creating at least one part of at least one functional 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.
[0067] Specifically, such as Figure 4As shown, for example, the initialization process includes four stages in sequence: stage 1 t1, stage 2 t2, stage 3 t3, and stage 4 t4, where n = 4. The description of stage 1 here is not consistent with the description of stage 1 above; they can refer to the same stage or different stages. Similarly, the description of stage 2 is not consistent with the description of stage 2 above; they can refer to the same stage or different stages. Stage 1 t1 is the beginning stage of the initialization process. In stage 1 t1, the first parts A of functional modules M1 to M7 are 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 created directly in parallel at the beginning stage of the initialization process. In stage 2 t2, the second parts B of functional modules M4, M6, and M7 are created in parallel. The parts that the second parts B of these three functional modules depend on are all created in stage 1 t1, so the second parts of these three functional modules can be created in stage 2 t2. In stage 3 t3, the second parts B of functional module M1 and 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 are all dependent on parts created in stages 1 (t1) and 2 (t2). Therefore, these parts can be created in stage 3 (t3). In stage 4 (t4), the third parts 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. In other words, different parts of the same functional module have different dependencies. If multiple parts satisfy their dependencies, these multiple parts are created in parallel. This completes the camera function initialization process, i.e., the creation process of multiple functional modules. By dividing each functional module into multiple parts and executing the creation of different functional modules in parallel, the initialization speed of 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 that different functional modules are divided into can be different. A functional module can be divided into more than three parts or less than three parts, depending on the dependency relationship.
[0069] In some embodiments, at least one part on which any part created in the i-th stage of n stages depends is created in the j-th stage, where j = i-1 and j is an integer less than i.
[0070] Specifically, for example, such as Figure 4 As shown, the second part B of the third functional module M3, created in the third stage t3, depends 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. This is because only in this case is it necessary to set the creation process of the second part B of the third functional module M3 in the third stage t3 to improve overall processing efficiency. If the second part B of the third functional module M3 does not depend on the parts created in the second stage t2, then the second part B of the third functional module M3 can be created in the second stage t2 to further improve overall processing efficiency.
[0071] In some embodiments, such as Figure 5 As shown, multiple functional modules are created by multiple threads, and there is a one-to-one correspondence between multiple functional modules and multiple threads.
[0072] Specifically, in the process of creating multiple functional modules in multiple stages as described above, multiple threads in a thread pool are used to execute the creation of multiple functional modules in parallel. Each thread executes tasks sequentially in multiple stages, and each executed task is to create the part corresponding to the current stage. Then, in the next stage, the creation of the part corresponding to the next stage is executed, thus achieving the parallel creation of multiple functional modules based on multithreading. Figure 4 The timing sequence shown, that is, the correspondence between each stage and the part of the functional module to be created, can be preset and stored in the electronic device. During each camera function initialization process, 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 sequentially in multiple stages based on the correspondence.
[0073] In some embodiments, each functional module includes a first part A, which is created in the first stage t1 of n stages. Since the first stage t1 is the beginning of the camera function initialization process, dependent parts can be created directly in this stage. Dependent parts refer to parts that can be created without relying on other parts. This approach improves 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 can be a first functional module M1, specifically RealTimeMCX, which can generate image data by controlling hardware; the module for receiving image data can be a second functional module M2, specifically MultiCameraReprocessRealTime, which can perform functions such as receiving data and allocating memory to cache the data; the modules for synchronizing image data can include a third functional module M3 and a fourth functional module M4, where the third functional module M3 can be Mux and the fourth functional module M4 can be AnchorSync; the modules for performing image processing can include a fifth functional module M5, a sixth functional module M6, and a seventh functional module M7, where the fifth functional module M5 can be Bayer2Yuv, used for converting Bayer format to Yuv format; the sixth functional module M6 can be Jpeg, used for processing Jpeg format images; and the seventh functional module M7 can be RawSIT, used for processing Raw format images. It should be noted that the above functional modules are only examples, and the specific modules can be set according to the actual needs of the camera application. A camera application with more functions may have more functional modules, and a camera application with fewer functions may have fewer functional modules.
[0076] In some embodiments, the above method includes performing the above camera function initialization process when the camera application is launched or when the camera application mode is switched.
[0077] Specifically, launching the camera application involves the user clicking the camera icon to launch the camera application. At this time, the electronic device will perform the camera function initialization process described above. After initialization is complete, the preview image captured by the camera will be displayed on the preview screen. Switching the camera application mode involves 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 perform the camera function initialization process described above. After initialization is complete, the preview image captured by the switched camera will be displayed on the preview screen.
[0078] This application also provides an electronic device, including a processor and a memory. The memory stores at least one instruction, which, when loaded and executed by the processor, causes the electronic device to perform the method of any of the above embodiments. The specific process and principle of this method are the same as those in the above embodiments, and will not be repeated here. Specifically, this electronic device can... Figure 2 The electronic device shown.
[0079] The electronic devices involved in this application may be any product such as smart TVs, mobile phones, tablets, personal computers (PCs), personal digital assistants (PDAs), smartwatches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, in-vehicle devices, drone devices, smart cars, smart speakers, robots, smart glasses, etc.
[0080] This application also provides a computer-readable storage medium, including a program or instructions, wherein the methods in any of the above embodiments are executed when the program or instructions are run on a computer.
[0081] This application also provides a computer program product containing executable instructions that, when executed on a computer, cause the computer to perform the methods described in any of the above embodiments.
[0082] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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, all or part of the processes or functions described in this application are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).
[0083] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related 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 represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0084] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A camera application processing method, characterized by, The method comprises performing a camera function initialization process, the camera function initialization process comprising: In a first stage, a first part of a first function module and a first part of a second function module are created in parallel; In a second stage after the first stage, a second part of the first function module is created, the second part of the first function module depending on the first part of the second function module; The camera function initialization process comprises: A plurality of function modules are created in a plurality of stages in sequence, each of the function modules comprising a plurality of parts, the plurality of function modules comprising the first function module and the second function module; In each of the stages, one part of at least one of the function modules is created in parallel; The plurality of stages comprises n stages, any part created in an i-th stage of the n stages depending on parts created before the i-th stage, n>1, i taking values of 2, 3, …, n; The plurality of function modules comprises a module for generating image data, a module for receiving the image data, a module for synchronizing the image data, and a module for performing image processing.
2. The method of claim 1, wherein At least one part on which any part created in an i-th stage of the n stages depends is created in a j-th stage, j=i-1, j being an integer less than i.
3. The method of claim 1, wherein The plurality of function modules are created by a plurality of threads respectively, the plurality of function modules and the plurality of threads corresponding to each other one by one.
4. The method of claim 1, wherein Each of the function modules comprises a first part, the first part in each of the function modules being created in a first stage of the n stages.
5. The method according to any one of claims 1 to 4, characterized in that, The method comprises: When a camera application is started or a mode of the camera application is switched, the camera function initialization process is performed.
6. An electronic device, comprising: The electronic device comprises: A processor and a memory, the memory being configured to store at least one program, the program, when executed by the processor, causing the electronic device to perform the method of any one of claims 1 to 5.
7. A readable storage medium, characterized by, The program product comprises a program, when executed on an electronic device, causing the electronic device to perform the method of any one of claims 1 to 5.
8. A program product, characterized by The program product comprises a program, when executed on an electronic device, causing the electronic device to perform the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Electronic device and controlling method thereof
CN101193207A