Image processing method and terminal device

By using mathematical models to derive camera module effect parameters in XR scenes, the problem of low image quality of multi-camera modules in complex environments is solved, high-quality image processing under power consumption and cost constraints is achieved, and the XR experience is improved. .

WO2024174711A1PCT designated stage expired Publication Date: 2024-08-29HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/140999
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-23
Filing Date
2023-12-22
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In XR scenarios such as augmented reality (AR) and virtual reality (VR), it is difficult for multi-camera modules to stably capture high-quality images in complex user environments. Existing hardware debugging costs are high, and software debugging leads to increased system load. How to Improving image quality under the constraints of power consumption, load and hardware cost is an urgent problem to be solved.

Method used

By calculating only the effect parameters of some camera modules in a multi-camera module with a common viewing area, and using pre-trained mathematical models to deduce the effect parameters of other camera modules, image shooting and processing can be achieved to avoid unnecessary errors for other cameras. The module configures hardware or software resources and uses deep learning models such as neural networks to derive parameters.

Benefits of technology

Under the constraints of power consumption, load and hardware cost, the image effect quality of multi-camera modules is improved, hardware and software resources are saved, and the XR experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023140999_29082024_PF_FP_ABST
    Figure CN2023140999_29082024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of terminals. Provided are an image processing method and a terminal device. The method comprises: acquiring effect parameters of at least one first camera module according to a real-time image captured by the at least one first camera module; inputting the effect parameters of the at least one first camera module into a trained mathematical model, so as to obtain effect parameters of a second camera module, wherein the at least one first camera module and the second camera module have a co-visibility region; and controlling the second camera module to capture an image by using the effect parameters of the second camera module, and / or by using the effect parameters of the second camera module, performing image processing on a real-time image captured by the second camera module. In the method, effect parameters are calculated according to captured images, without the need to configure corresponding hardware resources or software resources for a second camera module, such that the image effect and quality of a plurality of cameras can be improved under the constraints of power consumption, loads, and hardware costs.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method and terminal device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 23, 2023, with application number 202310203636.5 and application name “Image Processing Method and Terminal Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of image processing, and in particular to an image processing method and terminal device. Background Art

[0003] Extended reality (XR) is a general term for various technologies such as augmented reality (AR), virtual reality (VR), and mixed reality (MR). In XR scenarios, users can use multiple cameras to perceive, locate, or interact with the real world. In order to provide a better XR experience, different cameras need to be able to stably capture high-quality images in complex user environments. The image effect debugging used by existing XR headsets is divided into two categories: hardware debugging and software image algorithm debugging. If hardware debugging is used for multiple cameras, the power consumption and cost will be high; if software debugging is used for multiple cameras, the system load will be high.

[0004] Therefore, how to improve the image quality of multiple cameras under the constraints of power consumption, load and hardware cost is an urgent problem to be solved.

[0005] Summary of the Invention

[0006] The present application provides an image processing method and terminal device, which can improve the image quality of multiple cameras under the constraints of power consumption, load and hardware cost.

[0007] In a first aspect, an image processing method is provided, which is applied to a terminal device. The terminal device includes at least one first camera module and a second camera module, wherein the at least one first camera module and the second camera module have a common viewing area. The method includes: obtaining effect parameters of the at least one first camera module based on real-time images captured by the at least one first camera module; inputting the effect parameters of the at least one first camera module into a trained mathematical model to obtain effect parameters of the second camera module, wherein the trained mathematical model is obtained by training the mathematical model, the input of the mathematical model is sample images captured by the at least one first camera module, and the supervision data of the mathematical model is the effect parameters of the second camera model obtained based on the sample images captured by the second camera module; controlling the second camera module to capture images using the effect parameters of the second camera module, and / or performing image processing on the real-time images captured by the second camera module using the effect parameters of the second camera module.

[0008] According to the image processing method provided by the present application, for multiple camera modules with a common viewing area, only the effect parameters of some (i.e., one or more) camera modules are calculated, and the effect parameters of the other camera modules are derived using a pre-trained mathematical model. Then, the other camera modules use the derived effect parameters to capture images or use the derived effect parameters to perform corresponding image processing on the images captured by the other camera modules. This method does not require the configuration of corresponding hardware resources or software resources for the other camera modules to calculate the effect parameters based on the captured images, and can improve the image effect quality of multiple cameras under the constraints of power consumption, load and hardware cost.

[0009] In one possible implementation, the mathematical model may be a deep learning model, such as a neural network model.

[0010] In a possible implementation, the effect parameter includes one or more of the following: exposure time, exposure gain, white balance coefficient, color correction matrix, or sharpening coefficient.

[0011] In a possible implementation, the terminal device is a mixed reality (MR) device.

