Image processing method, device, equipment and medium

Multispectral high-dimensional color information is obtained through multispectral sensors, the color mapping relationship between cameras is determined and color correction is performed, which solves the problem of inaccurate color correction caused by the color temperature of the light source in multi-camera shooting and improves the accuracy of color correction.

CN113676713BActive Publication Date: 2024-09-27VIVO MOBILE COMM HANGZHOU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110921151.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-11
Publication Date
2024-09-27
Estimated Expiration
2041-08-11

AI Technical Summary

Technical Problem

In multi-camera shooting, due to the influence of the color temperature of the light source, the phenomenon of 'metamerism' occurs, which in turn makes the image color correction inaccurate and the color correction accuracy poor.

Method used

A multispectral sensor is used to obtain multispectral high-dimensional color information. Through the correspondence between automatic white balance and color mapping, the color mapping relationship between cameras is determined, and the color value of white pixels is used for color correction to improve the accuracy of color correction. accuracy.

Benefits of technology

Through the broad spectrum and subdivided spectrum capabilities of the multispectral sensor, the color mapping relationship between cameras under different light sources can be accurately distinguished, which improves the accuracy of image color correction and avoids the problem of poor color correction accuracy caused by 'metamerism'. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113676713B
    Figure CN113676713B
Patent Text Reader

Abstract

The present application discloses an image processing method, device, equipment and medium, belonging to the technical field of electronic equipment. The image processing method applied to an electronic device including a first camera, a second camera and a multispectral sensor includes: obtaining a first image, a second image and a third image respectively collected by the first camera, the second camera and the multispectral sensor for a target scene; correcting the color of the first image according to automatic white balance to obtain a fourth image; determining a first color mapping relationship between the first camera and the second camera according to the correspondence between the multispectral high-dimensional color information and the color mapping relationship and the first multispectral high-dimensional color information corresponding to the third image; correcting the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain a fifth image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, equipment and medium. Background Art

[0002] With the development of electronic devices and camera technology, multiple cameras can be integrated and installed on the same electronic device. When using multiple cameras for shooting, it is necessary to ensure the color consistency of multiple cameras to obtain images that meet the perception of the human eye.

[0003] In the related art, when ensuring the color consistency of multiple cameras, a camera is used to predict the light source, and the color transfer matrix (i.e., color mapping relationship) between the camera and other cameras is determined through the light source. Then, the images taken by other cameras are color corrected according to the color transfer matrix.

[0004] However, affected by the color temperature of the light source, the camera will have the phenomenon of "metamerism" when taking pictures. The "metamerism" phenomenon will lead to inaccurate prediction of the light source, which will lead to inaccurate color transfer matrix determined by the light source, inaccurate image color correction, and poor accuracy of image color correction. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an image processing method, device, equipment and medium, which can solve the problem of poor accuracy of image color correction.

[0006] In a first aspect, an embodiment of the present application provides an image processing method, which is applied to an electronic device, the electronic device including a first camera, a second camera and a multispectral sensor, the method comprising:

[0007] Acquire a first image, a second image, and a third image respectively captured by the first camera, the second camera, and the multispectral sensor for the target scene;

[0008] Correcting the color of the first image according to automatic white balance to obtain a fourth image;

[0009] Determine a first color mapping relationship between the first camera and the second camera according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image;

[0010] According to the first color mapping relationship and the first color value of the white pixel in the fourth image, the color of the second image is corrected to obtain a fifth image.

[0011] 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 first camera, a second camera, and a multispectral sensor, and the device includes:

[0012] A first acquisition module is used to acquire a first image, a second image, and a third image respectively captured by the first camera, the second camera, and the multispectral sensor for the target scene;

[0013] A first correction module, used for correcting the color of the first image according to automatic white balance to obtain a fourth image;

[0014] A first determination module is used to determine a first color mapping relationship between the first camera and the second camera according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image;

[0015] The second correction module is used to correct the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain the fifth image.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, which includes a first camera, a second camera, a multispectral sensor, a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[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 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 method described in the first aspect.

[0019] In an embodiment of the present application, a first image, a second image, and a third image captured by a first camera, a second camera, and a multispectral sensor for a target scene are respectively acquired; the color of the first image is corrected according to automatic white balance to obtain a fourth image; a first color mapping relationship between the first camera and the second camera is determined according to a correspondence between multispectral high-dimensional color information and a color mapping relationship, and the first multispectral high-dimensional color information corresponding to the third image; and the color of the second image is corrected according to the first color mapping relationship and a first color value of a white pixel in the fourth image to obtain a fifth image. It can ensure that the first image after color correction (i.e., the fourth image) and the second image after color correction (i.e., the fifth image) have consistent colors, and since the first color mapping relationship between the first camera and the second camera is determined based on the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship, and the first multi-spectral high-dimensional color information corresponding to the third image collected by the multi-spectral sensor, the multi-spectral sensor receives a wider spectral band than the camera sensor and divides the spectral band more finely, the multi-spectral sensor can more accurately distinguish the color mapping relationship between cameras under different light sources, therefore, the accuracy of color correction can be improved, and the problem of poor color correction accuracy caused by the "same color, different spectrum" phenomenon can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flowchart of an image processing method applied to an electronic device provided in an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of the arrangement of the first camera, the second camera and the multi-spectral sensor provided in an embodiment of the present application;

[0022] Figure 3 is a structural schematic diagram of an image processing device applied to an electronic device provided in an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION

[0024] 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.

[0025] 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 data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, 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.

[0026] The image processing method, apparatus, device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0027] Figure 1 It is a flow chart of an image processing method applied to an electronic device provided by an embodiment of the present application. The electronic device includes a first camera, a second camera and a multispectral sensor. The electronic device in the embodiment of the present application can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, 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 the non-mobile electronic device can 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.

