Camera module operation method and device, computer readable medium and electronic device

By obtaining the identification information of the camera module to determine the shooting mode and create the corresponding function driver, the problems of slow response and resource waste caused by creating all function drivers in the terminal device are solved, and the efficient operation of the camera module and the improvement of system performance are achieved.

CN116193249BActive Publication Date: 2025-09-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111415731.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-09-26
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

In the prior art, when a terminal device uses a camera module, all function drivers need to be created, resulting in a slow response speed, wasting system resources, and reducing system performance.

Method used

By obtaining the identification information of the camera module, its corresponding photographing mode is determined, and the corresponding function driver is determined and created according to the photographing mode, thereby avoiding the creation of unnecessary function drivers and only creating the function drivers required by the photographing mode.

Benefits of technology

The response speed of the camera module is improved, system resources are saved, system performance is improved, and the accuracy and efficiency of function drivers are guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116193249B_ABST
    Figure CN116193249B_ABST
Patent Text Reader

Abstract

The present disclosure provides a camera module operation method and device, a computer-readable medium, and an electronic device, and relates to the field of data processing technology. The method is executed by a terminal device integrated with a camera module and a camera platform architecture CamX‑CHI, and includes: obtaining identification information of the camera module, and determining the corresponding shooting mode of the camera module according to the identification information of the camera module; determining a function driver according to the shooting mode, and creating a function driver; wherein different shooting modes correspond to different function driver sets; and running the camera module in the shooting mode according to the created function driver. The present disclosure can effectively avoid the system performance loss caused by the related technology of starting all function drivers of all shooting modes when the camera module is running, effectively improve the startup time of the camera module and the switching efficiency of each shooting mode, improve the response speed of the corresponding module, and enhance the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a camera module operating method, a camera module operating device, a computer-readable medium, and an electronic device. Background Art

[0002] As people's living standards continue to improve, taking photos, selfies, and recording videos have become indispensable forms of entertainment. Consequently, most existing devices now incorporate camera modules. To ensure precise control of camera modules by devices, CamX-CHI, a camera platform architecture, has been proposed for Android devices. All camera module functions are integrated into distinct feature drivers.

[0003] At present, in order to meet the designs of various original equipment manufacturers (OEMs), relevant technical solutions create function-driven features corresponding to all functions of the camera module when the terminal device uses the camera module, resulting in a slow response speed of the camera module, wasting system resources and reducing system performance. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a camera module operation method, a camera module operation device, a computer-readable medium and an electronic device, thereby improving the response speed of the camera module, saving system resources and improving system performance, at least to a certain extent.

[0005] According to a first aspect of the present disclosure, a camera module operation method is provided, which is performed by a terminal device integrated with a camera module and a camera platform architecture CamX-CHI, and the method includes:

[0006] Acquiring identification information of the camera module, and determining a photographing mode corresponding to the camera module according to the identification information of the camera module;

[0007] Determining a function driver according to the photographing mode and creating the function driver; wherein different photographing modes correspond to different function driver sets;

[0008] The camera module in the photographing mode is driven to operate according to the created function.

[0009] According to a second aspect of the present disclosure, a camera module operating device is provided, which is provided in a terminal device integrated with a camera module and a camera platform architecture CamX-CHI, and includes:

[0010] a photographing mode determining module, configured to obtain identification information of the camera module and determine a photographing mode corresponding to the camera module according to the identification information of the camera module;

[0011] a function driver determination module, configured to determine a function driver according to the photographing mode and create the function driver; wherein different photographing modes correspond to different function driver sets;

[0012] A function driver creation module is used to run the camera module in the photographing mode according to the created function driver.

[0013] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.

[0014] According to a fourth aspect of the present disclosure, there is provided an electronic device, comprising:

[0015] processor; and

[0016] The memory is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the above method.

[0017] An embodiment of the present disclosure provides a camera module operation method that can obtain identification information of a camera module and determine a corresponding shooting mode of the camera module based on the identification information of the camera module. Furthermore, the method can determine a corresponding function driver based on the shooting mode, create only the function driver corresponding to the shooting mode, and support the operation of the camera module in the shooting mode based on the created function driver. On the one hand, when the camera module is running, only the function driver corresponding to the camera module is created, avoiding the problem of waste of system resources caused by creating all function drivers in related technical solutions, saving system resources and improving system performance. On the other hand, since only the function driver corresponding to the shooting mode of the camera module is created, the number of function drivers created is reduced, thereby improving the response speed of the camera module when starting or switching shooting modes to a certain extent. On the other hand, since the function drivers corresponding to the same shooting mode of different types of camera modules are different, determining the corresponding shooting mode based on the identification information of the camera module can not only ensure the accuracy of the determined function driver, but also improve the efficiency of the determined function driver, further ensuring the response speed of the camera module.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0020] Figure 1 A schematic diagram showing an overall system architecture to which the embodiments of the present disclosure may be applied is shown;