[0012] In one possible implementation, the at least one first camera module is connected to at least one image processing unit, which is a hardware resource. Acquiring effect parameters of the at least one first camera module based on real-time images captured by the at least one first camera module includes controlling the at least one image processing unit to perform image processing on the real-time images captured by the at least one first camera module to obtain the effect parameters of the at least one first camera module. This solution can calculate the effect parameters of the at least one first camera module using the image processing unit.

[0013] Exemplarily, the image processing unit may be an image signal processing (ISP), a graphics processing unit (GPU), or a digital signal processing (DSP), or other hardware resources capable of performing image processing.

[0014] In one possible implementation, the real-time image captured by the second camera module is processed using the effect parameters of the second camera module, including: controlling the image algorithm module to use part or all of the effect parameters to perform image processing on the real-time image captured by the second camera module, and the image algorithm module is a software resource.

[0015] In a second aspect, a terminal device is provided, comprising a functional module / unit for executing the method of the first aspect and any possible implementation manner of the first aspect.

[0016] According to a third aspect, a computer-readable medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing the first aspect or any one of the implementations of the first aspect.

[0017] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any one of the implementations of the first aspect.

[0018] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium, wherein the first storage medium can be packaged together with the processor or separately packaged with the processor, and the embodiments of the present application do not specifically limit this.

[0019] In a fifth aspect, a chip system is provided, which is applied to a terminal device, and the chip system includes one or more processors, and the processors are used to call computer instructions to enable the electronic device to execute the method in the first aspect or any one of the implementation methods of the first aspect.

[0020] Optionally, as an implementation method, the chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored on the memory. When the instructions are executed, the processor is used to execute the method in the first aspect or any one of the implementation methods of the first aspect.

[0021] In a sixth aspect, a terminal device is provided, comprising one or more processors, a memory, and multiple camera modules; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code comprising computer instructions, and the one or more processors calling the computer instructions to enable the electronic device to execute the method in the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of an XR head-mounted display provided in an embodiment of the present application;

[0023] FIG2 is a schematic diagram of a process of performing image processing by hardware according to an embodiment of the present application;

[0024] FIG3 is a schematic diagram of a process for performing image processing by software according to an embodiment of the present application;

[0025] FIG4 is a schematic diagram of a camera system of a terminal device provided in an embodiment of the present application;

[0026] FIG5 is a schematic diagram of a method for calculating effect parameters of a camera module provided by an embodiment of the present application;

[0027] FIG6 is a schematic diagram of a machine learning model training method provided in an embodiment of the present application;

[0028] FIG7 is a schematic flow chart of an image processing method provided in an embodiment of the present application;

[0029] FIG8 is another schematic flowchart of another image processing method provided in an embodiment of the present application;

[0030] FIG9 is a schematic block diagram of a terminal device provided in an embodiment of the present application;

[0031] FIG10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in a kind of "or" relationship.

[0033] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0034] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0035] Extended Reality (XR) refers to the use of computers to combine the real and virtual worlds to create a virtual environment that allows for human-computer interaction. XR is also a general term for various technologies, including AR, VR, and MR. In XR scenarios, users can perceive, locate, and interact with the real world through the multiple camera modules in XR devices (for example, XR headsets).

[0036] Exemplarily, FIG1 shows an XR head display intention. Referring to FIG1 , a plurality of camera modules are provided on the XR head display 100, such as camera modules 101 to 104 shown in the figure. There is a common viewing area for at least two camera modules among camera modules 101 to 104, that is, the partial viewing angles of at least two camera modules among camera modules 101 to 104 overlap. For example, the partial viewing angles of camera module 101 and camera module 102 overlap, and the partial viewing angles of camera module 103 and camera module 104 overlap. For example, referring to FIG1 , the images captured by camera module 101 and camera module 102 have partially the same picture (that is, the picture of a person lifting a bicycle). In addition, camera module 102 and camera module 103 may also have partial viewing angles overlapping. In some embodiments, the functions or types of the two camera modules with partial overlapping viewing angles are different. For example, the viewing angles of the camera module 101 and the camera module 102 partially overlap, the camera module 101 can implement the video perspective function, and the camera module 102 can implement the vector space positioning function.

[0037] To provide a better XR experience, different camera modules need to be able to stably capture high-quality images in complex user environments. However, due to the physical defects of the lens and image sensor in the camera module, the raw images output by the camera module are generally of poor quality. In order to obtain a usable image from the raw images output by the camera module, further processing of the raw images is usually required. For example, the raw images can be processed by automatic exposure (AE), automatic white balance (AWB), color correction, sharpening, etc. The following is a brief description of these processing methods.