[0028] The image processing method applied to the electronic device may include:

[0029] S101: Acquire a first image, a second image, and a third image respectively captured by a first camera, a second camera, and a multispectral sensor for a target scene;

[0030] S102: Correcting the color of the first image according to automatic white balance to obtain a fourth image;

[0031] S103: determining a first color mapping relationship between the first camera and the second camera according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image;

[0032] S104: Correct the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain a fifth image.

[0033] The specific implementation of the above steps will be described in detail below.

[0034] In an embodiment of the present application, a first image, a second image, and a third image captured by a first camera, a second camera, and a multispectral sensor for a target scene are respectively acquired; the color of the first image is corrected according to automatic white balance to obtain a fourth image; a first color mapping relationship between the first camera and the second camera is determined according to a correspondence between multispectral high-dimensional color information and a color mapping relationship, and the first multispectral high-dimensional color information corresponding to the third image; and the color of the second image is corrected according to the first color mapping relationship and a first color value of a white pixel in the fourth image to obtain a fifth image. It can ensure that the first image after color correction (i.e., the fourth image) and the second image after color correction (i.e., the fifth image) have consistent colors, and since the first color mapping relationship between the first camera and the second camera is determined based on the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image collected by the multi-spectral sensor, the multi-spectral sensor receives a wider spectral band than the camera sensor and divides the spectral band more finely, the multi-spectral sensor can more accurately distinguish the color mapping relationship between cameras under different light sources, and therefore, the accuracy of color correction can be improved, and the problem of poor color correction accuracy caused by the "same color, different spectrum" phenomenon can be avoided.

[0035] In some possible implementations of the embodiments of the present application, the first camera is a main camera and the second camera is a secondary camera.

[0036] In some possible implementations of the embodiments of the present application, the orientations of the first camera, the second camera, and the multi-spectral sensor satisfy a first condition.

[0037] In some possible implementations of the embodiments of the present application, the first condition may be that the orientations of the first camera, the second camera, and the multispectral sensor are consistent, that is, the orientations of the first camera, the second camera, and the multispectral sensor are the same.

[0038] In some possible implementations of the embodiments of the present application, the first camera, the second camera, and the multi-spectral sensor are located close to each other to ensure a large overlapping field of view between the cameras.

[0039] Figure 2 Schematic diagram of the arrangement of the first camera, the second camera and the multi-spectral sensor provided in the embodiment of the present application. Figure 2In the embodiment, the multispectral sensor 202, the first camera 203 and the second camera 204 are arranged on the back plate 201. That is, the multispectral sensor 202, the first camera 203 and the second camera 204 are installed in the electronic device through the back plate 201.

[0040] In some possible implementations of the embodiments of the present application, the back plate 201 may be absent, that is, the multispectral sensor 202 , the first camera 203 , and the second camera 204 may be directly installed in the electronic device without passing through the back plate 201 .

[0041] In some possible implementations of the embodiments of the present application, before S103, the image processing method provided by the embodiments of the present application for an electronic device also includes: under each target lighting condition of at least two lighting conditions, obtaining a sixth image, a seventh image, and an eighth image respectively captured by the first camera, the second camera, and the multispectral sensor for the target object; determining a second color mapping relationship between the first camera and the second camera under the target lighting condition based on the sixth image and the seventh image; and establishing a corresponding relationship between the third multispectral high-dimensional color information corresponding to the eighth image and the second color mapping relationship under the target lighting condition.

[0042] In some possible implementations of the embodiments of the present application, the target object includes a standard color card, wherein the standard color card includes but is not limited to a neutral gray card, a white card, a 24-color card, and the like.

[0043] In some possible implementations of the embodiments of the present application, the lighting condition refers to the light emitted by a certain light source under the condition that the environment remains unchanged. The light source in the embodiments of the present application includes but is not limited to: the sun, fluorescent lamp, halogen lamp, incandescent lamp, candlelight, etc.

[0044] Exemplarily, the sixth image, the seventh image and the eighth image collected by the first camera, the second camera and the multi-spectral sensor respectively for the standard color card under the first light source are obtained, and the pixel values ​​of the white pixels in the respective images are obtained from the sixth image and the seventh image. Among them, the pixel values ​​of the white pixels in the sixth image are (Rmaster, Gmaster, Bmaster), and the pixel values ​​of the white pixels in the seventh image are (Rslave, Gslave, Bslave). M1 represents the color transfer matrix corresponding to the color mapping relationship between the first camera and the second camera under the first light source X1, and the relationship shown in the following formula (1) is obtained:

[0045]

[0046] By solving the above formula (1) by the least square method, the color transfer matrix M1 corresponding to the color mapping relationship between the first camera and the second camera under the first light source X1 can be obtained. It can be understood that the color transfer matrix corresponding to the color mapping relationship between the first camera and the second camera is a matrix with 3 rows and 3 columns.

[0047] According to the eighth image, the multi-spectral high-dimensional color information corresponding to the eighth image under the first light source X1 is obtained, which is expressed as a vector (F X1-1 , F X1-2 , ..., F X1-n ), where F X1-n is the nth narrowband signal value under the first light source X1.

