Color difference measurement method and device, electronic device

By using a deep learning-based color feature model and a Siamese convolutional neural network, combined with Mahalanobis distance calculation, the problem of inaccurate color difference measurement in existing technologies is solved, achieving more accurate color difference measurement applicable to natural images and imperfectly aligned images.

CN115170834BActive Publication Date: 2026-01-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210893953.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2026-01-02
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Existing color difference measurement methods, such as CIEDE2000, are inconsistent with the evaluation mechanism of the human visual system and cannot accurately reflect the differences in color perception of natural images by the human eye, resulting in inaccurate color difference measurement values.

Method used

A deep learning-based color feature model is adopted, using a Siamese convolutional neural network and convolutional kernels of different sizes to extract multi-scale color information. The color difference features are calculated by combining Mahalanobis distance to measure the color difference between pixels and spatial color.

Benefits of technology

It improves the accuracy of color difference measurement, better reflects the differences in color perception of natural images by the human eye, is suitable for non-perfectly aligned images, and performs excellently in color difference measurement of natural images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170834B_ABST
    Figure CN115170834B_ABST
Patent Text Reader

Abstract

The application relates to a color difference measurement method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: performing feature extraction on an input image through a color feature model to obtain first color features and second color features; wherein the input image comprises a first image and a second image; the color feature model comprises convolution kernels of different sizes; the convolution kernels of different sizes are used to extract multi-scale color information of the input image; based on the first color features and the second color features, a color difference measurement value between pixel points of the first image and the second image is determined; and based on the color difference measurement value between the pixel points, a global color difference measurement value between the first image and the second image is determined. The method can effectively improve the accuracy of color difference measurement and better reflect the color perception difference of the human eye for a natural image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a color difference measurement method and device, electronic equipment and computer readable storage medium. BACKGROUND

[0002] With the development of computer technology, in the image processing system, more and more scenes need to evaluate the color difference of natural images, for example, the color difference measurement method represented by CIEDE2000 can realize pixel-by-pixel calculation of color difference, which provides an index for evaluating image color difference.

[0003] However, in the current color difference measurement method, the color difference measurement formula represented by CIEDE2000 is usually used to calculate the color difference of two images pixel by pixel, but in the color difference measurement processing method represented by CIEDE2000, the inevitable problem is that it does not conform to the evaluation mechanism of the human visual system, so that the promotion performance of this method on natural images cannot be guaranteed, and it cannot well reflect the color perception difference of the human eye for natural images, resulting in that the accurate color difference measurement value cannot be obtained. SUMMARY

[0004] The color difference measurement method, device, electronic equipment and computer readable storage medium provided by the embodiments of the present application can effectively improve the accuracy of color difference measurement and better reflect the color perception difference of the human eye for natural images.

[0005] A color difference measurement method, the method comprising: performing feature extraction on an input image through a color feature model to obtain first color features and second color features; wherein the input image comprises a first image and a second image; the color feature model comprises different sizes of convolution kernels; the different sizes of convolution kernels are used to extract multi-scale color information of the input image; based on the first color features and the second color features, determining a color difference measurement value between pixel points of the first image and the second image; based on the color difference measurement value between the pixel points, determining a global color difference measurement value between the first image and the second image.

[0006] A color difference measurement device comprises: an extraction module configured to perform feature extraction on an input image by a color feature model to obtain a first color feature and a second color feature; wherein the input image comprises a first image and a second image; the color feature model comprises convolution kernels of different sizes; the convolution kernels of different sizes are used to extract multi-scale color information of the input image; a determination module configured to determine a color difference measurement value between pixel points of the first image and the second image based on the first color feature and the second color feature; and determine a global color difference measurement value between the first image and the second image based on the color difference measurement value between the pixel points.

[0007] An electronic device comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the color difference measurement method.

[0008] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method.

[0009] The color difference measurement method performs feature extraction on an input image by a color feature model to obtain a first color feature and a second color feature; wherein the input image comprises a first image and a second image; the color feature model comprises convolution kernels of different sizes; the convolution kernels of different sizes are used to extract multi-scale color information of the input image; a color difference measurement value between pixel points of the first image and the second image is determined based on the first color feature and the second color feature; and a global color difference measurement value between the first image and the second image is determined based on the color difference measurement value between the pixel points. Since the color feature model uses convolution kernels of different sizes in a stacked manner during feature extraction, both pixel color difference and spatial color difference are considered, which is consistent with the evaluation mechanism of the human visual system. Therefore, the color feature model can not only measure the color difference of non-fully aligned images, but also achieve very competitive performance in natural image color difference measurement, better reflect the color perception difference of the human eye for natural images, and thus effectively improve the accuracy of color difference measurement. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0011] Figure 1 It is a flowchart of the color difference measurement method in an embodiment;

[0012] Figure 2 A flow chart of the steps of feature extraction on the input image by the color feature model to obtain the first color feature and the second color feature in one embodiment;

[0013] Figure 3 A schematic diagram of the color difference measurement network architecture of the CD Net2 model based on deep learning in one embodiment;

[0014] Figure 4 A structural block diagram of the color difference measurement device in one embodiment;

[0015] Figure 5 An internal structure diagram of the electronic device in one embodiment. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0017] In one embodiment, as shown in Figure 1 A color difference measurement method is provided, and the present embodiment is exemplified by applying the method to a terminal. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be realized through the interaction of the terminal and the server. In the present embodiment, the method includes the following steps:

[0018] Step 102, feature extraction on the input image by the color feature model to obtain the first color feature and the second color feature; wherein the input image includes a first image and a second image; the color feature model includes different sizes of convolution kernels; the different sizes of convolution kernels are used to extract multi-scale color information of the input image.