[0021] Figure 2 A schematic diagram showing an electronic device to which the embodiments of the present disclosure may be applied;

[0022] Figure 3 A schematic diagram of a camera platform architecture CamX-CHI to which the embodiments of the present disclosure can be applied is shown.

[0023] Figure 4 A flowchart schematically illustrates a camera module operating method in an exemplary embodiment of the present disclosure;

[0024] Figure 5 A structural diagram schematically illustrating the relationship between basic components of a camera platform architecture CamX-CHI in an exemplary embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of a process of starting a camera module in an exemplary embodiment of the present disclosure is schematically shown;

[0026] Figure 7 A schematic diagram schematically illustrates a startup process before optimization in an exemplary embodiment of the present disclosure;

[0027] Figure 8 A schematic diagram schematically illustrates an optimized startup process in an exemplary embodiment of the present disclosure;

[0028] Figure 9 A schematic diagram of a process for switching a camera mode of a camera module in an exemplary embodiment of the present disclosure is shown schematically;

[0029] Figure 10 A schematic diagram of a process for determining a function drive in an exemplary embodiment of the present disclosure is schematically shown;

[0030] Figure 11 The figure schematically shows the composition of the camera module operating device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0032] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] Figure 1 A schematic diagram showing an overall system architecture to which the embodiments of the present disclosure can be applied is shown.

[0034] like Figure 1 As shown, the overall architecture of the camera module operation method in the present disclosure may include a development framework Frameworks 110, a CamX architecture 120, a CHI-CDK 130, and a kernel 140. The development framework Frameworks 110 is the basic environment for application (APP) development. For example, a camera application that displays images captured by the camera module can be developed through the development framework Frameworks 110. When a user triggers a photo request through the capture button provided by the camera application, the development framework Frameworks 110 can send the photo request Request to the CamX architecture 120, and the CamX architecture 120 generates an image Result and feeds it back to the development framework Frameworks 110 to display the image in the camera application.

[0035] The CamX architecture 120 represents a code implementation set of general functional interfaces, and the CHI-CDK 130 represents a code implementation set of customizable requirements. The CamX architecture 120 and the CHI-CDK 130 constitute the camera platform architecture CamX-CHI in this example embodiment.

[0036] The CamX architecture 120 maintains communication with the Kernel 140 through the V4L2 framework, and maintains interaction with the CHI-CDK 130 by mutually dlopening the so library and obtaining the other party's operation interface.

[0037] Below Figure 2 Taking the electronic device 200 in FIG. 1 as an example, the structure of the terminal device in the present disclosure is exemplarily described. Figure 2 The electronic device 200 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0038] like Figure 2 As shown, electronic device 200 is implemented as a general-purpose computing device. Components of electronic device 200 may include, but are not limited to, at least one processing unit 210, at least one storage unit 220, a bus 230 connecting various system components (including storage unit 220 and processing unit 210), and a display unit 240.

[0039] The storage unit 220 stores program codes, and the program codes can be executed by the processing unit 210 , so that the processing unit 210 executes the motion posture determination method in this specification.

[0040] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 221 and / or a cache memory unit 222 , and may further include a read-only memory unit (ROM) 223 .

[0041] The storage unit 220 may also include a program / utility 224 having a set (at least one) of program modules 225, such program modules 225 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0042] Bus 230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0043] The electronic device 200 can also communicate with one or more external devices 270 (e.g., sensor devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 200, and / or any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can occur via an input / output (I / O) interface 250. Furthermore, the electronic device 200 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 260. As shown, the network adapter 260 communicates with other modules of the electronic device 200 via a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and sensor modules (e.g., gyroscope sensors, magnetic sensors, acceleration sensors, distance sensors, proximity sensors, etc.).

[0044] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0045] Figure 3 A schematic diagram of a camera platform architecture CamX-CHI to which the embodiments of the present disclosure can be applied is shown.

[0046] refer to Figure 3 As shown in the figure, CamX implements the HAL3 interface at the top and communicates with the kernel through the V4L2 framework at the bottom. In the middle, it interacts with CHI by dlopening the so library and obtaining the other party's operation interface.

[0047] The CamX part can include the following main directory structures: Core: used to store the core implementation module of CamX, which also includes the Hal directory mainly used to implement the HAL3 interface, and the CHI directory responsible for interacting with CHI; Csl: used to store the communication module mainly responsible for CamX and Camera driver, providing a unified Camera driver control interface for CamX; Hwl: used to store hardware nodes with independent computing capabilities, which are managed by Csl; Swl: used to store nodes that do not have independent computing capabilities and must rely on the CPU to be implemented.