[0048] A color mapping relationship between the first camera and the second camera under the first light source X1 is established, and a corresponding relationship between the multi-spectral high-dimensional color information corresponding to the eighth image under the first light source X1 is established.

[0049] Similarly, a color mapping relationship between the first camera and the second camera under the n-th light source Xn is established, and a corresponding relationship between the multi-spectral high-dimensional color information corresponding to the eighth image under the n-th light source Xn is established.

[0050] The correspondence between multispectral high-dimensional color information and color mapping is shown in Table 1.

[0051] Table 1

[0052] Multispectral high-dimensional color information Color mapping relationship <![CDATA[(F X1-1 ,F X1-2 ,……,F X1-n )]]> M1 <![CDATA[(F X2-1 ,F X2-2 ,……,F X2-n )]]> M2 …… …… <![CDATA[(F Xn-1 ,F Xn-2 ,……,F Xn-n )]]> Mn

[0053] In some possible implementations of the embodiments of the present application, S103 may include: determining second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information; determining the color mapping relationship corresponding to the second multispectral high-dimensional color information as the first color mapping relationship.

[0054] In some possible implementations of the embodiments of the present application, determining the second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information may include: calculating the distance between the spatial point corresponding to each multispectral high-dimensional color information in the at least two multispectral high-dimensional color information and the spatial point corresponding to the first multispectral high-dimensional color information; determining the multispectral high-dimensional color information corresponding to the spatial point whose distance is less than a preset distance as the second multispectral high-dimensional color information.

[0055] Exemplarily, the first multi-spectral high-dimensional color information is represented by a vector (F1, F2, ..., Fn), and the distance between the space point corresponding to the vector and the space point corresponding to each vector in Table 1 is calculated.

[0056] The distance D between the spatial point corresponding to the vector corresponding to the first multi-spectral high-dimensional color information and the spatial point corresponding to the vector corresponding to the multi-spectral high-dimensional color information of the image collected by the multi-spectral sensor under the i-th light source Xi in Table 1 Xi for:

[0057]

[0058] Wherein, in formula (2), 1≤i≤n, i is a positive integer.

[0059] Assume that D X2 If the distance is less than the preset distance, the multi-spectral high-dimensional color information (F X2-1 , F X2-2 , ..., F X2-n ) is determined as the second multi-spectral high-dimensional color information, and then the multi-spectral high-dimensional color information (F X2-1 , F X2-2 , ..., F X2-n ) corresponding to the color mapping relationship M2 is determined to be the above-mentioned first color mapping relationship.

[0060] In some possible implementations of the embodiments of the present application, determining the second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information may include: calculating the cosine value of the angle between a vector corresponding to each multispectral high-dimensional color information in the at least two multispectral high-dimensional color information and a vector corresponding to the first multispectral high-dimensional color information; determining the multispectral high-dimensional color information corresponding to the vector whose cosine value is greater than a preset cosine value as the second multispectral high-dimensional color information.

[0061] Exemplarily, the first multi-spectral high-dimensional color information is represented by a vector (F1, F2, ..., Fn), and the cosine value of the angle between the vector and each vector in Table 1 is calculated.

[0062] The cosine value cosa of the angle between the vector corresponding to the first multi-spectral high-dimensional color information and the vector corresponding to the multi-spectral high-dimensional color information of the image collected by the multi-spectral sensor under the i-th light source Xi in Table 1 above xi for:

[0063]

[0064] Wherein, in formula (3), 1≤i≤n, i is a positive integer.

[0065] Assume that cosa x3 is greater than the preset cosine value, the multi-spectral high-dimensional color information (F X3-1 , FX3-2 , ..., F X3-n ) is determined as the second multi-spectral high-dimensional color information, and then the multi-spectral high-dimensional color information (F X3-1 , F X3-2 , ..., F X3-n ) corresponding to the color mapping relationship M3 is determined to be the above-mentioned first color mapping relationship.

[0066] That is to say, the second multi-spectral high-dimensional color information can be determined by Euclidean distance or cosine similarity.

[0067] In some possible implementations of the embodiments of the present application, determining the second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information may include: when the spatial point corresponding to the first multispectral high-dimensional color information is inside a first polyhedron formed by spatial points corresponding to multiple multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the center of gravity of the first polyhedron can be determined as the second multispectral high-dimensional color information.

[0068] In some possible implementations of the embodiments of the present application, determining the second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information may include: when the spatial point corresponding to the first multispectral high-dimensional color information is inside a second polyhedron formed by N spatial points among the spatial points corresponding to M multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the center of gravity of the second polyhedron can be determined as the second multispectral high-dimensional color information.

[0069] In some possible implementations of the embodiments of the present application, determining the second multispectral high-dimensional color information corresponding to the first multispectral high-dimensional color information based on at least two multispectral high-dimensional color information may include: when the spatial point corresponding to the first multispectral high-dimensional color information is inside multiple polyhedrons, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the intersection of the multiple polyhedrons can be determined as the second multispectral high-dimensional color information, wherein each of the multiple polyhedrons is a polyhedron composed of N spatial points out of the M spatial points corresponding to the multispectral high-dimensional color information.

[0070] Wherein, the above M is greater than N, and both M and N are positive integers.