[0019] The color feature model refers to a pre-trained neural network model, and the color feature model in the present application is mainly used for color difference measurement on the input image. For example, the color feature model in the present application can be a color difference measurement network architecture CD Net2 model based on deep learning. The CD Net2 model includes a twin convolutional neural network structure, which is used for color space coordinate transform on the input image to obtain the corresponding color feature.

[0020] Siamese neural network, also known as twin neural network, is a coupled architecture based on two artificial neural networks. The Siamese neural network takes two samples as input and outputs their representations in a high-dimensional space to compare the similarity of the two samples. The narrow sense of Siamese neural network is composed of two neural networks with the same structure and shared weights. The generalized Siamese neural network, or "pseudo-siamese network", can be composed of any two neural networks. Siamese neural network usually has a deep structure and can be composed of convolutional neural network, recurrent neural network, etc. Siamese neural network contains two sub-networks, each of which receives an input, maps it to a high-dimensional feature space, and outputs the corresponding representation. By calculating the distance between the two representations, such as Euclidean distance, users can compare the similarity of the two inputs. The sub-networks of the Siamese neural network can be convolutional neural networks or recurrent neural networks, and their weights can be optimized by energy function or classification loss.

[0021] The input image refers to the image to be processed in the color feature model. The input image in the present application can include two different images, for example, the first image in the input image is an image with a brightness greater than a brightness threshold, and the second image in the input image is an image with a brightness less than the brightness threshold.

[0022] The first color feature refers to the color feature corresponding to the first image in the input image, and the second color feature refers to the color feature corresponding to the other image in the input image. The first color feature and the second color feature in the present application are used to distinguish the color features corresponding to different images. For example, the first color feature A is the color feature corresponding to the input image A, and the second color feature B is the color feature corresponding to the input image B.

[0023] Different sizes of convolution kernels refer to the color feature model containing convolution kernels of different sizes. For example, the color feature model in the present application can be a CD Net2 model, and the network structure of the CD Net2 model contains 1*1 convolution kernel and 11*11 convolution kernel. The 1*1 convolution kernel is used to extract more image pixel information; the 11*11 convolution kernel is used to extract more spatial information, that is, using a large size convolution kernel can fully consider the spatial features of adjacent pixels, so the color feature model can also measure the color difference of non-fully aligned color images.

[0024] Specifically, the terminal can perform feature extraction on the input first image and second image through the color feature model to obtain first color features and second color features, that is, the terminal can perform color space coordinate conversion on the input first image and second image through the twin convolutional neural network structure in the color feature model, so as to obtain the first color features corresponding to the first image and the second color features corresponding to the second image, that is, two different color features are obtained. The color features obtained in the present application contain both pixel color differences and spatial color differences. The color feature model in the present application includes convolution kernels of different sizes, which are used to extract multi-scale color information of the input image.

[0025] In the present application, the purpose of performing color space coordinate conversion on the input first image and second image through the twin convolutional neural network structure in the color feature model is to convert the image in the RGB three-dimensional color space to a color difference perception uniform color space of three dimensions or more, and to perform color difference measurement in this space, so that the color difference obtained through the color feature model can satisfy the properties of non-negativity, symmetry, unique reversibility and triangular inequality.

[0026] For example, taking the color feature model CD Net2 as an example for illustration. Assuming that the input images are image A and image B, the network structure of the CD Net2 model is a twin convolutional neural network structure, that is, the terminal can perform feature extraction on the input image A and image B through the first subnetwork and the second subnetwork of the CD Net2 model to obtain the first color features A corresponding to the image A and the second color features B corresponding to the image B.

[0027] Step 104, determining the color difference measurement value between the pixel points of the first image and the second image based on the first color features and the second color features.

[0028] Wherein, the pixel point refers to the pixel point corresponding to each position in the image, that is, the input image is divided into a plurality of small squares, each small square is called a pixel point, and the terminal device represents the position, color, brightness and other information of the pixel point, thereby representing the entire image.

[0029] The color difference measurement value between the pixel points refers to the color difference value between the pixel points of the same position in the first image and the second image. For example, the first image is marked as x, and the second image is marked as y, then the color difference value of the two images at the position (i, j) can be represented as △E(x ij , y ij ).

[0030] Specifically, after the terminal extracts the first color feature and the second color feature from the input images by the color feature model, the terminal can determine the color difference feature between the first image and the second image based on the first color feature and the second color feature, that is, determine the color difference feature between the input images. Further, the terminal can determine the color difference measurement value between the pixel points of the first image and the second image based on the color difference feature between the input images. For example, the terminal can use the Mahalanobis distance to calculate the color similarity of the color difference feature between the input images to obtain the point-to-point color difference measurement value between the input images, that is, the color difference measurement value between the pixel points of the input first image and the second image.

[0031] For example, taking the CD Net2 model as the color feature model, assuming that the input images are image A and image B, and the terminal extracts the first color feature f(x) corresponding to image A and the second color feature f(y) corresponding to image B from the input images by the CD Net2 model, the terminal can determine the color difference feature between the first image and the second image as f(x)-f(y) based on the first color feature f(x) and the second color feature f(y), that is, the terminal can calculate the difference value of the first color feature f(x) and the second color feature f(y) to obtain the color difference feature f(z) between the input images as f(z)=f(x)-f(y). Further, the terminal can use the similarity calculation method of the Mahalanobis distance to calculate the color similarity of the color difference feature f(z) between the input images to obtain the point-to-point color difference measurement value △E(x ij ,y ij ).

[0032] Step 106, determining the global color difference measurement value between the first image and the second image based on the color difference measurement value between the pixel points.

[0033] The global color difference measurement value refers to the global color difference value obtained by averaging the color difference measurement values between the pixel points of the two input images. That is, the global color difference measurement value is used to reflect the overall color difference measurement value between the input images.

[0034] Specifically, after the terminal determines the color difference measurement value between the pixel points of the first image and the second image based on the first color feature and the second color feature, the terminal can calculate the mean value of the color difference values between the pixel points of the first image and the second image based on the color difference measurement value between the pixel points of the first image and the second image, and take the calculated mean value as the global color difference measurement value between the input first image and second image.