[0048] CHI-CDK can include the following main directory structures: Chioverride: used to store the core module of CHI implementation, responsible for interacting with CamX and implementing the overall framework of CHI and specific business processing; Bin: used to store configuration items related to the camera platform architecture; Topology: used to store user-defined Usecase XML configuration files; Node: used to store Nodes for user-defined functions; Module: used to store configuration files for different Sensors, which are needed when initializing the Sensor; Tuning: used to store configuration files for effect parameters in different scenarios; Sensor: used to store private information and register configuration parameters of different Sensors; Actuator: used to store configuration information of different focus modules; Ois: used to store configuration information of the anti-shake module; Flash: stores configuration information of the flash module; Eeprom: stores configuration information of the Eeprom external storage module; Fd: stores configuration information of the face recognition module.

[0049] The following describes in detail the camera module operating method and camera module operating device of the exemplary embodiment of the present disclosure by taking the execution of the method by a terminal device integrated with a camera module and a camera platform architecture CamX-CHI as an example.

[0050] refer to Figure 4 As shown, Figure 4 The flowchart of a camera module operation method in this exemplary embodiment is shown, which may include the following steps S410 to S430:

[0051] In step S410, identification information of the camera module is acquired, and a photographing mode corresponding to the camera module is determined according to the identification information of the camera module.

[0052] In an exemplary embodiment, a camera module refers to a software module in a terminal device that processes image information based on an image acquisition device. For example, the image acquisition device may be composed of an optical lens, an image sensor, a flash, and a control circuit. The camera module may process the sensor data collected and transmitted by the image acquisition device to generate an image for display.

[0053] The identification information of a camera module refers to the data used to identify and distinguish different camera modules, namely, CameraID. Since the processing of collected images is different when using a multi-camera camera module or a single-camera camera module, or when using a single-camera camera module with different camera models, or when using a multi-camera camera module with different camera models and a combination of different types of cameras, differentiating different camera modules by CameraID helps to ensure the accuracy of image processing.

[0054] The photo mode refers to the image processing method adopted by the camera module when it is in different application scenarios. For example, for ordinary scenes with sufficient lighting, the photo mode can adopt the front photo mode or the rear photo mode; for dark scenes with insufficient lighting, the photo mode can adopt the front night scene mode or the rear night scene mode; for scenes of shooting people, the photo mode can adopt the front portrait mode. Of course, other types of photo modes are also possible, and this example embodiment does not specifically limit this.

[0055] In step S420, a function driver is determined according to the photographing mode, and the function driver is created; wherein different photographing modes correspond to different function driver sets.

[0056] In an exemplary embodiment, function driver refers to the basic component Feature in the camera platform architecture CamX-CHI. Function driver Feature represents a specific function. For example, for the artificial intelligence photo mode, it can include function driver FeatureASD. Function driver FeatureASD is used to implement AI (Artificial Intelligence) functions. During preview, it receives each frame of data, analyzes the AI ​​recognition output results of the current scene, and sends them to the upper layer through metadata for subsequent processing. Generally speaking, one function driver Feature or multiple function driver Features can be set for a photo mode. Of course, the function driver Feature can also not be set for the photo mode. Specifically, it can be customized according to user needs in the CHI-CDK corresponding to the camera platform architecture CamX-CHI. This exemplary embodiment does not specifically limit this.

[0057] Figure 5 A structural diagram schematically illustrates the relationship between basic components of a camera platform architecture CamX-CHI in an exemplary embodiment of the present disclosure.

[0058] refer to Figure 5 As shown, the camera platform architecture CamX-CHI may include at least an application instance Usecase component 510 , a function driver Feature component 520 , a camera pipeline control Session component 530 , and a camera pipeline Pipeline component 540 .

[0059] Among them, the application instance Usecase component 510 is the largest abstract concept in the camera platform architecture CamX-CHI, which contains multiple pipelines to implement specific functions. The specific implementation is completed in CHI through the Usecase class, which is mainly responsible for business processing and resource management.

[0060] The function-driven Feature component 520 represents a specific function that requires multiple Pipelines to be combined to implement. It is uniformly managed by Usecase and implemented through the Feature class in CHI. There is no corresponding definition in XML. The specific Feature selection work is completed in Usecase. By passing in the Usecase instance when creating the Feature, the respective resources of Usecase can be accessed.

[0061] The camera pipeline control Session component 530 is an abstract control unit for managing pipelines. A Session has at least one pipeline and controls all hardware resources, managing the flow of requests for each internal pipeline and the input and output of data. It has no customizable parts, so the Session is not defined as an independent unit in the XML file in CHI.

[0062] The camera pipeline component 540 is a collection of all resources that provide a single specific function. It maintains the flow of all hardware resources and data. Each Pipeline can include Node nodes 550 and Link node connection relationships 560. It is implemented in CamX through the Pipeline class and is responsible for the maintenance of the software and hardware resources of the entire Pipeline and the processing of business logic.