[0038] Automatic exposure: Automatically adjusts exposure time and exposure gain according to light intensity, thereby adjusting exposure. This ensures that photos taken in different lighting conditions and scenes are accurately exposed and have appropriate brightness, preventing overexposure or underexposure.

[0039] Auto White Balance: Related to color temperature, it measures the color authenticity and accuracy of an image. Specifically, it determines the color temperature of the light source based on the input image, then calculates the R / G / B coefficients (or gains) based on the color temperature. Finally, it adjusts the R / G / B coefficients to correct the input image, accurately restoring the original color of objects in various complex scenes.

[0040] Color correction primarily corrects color errors caused by color bleed between color blocks on the filter. The typical color correction process begins by comparing the image captured by the image sensor with a standard image to calculate a correction matrix. This matrix is ​​the color correction matrix for the image sensor. During the application of the image sensor, this matrix can be used to correct all images captured by the image sensor to obtain images that are closest to the object's true color.

[0041] Sharpening is an image processing method that makes image edges clearer. Its principle is to extract the high-frequency components of the original image and then superimpose them with the original image according to certain rules (involving the sharpening coefficient). The final image is the sharpened image.

[0042] Each of the above-mentioned processing methods corresponds to one or more parameters, which can be called effect parameters of the camera module. In the same environment or scene, the camera module or the corresponding processing unit can use the effect parameters to capture images or perform image processing on the captured images. For example, after automatic exposure, a suitable exposure time and exposure gain can be obtained. The exposure time and exposure gain can be considered as two effect parameters of the camera module. The camera module can use the exposure time and exposure gain to capture images. For another example, after automatic white balance, a suitable white balance coefficient can be obtained. The white balance coefficient can be considered as an effect parameter of the camera module. The camera module can use the white balance coefficient to capture images. Similarly, after color correction and sharpening processing, the corresponding color correction matrix and sharpening coefficient can be obtained. The color correction matrix and the sharpening coefficient are both effect parameters of the camera module. The color correction matrix and the sharpening coefficient can be used to process the image captured by the camera module.

[0043] It should be understood that only some image processing methods are introduced above. In fact, more or fewer processing methods can be used to process the original image. For example, the original image can also be processed by noise removal, bad pixel removal, interpolation, etc.; accordingly, the effect parameters can include the parameters used for the corresponding processing.

[0044] The image processing described above can be implemented in hardware or through software algorithms. The following briefly describes these two implementations in conjunction with Figures 1 and 2.

[0045] Figure 2 is a schematic diagram of the hardware-based image processing process. As shown in Figure 2, the camera module outputs an image signal, which the image processing unit performs post-processing on. These processes include automatic exposure, automatic white balance, color correction, and sharpening, thereby effectively reproducing scene details under varying optical conditions. After processing the image signal, the image processing unit outputs the processed image signal to the processor, which then performs further processing, such as displaying the image corresponding to the processed image signal on a display screen.

[0046] Exemplarily, the image processing unit in this application is a hardware resource capable of performing image processing. For example, the image processing unit in this application can be an image signal processing (ISP), a graphics processing unit (GPU), or a digital signal processing (DSP), or other hardware resources capable of performing image processing.

[0047] For example, the processor in the present application can run a variety of image processing algorithms and control peripheral devices. For example, the processor can be a central processing unit (CPU), GPU or other types of processors.

[0048] Depending on the processing capabilities of the image processing unit, one image processing unit may only be able to process the image signal output by one camera module at a time, or it may be able to process the image signals input by multiple (usually two) camera modules at the same time. If the multiple camera modules of an XR headset all use hardware for image processing, then multiple image processing units will be required, which will result in higher costs and power consumption.

[0049] Figure 3 is a schematic diagram of the image processing process performed by software. Referring to Figure 3, the camera module outputs an image signal to the processor. The image algorithm module within the processor performs post-processing on the image signal, such as automatic exposure, automatic white balance, color correction, and sharpening, to better reproduce scene details under varying optical conditions. The processed image signal can then be further processed by other modules within the processor, such as displaying the image corresponding to the processed image signal on a display screen.

[0050] Exemplarily, the image algorithm module in this application refers to a software algorithm for image signal processing.

[0051] The image algorithm module will take up a certain amount of load in the process of processing image signals. If multiple camera modules of the XR headset all use this software debugging method, it will bring a higher load.

[0052] However, ensuring the proper functioning of XR headsets typically imposes certain constraints on power consumption, load, and hardware costs. Improving the image quality of multi-camera modules within these constraints is a critical issue.