[0071] The embodiment of the present application does not limit the method used to determine that the spatial point is inside the polyhedron, and any available method can be applied to the embodiment of the present application. For example, the volume of the target polyhedron is first calculated, and then the volume of the polyhedron composed of the spatial point and the remaining vertices after removing one vertex in the target polyhedron is calculated respectively, and the volumes of the multiple polyhedrons calculated respectively are summed. If the sum of the volumes of the multiple polyhedrons is not greater than the volume of the above-mentioned target polyhedron, it is determined that the spatial point is inside the target polyhedron, otherwise, the spatial point is outside the target polyhedron. Exemplarily, taking determining whether point X is inside a polyhedron formed by four points A, B, C, and D as an example, first, the volume of polyhedron ABCD is calculated, then the volumes of polyhedrons XBCD, AXCD, ABXD, and ABCX are calculated, and the sum of the volumes of polyhedrons XBCD, AXCD, ABXD, and ABCX is calculated. If the sum of the volumes of polyhedrons XBCD, AXCD, ABXD, and ABCX is not greater than the volume of polyhedron ABCD, then point X is inside polyhedron ABCD, otherwise, point X is outside polyhedron ABCD. The embodiment of the present application does not limit the method used to calculate the volume of a polyhedron, and any available method can be applied to the embodiment of the present application.

[0072] After the second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information is determined by the above three methods, the color mapping relationship corresponding to the second multi-spectral high-dimensional color information may not exist in the above Table 1. At this time, the color mapping relationship corresponding to the second multi-spectral high-dimensional color information can be determined according to Table 1, and then the determined color mapping relationship corresponding to the second multi-spectral high-dimensional color information is determined as the first color mapping relationship. The embodiment of the present application does not limit the method used to determine the color mapping relationship corresponding to the second multi-spectral high-dimensional color information according to Table 1, and any available method can be applied to the embodiment of the present application, for example, using an interpolation algorithm to determine the color mapping relationship corresponding to the second multi-spectral high-dimensional color information.

[0073] In some possible implementations of the embodiments of the present application, when the determined first color mapping relationship includes only one color mapping relationship, for example, the determined first color mapping relationship is M5. The pixel value of the white pixel in the fourth image P4 is mapped using the color mapping relationship M5 to obtain the pixel value color of the white pixel in the second image P2 captured by the second camera. P2 .

[0074]

[0075] In formula (4), R P2 , G P2 , B P2are the red component, green component and blue component of the pixel value of the white pixel in the second image P2 respectively; P4 , G P4 , B P4 They are respectively the red component, green component and blue component of the pixel value of the white pixel in the fourth image P4.

[0076] When the pixel value color of the white pixel in the second image P2 is determined P2 Then, the pixel value color of the white pixel in the second image P2 is used. P2 The pixel value of each pixel in the second image P2 is corrected.

[0077] Specifically, the pixel value of each pixel in the second image P2 can be corrected by the following formulas (5), (6) and (7).

[0078]

[0079]

[0080]

[0081] In formula (7), R P2-i1 , G P2-i1 , B P2-i1 are the red component, green component and blue component of the pixel value of the i-th pixel point after color correction in the second image P2, R P2-i0 , G P2-i0 , B P2-i0 RGain are the red component, green component and blue component of the pixel value of the i-th pixel in the second image P2 before color correction; P2 is the red gain of the second image P2, BGain P2 is the blue gain of the second image P2.

[0082] In some possible implementations of the embodiments of the present application, the first color mapping relationship includes at least two color mapping relationships; accordingly, S104 may include: calculating the product of the color transfer matrix corresponding to each color mapping relationship in the at least two color mapping relationships and the first color value to obtain at least two second color values; determining the weighted average of the at least two second color values ​​as the third color value of the white pixel in the second image; and correcting the color of each pixel in the second image according to the third color value.

[0083] Exemplarily, the determined first color mapping relationship includes M1, M3 and M4. Then the product color of M1 and the pixel value of the white pixel in the fourth image P4 is calculated. P2-M1, calculate the product color of M3 and the pixel value of the white pixel in the fourth image P4 P2-M3 , calculate the product color of M4 and the pixel value of the white pixel in the fourth image P4 P2-M4 Then, color P2-M1 、color P2-M3 and color P2-M4 Weighted average to get the color value of the white pixel in the second image P2 P2 , and then correct the pixel value of each pixel in the second image P2 according to the above formulas (5), (6) and (7).

[0084] In some possible implementations of the embodiments of the present application, the weight corresponding to the target second color value in at least two second color values ​​includes: the distance between the first spatial point and the second spatial point corresponding to the first multi-spectral high-dimensional color information, wherein the first spatial point is the spatial point corresponding to the fourth multi-spectral high-dimensional color information, the fourth multi-spectral high-dimensional color information is the multi-spectral high-dimensional color information corresponding to the third color mapping relationship, and the third color mapping relationship is the color mapping relationship corresponding to the target second color value. The color value color of the white pixel in the second image P2 can be calculated by the following formula (8): P2 .

[0085]

[0086] When the color value color of the white pixel in the second image P2 is calculated according to formula (8), P2 Then, the pixel value of each pixel in the second image P2 is corrected according to the above formulas (5), (6) and (7).

[0087] In some possible implementations of the embodiments of the present application, the weight corresponding to the target second color value in the at least two second color values ​​includes: the cosine value of the angle between the vector corresponding to the fourth multi-spectral high-dimensional color information and the vector corresponding to the first multi-spectral high-dimensional color information. The color value color of the white pixel in the second image P2 can be calculated by the following formula (9): P2 .

[0088]