[0063] Simply put, it can be considered that a photo mode can correspond to an application instance Usecase. An application instance Usecase can manage and select multiple function-driven Features. A function-driven Feature can be composed of multiple Pipelines to implement a specific function. Pipelines can be managed by Session.

[0064] Of course, this is merely an illustrative example and should not impose any special limitations on this exemplary embodiment.

[0065] Continue to refer Figure 4 In step S430, the camera module in the photographing mode is driven according to the created function.

[0066] In an exemplary embodiment, by determining the shooting mode to be implemented by the camera module, and filtering the function-driven Features that need to be created based on the determined shooting mode, when the camera module is running, only the function-driven Features corresponding to the shooting mode need to be created, so as to maintain the operation of the camera module in the shooting mode, thereby avoiding the problem of waste of system resources caused by creating all the function-driven Features when the camera module is running in any shooting mode in the related technical solutions, and effectively improving the response speed of the camera.

[0067] Steps S410 to S430 are described in detail below.

[0068] In an exemplary embodiment, the Figure 6 To start the camera module, refer to Figure 6 Specifically, it may include:

[0069] Step S610, responding to a start instruction of the camera module, and determining an initial photographing mode corresponding to the camera module according to the start instruction;

[0070] Step S620, determining an initial function driver corresponding to the initial photographing mode;

[0071] Step S630: creating the initial function driver, and initializing the camera module according to the created initial function driver, so as to start the camera module in the initial photographing mode.

[0072] Among them, the start instruction refers to the instruction for the user to start the camera application and call the camera module when taking a photo. For example, the user clicks the icon that triggers the camera application in the image user interface of the terminal device to generate a start instruction, and calls and starts the camera module through the start instruction; of course, the user can also trigger and generate the start instruction to start the camera module in the form of a shortcut key combination, and this example embodiment does not make any special limitations on this.

[0073] The initial photo mode refers to the photo mode corresponding to the camera module when no mode switching operation is performed at startup. For example, the default photo mode of the camera module can be set in advance. For example, the rear photo mode is set as the default photo mode of the camera module. Then, each time the camera module is started, the rear photo mode will be used as the initial photo mode after startup. Of course, the initial photo mode can also be the historical photo mode recorded when the camera module was last shut down. For example, if the user uses the front night scene mode to take a photo and then closes the camera application, then the front night scene mode will be used as the initial photo mode of the camera module when the camera application is restarted next time. This example embodiment does not impose any special restrictions on the setting method of the initial photo mode.

[0074] The initial function driver refers to the function driver corresponding to the initial shooting mode of the camera module. For example, the initial shooting mode may be a rear-mounted night scene mode. The function drivers corresponding to the rear-mounted night scene mode may include FeatureHDR and RealtimeSERIALIZER. In this case, the initial function drivers corresponding to the initial shooting mode are FeatureHDR and RealtimeSERIALIZER. Of course, this is merely an illustrative example and does not impose any particular limitation on this exemplary embodiment.

[0075] During the startup process of the camera module, the initial shooting mode corresponding to the camera module is determined, and then the initial function driver corresponding to the initial shooting mode can be screened. Then, when initializing the camera module, only the initial function driver is created, and other unnecessary function drivers are not created, which reduces the number of function drivers created, thereby improving the response speed of the camera module when starting or switching shooting modes to a certain extent.

[0076] In an exemplary embodiment, the camera module may include a multi-camera camera module and a single-camera camera module, wherein a single-camera camera module refers to a camera module including one camera, and the image captured by the single-camera camera module is simply the recorded image of the camera; a multi-camera camera module refers to a camera module including two or more cameras with different functions. For example, a multi-camera camera module may be a camera module composed of a wide-angle camera combined with a telephoto camera, or a camera module composed of a wide-angle camera combined with a depth-of-field camera. This exemplary embodiment does not specifically limit this. The multi-camera camera module can synthesize images captured by different cameras by superposition, extraction, etc., so as to obtain clearer, higher-resolution, and better-looking images. Since the multi-camera camera module and the single-camera camera module have significant differences in composition, the processing flow of the captured images is also different.

[0077] It is easy to understand that due to the structural limitations of terminal devices such as smartphones, the image acquisition device associated with a multi-camera module is generally located on the back of the terminal device, acting as a rear-facing camera module for image acquisition, while the image acquisition device associated with a single-camera module is generally located on the front of the terminal device, acting as a front-facing camera module for image acquisition. Of course, in special scenarios, the image acquisition device associated with a multi-camera module can also be located on the front of the terminal device, and the image acquisition device associated with a single-camera module can also be located on the back of the terminal device, but this exemplary embodiment is not limited to this.