[0053] In view of this, the present application provides an image processing method that can calculate the effect parameters of only some camera modules in a scenario where multiple camera modules with a common view area are used together, and use a pre-trained mathematical model to derive the effect parameters of other camera modules. The other camera modules then use the derived effect parameters to capture images or use the derived effect parameters to perform corresponding image processing on images captured by other camera modules. This method does not require the configuration of corresponding hardware or software resources for other camera modules to calculate the effect parameters based on the captured images, and can improve the image quality of multiple cameras within the constraints of power consumption, load, and hardware cost.

[0054] The method provided in this application can be applied to a terminal device including multiple camera modules with a common viewing area. For example, the terminal device can be a VR device or an MR device. This application does not limit the type of the terminal device.

[0055] It should be understood that a camera module is sometimes also referred to as a camera or a camera.

[0056] For example, FIG4 shows a schematic diagram of a camera system of a terminal device provided by the present application. Referring to FIG4 , the camera system may include multiple camera modules, for example, including camera modules 1 to N, where N≥2. Among them, the image processing units corresponding to camera modules 1 to M can respectively perform image processing on the image signals output by camera modules 1 to M. For example, the image processing units can perform automatic exposure, automatic white balance, color correction, sharpening, and other processing on the image. The processor can calculate the effect parameters of the remaining part or all of the camera modules, such as camera modules (M+1) to camera modules N, using a pre-trained mathematical model based on the effect parameters of the image processing units corresponding to camera modules 1 to M. For example, if camera module 1, camera module 3, and camera module 4 all have a common viewing area, the effect parameters of camera module 3 and camera module 4 can be obtained based on the effect parameters of camera module 1. If camera module 2 and camera module 5 have a common viewing area, the effect parameters of camera module 5 can be obtained based on the effect parameters of camera module 2. After obtaining the effect parameters of the remaining part or all of the camera modules, the effect parameters of the corresponding camera module may be used to capture an image and / or perform image processing on the image signal of the camera module.

[0057] In some embodiments, referring to (a) in FIG4 , the processor may send the calculated effect parameters of camera modules (M+1) to camera modules N to camera modules (M+1) to camera modules N, respectively. Camera modules (M+1) to camera modules N may use their corresponding effect parameters to perform image processing on the image signals, and then may output the processed image signals to the processor. In some embodiments, referring to (b) in FIG4 , the processor may send the calculated effect parameters of camera modules (M+1) to camera modules N to the image algorithm modules corresponding to camera modules (M+1) to camera modules N, respectively. The image algorithm modules may use the effect parameters of the camera modules to perform image processing on the image signals output by the camera modules, and output the processed image signals. In some embodiments, the camera modules may use some of the effect parameters to capture images, and the image algorithm modules may use the remaining effect parameters to perform image processing on the image signals output by the camera modules, and output the processed image signals. It should be understood that the image algorithm module may be a software algorithm module, which may be executed by other hardware resources in the camera system, such as by the processor, or by other hardware resources with processing functions.

[0058] It should be understood that in the camera system shown in Figure 4, one image processing unit processes the image signal of one camera module. However, in practice, if one image processing unit can process the image signals of multiple camera modules, then multiple camera modules only need to be equipped with one image processing unit.

[0059] In addition, in the camera system shown in FIG4 , the image processing unit is provided outside the processor, but it should be understood that, in practice, the image processing unit may be provided inside the processor, that is, the processor may include one or more image processing units.

[0060] It should be understood that FIG4 only illustrates several units in the camera system that are relevant to the invention of this application. In an actual camera system, other units or modules involved in image signal processing may also be included. Although not shown in this application, this does not mean that they are excluded from the scope of protection of this application.

[0061] It should be understood that the terminal shown in FIG. 4 may further include other camera modules in addition to camera modules 1 to N.

[0062] It should be understood that the camera system shown in FIG4 can be configured in the XR headset shown in FIG1 , that is, the camera modules in FIG4 are part or all of the camera modules in FIG1 . For example, camera modules 1 to M in FIG4 are camera modules 101 and 103 in FIG1 , and camera modules (M+1) to N in FIG4 are camera modules 102 and 104 in FIG1 . In one example, the effect parameters of camera module 3 (equivalent to camera module 102 in FIG1 ) can be obtained based on the effect parameters of camera module 1 (equivalent to camera module 101 in FIG1 ), and the effect parameters of camera module 4 (equivalent to camera module 104 in FIG1 ) can be obtained based on the effect parameters of camera module 2 (equivalent to camera module 103 in FIG1 ). In another example, the effect parameters of camera module 1 (equivalent to camera module 101 in Figure 1) can be obtained based on the effect parameters of camera module 3 (equivalent to camera module 102 in Figure 1), and the effect parameters of camera module 2 (equivalent to camera module 103 in Figure 1) can be obtained based on the effect parameters of camera module 4 (equivalent to camera module 104 in Figure 1).