[0035] In this embodiment, the color feature model is used to extract features of the input image to obtain first color features and second color features; the input image includes a first image and a second image; the color feature model includes different sizes of convolution kernels, and the different sizes of convolution kernels are used to extract multi-scale color information of the input image; based on the first color features and the second color features, a color difference measurement value between pixel points of the first image and the second image is determined, and based on the color difference measurement value between the pixel points, a global color difference measurement value between the first image and the second image is determined. Since the color feature model uses the superposition of different sizes of learnable convolution kernels in the feature extraction process, both the pixel color difference and the spatial color difference are considered, which is consistent with the evaluation mechanism of the human visual system, so the color feature model can not only measure the color difference of non-fully aligned images, but also can achieve very competitive performance in the natural image color difference measurement problem, and can better reflect the color perception difference of the human eye for natural images, thereby effectively improving the accuracy of color difference measurement.

[0036] In one embodiment, as shown in Figure 2 The color feature model includes first and second convolution kernels; the first and second convolution kernels are two convolution kernels of different sizes; the color feature model is used to extract features of the input image to obtain first color features and second color features, including:

[0037] Step 202, extracting pixel information of the input image by the first convolution kernel to obtain first color features;

[0038] Step 204, extracting spatial information of the input image by the second convolution kernel to obtain second color features;

[0039] Step 206, splicing the first color features and the second color features to obtain spliced features;

[0040] Step 208, performing dimension reduction processing on the spliced features to obtain first color features and second color features of a preset dimension.

[0041] The first convolution kernel refers to a convolution kernel used to extract more image pixel information, for example, the first convolution kernel can be a 1*1 convolution kernel.

[0042] The second convolution kernel refers to a convolution kernel used to extract more spatial information, for example, the second convolution kernel can be an 11*11 convolution kernel. That is, using a large size convolution kernel can fully consider the spatial features of adjacent pixels, so the color feature model can also measure the color difference of non-fully aligned color images.

[0043] The first type of color feature refers to the color features related to pixel information extracted from the input image, and the second type of color feature refers to the color features related to spatial information extracted from the input image. The first and second types of color features are used to distinguish the different types of color features extracted.

[0044] Spatial information refers to the texture information in an image, representing the spatial distribution characteristics of a pixel and its surrounding pixels.

[0045] A splicing feature is a feature obtained by splicing different types of color features. For example, the splicing feature in this application is obtained by splicing the first type of color feature and the second type of color feature.

[0046] Dimensionality reduction refers to the process of reducing the dimensionality of spliced ​​features. The purpose of dimensionality reduction is to reduce the computational cost of the network model.

[0047] Specifically, when the terminal extracts features from the input image using a color feature model, the terminal can extract pixel information of the input image through a first convolutional kernel to obtain a first type of color feature, and extract spatial information of the input image through a second convolutional kernel to obtain a second type of color feature. The terminal then concatenates the first type of color feature and the second type of color feature using a color feature model to obtain a concatenated feature, and performs dimensionality reduction processing on the concatenated feature using a color feature model to obtain a first color feature and a second color feature of a preset dimension.

[0048] For example, such as Figure 3 The diagram shows a schematic of the color difference measurement network architecture of the CD Net2 model based on deep learning. Figure 3 In the example, "Conv 1*1 3*32" indicates that the size of the convolutional kernel in this layer is 1*1, the dimension of the input features is 3, and the dimension of the output features after the convolution operation of this kernel is 32. Figure 3 In the example, "Conv 11*11 3*32" indicates that the size of the convolution kernel in this layer is 11*11, the dimension of the input features is 3, and the dimension of the output features after the convolution operation of this kernel is 32. Figure 3 In the example, "Conv 1*1 64*32" indicates that the size of the convolution kernel in this layer is 1*1, the dimension of the input features is 64, and the dimension of the output features after the convolution operation of this kernel is 32. Figure 3 In the example, "Conv 1*1 32*16" indicates that the size of the convolution kernel in this layer is 1*1, the dimension of the input features is 32, and the dimension of the output features after the convolution operation of this kernel is 16. Figure 3 In the example, "Conv 1*1 16*12" indicates that the size of the convolution kernel in this layer is 1*1, the dimension of the input features is 16, and the dimension of the output features after the convolution operation of this kernel is 12.

[0049] Assuming that the input images are image x and image y, when the terminal extracts features of the input images through the CD Net2 model, the pixel information of the input images is extracted through a 1*1 convolution kernel to obtain first color features, and the spatial information of the input images is extracted through an 11*11 convolution kernel to obtain second color features; the terminal splices the first color features and the second color features through a Stack layer, obtains spliced features, and can perform nonlinear transformation on the spliced features by taking LReLU as an activation function, and then performs dimension reduction processing on the spliced features through multi-layer convolution operation with a 1*1 convolution kernel and a channel number decreasing from 64 to 12, so as to obtain twelve-dimensional first color features and second color features. That is, the terminal takes the finally obtained twelve-dimensional vector as the color features of a single image in a color space with uniform color difference perception, that is, the terminal takes image x and image y as inputs of the CD Net2, and after color space coordinate conversion processing, can obtain twelve-dimensional color features f(x) of image x and twelve-dimensional color features f(y) of image y.

[0050] It can be understood that the channel number in the dimension reduction operation of the embodiment of the application can be self-defined, for example, the dimension reduction operation is performed through multi-layer convolution operation with a 1*1 convolution kernel and a channel number decreasing from 64 to 3, and the obtained color features are three-dimensional vectors, that is, the terminal takes image x and image y as inputs of the CD Net2, and after color space coordinate conversion processing, can obtain three-dimensional color features f(x) of image x and three-dimensional color features f(y) of image y.