[0078] It is understandable that different shooting modes may correspond to different function driver sets. Specifically, different shooting modes may correspond to different function driver sets, including: different shooting modes in a camera module may correspond to different function driver sets. For example, in a single-camera camera module, shooting mode 1, shooting mode 2, and shooting mode 3 may be included, wherein shooting mode 1 may include function driver 2, function driver 3, and function driver 5, shooting mode 2 may include function driver 6, function driver 7, and function driver 8, and shooting mode 3 may include function driver 1, function driver 3, and function driver 4. Of course, this is merely an illustrative example and should not impose any special limitations on this exemplary embodiment.

[0079] In this example embodiment, the multi-camera module may include at least a rear-camera photo mode and a rear-camera night mode, wherein the rear-camera photo mode may include at least an MFNR function driver and a RawHDR function driver. The MFNR (Multi Frame Noise Reduction) function driver is mainly used to perform multi-frame noise reduction processing on image data, and the RawHDR function driver is mainly used to perform HDR (High-Dynamic Range) synthesis on image data based on the original data Raw format to respectively display the details of the highlights, midtones, and shadows in the image data; the rear-camera night mode may include at least an HDR function driver and a Demux Serializer function driver. The HDR function driver is mainly used to synthesize a final HDR image based on LDR (Low-Dynamic Range) images with different exposure times and using the LDR images with the best details corresponding to each exposure time. Compared with ordinary images, HDR images can provide a wider dynamic range and image details. The Demux Serializer function driver is mainly used to demultiplex and serialize the image data to improve the transmission and storage efficiency of the image data.

[0080] A single-camera camera module may include at least a front-facing photo mode and a front-facing night scene mode, wherein the front-facing photo mode may include at least a Y2YPostMFNR function driver and an Anchor function driver, the Y2YPostMFNR function driver is mainly used to convert the color space of the image data into a YUV color space and perform multi-frame noise reduction, thereby effectively reducing the noise data in the image data, and the Anchor function driver is mainly used to perform target detection on the image data; the front-facing night scene mode may include at least a FormatConvertor function driver and a RealTimeSerializer function driver, the FormatConvertor function driver is mainly used to convert a digital image into a matrix form and store it in the form of one-dimensional and two-dimensional arrays, and the RealTimeSerializer function driver is mainly used to perform real-time serialization processing on the image data to improve transmission efficiency.

[0081] It is easy for those skilled in the art to understand that the above-mentioned photographing modes and the functional drivers corresponding to the photographing modes are only illustrative, so as to facilitate those skilled in the art to understand the relationship between the camera module and the photographing modes and functional drivers in the present disclosure. In actual application, the photographing modes corresponding to the camera module are not limited to the above-mentioned illustrative examples, and the functional drivers corresponding to each photographing mode are not limited to the above-mentioned illustrative examples, and should not impose any special limitations on this exemplary embodiment.

[0082] Figure 7A schematic diagram schematically illustrates a startup process before optimization in an exemplary embodiment of the present disclosure.

[0083] refer to Figure 7 As shown, the startup process 710 before optimization can be divided into a process 720 of starting a multi-camera module and a process 730 of starting a single-camera module.

[0084] Among them, the shooting mode 740 corresponding to the multi-camera camera module can include multiple shooting modes such as rear photo mode and rear night scene mode. In the process 720 of starting the multi-camera camera module, no matter what type of shooting mode the initial shooting mode of the multi-camera camera module is, all function drivers 750 corresponding to the multi-camera camera module will be created.

[0085] The photo mode 760 corresponding to the single-camera module can include multiple photo modes such as front photo mode and front night scene mode. In the process 730 of starting the single-camera module, no matter what type of photo mode the initial photo mode of the single-camera module is, all function drivers 770 corresponding to the single-camera module will be created.

[0086] Assume that the multi-camera camera module (or single-camera camera module) only sets the rear photo mode (or front photo mode) at startup, and the number of function-driven Features corresponding to the rear photo mode (or front photo mode) is 2, that is, only these two function-driven Features are created to realize the rear photo mode (or front photo mode) of the multi-camera camera module (or single-camera camera module). However, the startup process 710 before optimization will create 100 function-driven Features corresponding to the multi-camera camera module (or single-camera camera module) to realize the rear photo mode (or front photo mode) of the multi-camera camera module (or single-camera camera module). Since a large number of unnecessary function-driven Features are created, it will cause waste of system resources, reduce system performance, and reduce the response speed of the camera module.

[0087] Figure 8 A schematic diagram schematically illustrates an optimized startup process in an exemplary embodiment of the present disclosure.

[0088] refer to Figure 8 As shown, the optimized startup process 810 can be divided into a process 820 of starting a multi-camera module and a process 830 of starting a single-camera module.

[0089] Among them, the shooting mode 840 corresponding to the multi-camera camera module can include multiple shooting modes such as rear photo mode and rear night scene mode. In the process 820 of starting the multi-camera camera module, the initial function driver 850 exclusive to the initial shooting mode can be screened according to the initial shooting mode of the multi-camera camera module when it is started, and only the initial function driver 850 corresponding to the initial shooting mode is created.