[0063] The solution provided in this application is described in detail below.

[0064] In some embodiments, the method provided herein is implemented based on a trained mathematical model (referred to herein as a trained mathematical model). Based on the trained mathematical model, the performance parameters of one or more camera modules can be used to predict the performance parameters of one or more other camera modules.

[0065] In one example, the mathematical model may be a machine learning model. The following briefly describes how to train a machine learning model.

[0066] The multiple camera modules with a common viewing area in the terminal device work in the same environment. The color temperature, overall brightness, and environmental content (bedroom scene, office scene, etc.) of the environment are the same or have little difference. Therefore, there is a certain mapping relationship between the effect parameters of the multiple cameras. In this application, multiple camera modules can be used to collect images in the same environment first, and then the effect parameters of the multiple camera modules are determined based on the images collected by the multiple camera modules in the same environment. Finally, the effect parameters of the multiple camera modules are used to perform machine model learning to obtain a trained machine learning model.

[0067] Optionally, images (ie, sample images) captured by multiple camera modules under the same environment may be input into the image processing unit, and the image processing unit may obtain effect parameters of the multiple camera modules according to the sample images.

[0068] For example, FIG5 shows a schematic diagram of a method for calculating the effect parameters of a camera module. Referring to FIG5 , camera module 1 and camera module 2 both have a common viewing area with camera module 3. The images collected by camera module 1 to camera module 3 in the same environment (for example, an office scene or an outdoor scene, etc.) are input into the ISP to which they are connected. After the ISP processes the input images, the effect parameters of the corresponding camera module in the environment can be obtained. For example, the ISP performs automatic exposure, automatic white balance, color correction, sharpening and other processing on the images input by each camera module, and then the effect parameters such as exposure time, exposure gain, white balance coefficient, color correction matrix, sharpening coefficient, etc. corresponding to each camera module can be obtained.

[0069] It should be understood that software algorithms may also be used to calculate the sample images to obtain the effect parameters of the multiple camera modules.

[0070] For example, FIG6 shows a schematic diagram of a machine learning model training. Referring to FIG6, the input parameter vector of the machine learning model is the effect parameters of camera module 1 and camera module 2 calculated in FIG5. i ,g i ,rw i ,gw i ,bw i ,X i ,k i ] is the effect parameter of camera module i, including exposure time t i , exposure gain g i , white balance coefficient (rw i ,gw i ,bw i ), color correction matrix X i , sharpening coefficient k i The output parameter vector of the machine learning model is the predicted effect parameter of the camera module 3. The output effect parameter of the camera module 3 is compared with the effect parameter of the camera module 3 calculated in Figure 5 (i.e., the supervision data or the true value), and the difference is calculated; the obtained difference is used to reversely update the relevant parameters in the machine learning model, and the above steps are repeated until the difference between the effect parameter of the camera module 3 output by the machine learning model and the effect parameter of the supervision data is less than a certain threshold, thereby completing the training of the machine learning model.

[0071] It should be understood that the machine learning model in this application can be any machine learning model, such as the deep learning model shown in the figure, such as a neural network model, that is, other machine learning models.

[0072] In another example, the mathematical model may be a linear model.

[0073] After obtaining the trained mathematical model, the image processing method provided by the present application can be executed. The image processing method provided by the present application is described in detail below with reference to the flowchart shown in FIG7 .

[0074] FIG7 is a schematic flow chart of an image processing method provided by the present application. The method can be executed by a terminal device, which includes at least one first camera module and a second camera module, and the at least one first camera module and the second camera module have a common viewing area. For example, the terminal device can be the XR glasses shown in FIG1 , the at least one first camera module can be camera module 101, the second camera module can be camera module 102, and camera module 101 and camera module 102 have a common viewing area. The method can include S710 to S730, and each step is described below.

[0075] S710: Acquire effect parameters of the at least one first camera module according to the real-time image captured by the at least one first camera module.

[0076] Specifically, the effect parameters of any first camera module can be obtained by performing image processing on a real-time image captured by any first camera module.

[0077] It should be understood that the real-time image refers to the image currently being captured.

[0078] In one example, the effect parameters of the at least one first camera module can be obtained by an image processing unit connected to the at least one first camera module. Specifically, an image captured by any first camera module can be input into the image processing unit connected thereto, and the image processing unit can obtain the effect parameters of the first camera module by processing the input image. For example, the image processing unit can obtain effect parameters such as exposure time, exposure gain, white balance coefficient, color correction matrix, and sharpening coefficient by performing automatic exposure, automatic white balance, color correction, and sharpening on the input image.