[0089] When the color value color of the white pixel in the second image P2 is calculated according to formula (9): P2 Then, the pixel value of each pixel in the second image P2 is corrected according to the above formulas (5), (6) and (7).

[0090] In some possible implementations of the embodiments of the present application, in S102, the pixel value of each pixel in the first image P1 is corrected using the pixel value of the white pixel in the first image P1. The process of correcting the pixel value of each pixel in the first image P1 using the pixel value of the white pixel in the first image P1 is similar to the process of correcting the pixel value of each pixel in the second image P2 using the pixel value of the white pixel in the second image P2. For details, please refer to the process of correcting the pixel value of each pixel in the second image P2 using the pixel value of the white pixel in the second image P2. The embodiments of the present application will not be described in detail here.

[0091] The present embodiment of the application does not elaborate on the process of determining white pixels in the first image P1 and the fourth image P4. For details, please refer to the process of determining white pixels in an image in the related art. For example, a color range is set, and when the color of a certain pixel is within the color range, the pixel is considered to be a white pixel. For another example, a gray value is set, and when the gray value of a certain pixel is greater than the set gray value, the pixel is considered to be a white pixel.

[0092] After determining each white pixel in the first image P1, the average value of the pixel values ​​of each white pixel in the first image P1 can be used as the pixel value of the white pixel in the first image P1; after determining each white pixel in the fourth image P4, the average value of the pixel values ​​of each white pixel in the fourth image P4 can be used as the pixel value of the white pixel in the fourth image P4.

[0093] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the image processing method. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the image processing device executing the image processing method as an example.

[0094] Figure 3 300 is a schematic diagram of the structure of an image processing device applied to an electronic device provided in an embodiment of the present application. The image processing device 300 applied to an electronic device may include:

[0095] A first acquisition module 301 is used to acquire a first image, a second image, and a third image respectively captured by the first camera, the second camera, and the multispectral sensor for the target scene;

[0096] A first correction module 302, configured to correct the color of the first image according to automatic white balance to obtain a fourth image;

[0097] A first determination module 303 is used to determine a first color mapping relationship between the first camera and the second camera according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image;

[0098] The second correction module 304 is used to correct the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain a fifth image.

[0099] In an embodiment of the present application, a first image, a second image, and a third image captured by a first camera, a second camera, and a multispectral sensor for a target scene are respectively acquired; the color of the first image is corrected according to automatic white balance to obtain a fourth image; a first color mapping relationship between the first camera and the second camera is determined according to a correspondence between multispectral high-dimensional color information and a color mapping relationship, and the first multispectral high-dimensional color information corresponding to the third image; and the color of the second image is corrected according to the first color mapping relationship and a first color value of a white pixel in the fourth image to obtain a fifth image. It can ensure that the first image after color correction (i.e., the fourth image) and the second image after color correction (i.e., the fifth image) have consistent colors, and since the first color mapping relationship between the first camera and the second camera is determined based on the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image collected by the multi-spectral sensor, the multi-spectral sensor receives a wider spectral band than the camera sensor and divides the spectral band more finely, the multi-spectral sensor can more accurately distinguish the color mapping relationship between cameras under different light sources, and therefore, the accuracy of color correction can be improved, and the problem of poor color correction accuracy caused by the "same color, different spectrum" phenomenon can be avoided.

[0100] In some possible implementations of the embodiment of the present application, the first determining module 303 includes:

[0101] A first determination submodule, configured to determine second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information based on at least two multi-spectral high-dimensional color information;

[0102] The second determining submodule is used to determine the color mapping relationship corresponding to the second multi-spectral high-dimensional color information as the first color mapping relationship.

[0103] In some possible implementations of the embodiments of the present application, the first determining submodule is specifically used to:

[0104] Calculate the distance between the spatial point corresponding to each multi-spectral high-dimensional color information in at least two multi-spectral high-dimensional color information and the spatial point corresponding to the first multi-spectral high-dimensional color information;

[0105] The multi-spectral high-dimensional color information corresponding to the spatial point whose distance is less than the preset distance is determined as the second multi-spectral high-dimensional color information.

[0106] In some possible implementations of the embodiments of the present application, the first determining submodule is specifically used to:

[0107] Calculating a cosine value of an angle between a vector corresponding to each of at least two multi-spectral high-dimensional color information and a vector corresponding to the first multi-spectral high-dimensional color information;

[0108] The multi-spectral high-dimensional color information corresponding to the vector whose cosine value is greater than the preset cosine value is determined as the second multi-spectral high-dimensional color information.

[0109] In some possible implementations of the embodiments of the present application, the first determining submodule is specifically used to:

[0110] When the spatial point corresponding to the first multispectral high-dimensional color information is inside the first polyhedron formed by the spatial points corresponding to the multiple multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the centroid of the first polyhedron is determined as the second multispectral high-dimensional color information.

[0111] In some possible implementations of the embodiments of the present application, the first determining submodule is specifically used to:

[0112] When the spatial point corresponding to the first multispectral high-dimensional color information is inside a second polyhedron formed by N spatial points among the M spatial points corresponding to the multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the centroid of the second polyhedron is determined as the second multispectral high-dimensional color information.

[0113] In some possible implementations of the embodiments of the present application, the first determining submodule is specifically used to:

[0114] When the spatial points corresponding to the first multispectral high-dimensional color information are inside multiple polyhedrons, the multispectral high-dimensional color information corresponding to the spatial points corresponding to the intersection points of the multiple polyhedrons is determined as the second multispectral high-dimensional color information, wherein each of the multiple polyhedrons is a polyhedron composed of N spatial points among the M spatial points corresponding to the multispectral high-dimensional color information.