[0090] The shooting mode 860 corresponding to the single-camera camera module may include multiple shooting modes such as front-facing photo mode and front-facing night scene mode. In the process 830 of starting the multi-camera camera module, the initial function driver 870 exclusive to the initial shooting mode can be screened according to the initial shooting mode of the single-camera camera module at startup, and only the initial function driver 870 corresponding to the initial shooting mode can be created.

[0091] Assume that the multi-camera camera module (or single-camera camera module) only sets the rear photo mode (or front photo mode) at startup, and the number of function-driven Features corresponding to the rear photo mode (or front photo mode) is 2, that is, only these two function-driven Features are created to realize the rear photo mode (or front photo mode) of the multi-camera camera module (or single-camera camera module). The optimized startup process 810 only creates two exclusive initial function drivers corresponding to the rear photo mode (or front photo mode). Since the creation of a large number of unnecessary function-driven Features is avoided, the waste of system resources by the startup process 710 before optimization is reduced, the system performance is improved, and the response speed of the camera module is improved.

[0092] In an exemplary embodiment, the Figure 9 To switch the camera module's photo mode, refer to Figure 9 Specifically, it may include:

[0093] Step S910, responding to a photographing mode switching instruction for the camera module, determining a current photographing mode of the camera module and a target photographing mode to be switched;

[0094] Step S920: obtaining a current function driver set corresponding to the current photographing mode, and obtaining a target function driver set corresponding to the target photographing mode;

[0095] Step S930, comparing the current function driver set with the target function driver set to determine common function drivers;

[0096] Step S940, stopping the function drivers other than the common function driver in the current function driver set, and creating function drivers other than the common function driver in the target function driver set, so as to switch the current shooting mode of the camera module to the target shooting mode.

[0097] The photo mode switching instruction refers to an instruction generated by a user through a triggering operation to implement a photo mode switch. For example, a photo mode switch control may be provided on the camera application interface, and the user may select a photo mode through the switch control, thereby generating a photo mode switching instruction. Of course, the photo mode switching instruction may also be an instruction for switching photo modes automatically generated by the system based on changes in the current application scenario of the terminal device. For example, if the terminal device moves from a well-lit indoor scene to a dimly lit outdoor scene, the system may generate a photo mode switching instruction to switch from the rear-view camera photo mode to the rear-view camera night scene mode based on the change in ambient light. This example embodiment does not specifically limit the method for generating the photo mode switching instruction.

[0098] The current function driver set refers to a list of function drivers corresponding to the current photographing mode before switching. For example, the current function driver set corresponding to the current photographing mode may be a list consisting of Feature1, Feature2, Feature5, and Feature6. Of course, this example embodiment is not limited to this.

[0099] The target function driver set refers to a list of function drivers corresponding to the target photographing mode after switching. For example, the target function driver set corresponding to the target photographing mode may be a list consisting of Feature2, Feature3, Feature4, and Feature5. Of course, this example embodiment is not limited to this.

[0100] Common function drivers refer to function drivers that are common to both the current photographing mode and the target photographing mode. For example, the current function driver set may be a list consisting of Feature1, Feature2, Feature5, and Feature6, and the target function driver set may be a list consisting of Feature2, Feature3, Feature4, and Feature5. After comparing the current function driver set and the target function driver set, it can be obtained that the common function drivers of the current photographing mode and the target photographing mode are Feature2 and Feature5. Of course, this is only an illustrative example and should not impose any special limitations on this exemplary embodiment.

[0101] It is easy to understand that before responding to the photo mode switching instruction for the camera module, the camera module can be in operation. At this time, the camera module can determine the current function driver set according to the current photo mode, and create the corresponding current function driver in the current function driver set, and then run the camera module in the current photo mode according to the created current function driver.

[0102] When the current shooting mode of the camera module is switched to the target shooting mode, the function drivers that have been created in the current function driver set except the common function drivers are stopped from running, and the function drivers except the common function drivers in the target function driver set are created, thereby switching the current shooting mode of the camera module to the target shooting mode.

[0103] Since we need to switch to the target shooting mode, in order to avoid wasting system resources due to function drivers that are not used in the current shooting mode, we can directly delete the function drivers that are not used in the target shooting mode. At the same time, in order to avoid the consumption of system resources in the process of deleting the same function driver and then recreating it, we can directly retain the common function driver and then create the remaining function drivers that implement the target shooting mode, thereby reducing the number of recreated function drivers and improving the switching response speed of the camera module's shooting mode.

[0104] In an exemplary embodiment, the Figure 10 The steps in the above code are used to determine the function driver corresponding to the photo mode. Figure 10 Specifically, it may include:

[0105] Step S1010, obtaining identification information of the application instance corresponding to the photographing mode;

[0106] Step S1020: Determine the function driver corresponding to the photographing mode according to the identification information of the application instance.