[0079] S720: Input the effect parameters of the at least one first camera module into the trained mathematical model to obtain the effect parameters of the second camera module output by the trained mathematical model.

[0080] The trained mathematical model is obtained by training a mathematical model. During the training of the mathematical model, the input of the mathematical model is sample images captured by the at least one first camera module, and the supervision data of the mathematical model is effect parameters of the second camera model obtained based on sample images captured by the second camera module. It will be understood that the trained mathematical model can represent the relationship between the effect parameters of the at least one first camera module and the effect parameters of the second camera module.

[0081] Regarding how to train the mathematical model and obtain the trained mathematical model, please refer to the previous description and will not be repeated here. It can be understood that the at least one first camera module here can be camera module 1 and camera module 2 described in Figures 5 and 6, and the second camera module can be camera module 3.

[0082] S730: Control the second camera module to capture an image using the effect parameters of the second camera module, and / or process the real-time image captured by the second camera module using the effect parameters of the second camera module.

[0083] The effect parameters of the second camera module may include only parameters for image capture, only parameters for image processing, or both parameters for image capture and parameters for image processing. If the effect parameters of the second camera module include parameters for image capture, the second camera module may use the parameters for image capture to capture images. If the effect parameters of the second camera module include parameters for image processing, the parameters for image processing may be used to perform image processing on the real-time image captured by the second camera module.

[0084] For example, if the effect parameters of the second camera module include one or more of exposure time, exposure gain, or white balance coefficient, the second camera module may use the exposure time, exposure gain, or white balance coefficient to capture the image. If the effect parameters of the second camera module include a color correction matrix and / or a sharpening coefficient, the color correction matrix and / or the sharpening coefficient may be used to color correct and / or sharpen the real-time image captured by the second camera module.

[0085] In summary, according to the image processing method provided by this application, for multiple camera modules with a common viewing area, only the effect parameters of some (i.e., one or more) camera modules are calculated, and the effect parameters of other camera modules are derived using a pre-trained mathematical model. Then, other camera modules use the derived effect parameters to capture images or use the derived effect parameters to perform corresponding image processing on images captured by other camera modules. This method does not require the configuration of corresponding hardware resources or software resources for other camera modules to calculate effect parameters based on the captured images, and can improve the image effect quality of multiple cameras under the constraints of power consumption, load, and hardware cost.

[0086] FIG8 is another schematic flow chart of the image processing method provided in this application. Referring to FIG8 , camera modules 801 to 804 are camera modules in the same terminal device. Camera module 801 and camera modules 802, 803, and 804 all have a common viewing area, and the viewing angles of camera modules 802, 803, and 804 are not exactly the same. The image signal output by camera module 801 is input into ISP 811; ISP 811 processes the input image signal to obtain the effect parameters of camera module 801. Then, the effect parameters of camera module 801 are respectively input into trained mathematical model A, trained mathematical model B, and trained mathematical model C to obtain the effect parameters of camera module 802, camera module 803, and camera module 804. Then, camera module 802, camera module 803, and camera module 804 can each use their respective effect parameters to perform image processing on the images they capture, thereby obtaining usable images. Alternatively, the image algorithm module may respectively use the effect parameters of the camera module 802 , the camera module 803 , and the camera module 804 to process the image signals output by the corresponding camera modules to obtain a usable image.

[0087] In this method, the ISP can only calculate the effect parameters of the camera module 801, and the trained mathematical model can be used to deduce the effect parameters of the camera module 802, the camera module 803 and the camera module 804 and send them to the camera module 802, the camera module 803 and the camera module 804 or transmit them to the image algorithm module 821 for use, so as to achieve the migration and reuse of the effect parameters, thereby saving ISP resources and ensuring the effect of multiple camera modules.

[0088] It should be understood that trained mathematical model A can be obtained by training a mathematical model based on the effect parameters of camera module 801 and camera module 802 in the same environment; trained mathematical model B can be obtained by training a mathematical model based on the effect parameters of camera module 801 and camera module 803 in the same environment; and trained mathematical model C can be obtained by training a mathematical model based on the effect parameters of camera module 801 and camera module 804 in the same environment. The trained mathematical model A, trained mathematical model B, and trained mathematical model C can be of the same or different types, and this application does not limit this.

[0089] It should be understood that the camera module 801 shown in FIG. 8 may be at least one first camera module in the method 700 , and the camera module 802 , the camera module 803 or the camera module 804 may be a second camera module in the method 700 .

[0090] The image processing methods provided in the embodiments of the present application are described in detail above. Below, in conjunction with Figures 9 and 10 , the device embodiments of the present application will be described in detail. It should be understood that the terminal device in the embodiments of the present application can execute the image processing methods in the aforementioned embodiments of the present application. For the specific operating procedures of the terminal device, reference can be made to the corresponding procedures in the aforementioned method embodiments.

