Image processing method and device and electronic equipment
By introducing image processing chips in electronic devices, and using the application processor to uniformly manages the image configuration parameters, the problem of poor image quality during the AP side is directly processed by the AP side, and a higher image quality is achieved.
Patent Information
- Application Number
- CN202411344841.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-25
AI Technical Summary
When existing electronic devices directly perform image processing on the AP side, the output image quality is poor.
By introducing image processing chips in electronic devices, and obtaining image configuration parameters by the application processor, they are sent to camera modules and image processing chips, respectively to ensure that the camera module and image processing chip are operated based on the same image configuration parameter.
Improve the output image quality of electronic devices, and enhance the image support capabilities of electronic equipment by combining image processing chips.
Smart Images

Figure CN119383474A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device and electronic equipment. Background Art
[0002] With the rapid development of electronic technology, electronic devices have been widely used, which can support the imaging function of electronic devices through camera modules and application processor system on chip (AP SoC).
[0003] Currently, electronic devices can use AP SoC to process image frames output by camera modules. Since the hardware on the application processor (AP) side is of a general type and is usually not optimized for a specific application scenario such as shooting business scenarios, this image processing method will result in poor output image quality. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method, device and electronic device to solve the technical problem of relatively poor output image quality existing in the image processing method of directly performing image processing on the AP side, and to improve the output image quality of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, which is performed by an electronic device, wherein the electronic device includes a camera module, an application processor, and an image processing chip, and the method includes:
[0006] The application processor obtains image configuration parameters;
[0007] The application processor sends the image configuration parameters to the camera module and the image processing chip respectively;
[0008] The camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip;
[0009] The image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
[0010] In a second aspect, an embodiment of the present application provides an image processing device, which is applied to an electronic device, wherein the electronic device includes a camera module, an application processor, and an image processing chip, and the device includes:
[0011] An acquisition module, used for the application processor to acquire image configuration parameters;
[0012] A first sending module, used for the application processor to send the image configuration parameters to the camera module and the image processing chip respectively;
[0013] A generating module, used for the camera module to generate a target image frame based on the image configuration parameters;
[0014] A second sending module, used for the camera module to send the target image frame to the image processing chip;
[0015] The image processing module is used for the image processing chip to perform image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the image processing method described in the first aspect are implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the image processing method described in the first aspect are implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the image processing method as described in the first aspect.
[0019] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the image processing method as described in the first aspect.
[0020] In an embodiment of the present application, image configuration parameters are obtained through an AP in an electronic device; the AP sends the image configuration parameters to a camera module in the electronic device and an image processing chip in the electronic device respectively; the camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip; the image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image. Since the image processing of the image processing chip depends on the actual exposure, gain and other configuration parameters of the image frame, the same image configuration parameters are sent to the camera module and the image processing chip respectively through the AP to control the camera module to generate an image frame based on the image configuration parameters, and to control the image processing chip to use the same image configuration parameters to act on the image frame output by the camera module, so that the image support capability of the electronic device can be enhanced by combining the image processing chip, thereby improving the output image quality of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flowchart of an image processing method provided by some embodiments of the present application;
[0022] Figure 2 This is one of the schematic diagrams of the timing of sending image configuration parameters by the application processor provided in some embodiments of the present application;
[0023] Figure 3 This is a second schematic diagram of the timing of sending image configuration parameters by an application processor provided in some embodiments of the present application;
[0024] Figure 4 This is a third schematic diagram of the timing of sending image configuration parameters by an application processor provided in some embodiments of the present application;
[0025] Figure 5 It is a schematic diagram of the storage time of image configuration parameters performed by the image processing chip provided in some embodiments of the present application;
[0026] Figure 6 This is a schematic diagram of a functional framework of an electronic device implementing image processing provided by some embodiments of the present application;
[0027] Figure 7 is a schematic diagram of a process flow of image configuration parameters processed by an image processing chip provided in some embodiments of the present application;
[0028] Figure 8 is an interactive schematic diagram of an image processing method of some embodiments of the present application;
[0029] Fig. 9 is a schematic diagram of the structure of an image processing device provided by some embodiments of the present application;
[0030] Fig.10 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application;
[0031] Fig.11 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0034] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0035] It should be noted that the image processing method of the embodiment of the present application is executed by an electronic device, and the electronic device may include a camera module, an application processor and an image processing chip.
[0036] The camera module may include an image sensor (Sensor), which may be a complementary metal oxide semiconductor (CMOS) sensor. The camera module may perform image exposure through the CMOS sensor to generate an image frame. Afterwards, in some embodiments, the camera module may output the image frame to the AP SoC and the image processing chip respectively.
[0037] Among them, image processing chip usually refers to an external chip or module used for graphics processing in mobile devices or computers. The image processing chip is usually used to provide additional graphics processing capabilities to improve the graphics performance of the device and handle graphics-related tasks. In mobile devices, image processing chips can be used to accelerate tasks such as games, video playback, and graphics rendering to provide a smoother user experience. The image processing chip usually works in conjunction with the central processing unit (CPU) to share the load of graphics processing, thereby improving the performance and efficiency of the overall system.
[0038] In some embodiments, the image processing chip may be an application-specific integrated circuit (ASIC) chip. In some embodiments, an external graphics processing unit (GPU) in a computer may also be considered as an image processing chip for processing complex graphics tasks, such as three-dimensional (3D) modeling, video editing, etc. In some high-performance computers or gaming devices, users may also choose to install additional graphics processors to improve graphics performance.
[0039] Among them, the application processor (AP) is a very large-scale integrated circuit that expands audio and video functions and dedicated interfaces based on the central processing unit. It plays the role of computing and calling other functional components in electronic equipment.
[0040] Among them, the AP may include an AP SoC, which can control the camera module to enable the camera module to output image frames. The AP SoC can also control the image processing chip to enable the image processing chip to perform image processing based on the image frames output by the camera module to obtain a first processed image.
[0041] In some embodiments, the AP may also include an image post-processing module, which may perform image post-processing on the first processed image sent by the image processing chip based on the image frame output by the camera module to output the image of the electronic device. In this way, the electronic device may realize image support capability through the camera module, AP and image processing chip.
[0042] In some embodiments, the electronic device may include an AP, a camera module and an ASIC chip. The camera module may output image frames to the AP SoC and the ASIC chip respectively through diversion. The ASIC chip may perform image processing based on the image frames output by the camera module, and send the obtained first processed image to the AP SoC. The AP SoC may perform image post-processing on the first processed image based on the image frames output by the camera module, and output the image accordingly, thereby realizing image support capability.
[0043] Among them, during the image output process of the electronic device, the camera module can generate an image frame based on the image configuration parameters, that is, the image configuration parameters are applied to the camera module so that the camera module generates an image frame, and the image processing chip can perform image processing on the image frame based on the image configuration parameters. In order to ensure that the electronic device outputs a good image effect, the image configuration parameters applied when the camera module generates the image frame usually need to be the same as the image configuration parameters used by the image processing chip to process the image frame, which is described in detail below.
[0044] Figure 1 is a flow chart of the image processing method provided in the embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0045] Step 101: The application processor obtains image configuration parameters.
[0046] In some embodiments, the image configuration parameters may include 3A related meta configuration parameters of the camera module, 3A refers to the camera module's Auto Exposure (AE), Auto White Balance (AWB) and Auto Focus (AF). Among them, AE is to adjust the shutter, aperture and sensitivity to make the image reach the appropriate brightness, AWB is to adjust the gain value of the red R / blue B channel of the image to adjust the color temperature / hue of the image, and AF is to control the displacement of the focus motor to make the lens focus at the appropriate position.
[0047] In some embodiments, the image configuration parameters may include control parameters of the camera module's operating mode and parameters related to the camera module's exposure. Among them, the camera module's operating mode may indicate the color temperature of the generated image frame, such as whether the color temperature is soft or black and white. The image characteristics of the image frames output by the camera module in different operating modes are different. In some embodiments, the camera module's operating mode can be controlled by adjusting the gain value of the red R / blue B channel of the image.
[0048] In some embodiments, the image configuration parameters can act on the CMOS Sensor, so that the CMOS Sensor generates an image frame based on the image configuration parameters, wherein the image frame can be output to the AP SoC by the camera module. When the AP SoC receives the image frame, it can send new image configuration parameters to the CMOS Sensor.
[0049] In some embodiments, the configuration sent by the AP SoC during the process of receiving each image frame may include: a configuration acting on the CMOS Sensor to generate the next image frame, and a configuration acting on the CMOS Sensor to generate the next image frame. That is, if the AP SoC is between the end of receiving the N-1th (N is an integer greater than 1) image frame and the process of receiving the Nth image frame, the image configuration parameters sent to the CMOS Sensor may include the first configuration parameters corresponding to the N+1th image frame of the camera module, and the second configuration parameters corresponding to the N+2th image frame of the camera module.
[0050] Among them, the first configuration parameter corresponding to the N+1th image frame of the camera module refers to the configuration parameter that can act on the CMOS Sensor to generate the N+1th image frame, and the second configuration parameter corresponding to the N+2th image frame of the camera module refers to the configuration parameter that can act on the CMOS Sensor to generate the N+2th image frame.
[0051] Among them, the first configuration parameter can be a configuration parameter of the first type, and the configuration parameter indicated by the first type is a control parameter of the working mode of the camera module; the second configuration parameter can be a configuration parameter of the second type, and the configuration parameter indicated by the second type is a parameter related to exposure.
[0052] In some embodiments, the AP SoC can obtain image configuration parameters when the electronic device starts the camera module. In some embodiments, the AP SoC can obtain pre-set image configuration parameters, for example, when the camera module starts to start, the AP SoC can obtain pre-set image configuration parameters. In some embodiments, when the AP SoC obtains the N-1th image frame, it can calculate the image configuration parameters based on the image features of the N-1th image frame, so that the image features output by the electronic device can be dynamically adjusted to improve the output image effect of the electronic device.
[0053] Step 102: The application processor sends image configuration parameters to the camera module and the image processing chip respectively.
[0054] Among them, when the AP SoC obtains the image configuration parameters, it can send them to the camera module and the image processing chip at the same time, or send them to the camera module and the image processing chip at different times.
[0055] Among them, due to the shadow mechanism of CMOS Sensor, AP SoC needs to send the image configuration parameters to the camera module before the image configuration parameters take effect in the hardware register of CMOS Sensor. The shadow mechanism of CMOS Sensor refers to the hardware register of CMOS Sensor as the shadow of CMOS Sensor, so that the hardware register can process the operation for CMOS Sensor and ensure the final effect, that is, to meet the demand for writing to CMOS Sensor. The hardware register needs to correctly handle its own state to ensure that the operation is consistent with that of CMOS Sensor.
[0056] That is to say, the hardware register of the CMOS Sensor needs to have the image configuration parameters written into the hardware register before the image configuration parameters act on the CMOS Sensor. Furthermore, the image configuration parameters need to be written into the hardware register before the image configuration parameters take effect in the hardware register of the CMOS Sensor, so as to ensure that the image configuration parameters stored in the hardware register can act on the CMOS Sensor, so that the CMOS Sensor generates a corresponding image frame.
[0057] In some embodiments, when the image configuration parameters include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, since the effective moment of the image configuration parameters in the hardware register of the CMOS Sensor is usually during the process of the application processor receiving the Nth image frame output by the camera module, the application processor can send the image configuration parameters to the camera module near the starting moment of receiving the Nth image frame output by the camera module.
[0058] Accordingly, the camera module can store the image configuration parameters in the hardware register before the state of the hardware register of the CMOS Sensor is switched, so that when the state switching moment of the hardware register of the CMOS Sensor comes, the image configuration parameters stored in the hardware register of the CMOS Sensor take effect. The CMOS Sensor taking effect on the image configuration parameters means that the state of the image configuration parameters stored in the hardware register is switched to the effective state. When the CMOS Sensor takes effect on the image configuration parameters, the image configuration parameters can act on the CMOS Sensor to generate image frames.
[0059] Due to the shadow mechanism of the image processing chip, the configuration parameters of the image frame need to be written into the hardware register of the image processing chip before the image frame begins to be received, so as to ensure that the image processing chip can perform image processing based on the configuration parameters stored in the hardware register. The shadow mechanism of the image processing chip is similar to the shadow mechanism of the CMOS Sensor, which will not be described in detail here.
[0060] In some embodiments, when the image configuration parameters include the first configuration parameters corresponding to the N+1th image frame of the camera module and the second configuration parameters corresponding to the N+2th image frame of the camera module, the application processor may send the image configuration parameters to the image processing chip before the start time of receiving the N+1th image frame. Accordingly, the image processing chip may store them in the hardware register so that the image configuration parameters stored in the hardware register of the image processing chip can be used for image processing of the corresponding image frame.
[0061] In this step, the application processor sends the same image configuration parameters to the camera module and the image processing chip respectively. In this way, the camera module and the image processing chip can be controlled by the application processor so that both can perform corresponding operations based on the same image configuration parameters, thereby ensuring that the electronic device outputs good image effects.
[0062] Step 103: The camera module generates a target image frame based on the image configuration parameters and sends the target image frame to the image processing chip.
[0063] In some embodiments, when the camera module receives the image configuration parameters, it can write the image configuration parameters into the hardware register of the CMOS Sensor, and the image configuration parameters stored in the hardware register of the CMOS Sensor can act on the camera module, so that the CMOS Sensor of the camera module generates the target image frame. The image configuration parameters act on the camera module, which means that the shutter, aperture, sensitivity, and gain value of the red R / blue B channel of the image are adjusted based on the image configuration parameters, and the displacement of the focus motor is controlled, so that the CMOS Sensor generates the corresponding image frame.
[0064] During the operation of the CMOS Sensor, the CMOS Sensor continuously generates image frames and sends the image frames to the image processing chip one by one. In some embodiments, the CMOS Sensor can be divided into two branches, which send the image frames to the AP SoC and the image processing chip respectively.
[0065] In some embodiments, the image configuration parameters may include a first configuration parameter corresponding to the N+1th image frame and a second configuration parameter corresponding to the N+2th image frame. During the operation of the CMOS Sensor, the first configuration parameter stored in the hardware register of the CMOS Sensor may be obtained, and the first configuration parameter may be applied to the CMOS Sensor to generate the N+1th image frame, and the second configuration parameter stored in the hardware register of the CMOS Sensor may be obtained, and the second configuration parameter may be applied to the CMOS Sensor to generate the N+2th image frame. The target image frame may include two image frames, namely the N+1th image frame and the N+2th image frame.
[0066] In some embodiments, the image configuration parameters may include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module. The camera module may generate the N+1th image frame based on the second configuration parameter and the first configuration parameter corresponding to the N+1th image frame. The camera module may also generate the N+2th image frame based on the second configuration parameter and the first configuration parameter corresponding to the N+2th image frame.
[0067] Among them, the first configuration parameter and the second configuration parameter corresponding to the same image frame are sent by the application processor at different times. For example, the second configuration parameter corresponding to the N+1th image frame is sent by the application processor during the reception process of the N-1th image frame, and the first configuration parameter corresponding to the N+1th image frame is sent by the application processor during the reception process of the Nth image frame. The second configuration parameter corresponding to the N+2th image frame is sent by the application processor during the reception process of the Nth image frame, and the first configuration parameter corresponding to the N+2th image frame is sent by the application processor during the reception process of the N+1th image frame.
[0068] When the camera module generates a target image frame, the camera module can send the target image frame to the image processing chip, so as to perform image processing on the target image frame with the help of the image processing function of the image processing chip, thereby improving the output image effect of the electronic device.
[0069] Step 104: The image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
[0070] In some embodiments, upon receiving the image configuration parameters, the image processing chip may store them in a hardware register.
[0071] In some embodiments, the image configuration parameters may include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, and the target image frame may include the N+1th image frame and the N+2th image frame. The image processing chip may perform image processing on the N+1th image frame based on the first configuration parameter stored in the hardware register when receiving the N+1th image frame, and may perform image processing on the N+2th image frame based on the second configuration parameter stored in the hardware register when receiving the N+2th image frame.
[0072] In some embodiments, the image configuration parameters may include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module. When the image processing chip receives the N+1th image frame, it may perform image processing on the N+1th image frame based on the second configuration parameter and the first configuration parameter corresponding to the N+1th image frame. When the image processing chip receives the N+2th image frame, it may perform image processing on the N+2th image frame based on the second configuration parameter and the first configuration parameter corresponding to the N+2th image frame.
[0073] In this embodiment, the same set of image configuration parameters is sent to the camera module and the image processing chip through the AP SoC. Accordingly, the image configuration parameters can act on the CMOS Sensor to generate an image frame. When the image processing chip receives the image frame, the image configuration parameters can be used to act on the image frame. In this way, the image processing chip can perform image processing based on the same image configuration parameters as those acting on the CMOS Sensor, which can enhance the image support capability of the electronic device. Among them, the image processing performed by the image processing chip may include image transformation, image enhancement, image denoising, etc., and the image processing is used to improve the graphics performance of the electronic device.
[0074] In this embodiment, the image configuration parameters are obtained through the AP in the electronic device; the AP sends the image configuration parameters to the camera module in the electronic device and the image processing chip in the electronic device respectively; the camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip; the image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image. Since the image processing of the image processing chip depends on the actual exposure, gain and other configuration parameters of the image frame, the same image configuration parameters are sent to the camera module and the image processing chip respectively through the AP to control the camera module to generate an image frame based on the image configuration parameters, and to control the image processing chip to use the same image configuration parameters to act on the image frame output by the camera module, so that the image support capability of the electronic device can be enhanced by combining the image processing chip, thereby improving the output image quality of the electronic device.
[0075] In some embodiments, since both the CMOS Sensor and the image processing chip have a shadow mechanism, it is necessary to store the image configuration parameters in the corresponding hardware registers before they take effect in the hardware registers. This requires that the image configuration parameters of the hardware registers of the image processing chip be synchronized with the image configuration parameters of the hardware registers of the CMOS Sensor. If they cannot be synchronized, the output image quality of the electronic device may be affected.
[0076] Here, synchronization means that the image configuration parameters in the hardware register of the CMOS Sensor can act on the CMOS Sensor to generate an image frame. When the image processing chip receives the image frame, the same image configuration parameters in the hardware register of the image processing chip can be used to act on the image frame to perform image processing.
[0077] It can be seen that due to the shadow mechanism of the CMOS Sensor chip and the image processing chip, the AP SoC needs to send the image configuration parameters to the CMOS Sensor chip and the image processing chip respectively at the correct time point, and the image processing chip needs to store the image configuration parameters in the hardware register at the correct time point. In this way, the image configuration parameters of the hardware register of the image processing chip can be synchronized with the image configuration parameters of the hardware register of the CMOS Sensor, so that the image configuration parameters acting on the CMOS Sensor are the same as the image configuration parameters used by the image processing chip to process the image frame, thereby ensuring the output image effect of the electronic device.
[0078] Taking into account that the configuration sent by the application processor during the reception process of each image frame includes both the configuration corresponding to the next image frame and the configuration corresponding to the next next image frame, and the hardware register has a shadow mechanism, the image processing chip is required to store and manage the image configuration parameters, and the image processing chip is required to control the timing of writing different types of configuration parameters to the hardware registers.
[0079] Optionally, step 102 specifically includes:
[0080] The application processor sends the image configuration parameters to the camera module between the first moment and the second moment; and the application processor sends the image configuration parameters to the image processing chip between the third moment and the fourth moment;
[0081] Among them, the image frames corresponding to the image configuration parameters include the N+1th image frame of the camera module, the first moment is the end moment when the application processor receives the N-1th image frame of the camera module, the second moment is the effective moment of the image configuration parameters in the camera module, the effective moment is the moment when the application processor is in the process of receiving the Nth image frame of the camera module, the third moment is the end moment when the camera module receives the N-1th image frame, and the fourth moment is the start moment when the application processor receives the N+1th image frame of the camera module, and N is an integer greater than 1.
[0082] The time when the application processor sends the image configuration parameters to the camera module may be the same as or different from the time when the application processor sends the image configuration parameters to the image processing chip.
[0083] The moment when the application processor sends the image configuration parameters to the camera module is after the first moment because the AP SoC can calculate the image configuration parameters based on the image features of the N-1th image frame. The moment when the application processor sends the image configuration parameters to the camera module is before the second moment because it is determined by the shadow mechanism of the CMOS Sensor to ensure that the image configuration parameters are written to the hardware register before the state of the hardware register of the CMOS Sensor is switched. In this way, it can be ensured that the image configuration parameters stored in its hardware register can act on the CMOS Sensor to generate the N+1th image frame and the N+2th image frame. Among them, when the state of the hardware register of the CMOS Sensor is switched to the effective state, it means that the CMOS Sensor takes effect on the image configuration parameters, and the corresponding image configuration parameters can act on the CMOSSensor to generate the N+1th image frame and the N+2th image frame.
[0084] like Figure 2As shown, the camera module can output image frames to the AP SoC frame by frame, and the AP SoC can send the image configuration parameters to the camera module at any time between the first time 201 and the second time 202.
[0085] The time when the application processor sends the image configuration parameters to the image processing chip is between the third time and the fourth time, which is determined by the shadow mechanism of the image processing chip to ensure that when the N+1th image frame arrives, the image processing chip has received the image processing chip sent by the application processor and written into the hardware register. In this way, it can be ensured that the image configuration parameters stored in the hardware register of the image processing chip act on the N+1th image frame.
[0086] like Figure 3 As shown, the camera module can output image frames to the AP SoC and the image processing chip frame by frame, and the AP SoC can send the image configuration parameters to the image processing chip at any time between the third moment 301 and the fourth moment 302.
[0087] In this embodiment, the AP SoC controls the sending time of the image configuration parameters so that the sending time is before the effective time of the image configuration parameters in the hardware register in the shadow mechanism of the CMOS Sensor and the image processing chip. This ensures that the image configuration parameters used when the camera module generates an image frame are the same as the image configuration parameters used by the image processing chip to process the image frame.
[0088] Optionally, the moment when the application processor sends the image configuration parameters to the camera module is the same as the moment when the application processor sends the image configuration parameters to the image processing chip.
[0089] In this embodiment, by setting the time when the application processor sends the image configuration parameters to the camera module to be the same as the time when the application processor sends the image configuration parameters to the image processing chip, the application processor can use the same set of sending control processes to send the image configuration parameters, without using different sending control processes to send the image configuration parameters to the camera module and the image processing chip respectively, thereby simplifying the AP SoC's sending control process for the image configuration parameters, and further improving the efficiency of image processing.
[0090] The image configuration parameters are effective in the camera module, usually during the process of the application processor receiving the Nth image frame. In some embodiments, the image configuration parameters are effective in the hardware register of the CMOS Sensor near the start time of the AP SoC receiving the Nth image frame. The AP SoC can determine the start time of the AP SoC receiving the Nth image frame by detecting the start of frame (SOF) of the Nth image frame, i.e., the start mark.
[0091] Optionally, the moment when the application processor sends the image configuration parameters to the camera module is after the start moment when the application processor receives the Nth image frame of the camera module, and the difference between the start moment when the application processor receives the Nth image frame of the camera module is less than a preset threshold. The preset threshold can be set according to actual conditions and is not specifically limited here.
[0092] like Figure 4 As shown, the camera module can output image frames one by one to the AP SoC and the image processing chip. The AP SoC can send the image configuration parameters to the camera module and the image processing chip respectively at time 401. The time 401 is near the starting time 402 when the application processor receives the Nth image frame of the camera module.
[0093] In this way, it can be ensured that the CMOS Sensor can write the image configuration parameters into the hardware register before the state of the hardware register is switched, thereby ensuring that the image configuration parameters of the hardware register of the CMOS Sensor are synchronized with the image configuration parameters of the hardware register of the ASIC chip.
[0094] Optionally, after step 102, the method further includes:
[0095] The image processing chip writes the image configuration parameters into the register;
[0096] The step 104 specifically includes:
[0097] When receiving the target image frame, the image processing chip performs image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image.
[0098] In some embodiments, the image processing chip may include two registers, namely a first register and a second register. The first register may store a first type of configuration parameter, namely a first configuration parameter, and the second register may store a second type of configuration parameter, namely a second configuration parameter.
[0099] In some embodiments, upon receiving the image configuration parameters, the image processing chip may directly write the first configuration parameters into the first register, and write the second configuration parameters into the second register. In some embodiments, the image configuration parameters may be cached first through a cache mechanism, and then the first configuration parameters may be written into the first register at a corresponding time, and the second configuration parameters may be written into the second register at a corresponding time.
[0100] Accordingly, when receiving the target image frame, the image processing chip performs image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image. The first processed image may include two images, namely, an image obtained by performing image processing on the N+1th image frame and an image obtained by performing image processing on the N+2th image frame.
[0101] In some embodiments, when the image processing chip receives the N+1th image frame, it performs image processing on the N+1th image frame based on the first configuration parameter stored in the first register, and when the image processing chip receives the N+2th image frame, it performs image processing on the N+2th image frame based on the second configuration parameter stored in the second register. In this way, by writing the image configuration parameters into the register, the image processing chip can ensure that the image processing chip correctly processes the image frame.
[0102] It should be noted that, due to the shadow mechanism of the hardware register of the image processing chip, it is necessary to write the first configuration parameter to the first register and the second configuration parameter to the second register at the correct time to ensure that the same configuration parameters as the CMOS Sensor can be used for image processing. Optionally, the image configuration parameters include the first configuration parameters corresponding to the N+1th image frame of the camera module and the second configuration parameters corresponding to the N+2th image frame of the camera module, and the target image frame includes the N+1th image frame and the N+2th image frame; the ASIC chip writes the image configuration parameters to the register, including:
[0103] At the fifth moment, the image processing chip writes the first configuration parameters corresponding to the N+1 image frames into the first register; and at the sixth moment, the image processing chip writes the second configuration parameters corresponding to the N+2 image frames into the second register;
[0104] Among them, the first configuration parameters stored in the first register are used to perform image processing on the N+1th image frame, the second configuration parameters stored in the second register are used to perform image processing on the N+2th image frame, the fifth moment is before the starting moment when the image processing chip receives the N+1 image frame, and the sixth moment is before the starting moment when the image processing chip receives the N+2 image frame.
[0105] The fifth moment and the sixth moment may be the same or different.
[0106] In some embodiments, when the image processing chip receives the image configuration parameters, it can first store the image configuration parameters in a cache area, and then when the fifth moment arrives, read the first configuration parameter from the cache area and write it into the first register, and when the sixth moment arrives, read the second configuration parameter from the cache area and write it into the second register.
[0107] like Figure 5 As shown, the image processing chip can write the first configuration parameter into the first register between the moment 501 when the image configuration parameter is received and the fifth moment 502, and write the second configuration parameter into the second register between the moment 501 when the image configuration parameter is received and the sixth moment 503. In this way, the image processing chip can ensure that the image configuration parameters stored in the hardware register of the image processing chip are the same as the image configuration parameters stored in the hardware register of the CMOS Sensor by storing and managing the image configuration parameters and controlling the timing of writing different types of configuration parameters into the hardware register.
[0108] In some embodiments, Figure 6 is a schematic diagram of a functional framework of an electronic device implementing image processing provided by some embodiments of the present application, such as Figure 6 As shown, the electronic device includes an AP SoC 601, a CMOS Sensor 602 and an ASIC chip 603, and the AP SoC 601 can send image configuration parameters to the CMOS Sensor 602 and the ASIC chip 603 respectively;
[0109] The ASIC chip 603 may include a cache management module 6031 for caching image configuration parameters into a suitable memory area in its own space for subsequent use. The cache management module 6031 may cache the first configuration parameter into the first cache area and the second configuration parameter into the second cache area.
[0110] The ASIC chip 603 may further include hardware registers 6032, such as a first register and a second register, which may read a first configuration parameter from the first buffer area and write it into the first register at a fifth moment, such as the end moment when the ASIC chip 603 receives the Nth image frame, and read a second configuration parameter from the second buffer area and write it into the second register at a sixth moment, such as the start moment when the ASIC chip 603 receives the N+1th image frame.
[0111] It should be noted that the start time of receiving the image frame by the AP SoC and the image processing chip can be determined by detecting the start mark of the image frame, that is, when the start mark of the image frame is detected, it can be determined that this moment is the start time of receiving the image frame. Correspondingly, the end time of receiving the image frame by the AP SoC and the image processing chip can be determined by detecting the end mark of the image frame, that is, when the end mark of the image frame is detected, it can be determined that this moment is the end time of receiving the image frame.
[0112] In this embodiment, the shadow mechanism of the image processing chip can be taken into consideration, and through the cache mechanism, the first configuration parameter of the first cache area is written to the first register at the fifth moment, and the second configuration parameter of the second cache area is written to the second register at the sixth moment. In this way, the image configuration parameters of the hardware register of the image processing chip and the image configuration parameters of the hardware register of the CMOS Sensor can be synchronized.
[0113] Optionally, the fifth moment is the end moment of the image processing chip receiving the Nth image frame of the camera module; or,
[0114] The sixth moment is the starting moment when the image processing chip receives N+1 image frames.
[0115] In this embodiment, the image processing chip determines the end time of receiving the Nth image frame of the camera module by the image processing chip by detecting the end of frame (End of Frame, EOF) of the Nth image frame, and can determine the start time of receiving the N+1th image frame of the camera module by detecting the SOF, i.e., the start mark, of the N+1th image frame.
[0116] Figure 7 is a schematic diagram of a process flow of image configuration parameters processed by an image processing chip provided in some embodiments of the present application, such as Figure 7 As shown, the image processing chip may be an ASIC chip, and the process includes the following steps:
[0117] Step 701: The ASIC chip receives the image configuration parameters sent by the AP SoC during the reception process of the Nth image frame. When the electronic device starts the camera module, the CMOS Sensor in the camera module usually sends image frames to the AP SoC and the ASIC chip frame by frame. The AP SoC can send the same set of image configuration parameters to the CMOS Sensor and the ASIC chip during the reception process of each image frame.
[0118] Step 702: the ASIC chip caches the received image configuration parameters into a cache queue in the cache area. Considering that the image configuration parameters sent by the AP SoC include configuration parameters that take effect in the next frame and configuration parameters that take effect in the next next frame, the length of the cache queue can be set to 2.
[0119] Step 703: When the end mark of the Nth image frame is detected, proceed to step 704;
[0120] Step 704: when the Nth image frame ends, read the first configuration parameter from the cache queue and write it into the first register;
[0121] Step 705: When the start mark of the N+1th image frame is detected, proceed to step 706;
[0122] Step 706: at the start of the N+1th image frame, read the second configuration parameter from the cache queue and write it into the second register;
[0123] Step 707: the ASIC chip receives the N+1th image frame, and during the receiving process, it also receives the image configuration parameters sent by the AP SoC, thereby looping back to step 701 to continue processing the image configuration parameters.
[0124] In this embodiment, the image processing chip can control the timing of writing different types of configuration parameters into the register by detecting the SOF and EOF of the image frame. While ensuring that the image configuration parameters of the hardware register of the image processing chip are synchronized with the image configuration parameters of the hardware register of the CMOS Sensor, the image processing chip can simplify the processing flow of the image configuration parameters, thereby simplifying the image processing flow.
[0125] The following specific example describes in detail the specific process of the image processing method of the embodiment of the present application.
[0126] Figure 8 is an interactive schematic diagram of an image processing method of some embodiments of the present application, such as Figure 8 As shown, the following steps are included:
[0127] Step 801: After receiving the N-1th image frame output by the CMOS Sensor, the AP SoC may calculate 3A-related meta configuration parameters, i.e., image configuration parameters, based on the image features of the N-1th image frame, and send the image configuration parameters to the CMOS Sensor and the ASIC chip near the SOF of the Nth image frame;
[0128] Step 802: The microcontroller unit (MCU) of the ASIC chip locally caches the received image configuration parameters. After receiving the image configuration parameters sent by the AP SoC, the ASIC MCU implements effective management through a cache management module such as a meta manager (MetaMgr) module. The functions that need to be supported include: each time an image configuration parameter is received, it needs to be queued for management; each time the ASIC chip receives an image frame in MIPI format and at the end of the image frame, the first configuration parameter is read from the MetaMgr module; each time the ASIC chip receives a MIPI image frame at the start of the image frame, the second configuration parameter is read from the MetaMgr module; each configuration parameter cannot be overwritten before being read from the MetaMgr module and written to the hardware register;
[0129] Module 803: The ASIC MCU reads the first configuration parameter from the MetaMgr module and updates it to the first register each time the EOF of the image frame is received, and reads the second configuration parameter from the MetaMgr module and updates it to the second register each time the SOF of the image frame is received.
[0130] In this way, at the SOF of the Nth image frame, the exposure-related parameters of the N+1th image frame can be read and updated to the second register, and at the EOF of the Nth image frame, the control parameters of the working mode of the camera module of the N+1th image frame can be read and updated to the first register, thereby accurately realizing the effectiveness control of different types of meta configuration parameters acting on each image frame.
[0131] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the image processing device provided in the embodiment of the present application.
[0132] See also Fig. 9 , Fig. 9 : is a structural schematic diagram of an image processing device provided in an embodiment of the present application, which is applied to an electronic device, the electronic device includes a camera module, an application processor and an image processing chip, and the device includes:
[0133] An acquisition module 901 is used for applying a processor to acquire image configuration parameters;
[0134] A first sending module 902 is used for the application processor to send image configuration parameters to the camera module and the image processing chip respectively;
[0135] A generation module 903 is used for the camera module to generate a target image frame based on the image configuration parameters;
[0136] The second sending module 904 is used for the camera module to send the target image frame to the image processing chip;
[0137] The image processing module 905 is used for the image processing chip to perform image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
[0138] Optionally, the first sending module 902 is specifically configured to:
[0139] The application processor sends the image configuration parameters to the camera module between the first moment and the second moment; and the application processor sends the image configuration parameters to the image processing chip between the third moment and the fourth moment;
[0140] Among them, the image frames corresponding to the image configuration parameters include the N+1th image frame of the camera module, the first moment is the end moment when the application processor receives the N-1th image frame of the camera module, the second moment is the effective moment of the image configuration parameters in the camera module, the effective moment is the moment when the application processor is in the process of receiving the Nth image frame of the camera module, the third moment is the end moment when the camera module receives the N-1th image frame, and the fourth moment is the start moment when the application processor receives the N+1th image frame of the camera module, and N is an integer greater than 1.
[0141] Optionally, the moment when the application processor sends the image configuration parameters to the camera module is the same as the moment when the application processor sends the image configuration parameters to the image processing chip.
[0142] Optionally, the moment when the application processor sends image configuration parameters to the camera module is after the starting moment when the application processor receives the Nth image frame of the camera module, and the difference between the starting moment when the application processor receives the Nth image frame of the camera module is less than a preset threshold.
[0143] Optionally, the device further comprises:
[0144] A storage module is used for the image processing chip to write image configuration parameters into registers;
[0145] The image processing module 905 is specifically configured to, when the image processing chip receives a target image frame, perform image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image.
[0146] Optionally, the image configuration parameters include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, and the target image frame includes the N+1th image frame and the N+2th image frame; the storage module is specifically used to:
[0147] At the fifth moment, the image processing chip writes the first configuration parameters corresponding to the N+1 image frames into the first register; and at the sixth moment, the image processing chip writes the second configuration parameters corresponding to the N+2 image frames into the second register;
[0148] Among them, the first configuration parameters stored in the first register are used to perform image processing on the N+1th image frame, the second configuration parameters stored in the second register are used to perform image processing on the N+2th image frame, the fifth moment is before the starting moment when the image processing chip receives the N+1 image frame, and the sixth moment is before the starting moment when the image processing chip receives the N+2 image frame.
[0149] Optionally, the fifth moment is the end moment of the image processing chip receiving the Nth image frame of the camera module; or,
[0150] The sixth moment is the starting moment when the image processing chip receives N+1 image frames.
[0151] In this embodiment, the image configuration parameters are obtained through the AP in the electronic device; the AP sends the image configuration parameters to the camera module in the electronic device and the image processing chip in the electronic device respectively; the camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip; the image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image. Since the image processing of the image processing chip depends on the actual exposure, gain and other configuration parameters of the image frame, the same image configuration parameters are sent to the camera module and the image processing chip respectively through the AP to control the camera module to generate an image frame based on the image configuration parameters, and to control the image processing chip to use the same image configuration parameters to act on the image frame output by the camera module, so that the image support capability of the electronic device can be enhanced by combining the image processing chip, thereby improving the output image quality of the electronic device.
[0152] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0153] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0154] The image processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0155] Alternatively, if Fig.10 As shown, an embodiment of the present application further provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores programs or instructions that can be executed on the processor 1001, and when the program or instructions are executed by the processor 1001, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0156] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0157] Fig.11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0158] The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110. The electronic device may also include a camera module, an application processor, and an image processing chip.
[0159] Those skilled in the art will appreciate that the electronic device 1100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0160] The processor 1110 is configured to:
[0161] The application processor obtains image configuration parameters;
[0162] The application processor sends image configuration parameters to the camera module and the image processing chip respectively;
[0163] The camera module generates a target image frame based on the image configuration parameters and sends the target image frame to the image processing chip;
[0164] The image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
[0165] In this embodiment, the image configuration parameters are obtained through the AP in the electronic device; the AP sends the image configuration parameters to the camera module in the electronic device and the image processing chip in the electronic device respectively; the camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip; the image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image. Since the image processing of the image processing chip depends on the actual exposure, gain and other configuration parameters of the image frame, the same image configuration parameters are sent to the camera module and the image processing chip respectively through the AP to control the camera module to generate an image frame based on the image configuration parameters, and to control the image processing chip to use the same image configuration parameters to act on the image frame output by the camera module, so that the image support capability of the electronic device can be enhanced by combining the image processing chip, thereby improving the output image quality of the electronic device.
[0166] Optionally, the processor 1110 is further configured to:
[0167] The application processor sends the image configuration parameters to the camera module between the first moment and the second moment; and the application processor sends the image configuration parameters to the image processing chip between the third moment and the fourth moment;
[0168] Among them, the image frames corresponding to the image configuration parameters include the N+1th image frame of the camera module, the first moment is the end moment when the application processor receives the N-1th image frame of the camera module, the second moment is the effective moment of the image configuration parameters in the camera module, the effective moment is the moment when the application processor is in the process of receiving the Nth image frame of the camera module, the third moment is the end moment when the camera module receives the N-1th image frame, and the fourth moment is the start moment when the application processor receives the N+1th image frame of the camera module, and N is an integer greater than 1.
[0169] Optionally, the moment when the application processor sends the image configuration parameters to the camera module is the same as the moment when the application processor sends the image configuration parameters to the image processing chip.
[0170] Optionally, the moment when the application processor sends image configuration parameters to the camera module is after the starting moment when the application processor receives the Nth image frame of the camera module, and the difference between the starting moment when the application processor receives the Nth image frame of the camera module is less than a preset threshold.
[0171] Optionally, the processor 1110 is further configured to:
[0172] The image processing chip writes the image configuration parameters into the register;
[0173] When receiving the target image frame, the image processing chip performs image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image.
[0174] Optionally, the image configuration parameters include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, and the target image frame includes the N+1th image frame and the N+2th image frame; the processor 1110 is further used to:
[0175] At the fifth moment, the image processing chip writes the first configuration parameters corresponding to the N+1 image frames into the first register; and at the sixth moment, the image processing chip writes the second configuration parameters corresponding to the N+2 image frames into the second register;
[0176] Among them, the first configuration parameters stored in the first register are used to perform image processing on the N+1th image frame, the second configuration parameters stored in the second register are used to perform image processing on the N+2th image frame, the fifth moment is before the starting moment when the image processing chip receives the N+1 image frame, and the sixth moment is before the starting moment when the image processing chip receives the N+2 image frame.
[0177] Optionally, the fifth moment is the end moment of the image processing chip receiving the Nth image frame of the camera module; or,
[0178] The sixth moment is the starting moment when the image processing chip receives N+1 image frames.
[0179] It should be understood that in the embodiment of the present application, the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0180] The memory 1109 can be used to store software programs and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1109 may include a volatile memory or a non-volatile memory, or the memory 1109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0181] The processor 1110 may include one or more processing units; in some embodiments, the processor 1110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1110.
[0182] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0183] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0184] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0185] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0186] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0187] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0189] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, characterized in that: The method is performed by an electronic device, the electronic device comprising a camera module, an application processor and an image processing chip, and comprises: The application processor obtains image configuration parameters; The application processor sends the image configuration parameters to the camera module and the image processing chip respectively; The camera module generates a target image frame based on the image configuration parameters, and sends the target image frame to the image processing chip; The image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
2. The method according to claim 1, characterized in that The application processor sends the image configuration parameters to the camera module and the image processing chip respectively, including: The application processor sends the image configuration parameter to the camera module between the first moment and the second moment; and the application processor sends the image configuration parameter to the image processing chip between the third moment and the fourth moment; Among them, the image frames corresponding to the image configuration parameters include the N+1th image frame of the camera module, the first moment is the end moment when the application processor receives the N-1th image frame of the camera module, the second moment is the effective moment of the image configuration parameters in the camera module, the effective moment is the moment when the application processor is in the process of receiving the Nth image frame of the camera module, the third moment is the end moment when the camera module receives the N-1th image frame, and the fourth moment is the start moment when the application processor receives the N+1th image frame of the camera module, and N is an integer greater than 1.
3. The method according to claim 2, characterized in that The time when the application processor sends the image configuration parameters to the camera module is the same as the time when the application processor sends the image configuration parameters to the image processing chip.
4. The method according to claim 2, characterized in that: The moment when the application processor sends the image configuration parameters to the camera module is after the starting moment when the application processor receives the Nth image frame of the camera module, and the difference between the moment when the application processor sends the image configuration parameters to the camera module is less than a preset threshold.
5. The method according to any one of claims 1 to 4, characterized in that After the application processor sends the image configuration parameters to the camera module and the image processing chip respectively, the method further includes: The image processing chip writes the image configuration parameters into a register; The image processing chip performs image processing on the target image frame based on the image configuration parameters to obtain a first processed image, including: When receiving the target image frame, the image processing chip performs image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image.
6. The method according to claim 5, characterized in that The image configuration parameters include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, and the target image frame includes the N+1th image frame and the N+2th image frame; The image processing chip writes the image configuration parameters into a register, including: The image processing chip writes the first configuration parameters corresponding to the N+1 image frames into the first register at the fifth moment; and the image processing chip writes the second configuration parameters corresponding to the N+2 image frames into the second register at the sixth moment; Among them, the first configuration parameters stored in the first register are used to perform image processing on the N+1th image frame, the second configuration parameters stored in the second register are used to perform image processing on the N+2th image frame, the fifth moment is before the starting moment when the image processing chip receives the N+1 image frame, and the sixth moment is before the starting moment when the image processing chip receives the N+2 image frame.
7. The method according to claim 6, characterized in that The fifth moment is the end moment of the image processing chip receiving the Nth image frame of the camera module; or, The sixth moment is the starting moment when the image processing chip receives the N+1 image frames.
8. An image processing device, characterized in that: Applied to electronic equipment, the electronic equipment includes a camera module, an application processor and an image processing chip, and the device includes: An acquisition module, used for the application processor to acquire image configuration parameters; A first sending module, used for the application processor to send the image configuration parameters to the camera module and the image processing chip respectively; A generating module, used for the camera module to generate a target image frame based on the image configuration parameters; A second sending module, used for the camera module to send the target image frame to the image processing chip; The image processing module is used for the image processing chip to perform image processing on the target image frame based on the image configuration parameters to obtain a first processed image.
9. The device according to claim 8, characterized in that The first sending module is specifically used for: The application processor sends the image configuration parameter to the camera module between the first moment and the second moment; and the application processor sends the image configuration parameter to the image processing chip between the third moment and the fourth moment; Among them, the image frames corresponding to the image configuration parameters include the N+1th image frame of the camera module, the first moment is the end moment when the application processor receives the N-1th image frame of the camera module, the second moment is the effective moment of the image configuration parameters in the camera module, the effective moment is the moment when the application processor is in the process of receiving the Nth image frame of the camera module, the third moment is the end moment when the camera module receives the N-1th image frame, and the fourth moment is the start moment when the application processor receives the N+1th image frame of the camera module, and N is an integer greater than 1.
10. The device according to claim 9, characterized in that The time when the application processor sends the image configuration parameters to the camera module is the same as the time when the application processor sends the image configuration parameters to the image processing chip.
11. The device according to claim 9, characterized in that The moment when the application processor sends the image configuration parameters to the camera module is after the starting moment when the application processor receives the Nth image frame of the camera module, and the difference between the moment when the application processor sends the image configuration parameters to the camera module is less than a preset threshold.
12. The device according to any one of claims 8 to 11, characterized in that The device also includes: A storage module, used for the image processing chip to write the image configuration parameters into a register; The image processing module is specifically used for the image processing chip to perform image processing on the target image frame based on the image configuration parameters stored in the register to obtain a first processed image when the target image frame is received.
13. The device according to claim 12, characterized in that The image configuration parameters include a first configuration parameter corresponding to the N+1th image frame of the camera module and a second configuration parameter corresponding to the N+2th image frame of the camera module, and the target image frame includes the N+1th image frame and the N+2th image frame; the storage module is specifically used to: The image processing chip writes the first configuration parameters corresponding to the N+1 image frames into the first register at the fifth moment; and the image processing chip writes the second configuration parameters corresponding to the N+2 image frames into the second register at the sixth moment; Among them, the first configuration parameters stored in the first register are used to perform image processing on the N+1th image frame, the second configuration parameters stored in the second register are used to perform image processing on the N+2th image frame, the fifth moment is before the starting moment when the image processing chip receives the N+1 image frame, and the sixth moment is before the starting moment when the image processing chip receives the N+2 image frame.
14. The device according to claim 13, characterized in that The fifth moment is the end moment of the image processing chip receiving the Nth image frame of the camera module; or, The sixth moment is the starting moment when the image processing chip receives the N+1 image frames.
15. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.
16. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for processing image shot by camera and camera
CN102104709A
System and method for processing image data using an image signal processor
CN102547301A
Signal processing method and apparatus for electronic device, and electronic device
CN107066400A
An image sensor synchronous configuration method and device
CN109862259A
Exposure processing method and device, electronic equipment and computer readable storage medium
CN114979498A
Cited By
Image processing method and apparatus, and electronic device
WO2026067173A1