[0051] In this embodiment, by using the stacking mode of different sizes of learnable convolution kernels in the feature extraction process, rich spatial information is learned, and each pixel information in the image is considered, so that the color feature model can perform color difference measurement on non-fully aligned images, can better reflect the color perception difference of the human eye for natural images, thereby effectively improving the accuracy of color difference measurement.

[0052] In one embodiment, the step of performing dimension reduction processing on the spliced features to obtain the first color features and the second color features of the preset dimension includes:

[0053] The spliced features are processed by using multi-layer convolution kernels with the same size as the first convolution kernel to obtain twelve-dimensional first color features and twelve-dimensional second color features; wherein the channel number of the multi-layer convolution kernel is decreased layer by layer according to a preset strategy.

[0054] Specifically, the terminal extracts pixel information of the input image through the first convolution kernel to obtain the first color feature, and extracts spatial information of the input image through the second convolution kernel to obtain the second color feature. Then, the terminal can use a plurality of convolution kernels with the same size as the first convolution kernel to perform dimension reduction processing on the spliced feature to obtain a twelve-dimensional first color feature and a twelve-dimensional second color feature. The number of channels of the plurality of convolution kernels is decreased layer by layer according to a preset strategy, that is, the color feature of the initial input image is three-dimensional, and the dimension of the final output color feature can be changed by setting the number of channels of each convolution kernel, so that the dimension of the finally obtained color feature meets the expected demand.

[0055] For example, as shown in FIG. 1, the color feature of the initial input image is three-dimensional, and the dimension of the final output color feature can be changed by setting the number of channels of each convolution kernel, so that the dimension of the finally obtained color feature meets the expected demand. Figure 3 Figure 3 In the above, “Conv 1*1 3*32” indicates that the size of the convolution kernel of this layer is 1*1, the dimension of the input color feature is 3, and the dimension of the output color feature after the convolution operation of this convolution kernel is 32. Figure 3 In the above, the dimension of the color feature output by the convolution kernel of “Conv 11*11 3*32” is also 32. Since the dimension of the color feature of the initial input image is 3, after the feature extraction of the input image through the “Conv 1*1 3*32” layer and the “Conv 11*11 3*32” layer, the dimension of the first color feature obtained is 32, and the dimension of the second color feature is also 32.

[0056] Further, the terminal splices the first color feature and the second color feature through the Stack layer to obtain a spliced feature with a dimension of 64. The terminal can use LReLU as an activation function to perform nonlinear transformation on the 64-dimensional spliced feature, and then perform convolution operation on the transformed 64-dimensional spliced feature through the convolution kernel of “Conv 1*164*32” to obtain a 32-dimensional spliced feature. Further, the terminal performs nonlinear transformation and convolution operation on the 32-dimensional spliced feature through the convolution kernel of “Conv 1*132*16” to obtain a 16-dimensional spliced feature. Then, the terminal performs nonlinear transformation and convolution operation on the 16-dimensional spliced feature through the convolution kernel of “Conv 1*1 16*12” to obtain a final 12-dimensional spliced feature. That is, the number of channels of the plurality of convolution kernels in this embodiment is decreased layer by layer according to a preset strategy, as shown in FIG. 1, the number of channels is gradually decreased from 64 to 12, that is, the dimension of the output color feature changes as follows: 3→32→64→32→16→12. Therefore, by using the number of channels that is decreased layer by layer for dimension reduction processing, the calculation amount of the network model can be reduced, thereby effectively improving the efficiency of the model in processing data. Figure 3

[0057] ​​In one embodiment, based on the first color feature and the second color feature, the color difference measure value between the pixels of the first image and the second image is determined, including:

[0058] Based on the first color feature and the second color feature, the color difference feature is determined.

[0059] The color similarity of the color difference feature is calculated to obtain the color difference measure value between the pixels of the first image and the second image.

[0060] Specifically, as shown in the figure, Figure 3 After the terminal extracts the first color feature and the second color feature from the input two images through the CD Net2 model, the terminal can perform difference operation on the first color feature and the second color feature, that is, the terminal subtracts the two different color features of the input two different images to obtain the color difference feature. Further, the terminal can use the calculation method of Mahalanobis distance to calculate the color similarity of the color difference feature, and thus obtain the color difference measure value between the pixels of the input two images, that is, the point-to-point color difference measure.

[0061] The calculation process of Mahalanobis distance is shown in the following formula (1):

[0062]

[0063] Wherein, f(x) represents the first color feature, f(y) represents the second color feature, T represents the transpose matrix, S represents the learnable positive semi-definite matrix, and △E(x ij ,y ij ) represents the point-to-point color difference measure value between the input images.

[0064] It can be understood that S in the present application can be a 12*12 learnable positive semi-definite matrix, which reflects the difference degree of the twelve-dimensional color difference feature in each dimension, and the specific parameters are learned by the neural network from the training of large-scale data.

[0065] In the embodiment, by using Mahalanobis distance, the obtained color difference feature and the positive semi-definite matrix representing the difference degree of the color difference feature in different dimensions are calculated for similarity. Since the positive semi-definite matrix is learned from large-scale data by the network, the color difference measure can be performed on the non-fully aligned images, and the optimal performance is achieved in the natural image color difference measure problem. In the evaluation of natural image color difference and color block color difference, competitive performance is achieved. The application provides an index for objective evaluation of image color difference, which can better reflect the color perception difference of the human eye for natural images, is consistent with the evaluation mechanism of the human visual system, and thus effectively improves the accuracy of the color difference measure.

[0066] In one embodiment, determining color difference features based on a first color feature and a second color feature includes:

[0067] The first color feature and the second color feature are interpolated to obtain a color difference feature of a preset dimension; the color difference feature includes pixel color difference and spatial color difference.