[0091] Figure 9 is a schematic block diagram of a terminal device provided in an embodiment of the present application. It should be understood that terminal device 900 can execute the image processing method shown in Figure 7 . Terminal device 900 includes a processing unit 910 . Terminal device 900 also includes at least one first camera module and a second camera module, wherein the at least one first camera module and the second camera module have a common viewing area.

[0092] The processing unit 910 is used to: obtain effect parameters of the at least one first camera module based on the real-time image captured by the at least one first camera module; input the effect parameters of the at least one first camera module into a trained mathematical model to obtain effect parameters of the second camera module, the trained mathematical model is obtained by training the mathematical model, the input of the mathematical model is the sample image captured by the at least one first camera module, and the supervision data of the mathematical model is the effect parameters of the second camera model obtained based on the sample image captured by the second camera module; control the second camera module to use the effect parameters of the second camera module to capture images, and / or use the effect parameters of the second camera module to perform image processing on the real-time image captured by the second camera module.

[0093] Optionally, the effect parameter includes one or more of the following: exposure time, exposure gain, white balance coefficient, color correction matrix, or sharpening coefficient.

[0094] Optionally, the terminal device is a mixed reality MR device.

[0095] Optionally, the processing unit includes at least one image processing unit, and the at least one first camera module is connected to the at least one image processing unit, and the at least one image processing unit is used to: perform image processing on the real-time image captured by the at least one first camera module to obtain effect parameters of the at least one first camera module.

[0096] Optionally, the processing unit further includes an image algorithm module, configured to perform image processing on the real-time image captured by the second camera module using part or all of the effect parameters of the second camera module.

[0097] It should be noted that the functional units of the terminal device 900 are embodied in the form of the term "unit" herein, which can be implemented in the form of software and / or hardware, and is not specifically limited thereto.

[0098] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the aforementioned functionality. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functionality.

[0099] Therefore, the units of each example described in the embodiments of this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0100] Figure 10 shows a schematic diagram of the structure of a terminal device provided by the present application. The terminal device 1000 can be used to implement the method described in the above method embodiment.

[0101] The terminal device 1000 includes multiple camera modules 1006 and one or more processors 1001. The multiple camera modules may include at least one first camera module and a second camera module as described above. The one or more processors 1001 may support the image processing method in the embodiment of the method implemented by the terminal device 1000. The processor 1001 may include a general-purpose processor and / or a dedicated processor. For example, the processor 1001 may include one or more of the following: a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0102] The processor 1001 can be used to control the terminal device 1000, execute software programs, and process data of the software programs.

[0103] The terminal device 1000 may further include a communication unit 1005 for implementing input (reception) and output (transmission) of signals.

[0104] For example, the terminal device 1000 may be a chip, the communication unit 1005 may be an input and / or output circuit of the chip, or the communication unit 1005 may be a communication interface of the chip, and the chip may serve as a component of the terminal device or other terminal devices.

[0105] For another example, the terminal device 1000 may be a terminal device, the communication unit 1005 may be a transceiver of the terminal device, or the communication unit 1005 may be a transceiver circuit of the terminal device.

[0106] The terminal device 1000 may include one or more memories 1002 on which a program 1004 is stored. The program 1004 can be executed by the processor 1001 to generate instructions 1003, so that the processor 1001 executes the image processing method described in the above method embodiment according to the instructions 1003.

[0107] Optionally, data may also be stored in the memory 1002 .

[0108] Optionally, the processor 1001 may also read data stored in the memory 1002 . The data may be stored at the same storage address as the program 1004 , or may be stored at a different storage address from the program 1004 .

[0109] The processor 1001 and the memory 1002 may be provided separately or integrated together, for example, integrated on a system on chip (SOC) of a terminal device.

[0110] Exemplarily, the memory 1002 may be used to store a program 1004 related to the image processing method provided in an embodiment of the present application, and the processor 1001 may be used to execute the program 1004 related to the image processing method stored in the memory 1002 .

[0111] Optionally, the processor 1001 may be configured to execute the various steps / functions of the embodiment shown in FIG. 7 .

[0112] The present application also provides a computer program product, which, when executed by the processor 1001, implements the image processing method of any method embodiment in the present application.

[0113] The computer program product may be stored in the memory 1002 , for example, a program 1004 . The program 1004 is converted into an executable target file that can be executed by the processor 1001 after undergoing processes such as preprocessing, compilation, assembly, and linking.

[0114] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the image processing method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.