[0107] Among them, the application instance refers to the Usecase component in the camera platform architecture CamX-CHI. One shooting mode can correspond to an application instance Usecase, and one application instance Usecase can manage and select multiple function-driven Features.

[0108] The identification information of the application instance refers to data for distinguishing the application instance Usecase corresponding to different photographing modes. For example, the identification information of the application instance may be UsecaseID.

[0109] Application instances corresponding to different types of shooting modes can be pre-set, and a mapping relationship between different types of shooting modes and identification information of application instances can be established. When in use, the identification information of the application instance can be determined according to the shooting mode and the mapping relationship, and the corresponding application instance can be found by querying the identification information, and then the function driver corresponding to the shooting mode can be determined according to the application instance Usecase.

[0110] Specifically, the camera platform architecture CamX-CHI may include a CHI-CDK part. CHI-CDK may include a custom configuration file, i.e., an XML file. Users or OEMs may use the custom configuration file to customize the function driver corresponding to the application instance.

[0111] Specifically, the configuration information of the application instance can be determined from a preset custom configuration file according to the identification information of the application instance, and then the function driver corresponding to the photographing mode can be determined according to the configuration information.

[0112] In summary, in this exemplary embodiment, the identification information of a camera module can be obtained, and the corresponding photography mode of the camera module can be determined based on this identification information. Furthermore, the function driver corresponding to the photography mode can be determined, and only the function driver corresponding to the photography mode can be created. The created function driver then supports the operation of the camera module in the photography mode. On the one hand, during camera module operation, only the function driver corresponding to the camera module is created, avoiding the waste of system resources caused by creating all function drivers in related technical solutions, thus saving system resources and improving system performance. On the other hand, since only the function driver corresponding to the photography mode of the camera module is created, the number of function drivers created is reduced, thereby improving the response speed of the camera module during startup or when switching between photography modes. Furthermore, since the function drivers corresponding to the same photography mode vary for different camera modules, determining the corresponding photography mode based on the identification information of the camera module not only ensures the accuracy of the function driver determination, but also improves the efficiency of the function driver determination, further ensuring the response speed of the camera module.

[0113] It should be noted that the above figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0114] For further reference, Figure 11 As shown, in the embodiment of this example, a camera module operating device 1100 is further provided, which may include a photographing mode determining module 1110, a function driver determining module 1120, and a function driver creating module 1130. Among them:

[0115] The photographing mode determining module 1110 may be configured to obtain identification information of the camera module and determine a photographing mode corresponding to the camera module according to the identification information of the camera module;

[0116] The function driver determination module 1120 may be configured to determine a function driver according to the photographing mode and create the function driver; wherein different photographing modes correspond to different sets of function drivers;

[0117] The function driver creation module 1130 may be configured to operate the camera module in the photographing mode according to the created function driver.

[0118] In an exemplary embodiment, the camera module operating device 1100 may include a camera module starting unit, and the camera module starting unit may be configured to:

[0119] In response to an on-command for starting a camera module, determining an initial photographing mode corresponding to the camera module according to the on-command;

[0120] Determining an initial function driver corresponding to the initial photographing mode;

[0121] The initial function driver is created, and the camera module is initialized according to the created initial function driver to start the camera module in the initial photographing mode.

[0122] In an exemplary embodiment, the camera module operating device 1100 may include a photographing mode switching unit, which may be configured to:

[0123] In response to a photographing mode switching instruction for the camera module, determining a current photographing mode of the camera module and a target photographing mode to be switched;

[0124] Obtaining a current function driver set corresponding to the current photographing mode, and obtaining a target function driver set corresponding to the target photographing mode;

[0125] Comparing the current function driver set with the target function driver set to determine a common function driver;

[0126] The function drivers other than the common function driver in the current function driver set are stopped from running, and the function drivers other than the common function driver in the target function driver set are created to switch the current shooting mode of the camera module to the target shooting mode.

[0127] In an exemplary embodiment, the camera module may include at least one of a multi-camera camera module and a single-camera camera module.

[0128] In an exemplary embodiment, the multi-camera module may include a rear-facing photo mode and a rear-facing night view mode, and the single-camera module may include a front-facing photo mode and a front-facing night view mode.

[0129] In an exemplary embodiment, the rear photo mode may include MFNR function driving and RawHDR function driving;

[0130] The rear night scene mode can include HDR function driver and Demux Serializer function driver;

[0131] The front photo mode can include Y2YPostMFNR function driver and Anchor function driver;

[0132] The front night scene mode may include a FormatConvertor function driver and a RealTimeSerializer function driver.

[0133] In an exemplary embodiment, the function driver determination module 1120 may include:

[0134] An identification information acquisition unit, configured to acquire identification information of an application instance corresponding to a photographing mode;

[0135] A function driver determining unit is configured to determine a function driver corresponding to the photographing mode according to identification information of the application instance.