[0068] Among them, difference operation refers to subtraction operation. For example, after performing a subtraction operation on two 12-dimensional vectors, the resulting vector is the color difference feature.

[0069] Specifically, such as Figure 3 As shown, the terminal inputs two images x and y into CD Net2. After feature extraction and color space coordinate transformation, the color features f(x) and f(y) are obtained respectively. Subtracting the two results in the color difference feature of the input image, i.e., f(x)-f(y), which has a dimension of 12, including both pixel color differences and spatial color differences. Since the color space coordinate transformation in the CD Net2 model uses a 1*1 multi-layer convolution operation decreasing from 64 dimensions to 12 dimensions for dimensionality reduction, the 12-dimensional color features f(x) and f(y) of the input image are obtained. Therefore, the terminal performs a difference operation between the first color feature f(x) and the second color feature f(y), and the resulting color difference feature f(x)-f(y) also has a dimension of 12, thus obtaining the 12-dimensional color difference feature f(x)-f(y).

[0070] It is understandable that the color difference features mentioned above can be in other dimensions besides 12 dimensions. For example, by using multi-layer convolution operations that decrease from 64 dimensions to 3 dimensions to perform dimensionality reduction, the resulting color difference features f(x)-f(y) are 3-dimensional. In order to match the Mahalanobis distance calculation, the positive semi-definite matrix S should be set to a 3*3 positive semi-definite matrix in this case, which reflects the degree of difference of the 3-dimensional color difference features f(x)-f(y) in the three dimensions.

[0071] In this embodiment, the obtained color difference features are compared with the positive semi-definite matrix representing the degree of difference of color difference features in different dimensions. Since the positive semi-definite matrix is ​​learned from large-scale data by the network, color difference can be measured for non-perfectly aligned images. It achieves optimal performance in the problem of color difference measurement of natural images and has achieved highly competitive performance in the evaluation of color difference and color block color difference in natural images. It provides an indicator for objectively evaluating the color difference of images and can better reflect the color perception difference of the human eye in natural images. It is consistent with the evaluation mechanism of the human visual system and thus effectively improves the accuracy of color difference measurement.

[0072] In one embodiment, the step of performing color similarity calculation on the color difference feature to obtain the color difference metric value between the pixel points of the first image and the second image comprises:

[0073] Based on the color difference feature and the predetermined positive semi-definite matrix, the color difference metric value between the pixel points of the first image and the second image is determined; wherein the predetermined positive semi-definite matrix is obtained from the training of a large amount of data by a neural network model;

[0074] The global color difference metric value between the first image and the second image is determined based on the color difference metric value between the pixel points.

[0075] The global color difference metric value between the first image and the second image is determined based on the length value, width value, and color difference metric value between the pixel points of the input image.

[0076] The predetermined positive semi-definite matrix is used to reflect the difference degree of the color difference feature in each dimension, for example, the predetermined positive semi-definite matrix S is a 12*12 learnable positive semi-definite matrix, which reflects the difference degree of the twelve-dimensional color difference feature in each dimension, and the specific parameters are learned by the neural network from the training of a large amount of data.

[0077] Specifically, when the terminal performs color similarity calculation on the color difference feature, the terminal can perform color similarity calculation using the Mahalanobis distance as shown in the above formula (1) to determine the color difference metric value between the pixel points of the input image. Further, after the terminal obtains the color difference metric value between the pixel points of the input two images, the terminal can determine the global color difference metric value between the first image and the second image based on the length value, width value, and color difference metric value between the pixel points of the input image, i.e., the terminal can calculate the global color difference metric value between the input images according to the following formula (2):

[0078]

[0079] wherein △E(x,y) represents the global color difference value of the input image, △E(x ij ,y ij ) represents the color difference value between the pixel points at the (i,j) position of the input two images, H represents the length value of the input image, i.e., H represents the number of pixel points in each row of the input image, for example, the length value H is 500, indicating that the number of pixel points in each row of the input image is 500; W represents the width value of the input image, i.e., W represents the number of pixel points in each column of the input image, for example, the width value W is 400, indicating that the number of pixel points in each column of the input image is 400.

[0080] For example, two images with length value and width value H and W are input, one image is x and the other image is y. (i, j) is a point on the image, and △E(x ij ,y ij ) represents the color difference value between the pixel points at the position (i, j) of the two input images, and the global color difference value is obtained by averaging the color difference values of H*W pixel points.

[0081] In this embodiment, the artificial intelligence method is innovatively used to measure the color difference of natural images, and a deep learning network model suitable for evaluating the color difference of natural images is constructed, so that the color feature model has achieved very competitive performance in the evaluation of natural image color difference and color block color difference, and provides an index for objective evaluation of image color difference.

[0082] In one embodiment, after determining the color difference measurement value between the pixel points of the first image and the second image based on the first color feature and the second color feature, the method further comprises:

[0083] Based on the color difference measurement value between the pixel points of the first image and the second image, a corresponding heat map is generated; the heat map is used to show the color difference distribution between the first image and the second image.

[0084] Specifically, after the terminal determines the color difference measurement value between the pixel points of the first image and the second image based on the first color feature and the second color feature, the terminal can generate a corresponding heat map based on the color difference measurement value between the pixel points of the first image and the second image, and the heat map is used to show the color difference distribution between the first image and the second image. That is, the terminal can calculate the point-to-point color difference value between the input images by the above formula (1), and then generate a smooth heat map to intuitively show the color difference distribution of the two input color images. Therefore, the color feature model can be used for point-to-point color difference calculation, and a heat map that intuitively shows the color difference distribution of the input images can be obtained, thereby effectively improving the user experience.

[0085] The present application also provides an application scenario applying the above color difference measurement method. Specifically, the color difference measurement method is applied in the application scenario as follows:

[0086] When it is necessary to evaluate the color difference of natural images, the above-mentioned color difference measurement method can be used, that is, the trained color feature model is used to measure the color difference of the input two images, the input images are automatically feature-extracted to obtain the first color feature and the second color feature, and based on the first color feature and the second color feature, the global color difference measurement value between the input images is determined. In addition, the above-mentioned color difference measurement method can also be applied to evaluate the difference between the target image and the competitor image, or the difference between other target images, or applied to guide image color adjustment or AI color rendition task. Among them, the natural image (Natural image) refers to the image corresponding to the color data, which is the image taken in daily life, and is distinguished from the image with uniform single color.

[0087] The method provided by the embodiments of the present application can be applied to the scene of measuring the color difference of natural images. The color difference measurement method provided by the embodiments of the present application is described below with the scene of measuring the color difference of natural images as an example.

[0088] In the traditional way, the color difference calculation formula CIEDE2000 is usually used to calculate the color difference. The color difference measurement formula represented by CIEDE2000 is developed based on CIELAB space. When designing, the non-uniform region on CIELAB space is corrected, but its performance is only verified on a small data set. It can realize pixel-by-pixel color difference calculation, and cannot evaluate the color difference of non-fully aligned pictures. That is, the general process of applying CIEDE2000 color difference evaluation formula to natural images is: calculating the color difference between the corresponding pixel points of the input two images, only considering the corresponding position pixels, and taking the average value of all the calculated corresponding pixel position color differences. For example, n pixel points correspond to n color difference values, and the average value obtained is the color difference of the input image. Therefore, when this method is used, the input image must be completely pixel-aligned. Pixel misalignment can easily cause evaluation errors. For example, 6 flagship mobile phones are used to take 6 images in the same scene at the same time. Although the algorithm has been used for alignment, due to factors such as lens distortion and mobile phone shaking, the 6 images cannot be completely pixel-aligned. If CIEDE2000 color difference evaluation formula is used to evaluate the color difference, there must be pixel point misalignment.

[0089] In addition, the influence of spatial information in the image on evaluating color difference is not considered in the traditional method, which is inconsistent with the evaluation mechanism of the human visual system. Because the perception of color difference by the human eye is in a regional manner, the difference between individual pixels has little influence on the overall perception. In the traditional method, the CIEDE2000 color difference evaluation formula is calculated pixel by pixel. Even in the same color difference region, the color difference between each point and the surrounding points is fragmented. The human visual system does not focus on the color difference on a specific pixel, but focuses on the overall color difference of the region. The spatial information needs to be considered. Therefore, the generalization performance of the CIEDE2000 color difference evaluation formula on natural images cannot be guaranteed, and it cannot well reflect the perceived color difference of natural images by the human eye, thereby leading to inaccurate color difference measurement values.

[0090] Therefore, in order to solve the above problems, the present application provides a color difference measurement method based on deep learning. The AI learning method is used to model the color difference evaluation problem of natural images, and a color difference measurement network architecture CD Net2 based on deep learning is proposed. CD Net2 has the characteristics of strong robustness and can measure the color difference of non-fully aligned images. It has achieved optimal performance in the color difference measurement problem of natural images, that is, it has achieved extremely competitive performance in the evaluation of natural image color difference and color block color difference. It provides an index for objective evaluation of image color difference and can better reflect the color perception difference of natural images by the human eye, effectively improving the accuracy of color difference measurement.

[0091] As shown in Figure 3 Fig. 1 is a color difference measurement network architecture diagram of the CD Net2 model based on deep learning. The CD Net2 model is composed of color space coordinate conversion and Mahalanobis distance calculation. Since the color difference perception in the RGB color space is not uniform, color difference measurement in this space will definitely result in a large error in measuring the image color difference. Therefore, in this embodiment, a neural network model is used to learn a color space with uniform color difference perception of more than three dimensions, so as to measure the color difference in this space. Therefore, in CD Net2, the color space coordinate conversion of the input image is first performed by a twin convolutional neural network structure. The purpose is to convert the image in the RGB three-dimensional color space to a color space with uniform color difference perception of more than three dimensions, and to measure the color difference in this space.

[0092] That is, in the CD Net2 model, first, a twin convolutional neural network structure is used to convert the input image in color space coordinates to obtain corresponding color features. Then, the color difference features between the input images can be obtained by subtracting the two different color features obtained from the two different input images. Finally, the CD Net2 model calculates the Mahalanobis distance of the color difference features to obtain the point-to-point color difference measurement between the input images. The color difference obtained by the model in this embodiment satisfies the non-negativity, symmetry, unique reversibility, and triangle inequality.

[0093] In the embodiment of the present application, as can be seen from the above formula (1), the color difference obtained by the CD Net2 model is always positive, S has a semi-positive constraint, and the input of x and y and the input of y and x are the same. Moreover, through a large number of verifications, the CD Net2 has unique reversibility compared with other network structures, and the CD Net2 is obviously superior to other network structures. In addition, through experimental verification on 2000000 groups of data, the CD Net2 can satisfy the triangle inequality.

[0094] In the CD Net2, the color space coordinate conversion part (coordinate transform) uses two convolution kernels of different sizes to obtain multi-scale color information of the image:

[0095] (1) The 1*1 convolution kernel is used to extract more information of the image pixels;

[0096] (2) The 11*11 convolution kernel is used to extract more spatial information. The use of a large size convolution kernel can fully consider the spatial features of adjacent pixels, so the CD Net2 model can also measure the color difference of non-fully aligned color images.

[0097] As shown in Figure 3 , the CD Net2 model concatenates the two types of color features obtained above according to the channel dimension, and then performs dimension reduction processing through multi-layer convolution operation with a convolution kernel of 1*1 and a channel number decreasing from 64 to 12. LReLU is used as the activation function between the multi-layer convolution layers. The parameters of all the convolution kernels (filters) in this process are obtained by training the neural network on a large amount of data. After the above operation, a twelve-dimensional vector is finally obtained, which is the color feature of a single image in the color space with uniform color difference perception. That is, taking an image x as the input of the CD Net2 model as shown in Figure 3 , the twelve-dimensional color feature f(x) of the input image x can be obtained through color space coordinate conversion.