[0115] Optionally, the computer-readable storage medium is, for example, memory 1002. Memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. 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), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0116] It should be noted that although the terminal device 1000 shown in FIG10 only shows a memory, a processor, and a communication interface, during the specific implementation process, those skilled in the art will understand that the terminal device 1000 may also include other components necessary for normal operation. At the same time, according to specific needs, those skilled in the art will understand that the terminal device 1000 may also include hardware components that implement other additional functions. In addition, those skilled in the art will understand that the terminal device 1000 may also include only the components necessary to implement the embodiments of the present application, and does not necessarily include all the components shown in FIG10.

[0117] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0118] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0119] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0120] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0121] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0122] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0124] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0125] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0126] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An image processing method, characterized in that: Applied to a terminal device, the terminal device includes at least one first camera module and a second camera module, and the at least one first camera module and the second camera module have a common viewing area, and the method includes: Acquiring effect parameters of the at least one first camera module according to the real-time image captured by the at least one first camera module; Inputting the effect parameters of the at least one first camera module into a trained mathematical model to obtain the effect parameters of the second camera module, wherein the trained mathematical model is obtained by performing model training on the mathematical model, the input of the mathematical model is a sample image taken by the at least one first camera module, and the supervision data of the mathematical model is the effect parameters of the second camera model obtained according to the sample image taken by the second camera module; Control the second camera module to use the effect parameters of the second camera module to capture images, and / or use the effect parameters of the second camera module to perform image processing on the real-time image captured by the second camera module.

2. The method according to claim 1, characterized in that The effect parameters include one or more of the following: exposure time, exposure gain, white balance coefficient, color correction matrix, or sharpening coefficient.

3. The method according to claim 1 or 2, characterized in that The terminal device is a mixed reality MR device.

4. The method according to any one of claims 1 to 3, characterized in that The at least one first camera module is connected to at least one image processing unit, and the at least one image processing unit is a hardware resource. The step of obtaining the effect parameter of the at least one first camera module according to the real-time image captured by the at least one first camera module includes: The at least one image processing unit is controlled to perform image processing on the real-time image captured by the at least one first camera module to obtain effect parameters of the at least one first camera module.

5. The method according to any one of claims 1 to 4, characterized in that The using the effect parameter of the second camera module to perform image processing on the real-time image captured by the second camera module includes: The image algorithm module is controlled to use part or all of the effect parameters to perform image processing on the real-time image taken by the second camera module, and the image algorithm module is a software resource.

6. A terminal device, characterized in that: include: At least one first camera module, a second camera module and a processing unit, wherein the at least one first camera module and the second camera module have a common viewing area; The processing unit is used for: Acquiring effect parameters of the at least one first camera module according to the real-time image captured by the at least one first camera module; Inputting the effect parameters of the at least one first camera module into a trained mathematical model to obtain the effect parameters of the second camera module, wherein the trained mathematical model is obtained by performing model training on the mathematical model, the input of the mathematical model is a sample image taken by the at least one first camera module, and the supervision data of the mathematical model is the effect parameters of the second camera model obtained according to the sample image taken by the second camera module; Control the second camera module to use the effect parameters of the second camera module to capture images, and / or use the effect parameters of the second camera module to perform image processing on the real-time image captured by the second camera module.

7. The terminal device according to claim 6, characterized in that: The effect parameters include one or more of the following: exposure time, exposure gain, white balance coefficient, color correction matrix, or sharpening coefficient.

8. The terminal device according to claim 6 or 7, characterized in that: The terminal device is a mixed reality MR device.

9. The terminal device according to any one of claims 6 to 8, characterized in that: The processing unit includes at least one image processing unit, the at least one first camera module is connected to the at least one image processing unit, and the at least one image processing unit is used to: Perform image processing on the real-time image captured by the at least one first camera module to obtain effect parameters of the at least one first camera module.

10. The terminal device according to any one of claims 6 to 9, characterized in that: The processing unit also includes an image algorithm module, which is used to: The real image captured by the second camera module is processed by using part or all of the effect parameters of the second camera module. The image is processed.

11. A terminal device, characterized in that: include: One or more processors, memories, at least one first camera module and a second camera module, wherein the at least one first camera module and the second camera module have a common viewing area; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the terminal device to execute the method according to any one of claims 1 to 5.

12. A chip system, characterized in that: The chip system is applied to a terminal device, and the chip system includes one or more processors, and the processor is used to call computer instructions so that the terminal device executes the method as described in any one of claims 1 to 5.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.

14. A computer program product, characterized in that The computer program product comprises a computer program code, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Camera shooting parameter determination method and neural network model training method

    CN114339022A

  • Shooting method, shooting parameter training method, electronic equipment and storage medium

    CN115701113A

  • Camera control system controlling different types of cameras

    EP0895421A2

  • Positioning cameras

    EP3328060A1