CN107507250A - A kind of complexion tongue color image color correction method based on convolutional neural networks - Google Patents
A kind of complexion tongue color image color correction method based on convolutional neural networks Download PDFInfo
- Publication number
- CN107507250A CN107507250A CN201710406983.2A CN201710406983A CN107507250A CN 107507250 A CN107507250 A CN 107507250A CN 201710406983 A CN201710406983 A CN 201710406983A CN 107507250 A CN107507250 A CN 107507250A
- Authority
- CN
- China
- Prior art keywords
- layer
- color
- image
- feature map
- color correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012937 correction Methods 0.000 title claims abstract description 82
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000013527 convolutional neural network Methods 0.000 title claims abstract description 36
- 238000012549 training Methods 0.000 claims abstract description 59
- 230000000694 effects Effects 0.000 claims abstract description 10
- 238000013480 data collection Methods 0.000 claims abstract description 5
- 238000010276 construction Methods 0.000 claims abstract description 4
- 230000006870 function Effects 0.000 claims description 23
- 230000009466 transformation Effects 0.000 claims description 23
- 238000010606 normalization Methods 0.000 claims description 16
- 230000004913 activation Effects 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000013528 artificial neural network Methods 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 4
- 238000004880 explosion Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 230000007613 environmental effect Effects 0.000 claims description 2
- 239000000284 extract Substances 0.000 claims description 2
- 238000001914 filtration Methods 0.000 claims description 2
- 238000011156 evaluation Methods 0.000 abstract description 22
- 230000003287 optical effect Effects 0.000 abstract description 6
- 230000019771 cognition Effects 0.000 abstract description 2
- 230000001815 facial effect Effects 0.000 abstract description 2
- 238000003672 processing method Methods 0.000 abstract description 2
- 239000003086 colorant Substances 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000004737 colorimetric analysis Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000010238 partial least squares regression Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 238000013213 extrapolation Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 230000035479 physiological effects, processes and functions Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Color Image Communication Systems (AREA)
Abstract
一种基于卷积神经网络的面色舌色图像颜色校正方法涉及数字图像处理方法。算法主要包括离线部分和在线部分。离线部分由训练数据采集、颜色校正卷积神经网络网络框架搭建和训练组成,在线部分则是图像颜色校正和颜色校正效果评价。CNN模仿人类的认知过程,即从局部特征到全局特征的逐层抽象。将卷积神经网络应用于颜色校正中,可以获得较为理想的颜色重现效果。本发明通过采用深度卷积神经网络方法,对稳定光学环境中采集到的人脸面色和舌色进行颜色校正,重现在相同光学环境中目标对象真是呈现的颜色信息。
A method for color correction of face color and tongue color image based on convolutional neural network relates to a digital image processing method. The algorithm mainly includes offline part and online part. The offline part consists of training data collection, color correction convolutional neural network framework construction and training, and the online part is image color correction and color correction effect evaluation. CNN imitates the human cognitive process, that is, layer-by-layer abstraction from local features to global features. Applying convolutional neural networks to color correction can achieve a more ideal color reproduction effect. The present invention uses a deep convolutional neural network method to perform color correction on the facial complexion and tongue color collected in a stable optical environment, and reproduce the color information that the target object actually presents in the same optical environment.
Description
技术领域technical field
本发明涉及数字图像处理方法,特别涉及一种基于卷积神经网络的面色舌色图像颜色校正方法。The invention relates to a digital image processing method, in particular to a method for correcting complexion and tongue color images based on a convolutional neural network.
背景技术Background technique
真实颜色的采集与复现在医学、艺术等领域具有重要的价值。图像的颜色信息是进行某些专业图像分析的重要依据。物体表面呈现的颜色与光源特性、光照条件、采集设备和显示设备、打印设备等各种环节密切相关。颜色校正是颜色复现、实现颜色一致性呈现的关键技术。目前,颜色校正已经在医学图像、壁画图像和证照图像等众多图像处理领域中得到了应用。研究能真实反映观察对象本身颜色的颜色校正技术具有重要的意义。The collection and reproduction of true colors is of great value in fields such as medicine and art. Image color information is an important basis for some professional image analysis. The color presented on the surface of an object is closely related to various links such as light source characteristics, lighting conditions, acquisition equipment, display equipment, and printing equipment. Color correction is a key technology for color reproduction and consistent color presentation. At present, color correction has been applied in many image processing fields such as medical images, mural images and license images. It is of great significance to study the color correction technology that can truly reflect the color of the observed object itself.
相机获得图像与实际场景图像相比存在的颜色失真。因此,有很多针对图像颜色校正的方法相继提出,比如多项式回归、基于偏最小二乘回归颜色校正法和神经网络等方法。多项式回归颜色校正方法需要的训练样本较少,运算复杂度低,但是其回归精度与训练样本和多项式选取关系大,外推能力较差。偏最小二乘回归颜色校正法能较好地解决如自变量之间的多重相关性、样本数相对较少的问题,但精度尚难以满足实际医学应用需求。传统基于神经网络的颜色校正方法训练受限于网络层数、初始化参数选择及并行方式,故网络泛化性能一般存在过拟合现象。The color distortion in the camera-acquired image compared to the actual scene image. Therefore, many methods for image color correction have been proposed one after another, such as polynomial regression, color correction based on partial least squares regression, and neural networks. The polynomial regression color correction method requires fewer training samples and has low computational complexity, but its regression accuracy is closely related to the selection of training samples and polynomials, and its extrapolation ability is poor. The partial least squares regression color correction method can better solve problems such as multiple correlations between independent variables and a relatively small number of samples, but the accuracy is still difficult to meet the needs of actual medical applications. The training of traditional neural network-based color correction methods is limited by the number of network layers, initialization parameter selection and parallel mode, so the generalization performance of the network generally has over-fitting phenomenon.
近年来,深度学习得到广泛应用,其中卷积神经网络(Convolutional NeuralNetwork,CNN)是一种典型的深度前馈网络。CNN模仿人类的认知过程,即从局部特征到全局特征的逐层抽象。将卷积神经网络应用于颜色校正中,可以获得较为理想的颜色重现效果。In recent years, deep learning has been widely used, among which Convolutional Neural Network (CNN) is a typical deep feedforward network. CNN imitates the human cognitive process, that is, layer-by-layer abstraction from local features to global features. Applying convolutional neural networks to color correction can achieve a more ideal color reproduction effect.
发明内容Contents of the invention
本发明的目的在于,通过采用深度卷积神经网络方法,对稳定光学环境中采集到的人脸面色和舌色进行颜色校正,重现在相同光学环境中目标对象真是呈现的颜色信息。The purpose of the present invention is to perform color correction on the facial complexion and tongue color collected in a stable optical environment by using a deep convolutional neural network method, and to reproduce the color information that the target object actually presents in the same optical environment.
本发明是采用以下技术手段实现的:The present invention is realized by adopting the following technical means:
一种基于卷积神经网络的面色舌色图像颜色校正方法,整体流程图如附图1所示;算法主要包括离线部分和在线部分。离线部分由训练数据采集、颜色校正卷积神经网络网络框架搭建和训练组成,在线部分则是图像颜色校正和颜色校正效果评价。A color correction method for complexion and tongue color images based on convolutional neural networks, the overall flow chart is shown in Figure 1; the algorithm mainly includes an offline part and an online part. The offline part consists of training data collection, color correction convolutional neural network framework construction and training, and the online part is image color correction and color correction effect evaluation.
所述的离线部分,具体内容如下:The specific content of the offline part is as follows:
(1)训练数据采集(1) Training data collection
本发明图像采集采用的是封闭式环境——人工暗箱,以避免外界杂散光的影响,利用人工光源照明,以保证舌图像采集的质量和稳定性;光源、成像设备相对位置固定,从而达到采集环境的一致性和标准化;在暗箱条件下人工光源(D65)来模拟自然光,有效的保证光源条件的稳定性。The image acquisition of the present invention adopts a closed environment—artificial dark box, to avoid the influence of stray light from the outside, and artificial light source is used for lighting to ensure the quality and stability of tongue image acquisition; the relative positions of the light source and imaging equipment are fixed, so as to achieve The consistency and standardization of the environment; the artificial light source (D65) is used to simulate natural light under the dark box condition, effectively ensuring the stability of the light source condition.
与传统方法不同,本方法使用ColorChecker Digital SG作为颜色校正的色卡。ColorChecker Digital SG有140色块,相对传统ColorChecker Classic有更广的颜色域。同时,在训练样本中,我们增加与肤色和舌色颜色相近的色块样本,这样有利于提高颜色校正的精度。在封闭式环境条件下,对ColorChecker Digital SG标准色卡进行拍照。通过改变色卡的拍摄角度,调整色卡与光源距离,调整色卡和相机的距离等方式拍摄得到色卡图像,利用这些图像生成卷积神经网络颜色校正模型的训练数据。对拍摄得到的图像进行处理,裁剪截取每个色块,每个色块需要设置固定大小格式作为训练样本,利用色卡每个色块标准值生成RGB图像做训练数据的标签,训练样本和标签一一对应。Unlike conventional methods, this method uses ColorChecker Digital SG as a color card for color correction. ColorChecker Digital SG has 140 color blocks, which has a wider color gamut than the traditional ColorChecker Classic. At the same time, in the training samples, we increase the color patch samples that are similar to the skin color and tongue color, which is conducive to improving the accuracy of color correction. Under closed environmental conditions, take pictures of ColorChecker Digital SG standard color cards. By changing the shooting angle of the color card, adjusting the distance between the color card and the light source, adjusting the distance between the color card and the camera, etc., the color card images are captured, and these images are used to generate training data for the color correction model of the convolutional neural network. Process the captured image, crop and intercept each color block, each color block needs to be set in a fixed size format as a training sample, use the standard value of each color block of the color card to generate an RGB image as the label of the training data, training samples and labels One to one correspondence.
(2)颜色校正卷积神经网络网络框架搭建和训练(2) Construction and training of color correction convolutional neural network network framework
本发明是由神经网络拟合真实颜色和拍照得到的图像颜色之间的关系,学习内容相对简单,所以网络设计为浅层的深度神经网络,网络层数为5层。本发明采用三种不同的层结构,如附图2所示,分别是输入层、非线性变换层、输出层。输入层是由一个卷积层和修正线性单元(Rectified linear unit,ReLU)组成;非线性变换层由3层网络组成,每层由一个卷积层和ReLU激活函数组成,在卷积层和激活函数中间有一个批归一化;输出层是由一个卷积层组成。In the present invention, the neural network is used to fit the relationship between the real color and the image color obtained by photographing, and the learning content is relatively simple, so the network is designed as a shallow deep neural network with 5 layers. The present invention adopts three different layer structures, as shown in Figure 2, which are input layer, nonlinear transformation layer and output layer respectively. The input layer is composed of a convolutional layer and a rectified linear unit (ReLU); the nonlinear transformation layer consists of a 3-layer network, each layer consists of a convolutional layer and a ReLU activation function, and the convolutional layer and activation There is a batch normalization in the middle of the function; the output layer is composed of a convolutional layer.
在训练中,本发明利用带mini-batch的随机梯度下降算法来迭代和更新卷积核状态W和偏置B,每次进行微批数据集(mini-batch)运算,并采用随机梯度下降算法寻找全局最优解。In the training, the present invention uses the stochastic gradient descent algorithm with mini-batch to iterate and update the convolution kernel state W and bias B, each time a micro-batch data set (mini-batch) operation is performed, and the stochastic gradient descent algorithm is used Find the global optimal solution.
在CNN的图像处理过程中,卷积层之间需要通过卷积滤波器联系,卷积滤波器的定义表示为W×H×C×D,其中,C代表被滤波图像的通道数;W、H分别代表滤波范围的宽、高;D代表卷积滤波器的种类。In the image processing process of CNN, convolutional layers need to be connected through convolutional filters. The definition of convolutional filters is expressed as W×H×C×D, where C represents the number of channels of the filtered image; W, H represents the width and height of the filtering range respectively; D represents the type of convolution filter.
网络的输入层含有一个卷积层和ReLU激活函数。输入层特征提取公式表示如下:The input layer of the network consists of a convolutional layer and a ReLU activation function. The input layer feature extraction formula is expressed as follows:
F1(X1)=max(0,W1*X1+B1) (1)F 1 (X 1 )=max(0, W 1 *X 1 +B 1 ) (1)
式中,X1为进入输入层的特征图。W1和B1分别表示输入层的卷积滤波器和偏置,W1的尺寸是3×3×3×64,它表示64种不同的卷积滤波器,每个卷积的核尺寸3×3×3,F1(X1)是输入层得到的特征图。输入图像为3×40×40的特征图,表示特征图为3通道的彩色图,宽w和高h均为40。经过卷积层输出特征图的宽w1和高h1计算公式如公式(2)和公式(3)所示,kernel为卷积的核大小;stride为卷积核的步长,当取值为1时,提取重叠的图像块,效果较好;pad为边缘补零像素个数。在本发明中设定kernel的值为3,stride的值为1,pad的值为1。因此,输入图像经过输入层64个卷积核3×3之后会产生64×40×40的特征图;然后,特征图经过修正线性单元ReLU。ReLu的表示为max(0,X),可以提取有用的特征图。最后输出结果仍为64×40×40的特征图。where X1 is the feature map entering the input layer. W 1 and B 1 represent the convolution filter and bias of the input layer respectively. The size of W 1 is 3×3×3×64, which represents 64 different convolution filters, and the kernel size of each convolution is 3 ×3×3, F 1 (X 1 ) is the feature map obtained by the input layer. The input image is a 3×40×40 feature map, which means that the feature map is a 3-channel color map, and the width w and height h are both 40. The calculation formulas of width w 1 and height h 1 of the output feature map through the convolutional layer are shown in formula (2) and formula (3), kernel is the kernel size of convolution; stride is the step size of convolution kernel, when the value When it is 1, the overlapping image blocks are extracted, and the effect is better; pad is the number of zero-filled pixels on the edge. In the present invention, the value of kernel is set to 3, the value of stride is 1, and the value of pad is 1. Therefore, after the input image passes through the 64 convolution kernels of the input layer 3×3, a 64×40×40 feature map will be generated; then, the feature map will pass through the modified linear unit ReLU. The representation of ReLu is max(0,X), which can extract useful feature maps. The final output is still a 64×40×40 feature map.
在非线性变换层的非线性映射过程中,卷积层、批归一化和ReLU函数位于第二层、第三层和第四层。非线性变换层各阶段的公式表示如下:In the nonlinear mapping process of the nonlinear transformation layer, the convolutional layer, batch normalization and ReLU functions are located in the second, third and fourth layers. The formulas of each stage of the nonlinear transformation layer are expressed as follows:
Fi(Xi)=max(0,Wi*Fi-1(Xi-1)+Bi){i=2,3,4} (4)F i (X i )=max(0, W i *F i-1 (X i-1 )+B i ){i=2, 3, 4} (4)
(4)式中,i表示第i层,Xi为第i-1层的输出,即Fi-1(Xi-1)。Wi和Bi分别表示非线性变换阶段的卷积滤波器和偏置,其中,卷积滤波器W1的尺寸是3×3×3×64,第2,3,4层卷积层Wi的尺寸是64×3×3×64,每个卷积核的尺寸为64×3×3。输入层输出的64×40×40的特征图,输入到第二个卷积层中,经过64个卷积核3×3之后会产生64×40×40的特征图。然后,64×40×40的特征图进入批归一化。批归一化在卷积层和ReLU激活函数中间,解决了神经网络训练时的收敛速度慢和梯度爆炸等无法训练的情况。同时,批归一化加快了网络的训练速度,提高了模型精度。最后,特征图经过修正线性单元,提高了特征的非线性。第二层网络输出64×40×40的特征图之后经过与第二层有相同的结构的第三、四层,最终得到64×40×40的特征图。In formula (4), i represents the i-th layer, and X i is the output of the i-1th layer, that is, F i-1 (X i-1 ). W i and B i respectively represent the convolution filter and bias of the nonlinear transformation stage, where the size of the convolution filter W 1 is 3×3×3×64, and the second, third, and fourth layers of convolutional layers W The size of i is 64×3×3×64, and the size of each convolution kernel is 64×3×3. The 64×40×40 feature map output by the input layer is input into the second convolutional layer, and a 64×40×40 feature map will be generated after passing through 64 convolution kernels 3×3. Then, the 64×40×40 feature maps go into batch normalization. Batch normalization is between the convolutional layer and the ReLU activation function, which solves the problems of slow convergence and gradient explosion during neural network training. At the same time, batch normalization speeds up the training speed of the network and improves the model accuracy. Finally, the feature maps are modified with linear units to improve the non-linearity of the features. The second layer network outputs a 64×40×40 feature map, and then passes through the third and fourth layers with the same structure as the second layer, and finally obtains a 64×40×40 feature map.
在输出层的输出重建过程中,特征图输入到只含有一个卷积层的输出层。输出重建的公式表示如下:In the output reconstruction process of the output layer, the feature map is input to the output layer which contains only one convolutional layer. The formula for the output reconstruction is expressed as follows:
F5(X5)=W5*F4(X4)+B5 (5)F 5 (X 5 )=W 5 *F 4 (X 4 )+B 5 (5)
式中,X5为第4层的输出。W5和B5分别表示特征重建层的卷积滤波器和偏置,W5的尺寸是3×3×64×3,特征重建层有3个卷积滤波器,等同于均值滤波器的作用,每个卷积的核尺寸是3×3×64,能够实现平均特征图的作用,F4(X4)是非线性变换层产生的特征图,即X5;非线性变换层输出的特征图经过3个卷积核3×3之后会产生3×40×40的特征图。In the formula, X 5 is the output of the fourth layer. W 5 and B 5 represent the convolution filter and offset of the feature reconstruction layer respectively. The size of W 5 is 3×3×64×3, and the feature reconstruction layer has 3 convolution filters, which are equivalent to the function of the mean filter , the kernel size of each convolution is 3×3×64, which can realize the function of the average feature map, F 4 (X 4 ) is the feature map generated by the nonlinear transformation layer, that is, X 5 ; the feature map output by the nonlinear transformation layer After 3 convolution kernels 3×3, a 3×40×40 feature map will be generated.
采集得到的数据集经过该网络进行训练,迭代50次以上后得到每轮训练的模型,模型最终被保存到文件中。The collected data set is trained by the network, and the model of each round of training is obtained after more than 50 iterations, and the model is finally saved to a file.
所述的在线部分,具体内容如下:The online part, the specific content is as follows:
(1)图像颜色校正(1) Image color correction
利用训练得到的模型对颜色失真图像进行颜色校正,得到校正后的图像。在本发明的暗室中拍摄色卡、人脸和舌图像,得到的照片与实际颜色相比较存在失真,使用基于卷积神经网络颜色校正方法对失真图像进行颜色校正。首先读取待校正图像像素点保存为图像矩阵,然后读取训练得到的MAT格式文件得到颜色校正模型。将图像矩阵输入到网络模型当中,分别在R、G、B三个通道对图像进行颜色校正,输出校正后的图像。The color-distorted image is color-corrected by using the trained model to obtain the corrected image. In the darkroom of the present invention, the color card, face and tongue images are taken, and the obtained photos are distorted compared with the actual color, and the color correction method based on the convolutional neural network is used to correct the color of the distorted image. First, read the pixel points of the image to be corrected and save it as an image matrix, and then read the MAT format file obtained from the training to obtain the color correction model. Input the image matrix into the network model, perform color correction on the image in the R, G, and B channels respectively, and output the corrected image.
(2)颜色校正效果评价(2) Evaluation of color correction effect
为了验证颜色校正模型的有效性,需要对颜色校正效果进行评价。颜色校正的评价是一个很复杂的问题,涉及到色度学、生理学、心理学等不同学科领域。常用的评价方法有客观评价和主观评价。In order to verify the validity of the color correction model, it is necessary to evaluate the color correction effect. The evaluation of color correction is a very complex issue, involving different disciplines such as colorimetry, physiology, and psychology. Commonly used evaluation methods include objective evaluation and subjective evaluation.
根据色度学的理论,颜色重现的评价标准有反射光谱匹配、色貌匹配和三刺激匹配等,这些都属于客观标准。三刺激值匹配是使计算机显示的物体的三刺激值与对应的实际物体颜色的三刺激值相同。拍摄后的图像的颜色,其三刺激值与对应的实际物体相同或者色差在允许范围内,则颜色重现的质量就好。三刺激值匹配是最普通和最有实际意义的颜色重现标准。本发明采用CIE1976L*a*b*作为评价指标。According to the theory of colorimetry, the evaluation criteria of color reproduction include reflection spectrum matching, color appearance matching and tri-stimulus matching, etc., which are all objective standards. Tristimulus value matching is to make the tristimulus value of the object displayed by the computer the same as the tristimulus value of the corresponding actual object color. The quality of color reproduction is good if the tristimulus value of the captured image is the same as that of the corresponding actual object or the color difference is within the allowable range. Tristimulus value matching is the most common and practical color reproduction criterion. The present invention adopts CIE1976L*a*b* as an evaluation indicator.
主观评价就是有人对某一给定刺激的视觉感受做直接评价,本发明中颜色校正主观评价的观察者对比真实食物和校正后图像,之后评价该方法是否还原出真实的颜色。Subjective evaluation means that someone directly evaluates the visual experience of a given stimulus. In the present invention, the observer of the color correction subjective evaluation compares the real food with the corrected image, and then evaluates whether the method restores the true color.
附图说明:Description of drawings:
图1基于卷积神经网络颜色校正方法流程图;Figure 1 is a flow chart of color correction method based on convolutional neural network;
图2颜色校正卷积神经网络模型架构图;Figure 2 Architecture diagram of color correction convolutional neural network model;
图3人脸和舌校正前后对比图。Figure 3 Comparison of face and tongue before and after correction.
具体实施方式detailed description
根据上述描述,以下介绍本发明具体的实施流程。According to the above description, the following describes the specific implementation process of the present invention.
所述离线部分分为2个步骤:The offline part is divided into 2 steps:
步骤1:训练数据采集Step 1: Training Data Acquisition
图像采集是颜色校正工作的基础。采集设备及照明条件变化时,如何保证获取的图像具有恒定的彩色特性是图像采集的关键问题。它涉及到图像采集装置的设计、照明光源的选择、色彩空间(Color Space)选取、系统颜色特性数学模型的建立等诸多问题。因此,颜色校正图像采集环境及方法的标准化是颜色校正的重要基础。一般情况下,暗室或暗箱是最理想的拍摄环境,本发明采用的自行研制的暗箱,能够避免外界杂光的干扰,保持光源环境的稳定。Image acquisition is the basis for color correction work. When the acquisition equipment and lighting conditions change, how to ensure that the acquired image has constant color characteristics is a key issue in image acquisition. It involves many issues such as the design of the image acquisition device, the selection of the lighting source, the selection of the color space (Color Space), the establishment of the mathematical model of the system color characteristics, and so on. Therefore, the standardization of color correction image acquisition environment and method is an important basis for color correction. Generally, a dark room or a dark box is the most ideal shooting environment. The self-developed dark box adopted by the present invention can avoid the interference of external stray light and keep the light source environment stable.
步骤1.1:规范化样本采集Step 1.1: Normalize Sample Collection
经过大量试验,本发明为保证图像采集的质量,避免外界环境的影响,对颜色校正采集环境提出了以下条件。After a large number of tests, in order to ensure the quality of image acquisition and avoid the influence of the external environment, the present invention proposes the following conditions for the color correction acquisition environment.
1)使用封闭的采集环境,避免杂散光进入拍摄环境和强烈光线射入镜头;1) Use a closed collection environment to avoid stray light entering the shooting environment and strong light entering the lens;
2)实验光源选用D65光源,模拟自然光;2) The experimental light source is D65 light source, simulating natural light;
3)D65光源稳定时间是10分钟。打开光源,待光源稳定之后,采集样本图像;3) D65 light source stabilization time is 10 minutes. Turn on the light source, and collect the sample image after the light source is stable;
4)将光源和相机两者位置固定,色卡的位置设定在距离相机30~35厘米范围之内;4) Fix the positions of the light source and the camera, and set the position of the color card within 30-35 cm from the camera;
5)正确设置相机参数。对佳能EOS1200D,设置白平衡自动,光圈F10,ISO设置为3200,快门时间为1/160秒;5) Correctly set the camera parameters. For Canon EOS1200D, set the white balance to auto, the aperture to F10, the ISO to 3200, and the shutter time to 1/160 second;
步骤1.2:样本采集Step 1.2: Sample Collection
样本采集过程按照设定条件进行。本发明在暗箱中使用已经配置好参数的佳能EOS1200D对ColorCheck Digital SG色卡进行拍照,通过改变色卡位置、相机拍摄角度,获得大量色卡照片。为了增加颜色校正的鲁棒性,在相同光照环境下对人脸、舌等进行拍照,得到的人脸和舌图像可以应用到卷积神经网络颜色校正模型校正效果的验证。ColorCheckDigital SG色卡具有光学标准值,故所得的色卡照片,经过处理和对应的标准图像一一对应,能够作为颜色校正网络的训练样本。The sample collection process is carried out according to the set conditions. The present invention uses the Canon EOS1200D with configured parameters to take pictures of the ColorCheck Digital SG color card in the dark box, and obtains a large number of color card photos by changing the position of the color card and the shooting angle of the camera. In order to increase the robustness of color correction, the face and tongue are photographed under the same lighting environment, and the obtained face and tongue images can be applied to the verification of the correction effect of the convolutional neural network color correction model. The ColorCheckDigital SG color card has optical standard values, so the obtained color card photos, after processing, correspond to the corresponding standard images one-to-one, and can be used as training samples for the color correction network.
步骤1.3:样本预处理Step 1.3: Sample Preprocessing
相机拍摄得到的ColorCheck Digital SG色卡照片,不能直接作为卷积神经网络的训练样本,需要将每个色块分割出来。本发明把色卡每个色块分割出来,每个色块的尺寸为180×180像素。通过查阅官方提供的ColorCheck Digital SG光学资料得到色卡每个色块的LAB值。本发明将每个色块的LAB值转化为D65光源环境下的RGB值,利用色块的RGB数值,生成RGB图像。同样,本发明设置标准色块RGB图像尺寸为180×180,照片截得色块图像和标准色块图像尺寸大小相同,便于之后运算。标准色卡RGB图像作为截得的色块图像训练标签,截得的色块图像与标签命名一一对应,能够避免对应错误所造成较大的误差。The ColorCheck Digital SG color card photos taken by the camera cannot be directly used as training samples for the convolutional neural network, and each color block needs to be segmented. The present invention divides each color block of the color card, and the size of each color block is 180×180 pixels. The LAB value of each color block of the color card can be obtained by consulting the official ColorCheck Digital SG optical data. The invention converts the LAB value of each color block into the RGB value under the D65 light source environment, and uses the RGB value of the color block to generate an RGB image. Similarly, the present invention sets the size of the standard color block RGB image to 180×180, and the size of the color block image cut from the photo is the same as that of the standard color block image, which is convenient for subsequent calculations. The RGB image of the standard color card is used as the training label of the intercepted color patch image, and the intercepted color patch image is in one-to-one correspondence with the label name, which can avoid large errors caused by corresponding errors.
为了提高卷积神经网络颜色校正模型的泛化能力和鲁棒性,本发明将同一张色卡图像裁剪出的140色块,按照ColorCheck Digital SG色卡中色块排列顺序拼接在一起,生成拼接图像,与单色块图片一同放入到训练数据中,同时将标准色块照片按同样的顺序拼接起来,放入标签数据集中。这样训练数据样本类型呈现多样性,有利于提高模型的泛化能力。In order to improve the generalization ability and robustness of the convolutional neural network color correction model, the present invention splices 140 color blocks cut from the same color card image according to the order of the color blocks in the ColorCheck Digital SG color card to generate a splicing The images are put into the training data together with the single color block pictures, and the standard color block photos are stitched together in the same order and put into the label data set. In this way, the types of training data samples are diverse, which is conducive to improving the generalization ability of the model.
为了增加样本多样性及样本库的扩充,本发明对训练数据集进行数据增强,通过上下翻转、向左旋转90度、向右旋转90度、向右转换180度、向左旋转90度并上下翻转、向右旋转90度并上下翻转和向右转换180度并上下翻转七种变换,将训练数据扩充为原来的8倍,之后使用滑动窗对训练样本分割成40*40小图。经过一系列的扩充训练数据集的数量达到96000张。颜色校正模型训练本质上是一种输入到输出的映射,它能够学习大量的输入与输出之间的映射关系,最后生成校正模型。为了验证验证模型的准确度的,采用类似的方式准备大小为1280张图片的测试集。将训练集和测试集送入到卷积神经网络中进行训练。In order to increase sample diversity and expand the sample library, the present invention performs data enhancement on the training data set by flipping up and down, rotating 90 degrees to the left, rotating 90 degrees to the right, converting 180 degrees to the right, rotating 90 degrees to the left and up and down Flip, rotate 90 degrees to the right and flip up and down, convert 180 degrees to the right and flip up and down seven transformations, expand the training data to 8 times the original size, and then use the sliding window to divide the training samples into 40*40 small images. After a series of expansions, the number of training data sets reached 96,000. Color correction model training is essentially an input-to-output mapping, which can learn a large number of mapping relationships between inputs and outputs, and finally generate a correction model. In order to verify the accuracy of the verification model, a test set with a size of 1280 images is prepared in a similar manner. The training set and test set are sent to the convolutional neural network for training.
步骤2:颜色校正卷积神经网络网络框架搭建和训练Step 2: Building and training the color correction convolutional neural network framework
本发明中没有加入池化层和全连接层,整个网络分为输入层、非线性变换层、输出层。输入层是由一个卷积层和一个ReLU激活函数组成;非线性变换层由3层网络组成,每层由一个卷积层和一个ReLU激活函数组成,在卷积层和激活函数中间有一个批归一化;输出层是由一个卷积层组成。In the present invention, no pooling layer and fully connected layer are added, and the entire network is divided into an input layer, a nonlinear transformation layer, and an output layer. The input layer is composed of a convolutional layer and a ReLU activation function; the nonlinear transformation layer is composed of a 3-layer network, each layer is composed of a convolutional layer and a ReLU activation function, and there is a batch between the convolutional layer and the activation function Normalization; the output layer is composed of a convolutional layer.
(1)网络的输入层含有一个卷积层和ReLU激活函数。输入层特征提取公式表示如下:(1) The input layer of the network contains a convolutional layer and a ReLU activation function. The input layer feature extraction formula is expressed as follows:
F1(X1)=max(0,W1*X1+B1) (6)F 1 (X 1 )=max(0, W 1 *X 1 +B 1 ) (6)
式中,X1为进入输入层的特征图。W1和B1分别表示输入层的卷积滤波器和偏置,W1的尺寸是3×3×3×64,它表示64种不同的卷积滤波器,每个卷积的核尺寸3×3×3,F1(X1)是输入层得到的特征图。where X1 is the feature map entering the input layer. W 1 and B 1 represent the convolution filter and bias of the input layer respectively. The size of W 1 is 3×3×3×64, which represents 64 different convolution filters, and the kernel size of each convolution is 3 ×3×3, F 1 (X 1 ) is the feature map obtained by the input layer.
在非线性变换层的非线性映射过程中,卷积层、批归一化和ReLU函数位于第二层、第三层和第四层。非线性变换层各阶段的公式表示如下:In the nonlinear mapping process of the nonlinear transformation layer, the convolutional layer, batch normalization and ReLU functions are located in the second, third and fourth layers. The formulas of each stage of the nonlinear transformation layer are expressed as follows:
Fi(Xi)=max(0,Wi*Fi-1(Xi)+Bi){i=2,3,4} (7)F i (X i )=max(0,W i *F i-1 (X i )+B i ){i=2,3,4} (7)
式中,i表示第i层,Xi为第i-1层的输出。Wi和Bi分别表示非线性变换阶段的卷积滤波器和偏置,其中,卷积滤波器W1的尺寸是3×3×3×64,第2,3,4层卷积层Wi的尺寸是64×3×3×64,每个卷积核的尺寸为64×3×3。In the formula, i represents the i-th layer, and X i is the output of the i-1th layer. W i and B i respectively represent the convolution filter and bias of the nonlinear transformation stage, where the size of the convolution filter W 1 is 3×3×3×64, and the second, third, and fourth layers of convolutional layers W The size of i is 64×3×3×64, and the size of each convolution kernel is 64×3×3.
在输出层的输出重建过程中,特征图输入到只含有一个卷积层的输出层。输出重建的公式表示如下:In the output reconstruction process of the output layer, the feature map is input to the output layer which contains only one convolutional layer. The formula for the output reconstruction is expressed as follows:
F5(X5)=W5*F4(X4)+B5 (8)F 5 (X 5 )=W 5 *F 4 (X 4 )+B 5 (8)
式中,X5为第4层的输出。W5和B5分别表示特征重建层的卷积滤波器和偏置,W5的尺寸是3×3×64×3,特征重建层有3个卷积滤波器,等同于均值滤波器的作用,每个卷积的核尺寸是3×3×64,能够实现平均特征图的作用,F4(X4)是非线性变换层产生的特征图。In the formula, X 5 is the output of the fourth layer. W 5 and B 5 represent the convolution filter and offset of the feature reconstruction layer respectively. The size of W 5 is 3×3×64×3, and the feature reconstruction layer has 3 convolution filters, which are equivalent to the function of the mean filter , the kernel size of each convolution is 3×3×64, which can realize the function of the average feature map, and F 4 (X 4 ) is the feature map generated by the nonlinear transformation layer.
在模型训练过程中,输入图像大小为40×40的特征图,在第一个卷积层中,经过64个卷积核3×3之后会产生64×40×40的特征图;在第二个卷积层中,输入大小为64×40×40的特征图,经过64个卷积核3×3之后会产生64×40×40的特征图;在第三个卷积层中,输入大小为64×40×40的特征图,经过64个卷积核3×3之后会产生64×40×40的特征图;在第四个卷积层中,输入大小为64×40×40的特征图,经过64个卷积核3×3之后会产生64×40×40的特征图;最后输入到输出层的卷积层,经过3个卷积核3×3之后会产生3×40×40的特征图。In the process of model training, the input image size is 40×40 feature map, in the first convolutional layer, after 64 convolution kernels 3×3, a 64×40×40 feature map will be generated; in the second In the first convolutional layer, the input size is 64×40×40 feature map, after passing through 64 convolution kernels 3×3, a 64×40×40 feature map will be generated; in the third convolutional layer, the input size is It is a 64×40×40 feature map, and after 64 convolution kernels 3×3, a 64×40×40 feature map will be generated; in the fourth convolutional layer, the input size is 64×40×40. Figure, after 64 convolution kernels 3×3, a 64×40×40 feature map will be generated; finally input to the convolution layer of the output layer, after 3 convolution kernels 3×3, a 3×40×40 feature map will be generated feature map of .
(2)在非线性变换层中,卷积层和激励层之间加入批归一化。批归一化主要思路是将输入数据白化(Whitened),加快网络收敛速度,降低数据冗余性和特性相关性,实际上通过线性变换使数据0均值和单位方差。批归一化解决了神经网络训练时遇到的收敛速度慢和梯度爆炸等无法训练的情况。同时,批归一化加快了网络的训练速度,提高模型精度。(2) In the nonlinear transformation layer, batch normalization is added between the convolution layer and the excitation layer. The main idea of batch normalization is to whiten the input data, speed up network convergence, reduce data redundancy and feature correlation, and actually make the data 0 mean and unit variance through linear transformation. Batch normalization solves the untrainable problems such as slow convergence and gradient explosion encountered during neural network training. At the same time, batch normalization speeds up the training speed of the network and improves the accuracy of the model.
(3)在每层的激活函数中,本发明采用修正线性单元,公式如(9)式所示。x表示特征图经过卷积核后的结果,当x<0,f(x)=0;如果x>0,f(x)=x。在正向传播时,加快了计算速度。在反向传播时,当x>0时,梯度为1,因而减轻了梯度弥散问题。故得到的随机梯度下降算法收敛速度较sigmoid和tanh有很大提高。(3) In the activation function of each layer, the present invention uses a modified linear unit, and the formula is shown in formula (9). x represents the result of the feature map after the convolution kernel, when x<0, f(x)=0; if x>0, f(x)=x. During forward propagation, the calculation speed is accelerated. During backpropagation, when x>0, the gradient is 1, thus alleviating the gradient dispersion problem. Therefore, the convergence speed of the obtained stochastic gradient descent algorithm is greatly improved compared with sigmoid and tanh.
f(x)=max(0,x) (9)f(x)=max(0,x) (9)
(4)在网络训练时本发明采用带mini-batch的随机梯度下降算法进行训练,当样本量比较大或迭代次数高时时,传统的梯度下降算法运算速度较慢,而随机梯度下降算克服这些缺点。传统的训练每次带入所有的样本,带mini-batch的随机梯度下降算法则是带入微批数据集(mini-batch)进行运算,采用随机下降加寻找全局最优解。学习速率是随机梯度下降算法学习方法的必要参数,决定了权值更新的速度,设置得太大会导致代价函数振荡,结果越过最优值,太小会使收敛速度过慢,一般倾向于选取较小的学习速率,如0.001±0.01以保持系统稳定。动量参数和权值衰减因子可提高训练自适应性,动量参数通常为[0.9,1.0],权值衰减因子通常为0.0005±0.0002。通过实验观察,本发明将学习速率设为10-4,动量参数设为0.9,权值衰减因子取值0.0005。经过多次实验,本发明设定批尺寸为128。(4) During network training, the present invention adopts the stochastic gradient descent algorithm with mini-batch for training. When the sample size is relatively large or the number of iterations is high, the traditional gradient descent algorithm has a slow operation speed, and the stochastic gradient descent algorithm overcomes these shortcoming. The traditional training brings in all samples each time, and the stochastic gradient descent algorithm with mini-batch is brought into the micro-batch data set (mini-batch) for operation, and uses random descent plus to find the global optimal solution. The learning rate is a necessary parameter of the stochastic gradient descent algorithm learning method, which determines the speed of weight update. If it is set too large, the cost function will oscillate, and the result will exceed the optimal value. If it is too small, the convergence speed will be too slow. Small learning rate, such as 0.001 ± 0.01 to keep the system stable. The momentum parameter and the weight decay factor can improve the training adaptability, the momentum parameter is usually [0.9,1.0], and the weight decay factor is usually 0.0005±0.0002. Through experimental observation, the present invention sets the learning rate to 10 -4 , the momentum parameter to 0.9, and the weight decay factor to 0.0005. After many experiments, the present invention sets the batch size to 128.
经过以上四个主要步骤设计和调整,卷积神经网络颜色校正模型搭建完成,将步骤1中采集得到的训练样本数据放入网络中训练,训练完成后,得到了50轮训练后的模型,以Matlab的MAT格式保存。After the design and adjustment of the above four main steps, the convolutional neural network color correction model is built, and the training sample data collected in step 1 is put into the network for training. After the training is completed, the model after 50 rounds of training is obtained. Matlab's MAT format saves.
所述在线部分分为2个步骤:The online part is divided into 2 steps:
步骤1:图像颜色校正Step 1: Image Color Correction
在暗箱中对色卡、人脸和舌进行拍摄,得到该光源环境下的色卡、人脸和舌照片。通过比较可以发现,照片和实际物体存在不同程度的颜色失真。本发明使用基于卷积神经网络颜色校正模型,对颜色失真图像进行颜色校正。首先,对待校正的图像进行逐像素读取RGB值,保存为图像矩阵。然后,将颜色校正网络从Matlab的MAT格式中读取出来,获得基于卷积神经网络颜色校正模型。将图像矩阵输入到网络中,输入层3个卷积核读取图像R、G、B三通道的矩阵。之后,模型分别对图像的R、G、B分量进行颜色校正。三通道的图像矩阵通过网络颜色校正后,输出三通道图像矩阵。三个图像矩阵最后合并成RGB图像,即得到颜色校正后的图像。Photograph the color card, human face and tongue in the dark box, and obtain the color card, human face and tongue photos under the light source environment. Through comparison, it can be found that there are different degrees of color distortion in photos and actual objects. The present invention uses a convolutional neural network-based color correction model to perform color correction on color-distorted images. First, the RGB value of the image to be corrected is read pixel by pixel and saved as an image matrix. Then, read the color correction network from the MAT format of Matlab to obtain a color correction model based on convolutional neural network. The image matrix is input into the network, and the three convolution kernels of the input layer read the matrix of the three channels of the image R, G, and B. Afterwards, the model performs color correction on the R, G, and B components of the image, respectively. After the three-channel image matrix is color-corrected by the network, the three-channel image matrix is output. The three image matrices are finally merged into an RGB image, that is, a color-corrected image is obtained.
步骤2:颜色校正效果评价Step 2: Color correction effect evaluation
利用该模型对色卡、人脸和舌图像进行颜色校正,得到校正后的图像。为了验证颜色校正模型的有效性,需要对校正后的图像进行评价。The model is used to correct the color of the color card, face and tongue images, and the corrected images are obtained. In order to verify the effectiveness of the color correction model, the corrected images need to be evaluated.
颜色校正的评价涉及到色度学、心理学等领域,是一个复杂的问题。通常分为主观评价和客观评价两类。主观评价方法经常是让观察者,对校正图像和拍摄物体进行观察比较。观察者通过校正后的图像的颜色与真实颜色进行比较,衡量颜色重现的效果。这种方法直观有效,是颜色校正质量评价的主要方法。The evaluation of color correction involves fields such as colorimetry and psychology, and is a complex issue. It is usually divided into two categories: subjective evaluation and objective evaluation. Subjective evaluation methods often allow the observer to observe and compare the corrected image and the photographed object. Observers measure how well the colors are reproduced by comparing the colors of the corrected image with the real colors. This method is intuitive and effective, and it is the main method for color correction quality evaluation.
客观评价是在一定的条件下,采用一套色标进行。如果校正后的颜色接近于原来的色标值,则颜色校正的效果较好。通常,颜色重现三刺激值和色标色差在允许的范围内,就认为获得校正的图像和真实的物体获得相同的视觉效果。在CIELAB空间中,一般认为ΔE<3为彩色颜色真实重现的标准,ΔE<6为颜色校正精准可被接受的标准。Objective evaluation is carried out under certain conditions with a set of color scales. Color correction works better if the corrected color is close to the original color stop value. Generally, if the color reproduction tristimulus value and the color difference of the color scale are within the allowable range, it is considered that the corrected image and the real object have the same visual effect. In CIELAB space, it is generally believed that ΔE<3 is the standard for true color reproduction, and ΔE<6 is the standard for accurate and acceptable color correction.
为了验证基于卷积神经网络颜色校正方法的有效性,本发明对色卡、人脸和舌拍摄图像进行颜色校正;为了评估颜色校正模型性能的优劣,本发明分别给出了主观和客观颜色评价结果。In order to verify the effectiveness of the color correction method based on the convolutional neural network, the present invention performs color correction on the color card, face and tongue images; in order to evaluate the performance of the color correction model, the present invention respectively gives subjective and objective color Evaluation results.
步骤1.1:主观评价Step 1.1: Subjective Evaluation
如图3所示,本实验给出人脸和舌颜色校正前后的对比图。佳能相机原拍摄人的照片存在偏褐色、偏暗问题。经过颜色校正后,基于卷积神经网络颜色校正方法很好的还原出人脸和舌的真实颜色。As shown in Figure 3, this experiment gives a comparison of the face and tongue before and after color correction. Canon cameras originally took photos of people with brownish and dark problems. After color correction, the color correction method based on the convolutional neural network can restore the true color of the face and tongue very well.
步骤1.2:客观评价Step 1.2: Objective Evaluation
针对客观颜色评价结果,对标准色卡图像,利用本发明自行开发的软件将色卡图像裁剪出色块图像,并读取每个色块中RGB值,将RGB值转化为LAB值,利用标准误差值CIE1976L*a*b*作为评价指标,误差如计算公式(10)所示。For the objective color evaluation results, for the standard color card image, use the self-developed software of the present invention to cut out the color block image of the color card image, and read the RGB value in each color block, convert the RGB value into a LAB value, and use the standard error Value CIE1976L*a*b* As an evaluation index, the error is shown in formula (10).
上式中ΔL*、Δa*和Δb*分别是色块图像LAB值和标准色块LAB值的差值。利用上述方法,测试样本矫正前后色差情况。经计算得到,校正前样本颜色误差平均值为14.21,经过颜色校正后误差平均值为3.70。因此,本发明提出的颜色校正方法取得了不错的校正结果。In the above formula, ΔL * , Δa * and Δb * are the difference between the LAB value of the color patch image and the LAB value of the standard color patch, respectively. Using the above method, test the chromatic aberration of the sample before and after correction. Calculated, the sample color error before correction Average is 14.21, color corrected for error The average is 3.70. Therefore, the color correction method proposed by the present invention has achieved good correction results.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710406983.2A CN107507250B (en) | 2017-06-02 | 2017-06-02 | Surface color and tongue color image color correction method based on convolutional neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710406983.2A CN107507250B (en) | 2017-06-02 | 2017-06-02 | Surface color and tongue color image color correction method based on convolutional neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107507250A true CN107507250A (en) | 2017-12-22 |
CN107507250B CN107507250B (en) | 2020-08-21 |
Family
ID=60679349
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710406983.2A Expired - Fee Related CN107507250B (en) | 2017-06-02 | 2017-06-02 | Surface color and tongue color image color correction method based on convolutional neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107507250B (en) |
Cited By (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108038832A (en) * | 2017-12-25 | 2018-05-15 | 中国科学院深圳先进技术研究院 | A kind of underwater picture Enhancement Method and system |
CN108388905A (en) * | 2018-03-21 | 2018-08-10 | 合肥工业大学 | A kind of Illuminant estimation method based on convolutional neural networks and neighbourhood context |
CN108710831A (en) * | 2018-04-24 | 2018-10-26 | 华南理工大学 | A kind of small data set face recognition algorithms based on machine vision |
CN108765502A (en) * | 2018-04-25 | 2018-11-06 | 上海健康医学院 | A kind of color looks acquisition methods under complex environment |
CN109102457A (en) * | 2018-06-12 | 2018-12-28 | 杭州米绘科技有限公司 | A kind of intelligent color change system and method based on convolutional neural networks |
CN109118549A (en) * | 2018-07-20 | 2019-01-01 | 上海电力学院 | A method of making object of reference with white printing paper and restores object color |
CN109242792A (en) * | 2018-08-23 | 2019-01-18 | 广东数相智能科技有限公司 | A kind of white balance proofreading method based on white object |
CN109272441A (en) * | 2018-09-14 | 2019-01-25 | 三星电子(中国)研发中心 | The generation method of neural network and associated images |
CN109273071A (en) * | 2018-08-23 | 2019-01-25 | 广东数相智能科技有限公司 | A method of establishing white object contrast model |
CN109615593A (en) * | 2018-11-29 | 2019-04-12 | 北京市商汤科技开发有限公司 | Image processing method and device, electronic equipment and storage medium |
CN109636864A (en) * | 2018-12-19 | 2019-04-16 | 新绎健康科技有限公司 | A kind of tongue dividing method and system based on color correction Yu depth convolutional neural networks |
CN109711306A (en) * | 2018-12-19 | 2019-05-03 | 新绎健康科技有限公司 | A kind of method and apparatus obtaining facial characteristics based on depth convolutional neural networks |
CN109815860A (en) * | 2019-01-10 | 2019-05-28 | 中国科学院苏州生物医学工程技术研究所 | TCM tongue diagnosis image color correction method, electronic equipment, storage medium |
CN109859117A (en) * | 2018-12-30 | 2019-06-07 | 南京航空航天大学 | A kind of image color correction method directly correcting rgb value using neural network |
CN110534071A (en) * | 2019-07-19 | 2019-12-03 | 南京巨鲨显示科技有限公司 | A kind of display color calibration system neural network based and method |
CN110599554A (en) * | 2019-09-16 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for identifying face skin color, storage medium and electronic device |
CN111064860A (en) * | 2018-10-17 | 2020-04-24 | 北京地平线机器人技术研发有限公司 | Image correction method, image correction device and electronic equipment |
CN111062876A (en) * | 2018-10-17 | 2020-04-24 | 北京地平线机器人技术研发有限公司 | Method and device for correcting model training and image correction and electronic equipment |
CN111292251A (en) * | 2019-03-14 | 2020-06-16 | 展讯通信(上海)有限公司 | Image color cast correction method, device and computer storage medium |
CN111784780A (en) * | 2020-06-16 | 2020-10-16 | 北京理工大学 | Color calibration method of color camera based on deep learning |
CN112313674A (en) * | 2019-11-13 | 2021-02-02 | 深圳市大疆创新科技有限公司 | Neural network model deployment method, device and equipment |
CN112487945A (en) * | 2020-11-26 | 2021-03-12 | 上海贝业斯健康科技有限公司 | Pulse condition identification method based on double-path convolution neural network fusion |
CN112508812A (en) * | 2020-12-01 | 2021-03-16 | 厦门美图之家科技有限公司 | Image color cast correction method, model training method, device and equipment |
CN112634143A (en) * | 2019-09-24 | 2021-04-09 | 北京地平线机器人技术研发有限公司 | Image color correction model training method and device and electronic equipment |
CN112771355A (en) * | 2018-09-27 | 2021-05-07 | 德塔颜色公司 | Correction of inter-instrument variation |
WO2021114184A1 (en) * | 2019-12-12 | 2021-06-17 | 华为技术有限公司 | Neural network model training method and image processing method, and apparatuses therefor |
CN113095109A (en) * | 2019-12-23 | 2021-07-09 | 中移(成都)信息通信科技有限公司 | Crop leaf surface recognition model training method, recognition method and device |
CN113378754A (en) * | 2021-06-24 | 2021-09-10 | 中国计量大学 | Construction site bare soil monitoring method |
CN113452969A (en) * | 2020-03-26 | 2021-09-28 | 华为技术有限公司 | Image processing method and device |
CN113542593A (en) * | 2021-06-16 | 2021-10-22 | 深圳市景阳科技股份有限公司 | Image processing method and device and terminal equipment |
CN114511567A (en) * | 2022-04-20 | 2022-05-17 | 天中依脉(天津)智能科技有限公司 | Tongue body and tongue coating image identification and separation method |
CN116433508A (en) * | 2023-03-16 | 2023-07-14 | 湖北大学 | A Coloring Correction Method of Gray Image Based on Swin-Unet |
CN117649661A (en) * | 2024-01-30 | 2024-03-05 | 青岛超瑞纳米新材料科技有限公司 | Carbon nanotube preparation state image processing method |
JP7550416B1 (en) | 2024-05-31 | 2024-09-13 | 一般社団法人健康マイスター協会 | Trained model generation device, information processing device, trained model generation method, information processing method, trained model generation program, and information processing program |
CN119131158A (en) * | 2024-08-23 | 2024-12-13 | 中润华谷(南京)科技有限公司 | Color difference correction and chromaticity detection method and system based on DDGS |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5828781A (en) * | 1994-08-11 | 1998-10-27 | Toyo Ink Manufacturing Co., Ltd. | Color image reproducing system with image signal correction function |
CN1622135A (en) * | 2004-12-13 | 2005-06-01 | 中国科学院长春光学精密机械与物理研究所 | Digital image color correction method |
CN104410850A (en) * | 2014-12-25 | 2015-03-11 | 武汉大学 | Colorful digital image chrominance correction method and system |
CN106295139A (en) * | 2016-07-29 | 2017-01-04 | 姹ゅ钩 | A kind of tongue body autodiagnosis health cloud service system based on degree of depth convolutional neural networks |
-
2017
- 2017-06-02 CN CN201710406983.2A patent/CN107507250B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5828781A (en) * | 1994-08-11 | 1998-10-27 | Toyo Ink Manufacturing Co., Ltd. | Color image reproducing system with image signal correction function |
CN1622135A (en) * | 2004-12-13 | 2005-06-01 | 中国科学院长春光学精密机械与物理研究所 | Digital image color correction method |
CN104410850A (en) * | 2014-12-25 | 2015-03-11 | 武汉大学 | Colorful digital image chrominance correction method and system |
CN106295139A (en) * | 2016-07-29 | 2017-01-04 | 姹ゅ钩 | A kind of tongue body autodiagnosis health cloud service system based on degree of depth convolutional neural networks |
Cited By (50)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108038832A (en) * | 2017-12-25 | 2018-05-15 | 中国科学院深圳先进技术研究院 | A kind of underwater picture Enhancement Method and system |
CN108388905B (en) * | 2018-03-21 | 2019-07-19 | 合肥工业大学 | A Light Source Estimation Method Based on Convolutional Neural Network and Neighborhood Context |
CN108388905A (en) * | 2018-03-21 | 2018-08-10 | 合肥工业大学 | A kind of Illuminant estimation method based on convolutional neural networks and neighbourhood context |
CN108710831A (en) * | 2018-04-24 | 2018-10-26 | 华南理工大学 | A kind of small data set face recognition algorithms based on machine vision |
CN108765502B (en) * | 2018-04-25 | 2021-09-24 | 上海健康医学院 | A Color Appearance Acquisition Method in a Complex Environment |
CN108765502A (en) * | 2018-04-25 | 2018-11-06 | 上海健康医学院 | A kind of color looks acquisition methods under complex environment |
CN109102457A (en) * | 2018-06-12 | 2018-12-28 | 杭州米绘科技有限公司 | A kind of intelligent color change system and method based on convolutional neural networks |
CN109102457B (en) * | 2018-06-12 | 2023-01-17 | 杭州米绘科技有限公司 | Intelligent color changing system and method based on convolutional neural network |
CN109118549A (en) * | 2018-07-20 | 2019-01-01 | 上海电力学院 | A method of making object of reference with white printing paper and restores object color |
CN109242792A (en) * | 2018-08-23 | 2019-01-18 | 广东数相智能科技有限公司 | A kind of white balance proofreading method based on white object |
CN109273071A (en) * | 2018-08-23 | 2019-01-25 | 广东数相智能科技有限公司 | A method of establishing white object contrast model |
CN109272441A (en) * | 2018-09-14 | 2019-01-25 | 三星电子(中国)研发中心 | The generation method of neural network and associated images |
CN112771355A (en) * | 2018-09-27 | 2021-05-07 | 德塔颜色公司 | Correction of inter-instrument variation |
CN111062876B (en) * | 2018-10-17 | 2023-08-08 | 北京地平线机器人技术研发有限公司 | Method and device for correcting model training and image correction and electronic equipment |
CN111064860A (en) * | 2018-10-17 | 2020-04-24 | 北京地平线机器人技术研发有限公司 | Image correction method, image correction device and electronic equipment |
CN111062876A (en) * | 2018-10-17 | 2020-04-24 | 北京地平线机器人技术研发有限公司 | Method and device for correcting model training and image correction and electronic equipment |
CN109615593A (en) * | 2018-11-29 | 2019-04-12 | 北京市商汤科技开发有限公司 | Image processing method and device, electronic equipment and storage medium |
CN109711306B (en) * | 2018-12-19 | 2023-04-25 | 新绎健康科技有限公司 | Method and equipment for obtaining facial features based on deep convolutional neural network |
CN109711306A (en) * | 2018-12-19 | 2019-05-03 | 新绎健康科技有限公司 | A kind of method and apparatus obtaining facial characteristics based on depth convolutional neural networks |
CN109636864A (en) * | 2018-12-19 | 2019-04-16 | 新绎健康科技有限公司 | A kind of tongue dividing method and system based on color correction Yu depth convolutional neural networks |
CN109859117A (en) * | 2018-12-30 | 2019-06-07 | 南京航空航天大学 | A kind of image color correction method directly correcting rgb value using neural network |
CN109815860A (en) * | 2019-01-10 | 2019-05-28 | 中国科学院苏州生物医学工程技术研究所 | TCM tongue diagnosis image color correction method, electronic equipment, storage medium |
CN111292251B (en) * | 2019-03-14 | 2022-09-30 | 展讯通信(上海)有限公司 | Image color cast correction method, device and computer storage medium |
CN111292251A (en) * | 2019-03-14 | 2020-06-16 | 展讯通信(上海)有限公司 | Image color cast correction method, device and computer storage medium |
CN110534071B (en) * | 2019-07-19 | 2020-09-18 | 南京巨鲨显示科技有限公司 | Display color calibration system and method based on neural network |
CN110534071A (en) * | 2019-07-19 | 2019-12-03 | 南京巨鲨显示科技有限公司 | A kind of display color calibration system neural network based and method |
CN110599554A (en) * | 2019-09-16 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for identifying face skin color, storage medium and electronic device |
CN112634143B (en) * | 2019-09-24 | 2025-01-24 | 北京地平线机器人技术研发有限公司 | Image color correction model training method, device and electronic equipment |
CN112634143A (en) * | 2019-09-24 | 2021-04-09 | 北京地平线机器人技术研发有限公司 | Image color correction model training method and device and electronic equipment |
CN112313674A (en) * | 2019-11-13 | 2021-02-02 | 深圳市大疆创新科技有限公司 | Neural network model deployment method, device and equipment |
WO2021092796A1 (en) * | 2019-11-13 | 2021-05-20 | 深圳市大疆创新科技有限公司 | Neural network model deployment method and apparatus, and device |
WO2021114184A1 (en) * | 2019-12-12 | 2021-06-17 | 华为技术有限公司 | Neural network model training method and image processing method, and apparatuses therefor |
CN113095109A (en) * | 2019-12-23 | 2021-07-09 | 中移(成都)信息通信科技有限公司 | Crop leaf surface recognition model training method, recognition method and device |
CN113452969A (en) * | 2020-03-26 | 2021-09-28 | 华为技术有限公司 | Image processing method and device |
CN111784780A (en) * | 2020-06-16 | 2020-10-16 | 北京理工大学 | Color calibration method of color camera based on deep learning |
CN111784780B (en) * | 2020-06-16 | 2023-06-16 | 北京理工大学 | Color calibration method of color camera based on deep learning |
CN112487945A (en) * | 2020-11-26 | 2021-03-12 | 上海贝业斯健康科技有限公司 | Pulse condition identification method based on double-path convolution neural network fusion |
CN112508812B (en) * | 2020-12-01 | 2024-08-27 | 厦门美图之家科技有限公司 | Image color cast correction method, model training method, device and equipment |
CN112508812A (en) * | 2020-12-01 | 2021-03-16 | 厦门美图之家科技有限公司 | Image color cast correction method, model training method, device and equipment |
CN113542593B (en) * | 2021-06-16 | 2023-04-07 | 深圳市景阳科技股份有限公司 | Image processing method and device and terminal equipment |
CN113542593A (en) * | 2021-06-16 | 2021-10-22 | 深圳市景阳科技股份有限公司 | Image processing method and device and terminal equipment |
CN113378754A (en) * | 2021-06-24 | 2021-09-10 | 中国计量大学 | Construction site bare soil monitoring method |
CN113378754B (en) * | 2021-06-24 | 2023-06-20 | 中国计量大学 | A method for monitoring bare soil on a construction site |
CN114511567A (en) * | 2022-04-20 | 2022-05-17 | 天中依脉(天津)智能科技有限公司 | Tongue body and tongue coating image identification and separation method |
CN116433508A (en) * | 2023-03-16 | 2023-07-14 | 湖北大学 | A Coloring Correction Method of Gray Image Based on Swin-Unet |
CN116433508B (en) * | 2023-03-16 | 2023-10-27 | 湖北大学 | A grayscale image coloring correction method based on Swin-Unet |
CN117649661B (en) * | 2024-01-30 | 2024-04-12 | 青岛超瑞纳米新材料科技有限公司 | Carbon nanotube preparation state image processing method |
CN117649661A (en) * | 2024-01-30 | 2024-03-05 | 青岛超瑞纳米新材料科技有限公司 | Carbon nanotube preparation state image processing method |
JP7550416B1 (en) | 2024-05-31 | 2024-09-13 | 一般社団法人健康マイスター協会 | Trained model generation device, information processing device, trained model generation method, information processing method, trained model generation program, and information processing program |
CN119131158A (en) * | 2024-08-23 | 2024-12-13 | 中润华谷(南京)科技有限公司 | Color difference correction and chromaticity detection method and system based on DDGS |
Also Published As
Publication number | Publication date |
---|---|
CN107507250B (en) | 2020-08-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107507250B (en) | Surface color and tongue color image color correction method based on convolutional neural network | |
US8947549B2 (en) | Spectral synthesis for image capturing device processing | |
CN110399849A (en) | Image processing method and device, processor, electronic equipment and storage medium | |
CN103268499B (en) | Human body skin detection method based on multispectral imaging | |
US11044450B2 (en) | Image white balancing | |
CN106204779A (en) | The check class attendance method learnt based on plurality of human faces data collection strategy and the degree of depth | |
Zhang et al. | Image fusion employing adaptive spectral-spatial gradient sparse regularization in UAV remote sensing | |
CN109255758A (en) | Image enchancing method based on full 1*1 convolutional neural networks | |
Zhuo et al. | A K-PLSR-based color correction method for TCM tongue images under different illumination conditions | |
CN109389135A (en) | A kind of method for screening images and device | |
US11576478B2 (en) | Method for simulating the rendering of a make-up product on a body area | |
JP2022529230A (en) | Systems and methods for creating topical agents with improved image capture | |
WO2023035878A1 (en) | Spectral imaging device | |
Ma et al. | Color discrimination enhancement for dichromats using self-organizing color transformation | |
CN112862906B (en) | Color space conversion method based on neural network | |
CN114187380A (en) | Color transfer method based on visual saliency and channel attention mechanism | |
Lu et al. | Dccn: a deep-color correction network for traditional Chinese medicine tongue images | |
CN114897757B (en) | NSST and parameter self-adaptive PCNN-based remote sensing image fusion method | |
Zhang et al. | Sub-pixel dispersion model for coded aperture snapshot spectral imaging | |
CN115601611A (en) | A Deep Learning Spectral Reconstruction Method and System Adapting to Exposure Changes | |
Wei et al. | Spectral reflectance estimation based on two-step k-nearest neighbors locally weighted linear regression | |
Yuan et al. | Full convolutional color constancy with adding pooling | |
CN118333873B (en) | A low-light enhancement method and system based on multispectral image reconstruction | |
Dávila-Meza et al. | Quaternion and split quaternion neural networks for low-light color image enhancement | |
Granger | SPECIFICATION OF COLOR IMAGE QUALITY. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200821 |