[0136] In an exemplary embodiment, the function-driven determination unit may be configured to:

[0137] Determining configuration information of the application instance from a preset custom configuration file according to the identification information of the application instance;

[0138] The function driver corresponding to the photographing mode is determined through the configuration information.

[0139] In an exemplary embodiment, the camera platform architecture CamX-CHI may include CHI-CDK, which may include a custom configuration file, and the function driver corresponding to the application instance may be configured through the custom configuration file.

[0140] The specific details of each module in the above device have been described in detail in the implementation method part. The undisclosed details can be found in the implementation method part, so they will not be repeated here.

[0141] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0142] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium having stored thereon a program product capable of implementing the methods described above in this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code that, when executed on a terminal device, causes the terminal device to execute the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of the present disclosure.

[0143] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0144] In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0145] In addition, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0146] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0147] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A camera module operation method, characterized in that: The method is performed by a terminal device integrated with a camera module and a camera platform architecture CamX-CHI, and includes: Acquiring identification information of the camera module, and determining a photographing mode corresponding to the camera module according to the identification information of the camera module; Determining a function driver according to the photographing mode, and creating the function driver corresponding to the photographing mode from all function drivers of the camera module; wherein different photographing modes correspond to different function driver sets; Drive the camera module in the photographing mode according to the created function; The method further comprises: In response to a photographing mode switching instruction for the camera module, determining a current photographing mode of the camera module and a target photographing mode to be switched; Obtaining a current function driver set corresponding to the current photographing mode, and obtaining a target function driver set corresponding to the target photographing mode; Comparing the current function driver set with the target function driver set to determine a common function driver; The function drivers other than the common function driver in the current function driver set are stopped from running, and the function drivers other than the common function driver in the target function driver set are created to switch the current shooting mode of the camera module to the target shooting mode.

2. The method according to claim 1, characterized in that The method comprises: In response to an on-command for starting a camera module, determining an initial photographing mode corresponding to the camera module according to the on-command; Determining an initial function driver corresponding to the initial photographing mode; The initial function driver is created, and the camera module is initialized according to the created initial function driver to start the camera module in the initial photographing mode.

3. The method according to claim 1, characterized in that The camera module includes at least one of a multi-camera camera module and a single-camera camera module.

4. The method according to claim 3, characterized in that The multi-camera module includes a rear photo mode and a rear night view mode, and the single-camera module includes a front photo mode and a front night view mode.

5. The method according to claim 4, characterized in that: The rear photo mode includes MFNR function driver and RawHDR function driver; The rear night scene mode includes HDR function driver and Demux Serializer function driver; The front photo mode includes Y2YPostMFNR function driver and Anchor function driver; The front night scene mode includes a FormatConvertor function driver and a RealTimeSerializer function driver.

6. The method according to any one of claims 1 to 5, characterized in that The determining of a function driver according to the photographing mode includes: Get the identification information of the application instance corresponding to the photo mode; A function driver corresponding to the photographing mode is determined according to the identification information of the application instance.

7. The method according to claim 6, characterized in that The determining, according to the identification information of the application instance, a function driver corresponding to the photographing mode includes: Determining configuration information of the application instance from a preset custom configuration file according to the identification information of the application instance; The function driver corresponding to the photographing mode is determined through the configuration information.

8. The method according to claim 7, characterized in that The camera platform architecture CamX-CHI includes CHI-CDK, and the CHI-CDK includes a custom configuration file, and the function driver corresponding to the application instance is configured through the custom configuration file.

9. A camera module operating device, characterized in that: The device is provided in a terminal device integrated with a camera module and a camera platform architecture CamX-CHI, and includes: a photographing mode determining module, configured to obtain identification information of the camera module and determine a photographing mode corresponding to the camera module according to the identification information of the camera module; a function driver determination module, configured to determine a function driver according to the photographing mode, and create the function driver corresponding to the photographing mode from all function drivers of the camera module; wherein different photographing modes correspond to different sets of function drivers; A function driver creation module, configured to operate the camera module in the photographing mode according to the created function driver; The camera module operation device also includes a photographing mode switching unit, which is used to respond to a photographing mode switching instruction for the camera module, determine the current photographing mode of the camera module and the target photographing mode to be switched; obtain a current function driver set corresponding to the current photographing mode, and obtain a target function driver set corresponding to the target photographing mode; compare the current function driver set with the target function driver set to determine a common function driver; stop the operation of function drivers other than the common function driver in the current function driver set, and create function drivers other than the common function driver in the target function driver set, so as to switch the current photographing mode of the camera module to the target photographing mode.

10. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 8 by executing the executable instructions.

Citation Information

Patent Citations

  • Information acquisition device and method, inspection robot and storage medium

    CN110460782A

  • Camera starting method and device, terminal equipment and storage medium

    CN113032030A