[0098] In the embodiment, a 1*1 convolution kernel is used for dimension reduction because the required parameter amount is very small, the color features can be better fused, and the mutual influence of the front and rear network modules is alleviated.

[0099] It can be understood that the 11*11 size convolution kernel used in the feature extraction step in the color space coordinate conversion of the CD-Net2 in the embodiment can also use other size convolution kernels. The feature extraction step in the color space coordinate conversion can use different size convolution kernels, which can be set according to requirements. Meanwhile, other channel numbers can also be used for dimension reduction processing in the CD-Net2 in the embodiment. The purpose of dimension reduction is to reduce the network model calculation amount. For example, a multi-layer convolution operation with a decrease from 64 to 3 is used for dimension reduction operation, and the Mahalanobis distance calculation needs to be changed accordingly. For example, a multi-layer convolution operation with a decrease from 64 dimensions to 3 dimensions is used for dimension reduction operation, and f(x)-f(y) is 3 dimensions. In order to match the Mahalanobis distance calculation, S should be changed to a 3*3 semi-definite matrix in this case, which reflects the difference degree of the 3-dimensional color difference feature f(x)-f(y) in 3 dimensions.

[0100] The specific steps of the color difference calculation in the CD Net2 are as follows:

[0101] (1) Two images x and y are input into the CD Net2, and the color features f(x) and f(y) of the two images can be obtained after feature extraction and color space coordinate conversion. The color difference feature of the input image can be obtained after the two are subtracted, that is, f(x)-f(y), which has a dimension of 12, and contains both pixel color difference and spatial color difference.

[0102] (2) The color difference feature is subjected to Mahalanobis distance color similarity calculation, and finally the point-to-point color difference measurement between the input images is obtained. The calculation process is shown in the formula (1) as described above.

[0103] It can be understood that other color similarity calculation methods often do not have good physical properties, do not satisfy non-negativity, symmetry, unique reducibility and triangular inequality, and cannot generate a smooth heat map. Therefore, the Mahalanobis distance is preferentially used for color similarity calculation in the embodiment.

[0104] In the embodiments of the present application, when the Mahalanobis distance is used for color similarity measurement, optimization is performed on its application level. S in the above formula (1) is learned from large-scale data by a network. For example, S can be a 12*12 learnable positive semi-definite matrix, which reflects the difference degree of twelve-dimensional color difference features in each dimension, and the specific parameters are learned by a neural network from the training of large-scale data. The point-to-point color difference value on the input image can be obtained by calculating the above formula (1), and then a smooth heat map can be generated to intuitively show the color difference distribution of the two input color images. Finally, the CD Net2 model can obtain the overall color difference measurement value between the input images according to the mean value of the color difference value between the pixels of the above two input images, and the specific calculation process is shown in the above formula (2).

[0105] The beneficial effects of the method provided in the embodiments of the present application include:

[0106] (1) The artificial intelligence method is innovatively used to measure the color difference of natural images, and a deep learning network model suitable for evaluating the color difference of natural images is constructed. The CD Net2 model has achieved very competitive performance in the evaluation of natural image color difference and color block color difference, and provides an index for objectively evaluating the color difference of images.

[0107] (2) In the feature extraction process of the CD-Net2 model, different sizes of learnable convolution kernels are stacked, which not only learns rich spatial information, but also considers the information of each pixel in the image, so that the CD-Net2 model can measure the color difference of non-fully aligned images.

[0108] (3) The calculation formula of the Mahalanobis distance is used in CD-Net2, in which the positive semi-definite matrix representing the difference degree of variables is learned by a neural network in training.

[0109] (4) CD-Net2 can realize point-to-point color difference calculation, and can further obtain a heat map that intuitively shows the color difference distribution of the input image.

[0110] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time but can be executed at different times, and the execution of the steps or stages is not necessarily sequential but can be performed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiments of the present application also provide a color difference measurement device for implementing the color difference measurement method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more color difference measurement device embodiments provided below can refer to the limitations of the color difference measurement method described above, which will not be repeated here.

[0112] In one embodiment, as shown in Figure 4 a color difference measurement device is provided, comprising: an extraction module 402 and a determination module 404, wherein:

[0113] The extraction module 402 is configured to perform feature extraction on the input image by a color feature model to obtain first color features and second color features; wherein the input image includes a first image and a second image; the color feature model includes convolution kernels of different sizes; and the convolution kernels of different sizes are used to extract multi-scale color information of the input image.

[0114] The determination module 404 is configured to determine a color difference measurement value between pixel points of the first image and the second image based on the first color features and the second color features; and determine a global color difference measurement value between the first image and the second image based on the color difference measurement value between the pixel points.

[0115] In one embodiment, the device further comprises a splicing module and a processing module.

[0116] The extraction module is further configured to extract pixel information of the input image by the first convolution kernel to obtain first color features, and extract spatial information of the input image by the second convolution kernel to obtain second color features; the splicing module is configured to splice the first color features and the second color features to obtain spliced features; and the processing module is configured to perform dimension reduction processing on the spliced features to obtain first color features and second color features of a preset dimension.

[0117] In one embodiment, the processing module is further configured to perform dimension reduction processing on the spliced features by using a plurality of convolution kernels of the same size as the first convolution kernel, to obtain a first color feature of twelve dimensions and a second color feature of twelve dimensions; wherein the number of channels of the plurality of convolution kernels decreases layer by layer according to a preset strategy.

[0118] In one embodiment, the device further comprises a calculation module.

[0119] The determination module is further configured to determine a color difference feature based on the first color feature and the second color feature; and the calculation module is configured to perform color similarity calculation on the color difference feature to obtain a color difference measurement value between the pixel points of the first image and the second image.