[0115] Wherein, the above M is greater than N, and both M and N are positive integers.

[0116] In some possible implementations of the embodiments of the present application, the image processing device 300 applied to the electronic device further includes:

[0117] A second acquisition module is used to acquire, under each target illumination condition of at least two illumination conditions, a sixth image, a seventh image, and an eighth image respectively captured by the first camera, the second camera, and the multispectral sensor for the target object;

[0118] A second determination module is used to determine a second color mapping relationship between the first camera and the second camera under target lighting conditions according to the sixth image and the seventh image;

[0119] An establishing module is used to establish a corresponding relationship between the third multi-spectral high-dimensional color information corresponding to the eighth image and the second color mapping relationship under target illumination conditions.

[0120] In some possible implementations of the embodiment of the present application, the first color mapping relationship includes at least two color mapping relationships; the second correction module 304 includes:

[0121] A calculation submodule, configured to calculate the product of a color transfer matrix corresponding to each color mapping relationship in at least two color mapping relationships and the first color value to obtain at least two second color values;

[0122] A determination submodule, configured to determine a weighted average of at least two second color values ​​as a third color value of a white pixel in the second image;

[0123] The correction submodule is used to correct the color of each pixel in the second image according to the third color value.

[0124] In some possible implementations of the embodiments of the present application, the weight corresponding to the target second color value in the at least two second color values ​​includes:

[0125] The distance between a first spatial point and a second spatial point corresponding to the first multi-spectral high-dimensional color information, wherein the first spatial point is a spatial point corresponding to fourth multi-spectral high-dimensional color information, the fourth multi-spectral high-dimensional color information is multi-spectral high-dimensional color information corresponding to a third color mapping relationship, and the third color mapping relationship is a color mapping relationship corresponding to a target second color value; or,

[0126] The cosine value of the angle between the vector corresponding to the fourth multi-spectral high-dimensional color information and the vector corresponding to the first multi-spectral high-dimensional color information.

[0127] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The electronic device in the embodiment of the present application can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, 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 the non-mobile electronic device can 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.

[0128] The electronic 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.

[0129] The image processing device applied to electronic equipment provided in the embodiment of the present application can achieve Figure 1 to Figure 2 To avoid repetition, the various processes in the embodiment of the image processing method applied to the electronic device are not described here.

[0130] An embodiment of the present application also provides an electronic device, including a first camera, a second camera, a multispectral sensor, a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the 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 described here.

[0131] 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.

[0132] In some possible implementations of the embodiments of the present application, the orientations of the first camera, the second camera, and the multi-spectral sensor satisfy a first condition.

[0133] In some possible implementations of the embodiments of the present application, the first condition may be that the orientations of the first camera, the second camera, and the multispectral sensor are consistent, that is, the orientations of the first camera, the second camera, and the multispectral sensor are the same.

[0134] In some possible implementations of the embodiments of the present application, the first camera, the second camera, and the multi-spectral sensor are located close to each other to ensure a large overlapping field of view between the cameras.

[0135] In some possible implementations of the embodiments of the present application, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0136] In some possible implementations of the embodiments of the present application, the memory may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the image processing method according to the embodiments of the present application.

[0137] Figure 4 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0138] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .

[0139] Those skilled in the art will appreciate that the electronic device 400 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 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 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.

[0140] Among them, the processor 410 is used to: obtain the first image, the second image and the third image respectively collected by the first camera, the second camera and the multispectral sensor for the target scene; correct the color of the first image according to the automatic white balance to obtain the fourth image; determine the first color mapping relationship between the first camera and the second camera according to the correspondence between the multispectral high-dimensional color information and the color mapping relationship, and the first multispectral high-dimensional color information corresponding to the third image; correct the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain the fifth image.

[0141] In an embodiment of the present application, a first image, a second image, and a third image captured by a first camera, a second camera, and a multispectral sensor for a target scene are respectively acquired; the color of the first image is corrected according to automatic white balance to obtain a fourth image; a first color mapping relationship between the first camera and the second camera is determined according to a correspondence between multispectral high-dimensional color information and a color mapping relationship, and the first multispectral high-dimensional color information corresponding to the third image; and the color of the second image is corrected according to the first color mapping relationship and a first color value of a white pixel in the fourth image to obtain a fifth image. It can ensure that the first image after color correction (i.e., the fourth image) and the second image after color correction (i.e., the fifth image) have consistent colors, and since the first color mapping relationship between the first camera and the second camera is determined based on the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image collected by the multi-spectral sensor, the multi-spectral sensor receives a wider spectral band than the camera sensor and divides the spectral band more finely, the multi-spectral sensor can more accurately distinguish the color mapping relationship between cameras under different light sources, and therefore, the accuracy of color correction can be improved, and the problem of poor color correction accuracy caused by the "same color, different spectrum" phenomenon can be avoided.

[0142] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0143] Determine, according to at least two multi-spectral high-dimensional color information, second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information;

[0144] The color mapping relationship corresponding to the second multi-spectral high-dimensional color information is determined as the first color mapping relationship.

[0145] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0146] Calculate the distance between the spatial point corresponding to each multi-spectral high-dimensional color information in at least two multi-spectral high-dimensional color information and the spatial point corresponding to the first multi-spectral high-dimensional color information;

[0147] The multi-spectral high-dimensional color information corresponding to the spatial point whose distance is less than the preset distance is determined as the second multi-spectral high-dimensional color information.

[0148] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0149] Calculating a cosine value of an angle between a vector corresponding to each of at least two multi-spectral high-dimensional color information and a vector corresponding to the first multi-spectral high-dimensional color information;

[0150] The multi-spectral high-dimensional color information corresponding to the vector whose cosine value is greater than the preset cosine value is determined as the second multi-spectral high-dimensional color information.

[0151] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0152] When the spatial point corresponding to the first multispectral high-dimensional color information is inside the first polyhedron formed by the spatial points corresponding to the multiple multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the centroid of the first polyhedron is determined as the second multispectral high-dimensional color information.

[0153] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0154] When the spatial point corresponding to the first multispectral high-dimensional color information is inside a second polyhedron formed by N spatial points among the M spatial points corresponding to the multispectral high-dimensional color information, the multispectral high-dimensional color information corresponding to the spatial point corresponding to the centroid of the second polyhedron is determined as the second multispectral high-dimensional color information.

[0155] In some possible implementations of the embodiments of the present application, the processor 410 is specifically configured to:

[0156] When the spatial points corresponding to the first multispectral high-dimensional color information are inside multiple polyhedrons, the multispectral high-dimensional color information corresponding to the spatial points corresponding to the intersection points of the multiple polyhedrons is determined as the second multispectral high-dimensional color information, wherein each of the multiple polyhedrons is a polyhedron composed of N spatial points among the M spatial points corresponding to the multispectral high-dimensional color information.

[0157] Wherein, the above M is greater than N, and both M and N are positive integers.

[0158] In some possible implementations of the embodiments of the present application, the processor 410 is further configured to:

[0159] Under each target illumination condition of at least two illumination conditions, acquiring a sixth image, a seventh image, and an eighth image respectively captured by the first camera, the second camera, and the multispectral sensor for the target object;

[0160] A second determination module is used to determine a second color mapping relationship between the first camera and the second camera under target lighting conditions according to the sixth image and the seventh image;

[0161] A correspondence between the third multi-spectral high-dimensional color information corresponding to the eighth image and the second color mapping relationship under the target illumination condition is established.

[0162] In some possible implementations of the embodiment of the present application, the first color mapping relationship includes at least two color mapping relationships; the processor 410 is specifically configured to:

[0163] Calculate the product of the color transfer matrix corresponding to each color mapping relationship in at least two color mapping relationships and the first color value to obtain at least two second color values;

[0164] Determine a weighted average of at least two second color values ​​as a third color value of a white pixel in the second image;

[0165] The color of each pixel in the second image is corrected according to the third color value.

[0166] In some possible implementations of the embodiments of the present application, the weight corresponding to the target second color value in the at least two second color values ​​includes:

[0167] The distance between a first spatial point and a second spatial point corresponding to the first multi-spectral high-dimensional color information, wherein the first spatial point is a spatial point corresponding to fourth multi-spectral high-dimensional color information, the fourth multi-spectral high-dimensional color information is multi-spectral high-dimensional color information corresponding to a third color mapping relationship, and the third color mapping relationship is a color mapping relationship corresponding to a target second color value; or,

[0168] The cosine value of the angle between the vector corresponding to the fourth multi-spectral high-dimensional color information and the vector corresponding to the first multi-spectral high-dimensional color information.

[0169] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 409 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.

[0170] 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.

[0171] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, and examples of the computer-readable storage medium include non-transitory computer-readable storage media, such as ROM, RAM, magnetic disk or optical disk.

[0172] 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.

[0173] 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.

[0174] 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.