[0120] In one embodiment, the device further comprises an operation module.

[0121] The operation module is configured to perform difference operation on the first color feature and the second color feature to obtain a color difference feature of a preset dimension; the color difference feature includes pixel color difference and spatial color difference.

[0122] In one embodiment, the determination module is further configured to determine a color difference measurement value between the pixel points of the first image and the second image based on the color difference feature and a preset positive semi-definite matrix; wherein the preset positive semi-definite matrix is obtained from training of a large amount of data by a neural network model; and determine a global color difference measurement value between the first image and the second image based on a length value and a width value of the input image, the color difference measurement value between the pixel points.

[0123] In one embodiment, the device further comprises a generation module.

[0124] The generation module is configured to generate a corresponding heat map based on the color difference measurement value between the pixel points of the first image and the second image; and the heat map is used to show the color difference distribution between the first image and the second image.

[0125] Each of the above color difference measurement devices can be realized by software, hardware and combinations thereof, in whole or in part. Each of the above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each of the above modules.

[0126] In one embodiment, a computer device is provided, which can be a terminal, and the internal structure diagram thereof can be as shown in Figure 5The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement a color difference measurement method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0127] Those skilled in the art can understand that, Figure 5 The skilled in the art can understand that,

[0128] The computer device shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0129] The computer device shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0132] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0133] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A color difference metric method characterized by, The method comprises: extracting features of an input image through a color feature model to obtain first color features and second color features; wherein the input image comprises a first image and a second image; the color feature model comprises different sizes of convolution kernels; the different sizes of convolution kernels are used to extract multi-scale color information of the input image; the first color features are color features corresponding to the first image; the second color features are color features corresponding to the second image; determining color difference features based on the first color features and the second color features; performing color similarity calculation on the color difference features to obtain color difference measurement values between pixel points of the first image and the second image; determining a global color difference measurement value between the first image and the second image based on the color difference measurement values between the pixel points; The color feature model comprises a first convolution kernel and a second convolution kernel; the first convolution kernel and the second convolution kernel are two convolution kernels of different sizes; the color feature model is used to extract features of an input image to obtain first color features and second color features, comprising: extracting pixel information of the input image through the first convolution kernel to obtain first color features; extracting spatial information of the input image through the second convolution kernel to obtain second color features; the spatial information refers to texture information in the input image, indicating the distribution characteristics of a pixel point and surrounding pixel points in space; splicing the first color features and the second color features to obtain spliced features; performing dimension reduction processing on the spliced features to obtain first color features and second color features of a preset dimension.

2. The method of claim 1, wherein, The dimension reduction processing on the spliced features to obtain first color features and second color features of a preset dimension comprises: using a plurality of convolution kernels with the same size as the first convolution kernel to perform dimension reduction processing on the spliced features to obtain twelve-dimensional first color features and twelve-dimensional second color features; wherein the number of channels of the plurality of convolution kernels decreases layer by layer according to a preset strategy.

3. The method of claim 1, wherein, The determination of color difference features based on the first color features and the second color features comprises: performing difference operation on the first color features and the second color features to obtain color difference features of a preset dimension; the color difference features include pixel color difference and spatial color difference.

4. The method of claim 3, wherein, The color similarity calculation on the color difference features to obtain color difference measurement values between pixel points of the first image and the second image comprises: determining color difference measurement values between pixel points of the first image and the second image based on the color difference features and a preset positive semi-definite matrix; wherein the preset positive semi-definite matrix is obtained from the training of a large amount of data by a neural network model; The determination of a global color difference measurement value between the first image and the second image based on the color difference measurement values between the pixel points comprises: determining a global color difference measurement value between the first image and the second image based on the length value, the width value of the input image and the color difference measurement values between the pixel points.

5. The method of claim 1, wherein, The method further comprises: Generate a corresponding heat map based on the color difference measurement value between the pixels of the first image and the second image; the heat map is used to show the color difference distribution between the first image and the second image.

6. A color difference measuring device characterized by comprising: Comprise: The extraction module is used for extracting features of the input image through a color feature model to obtain first color features and second color features; wherein the input image comprises a first image and a second image; the color feature model comprises different sizes of convolution kernels; the different sizes of convolution kernels are used to extract multi-scale color information of the input image; the first color features are color features corresponding to the first image; the second color features are color features corresponding to the second image; The determination module is used for determining color difference features based on the first color features and the second color features; The calculation module is used for color similarity calculation on the color difference features to obtain color difference measurement values between the pixels of the first image and the second image; The determination module is also used for determining global color difference measurement values between the first image and the second image based on the color difference measurement values between the pixels; The color feature model comprises a first convolution kernel and a second convolution kernel; the first convolution kernel and the second convolution kernel are two convolution kernels of different sizes; The extraction module is also used for extracting pixel information of the input image through the first convolution kernel to obtain first color features; and extracting spatial information of the input image through the second convolution kernel to obtain second color features; The splicing module is used for splicing the first color features and the second color features to obtain spliced features; The processing module is used for dimension reduction processing on the spliced features to obtain first color features and second color features of a preset dimension.

7. The apparatus of claim 6, wherein, The processing module is also used for dimension reduction processing on the spliced features by using a plurality of convolution kernels of the same size as the first convolution kernel to obtain twelve-dimensional first color features and twelve-dimensional second color features; wherein the number of channels of the plurality of convolution kernels is decreased layer by layer according to a preset strategy.

8. An electronic device comprising a memory and a processor, said memory having stored therein a computer program, characterized in that, The computer program is executed by the processor to make the processor execute the steps of the color difference measurement method in any one of claims 1 to 5.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Post-processed bokeh rendering using asymmetric recursive Gaussian filters

    AU2013273830A1

  • Pavement area identification method and system for open-pit mine road

    CN110059629A