[0175] 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 relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (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.

[0176] 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: Applied to an electronic device, the electronic device includes a first camera, a second camera and a multi-spectral sensor, and the method includes: Acquire a first image, a second image, and a third image respectively captured by the first camera, the second camera, and the multispectral sensor for a target scene; Correcting the color of the first image according to automatic white balance to obtain a fourth image; Determine a first color mapping relationship between the first camera and the second camera according to a correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image; Correcting the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain a fifth image; Before determining the first color mapping relationship between the first camera and the second camera according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image, the method further includes: Under each target illumination condition of at least two illumination conditions, acquiring a sixth image, a seventh image, and an eighth image respectively captured by the first camera, the second camera, and the multispectral sensor for the target object; Determine, according to the sixth image and the seventh image, a second color mapping relationship between the first camera and the second camera under the target illumination condition; A correspondence between the third multi-spectral high-dimensional color information corresponding to the eighth image and the second color mapping relationship under the target illumination condition is established.

2. The method according to claim 1, characterized in that The determining, according to the correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image, a first color mapping relationship between the first camera and the second camera includes: Determine, according to at least two multi-spectral high-dimensional color information, second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information; The color mapping relationship corresponding to the second multi-spectral high-dimensional color information is determined as the first color mapping relationship.

3. The method according to claim 2, characterized in that The determining, based on at least two multi-spectral high-dimensional color information, second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information comprises: Calculating the distance between a spatial point corresponding to each multi-spectral high-dimensional color information and a spatial point corresponding to the first multi-spectral high-dimensional color information in the at least two multi-spectral high-dimensional color information; The multi-spectral high-dimensional color information corresponding to the spatial point whose distance is less than the preset distance is determined as the second multi-spectral high-dimensional color information.

4. The method according to claim 2, characterized in that: The determining, based on at least two multi-spectral high-dimensional color information, second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information comprises: Calculating a cosine value of an angle between a vector corresponding to each of the at least two multi-spectral high-dimensional color information and a vector corresponding to the first multi-spectral high-dimensional color information; The multi-spectral high-dimensional color information corresponding to the vector whose cosine value is greater than the preset cosine value is determined as the second multi-spectral high-dimensional color information.

5. The method according to claim 1, characterized in that The first color mapping relationship includes at least two color mapping relationships, and each color mapping relationship in the at least two color mapping relationships corresponds to a different light source component; The step of correcting the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image includes: Calculate the product of the color transfer matrix corresponding to each color mapping relationship of the at least two color mapping relationships and the first color value to obtain at least two second color values; Determine a weighted average of the at least two second color values ​​as a third color value of a white pixel in the second image; Correct the color of each pixel in the second image according to the third color value.

6. The method according to claim 5, characterized in that The weight corresponding to the target second color value of the at least two second color values ​​includes: The distance between a first spatial point and a second spatial point corresponding to the first multi-spectral high-dimensional color information, wherein the first spatial point is a spatial point corresponding to fourth multi-spectral high-dimensional color information, the fourth multi-spectral high-dimensional color information is multi-spectral high-dimensional color information corresponding to a third color mapping relationship, and the third color mapping relationship is a color mapping relationship corresponding to the target second color value; or, The cosine value of the angle between the vector corresponding to the fourth multi-spectral high-dimensional color information and the vector corresponding to the first multi-spectral high-dimensional color information.

7. An image processing device, characterized in that: Applied to an electronic device, the electronic device comprises a first camera, a second camera and a multi-spectral sensor, and the device comprises: A second acquisition module is used to acquire, under each target illumination condition of at least two illumination conditions, a sixth image, a seventh image, and an eighth image respectively captured by the first camera, the second camera, and the multispectral sensor for the target object; A second determination module, configured to determine a second color mapping relationship between the first camera and the second camera under the target illumination condition according to the sixth image and the seventh image; An establishing module, used for establishing a corresponding relationship between the third multi-spectral high-dimensional color information corresponding to the eighth image and the second color mapping relationship under the target illumination condition; A first acquisition module is used to acquire a first image, a second image, and a third image respectively captured by the first camera, the second camera, and the multispectral sensor for a target scene; A first correction module, used for correcting the color of the first image according to automatic white balance to obtain a fourth image; A first determination module, configured to determine a first color mapping relationship between the first camera and the second camera according to a correspondence between the multi-spectral high-dimensional color information and the color mapping relationship and the first multi-spectral high-dimensional color information corresponding to the third image; The second correction module is used to correct the color of the second image according to the first color mapping relationship and the first color value of the white pixel in the fourth image to obtain a fifth image.

8. The device according to claim 7, characterized in that The first determining module comprises: A first determination submodule, configured to determine second multi-spectral high-dimensional color information corresponding to the first multi-spectral high-dimensional color information based on at least two multi-spectral high-dimensional color information; The second determining submodule is configured to determine the color mapping relationship corresponding to the second multi-spectral high-dimensional color information as the first color mapping relationship.

9. The device according to claim 8, characterized in that The first determining submodule is specifically used for: Calculating the distance between a spatial point corresponding to each multi-spectral high-dimensional color information in the at least two multi-spectral high-dimensional color information and a spatial point corresponding to the first multi-spectral high-dimensional color information; The multi-spectral high-dimensional color information corresponding to the spatial point whose distance is less than the preset distance is determined as the second multi-spectral high-dimensional color information.

10. The device according to claim 8, characterized in that The first determining submodule is specifically used for: Calculating a cosine value of an angle between a vector corresponding to each of the at least two multi-spectral high-dimensional color information and a vector corresponding to the first multi-spectral high-dimensional color information; The multi-spectral high-dimensional color information corresponding to the vector whose cosine value is greater than the preset cosine value is determined as the second multi-spectral high-dimensional color information.

11. The device according to claim 7, characterized in that The first color mapping relationship includes at least two color mapping relationships, and each color mapping relationship in the at least two color mapping relationships corresponds to a different light source component; The second correction module comprises: a calculation submodule, configured to calculate the product of a color transfer matrix corresponding to each color mapping relationship of the at least two color mapping relationships and the first color value to obtain at least two second color values; a determination submodule, configured to determine a weighted average of the at least two second color values ​​as a third color value of a white pixel in the second image; A correction submodule is used to correct the color of each pixel in the second image according to the third color value.

12. The device according to claim 11, characterized in that The weight corresponding to the target second color value of the at least two second color values ​​includes: The distance between a first spatial point and a second spatial point corresponding to the first multi-spectral high-dimensional color information, wherein the first spatial point is a spatial point corresponding to fourth multi-spectral high-dimensional color information, the fourth multi-spectral high-dimensional color information is multi-spectral high-dimensional color information corresponding to a third color mapping relationship, and the third color mapping relationship is a color mapping relationship corresponding to the target second color value; or, The cosine value of the angle between the vector corresponding to the fourth multi-spectral high-dimensional color information and the vector corresponding to the first multi-spectral high-dimensional color information.

13. An electronic device, characterized in that: The electronic device includes: a first camera, a second camera, a multispectral sensor, a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method as described in any one of claims 1 to 6.

14. The electronic device according to claim 13, characterized in that: The orientations of the first camera, the second camera, and the multispectral sensor satisfy a first condition.

15. 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 6 are implemented.