[go: up one dir, main page]

CN104835124A - Foam image color correction method based on spectrum information fusion and device thereof - Google Patents

Foam image color correction method based on spectrum information fusion and device thereof Download PDF

Info

Publication number
CN104835124A
CN104835124A CN201510230558.3A CN201510230558A CN104835124A CN 104835124 A CN104835124 A CN 104835124A CN 201510230558 A CN201510230558 A CN 201510230558A CN 104835124 A CN104835124 A CN 104835124A
Authority
CN
China
Prior art keywords
color
image
dissipation
foam
camera
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
Application number
CN201510230558.3A
Other languages
Chinese (zh)
Other versions
CN104835124B (en
Inventor
李勇刚
马庆
阳春华
朱红求
蔡耀仪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Baihuite Technology Co ltd
Original Assignee
Central South University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN201510230558.3A priority Critical patent/CN104835124B/en
Publication of CN104835124A publication Critical patent/CN104835124A/en
Application granted granted Critical
Publication of CN104835124B publication Critical patent/CN104835124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

本发明公开了一种基于光谱信息融合的泡沫图像颜色校正方法,利用工业相机采集泡沫图像相机颜色数据,利用可见光光谱检测系统采集泡沫光谱信息。通过分析外界环境对图像颜色的影响,建立介质传播颜色变化模型。计算原始图像暗通道数值,求解图像的介质传播耗散量函数。融合光谱信息改进介质传播耗散函数,校正每个像素点的颜色耗散量,利用该模型还原泡沫图像的准确颜色数值。本发明对于工业现场环境光线变化频繁、空气存在水雾,造成图像模糊、颜色失真很有针对性,同时,光谱设备具有环境无依赖性,非常适用于工业现场。

The invention discloses a foam image color correction method based on spectral information fusion. An industrial camera is used to collect color data of the foam image camera, and a visible light spectrum detection system is used to collect foam spectral information. By analyzing the influence of the external environment on the color of the image, a color change model of medium propagation is established. Calculate the dark channel value of the original image, and solve the medium propagation dissipation function of the image. The spectral information is fused to improve the medium propagation dissipation function, correct the color dissipation of each pixel, and use this model to restore the accurate color value of the foam image. The present invention is very targeted for frequent light changes in the industrial site environment and water mist in the air, resulting in blurred images and color distortion. At the same time, the spectral equipment has no dependence on the environment and is very suitable for industrial sites.

Description

一种基于光谱信息融合的泡沫图像颜色校正方法及装置A foam image color correction method and device based on spectral information fusion

技术领域technical field

本发明属于光谱分析与计算机数字图像处理融合领域,具体涉及了一种泡沫浮选过程中图像颜色校正方法及装置。The invention belongs to the fusion field of spectral analysis and computer digital image processing, and in particular relates to an image color correction method and device in the froth flotation process.

背景技术Background technique

常用选矿方法中,泡沫浮选是最重要的提矿方法。泡沫颜色不仅与浮选生产工况密切相关,还反映了泡沫所含矿物种类及矿物粒子的富集程度,是浮选过程操作的重要依据。因此,浮选泡沫颜色特征的准确提取至关重要。工业现场通过相机采集图像颜色数据,而工业相机采集图像过程对环境依赖度过高。工业现场环境恶劣,光源易受影响,造成光线不稳定,光照改变频繁,导致采集到的图像颜色失真。同时,现场空气中存在雾气、粉尘,影响相机成像效果。两者共同作用,导致相机采集泡沫颜色数据不准确,影响浮选控制过程效果。因此,研究浮选泡沫颜色特征的校正方法具有重要意义。Among the commonly used beneficiation methods, froth flotation is the most important ore extraction method. The color of the foam is not only closely related to the flotation production conditions, but also reflects the types of minerals contained in the foam and the degree of enrichment of mineral particles, which is an important basis for the operation of the flotation process. Therefore, accurate extraction of flotation froth color features is crucial. Industrial sites collect image color data through cameras, and the process of collecting images by industrial cameras is too dependent on the environment. The environment of the industrial site is harsh, and the light source is easily affected, resulting in unstable light and frequent light changes, resulting in color distortion of the collected images. At the same time, there is fog and dust in the air on site, which affects the imaging effect of the camera. The combination of the two results in inaccurate foam color data collected by the camera, which affects the effect of the flotation control process. Therefore, it is of great significance to study the correction method of the color characteristics of flotation froth.

目前对泡沫颜色校正的方法,受限于设备和环境的影响,大多通过对比一段时间前后泡沫颜色数据,分析变化趋势,研究环境对颜色数据的叠加影响。The current method of foam color correction is limited by the influence of equipment and environment. Most of them compare the foam color data before and after a period of time, analyze the change trend, and study the superimposed influence of the environment on the color data.

包含以下两大类方法:第一类为基于空间映射的颜色校正方法,通过确定源颜色空间到目标颜色空间的映射关系实现颜色空间转换,这类方法可以达到比较高的精度,但只有在训练样本足够且合理的情况下才能得到较好的效果。It includes the following two categories of methods: The first category is the color correction method based on space mapping, which realizes color space conversion by determining the mapping relationship between the source color space and the target color space. This type of method can achieve relatively high accuracy, but only in the training Only when the samples are sufficient and reasonable can better results be obtained.

第二类为基于图像分析的颜色校正方法,代表性算法为直方图法等。这一类校正算法是在研究图像本身的颜色分布基础上,依据图像色度分布特性检测图像是否偏色以及偏色的程度,而对数字图像进行整体调整,一般使用于图像偏色检测等领域。The second category is the color correction method based on image analysis, and the representative algorithm is the histogram method and the like. This type of correction algorithm is based on the study of the color distribution of the image itself, and according to the chromaticity distribution characteristics of the image to detect whether the image is color cast and the degree of color cast, and to adjust the overall digital image, generally used in the field of image color cast detection and other fields .

以上算法都旨在对大量数据分析基础上进行数据建模,没有从机理的方面分析图像颜色变化的成因,对工业现场的偏色现象没有针对性。同时,工业相机成像过程受外界环境较大,采集图像过程无法摆脱对现场环境的依赖,当干扰条件增多,根据颜色数据进行分析的校正方法无法达到很好的校正效果。The above algorithms are all designed to perform data modeling on the basis of a large amount of data analysis. They do not analyze the cause of image color changes from the perspective of mechanism, and are not targeted at the color cast phenomenon in industrial sites. At the same time, the imaging process of industrial cameras is greatly affected by the external environment, and the image acquisition process cannot get rid of the dependence on the on-site environment. When the interference conditions increase, the correction method based on the analysis of color data cannot achieve a good correction effect.

分析矿物浮选工业现场环境,造成颜色不准确有两大因素:现场光源光线随时间变化,工业相机成像受光源影响发生变化;雾气弥漫,采集图像不清晰导致颜色不准确。Analyzing the on-site environment of the mineral flotation industry, there are two major factors that cause inaccurate colors: the light of the on-site light source changes with time, and the imaging of the industrial camera changes due to the influence of the light source; the fog is diffuse, and the collected images are not clear, resulting in inaccurate colors.

发明内容Contents of the invention

本发明提供一种不要求大量颜色数据,且校正精度高的泡沫图像颜色校正方法及装置。The invention provides a foam image color correction method and device which do not require a large amount of color data and have high correction accuracy.

为实现上述目的,本发明的技术方案如下:To achieve the above object, the technical scheme of the present invention is as follows:

一种基于光谱信息融合的泡沫图像颜色校正方法,包含步骤如下:A foam image color correction method based on spectral information fusion, comprising the following steps:

步骤一:光源光线固定且无雾气干扰条件下,采集色卡不同色块光谱数据和相机颜色数据,建立基于该相机特性的光谱-相机颜色空间转换模型;Step 1: Under the condition of fixed light source and no fog interference, collect the spectral data of different color blocks of the color card and camera color data, and establish a spectrum-camera color space conversion model based on the characteristics of the camera;

步骤二:工业现场,相机采集浮选槽内泡沫原始图像数据I(x),上传至上位机待处理;Step 2: In the industrial site, the camera collects the original image data I(x) of the foam in the flotation tank and uploads it to the host computer for processing;

步骤三:利用可见光光谱系统,采集浮选槽内泡沫散点的光谱反射信息,根据步骤一中颜色空间转换模型,将泡沫的光谱颜色信息转换相机RGB颜色空间数值表征;Step 3: Use the visible light spectrum system to collect the spectral reflection information of the scattered points of the foam in the flotation cell, and convert the spectral color information of the foam into the RGB color space numerical representation of the camera according to the color space conversion model in step 1;

步骤四:根据大气散射原理和环境光模型,建立泡沫颜色变化模型;Step 4: Establish a foam color change model based on the atmospheric scattering principle and the ambient light model;

步骤五:取原始图像I(x)每个像素点三通道的最小值,组成最小颜色值图像,对该图像矩阵的每个像素点进行最小滤波运算处理,得到其暗通道图像,计算介质传播耗散函数;Step 5: Take the minimum value of the three channels of each pixel of the original image I(x) to form a minimum color value image, perform minimum filtering operations on each pixel of the image matrix, obtain its dark channel image, and calculate the medium propagation Dissipation function;

步骤六:利用步骤三中采集并转换到RGB空间的泡沫散点光谱颜色值,校正介质传播耗散函数,求解图像每像素点的准确颜色耗散量;Step 6: Use the foam scatter point spectral color values collected in step 3 and converted to RGB space to correct the medium propagation dissipation function and solve the accurate color dissipation per pixel of the image;

步骤七:将准确颜色耗散量与原始泡沫图像数据代入颜色变化模型中,确定校正后的准确图像颜色数据。Step 7: Substituting the accurate color dissipation amount and the original foam image data into the color change model to determine the corrected accurate image color data.

其中,步骤一中颜色空间转换模型的建立,过程包括:Wherein, the establishment of the color space conversion model in step 1 includes:

步骤11:D65光源下,以标准色卡各色块中心为中点,以5*10pix为窗口大小,工业相机采集图像RGB数据,平均后作为该色块颜色数据值rgbn,n=1..140。同时采集不同色块光谱反射率kn,其中n=1,2...140;Step 11: Under the D65 light source, take the center of each color block of the standard color card as the midpoint, and take 5*10pix as the window size, the industrial camera collects the RGB data of the image, and takes the average as the color data value rgb n of the color block, n=1.. 140. Simultaneously collect spectral reflectance k n of different color blocks, where n=1,2...140;

步骤12:以CIE1931规定为标准,利用不同色块反射率数据,计算求得各色块的色度坐标(xn,yn,zn),以色度坐标所在锥体颜色空间内位置,来表征泡沫的颜色分布情况。Step 12: Using CIE1931 as the standard, use the reflectance data of different color blocks to calculate the chromaticity coordinates (x n , y n , z n ) of each color block, and use the position in the cone color space where the chromaticity coordinates are located to obtain Characterizes the color distribution of the foam.

步骤13:以色度坐标x,y,z为最小单位,建立不同色块的十项多项式模型,表达式如下:Step 13: With the chromaticity coordinates x, y, z as the smallest unit, establish a decaterm polynomial model of different color blocks, the expression is as follows:

xyzxyz == 11 ++ xx 11 ++ ythe y 11 ++ zz 11 ++ xx 11 ythe y 11 ++ xx 11 zz 11 ++ ythe y 11 zz 11 ++ xx 11 22 ++ ythe y 11 22 ++ zz 11 22 11 ++ xx 22 ++ ythe y 22 ++ zz 22 ++ xx 22 ythe y 22 ++ xx 22 zz 22 ++ ythe y 22 zz 22 ++ xx 22 22 ++ ythe y 22 22 ++ zz 22 22 ·&Center Dot; ·&Center Dot; 11 ++ xx nno ++ ythe y nno ++ zz nno ++ xx nno ythe y nno ++ xx nno zz nno ++ ythe y nno zz nno ++ xx nno 22 ++ ythe y nno 22 ++ zz nno 22 -- -- -- (( 11 ))

以多项式的各项为自变量,以相机RGB颜色数据分别为因变量,表达式如下:Taking the items of the polynomial as independent variables and taking the RGB color data of the camera as dependent variables, the expressions are as follows:

rr == rr 11 ·&Center Dot; ·&Center Dot; rr nno ,, gg == gg 11 ·&Center Dot; ·· gg nno ,, bb == bb 11 ·· ·· bb nno -- -- -- (( 22 ))

分别建立三个通道的多元线性回归模型,表达式如下:The multiple linear regression models of the three channels are respectively established, and the expressions are as follows:

PP xyzxyz 22 rgbrgb :: rr == xyzxyz ** ee 11 gg == xyzxyz ** ee 22 bb == xyzxyz ** ee 33 ,, EE. == {{ ee 11 ,, ee 22 ,, ee 33 }} ,, -- -- -- (( 33 ))

E为多元回归方程的各项系数,该模型实现了色度坐标空间到相机颜色空间的转换,任意光谱颜色信息都可以由相机颜色RGB空间表征,即rgb=xyz*E。E is the coefficient of the multiple regression equation. This model realizes the transformation from the chromaticity coordinate space to the camera color space. Any spectral color information can be represented by the camera color RGB space, that is, rgb=xyz*E.

其中,步骤四中建立泡沫颜色变化模型,过程包括:Wherein, in step 4, the foam color change model is established, and the process includes:

步骤41:根据光线传播和颜色形成原理分析,环境对颜色的影响分为反射衰减损耗和环境光模型两部分,结合颜色产生原理和大气散射模型,建立介质传播图像改变模型,表达式如下:Step 41: According to the analysis of the principle of light propagation and color formation, the influence of the environment on the color is divided into two parts: reflection attenuation loss and ambient light model. Combining the principle of color generation and the atmospheric scattering model, a medium propagation image change model is established. The expression is as follows:

I(x)=S(x)e-βd(x)+A(1-e-βd(x))   (4)I(x)=S(x)e -βd(x) +A(1-e -βd(x) ) (4)

S(x)为未受到干扰时的图像颜色,即校正后的准确图像颜色,x代表图中每个像素点,A为现场环境大气光值,依照大气反射模型,S(x)应为大气光和场景反照率ρ的乘积,场景反照率ρ只取决于物体对光线的物理反射性,e-βd(x)为介质传播耗散函数;S(x) is the image color when it is not disturbed, that is, the correct image color after correction, x represents each pixel in the picture, A is the atmospheric light value of the scene environment, according to the atmospheric reflection model, S(x) should be the atmospheric The product of light and scene albedo ρ, the scene albedo ρ only depends on the physical reflectivity of the object to light, e -βd(x) is the medium propagation dissipation function;

步骤42:定义t(x)=e-βd(x)为介质传播耗散函数,则颜色变化模型简化为表达式:Step 42: Define t(x)=e -βd(x) as the medium propagation dissipation function, then the color change model is simplified to an expression:

I(x)=S(x)t(x)+A(1-t(x))。   (5)I(x)=S(x)t(x)+A(1-t(x)). (5)

其中,步骤六中校正介质传播耗散函数的过程包括:Among them, the process of correcting the medium propagation dissipation function in step six includes:

步骤61:根据暗原色先验求解原始图像的每点介质传播耗散量t1(x),表达式如下:Step 61: Solve the per-point medium propagation dissipation t 1 (x) of the original image according to the dark channel prior, the expression is as follows:

tt 11 (( xx )) == AA -- JJ darkdark AA -- -- -- (( 66 ))

Jdark为步骤五中得到的原始图像的暗通道图像;J dark is the dark channel image of the original image obtained in step five;

步骤62:步骤三中测得的多组泡沫光谱RGB颜色数据(rn,gn,bn),作为此情况下的准确泡沫物理颜色属性,重复步骤五,即可求各组泡沫散点处的准确耗散量,表达式如下:Step 62: multiple sets of foam spectrum RGB color data (r n , g n , b n ) measured in step 3 are used as the accurate foam physical color attributes in this case, and step 5 is repeated to obtain the scattered points of each group of foam The exact dissipation at , the expression is as follows:

tt 22 (( nno )) == JJ darkdark -- AA minmin (( minmin (( rr nno ,, gg nno ,, bb nno )) )) -- AA -- -- -- (( 77 ))

步骤63:根据介质传播函数t(x)=e-βd(x),将计算得到图像所有像素点的耗散量t(x)按升序排列,绘制一条指数曲线s1;根据此曲线,拟合求得该指数函数各项系数,表达式如下:Step 63: According to the medium propagation function t(x)=e -βd(x) , arrange the calculated dissipation t(x) of all pixels in the image in ascending order, and draw an exponential curve s1; according to this curve, fitting The coefficients of the exponential function are obtained, and the expressions are as follows:

sthe s 11 == ee αα 11 xx ++ ββ 11 -- -- -- (( 88 ))

步骤64:将步骤62中求得的各组准确耗散量t2(n),同样按照升序排列,并拟合出准确耗散函数,表达式如下:Step 64: Arrange each group of accurate dissipation quantities t 2 (n) obtained in step 62 in ascending order, and fit the exact dissipation function, the expression is as follows:

sthe s 22 == ee αα 22 xx ++ ββ 22 -- -- -- (( 99 ))

步骤65:比较两组耗散函数,将曲线s1进行扭转、移动、放大或缩小,使其无限贴近耗散曲线s2,即将函数s1进行整体变形,将转化为函数s2的形式,校正全部s1中的耗散量,具体过程如下:Step 65: Compare the two sets of dissipation functions, twist, move, enlarge or reduce the curve s1 to make it infinitely close to the dissipation curve s2, that is, transform the function s1 into the form of the function s2, and correct all s1 The specific process is as follows:

s1、s2两边同时取对数,表达式如下:Take the logarithm on both sides of s1 and s2 at the same time, the expression is as follows:

loglog s the s 11 == αα 11 xx ++ loglog ββ 11 -- -- -- (( 1010 )) loglog s the s 22 == αα 22 xx ++ loglog ββ 22 -- -- -- (( 1111 ))

将公式10、11变形,得到表达式如下:Transform the formulas 10 and 11 to get the following expressions:

αα 22 ** (( loglog s the s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 == αα 22 xx ++ loglog ββ 22 -- -- -- (( 1212 ))

使之与散点的介质传播耗散函数形式一致,则变形后公式右侧数值为校正后的全部准确耗散量的对数,对其取指数,则新的全部耗散量qt(x),表达式如下:Make it consistent with the form of the medium propagation dissipation function of the scattered point, then the value on the right side of the deformed formula is the logarithm of the corrected all accurate dissipation, and take the exponent, then the new total dissipation qt(x) , the expression is as follows:

qtqt (( xx )) == ee αα 22 ** (( loglog s the s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 -- -- -- (( 1313 ))

步骤66:根据步骤62中的排序顺序,将qt(x)中不同像素点耗散量值恢复原始顺序,得到泡沫图像的所有像素点的准确耗散量矩阵t(x)。Step 66: According to the sorting order in step 62, restore the dissipation value of different pixels in qt(x) to the original order, and obtain the accurate dissipation matrix t(x) of all pixels in the foam image.

其中,步骤七中确定校正后的准确图像颜色数据具体为:根据颜色变化模型,Wherein, determining the corrected accurate image color data in step seven is specifically: according to the color change model,

I(x)=S(x)t(x)+A(1-t(x)),已知大气光A与耗散量t(x),可求图像的准确颜色数据,S(x)表达式如下:I(x)=S(x)t(x)+A(1-t(x)), given the atmospheric light A and dissipation t(x), the accurate color data of the image can be obtained, S(x) The expression is as follows:

SS (( xx )) == II (( xx )) -- AA (( 11 -- tt (( xx )) )) tt (( xx )) -- -- -- (( 1414 )) ..

一种基于光谱信息融合的泡沫图像颜色校正装置,包括以下模块:   (17)A foam image color correction device based on spectral information fusion, including the following modules: (17)

图像相机颜色采集模块,用于采集泡沫图像的相机RGB颜色,模块利用工业相机采集整幅图像的RGB颜色信息,并将颜色数据传至上位机待处理;The image camera color acquisition module is used to collect the camera RGB color of the foam image. The module uses the industrial camera to collect the RGB color information of the entire image, and transmits the color data to the host computer for processing;

光谱信息采集模块,用于采集图像区域范围内不同位置的散点光谱反射率信息,光谱采集模块将待测图像分割为不同区域,利用可见光微型光谱仪,采集每个区域内的散点光谱反射率信息;The spectral information collection module is used to collect the scattered point spectral reflectance information at different positions within the range of the image area. The spectral collection module divides the image to be measured into different regions, and uses the visible light micro-spectrometer to collect the scattered point spectral reflectance in each region information;

数据处理模块,用于处理图像的相机RGB信息与光谱信息,利用建立好的模型对相机采集的原始图像数据进行校正,输出校正后的颜色数据。The data processing module is used to process the camera RGB information and spectral information of the image, use the established model to correct the original image data collected by the camera, and output the corrected color data.

本发明将光线传播机理与光谱分析法融合,更准确的重现了颜色数据受外界影响的过程,同时摆脱了以往对大量颜色数据的要求,提升了校正精度。The invention combines the light propagation mechanism with the spectral analysis method, more accurately reproduces the process of color data being affected by the outside world, and at the same time gets rid of the previous requirement for a large amount of color data, and improves the correction accuracy.

附图说明Description of drawings

图1为本发明装置图。Fig. 1 is a device diagram of the present invention.

图2为本发明实施中工业相机颜色空间与光谱颜色空间的转化流程图。Fig. 2 is a flow chart of conversion between industrial camera color space and spectral color space in the implementation of the present invention.

图3为本发明实施中融合光谱颜色信息的颜色校正流程图。Fig. 3 is a flow chart of color correction for fusing spectral color information in the implementation of the present invention.

图4为通过原图像的暗通道图像。Figure 4 is the dark channel image through the original image.

图5为粗糙全像素点介质耗散量曲线。Fig. 5 is a rough full-pixel medium dissipation curve.

图6为散点的准确介质耗散量曲线。Fig. 6 is the accurate medium dissipation curve of the scatter point.

具体实施方式Detailed ways

下面结合附图及实例,对本发明做进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and examples.

外界环境对相机采集泡沫图像颜色的影响有两点:一是受工业现场环境影响,导致光线到泡沫表面传播过程中,光线发生散射现象,导致反射光强损失一部分,图像颜色分量受损,传播距离越远,即景深越深,损失越大,反射光光强与景深呈反比例;二是光线传播过程中由于环境光模型,大气粒子对自然光的散射而呈现光源性,导致图像颜色分量增加,传播距离越长,则呈现的光源性越强。The external environment has two influences on the color of the foam image collected by the camera: one is affected by the industrial site environment, which causes the light to scatter during the propagation of the light to the foam surface, resulting in a loss of part of the reflected light intensity and damage to the image color components. The farther the distance, the deeper the depth of field, the greater the loss, and the intensity of reflected light is inversely proportional to the depth of field; second, due to the ambient light model and the scattering of natural light by atmospheric particles in the process of light propagation, the light source property appears, resulting in an increase in the color component of the image. The longer the propagation distance, the stronger the light source is presented.

在工业现场,光源光线不稳定,散射损失模型和环境光模型共同作用,导致相机采集到的图像颜色数据不准确。在受影响图像中剥离这些模型的叠加作用,就可以得到泡沫本身的准确物理颜色属性。In industrial sites, the light source light is unstable, and the scattering loss model and the ambient light model work together, resulting in inaccurate color data of images collected by the camera. Peeling back the superimposed effects of these models in the affected image yields the exact physical color properties of the foam itself.

本发明针对外界环境造成相机采集颜色错误,融合图像的光谱信息进行建模,校正图像颜色数据。The present invention aims at camera acquisition color error caused by external environment, fuses spectral information of images to model, and corrects image color data.

本实例中采用的图像颜色校正装置如图1所示,该装置包括光源1、工业相机2、直通光纤3、可见光微型光谱仪4、色卡5和计算机6。装置安排如下:光源1选用与工业现场相同的色温为6500K的D65光源作为标准光源;工业相机2与计算机6的usb接口连接,上传相机采集图像数据;光纤3一端探头放置于色卡5上方,检测其光线反射情况;光纤3另一端与光谱仪4连接,用于发送光线反射信息;光谱仪4与计算机6的usb接口连接,传输光谱反射数据。色卡5为爱色丽公司140色色卡,作为建模和测试对象。The image color correction device used in this example is shown in Figure 1, and the device includes a light source 1, an industrial camera 2, a straight-through optical fiber 3, a visible light micro-spectrometer 4, a color card 5 and a computer 6. The arrangement of the device is as follows: light source 1 selects D65 light source with the same color temperature as the industrial site as the standard light source; industrial camera 2 is connected to the usb interface of computer 6 to upload the camera to collect image data; Detect its light reflection; the other end of the optical fiber 3 is connected to the spectrometer 4 for sending light reflection information; the spectrometer 4 is connected to the usb interface of the computer 6 to transmit spectral reflection data. Color card 5 is a 140-color color card of X-Rite Company, which is used as a modeling and testing object.

从功能模块角度,图像颜色校正装置包括三大部分:图像相机颜色采集模块、光谱信息采集模块以及数据处理模块。From the perspective of functional modules, the image color correction device includes three parts: image camera color acquisition module, spectral information acquisition module and data processing module.

图像相机颜色采集模块用于采集泡沫图像的相机RGB颜色,模块利用工业相机采集整幅图像的RGB颜色信息,并将颜色数据传至上位机待处理,主要包括工业相机。The image camera color acquisition module is used to collect the camera RGB color of the foam image. The module uses the industrial camera to collect the RGB color information of the entire image, and transmits the color data to the host computer for processing, mainly including the industrial camera.

光谱信息采集模块用于采集图像区域范围内不同位置的散点光谱反射率信息。光谱采集模块将待测图像分割为不同区域,利用可见光微型光谱仪,采集每个区域内的散点光谱反射率信息。主要包括光纤、可见光光谱仪。The spectral information collection module is used to collect scattered spectral reflectance information at different positions within the image area. The spectrum acquisition module divides the image to be measured into different regions, and uses a visible light micro-spectrometer to collect the scattered spectral reflectance information in each region. It mainly includes optical fiber and visible light spectrometer.

数据处理模块用于处理图像的相机RGB信息与光谱信息,利用建立好的模型对相机采集的原始图像数据进行校正,输出校正后的颜色数据。主要设备为计算机。The data processing module is used to process the camera RGB information and spectral information of the image, use the established model to correct the original image data collected by the camera, and output the corrected color data. The main equipment is a computer.

如图2、图3所示,本实施例基于光谱信息融合的图像颜色校正方法包括如下具体实施步骤。As shown in FIG. 2 and FIG. 3 , the image color correction method based on spectral information fusion in this embodiment includes the following specific implementation steps.

步骤一:.在光源稳定且无外界干扰的环境下,建立基于该相机光谱特性的光谱-相机颜色空间转换模型Pxyz2rgbStep 1: In an environment with a stable light source and no external interference, establish a spectrum-camera color space conversion model P xyz2rgb based on the spectral characteristics of the camera;

(1)在d65光源稳定照射情况下,利用微型可见光光谱分析仪分别测量色卡所有色块的反射率kn,其中n=1,2...140;(1) Under the condition of stable irradiation of d65 light source, use a miniature visible light spectrum analyzer to measure the reflectance k n of all the color blocks of the color card, where n=1,2...140;

(2)利用工业相机采集色卡图像数据,同一色块以色块中点为中心,窗口大小5*10为范围取50个像素值,平均后作为该色卡的该色块最终颜色数据值rgbn,n=1..140,传输至上位机待处理;(2) Use an industrial camera to collect the image data of the color card. The same color block is centered on the midpoint of the color block, and the window size is 5*10. Take 50 pixel values, and take the average as the final color data value of the color block of the color card rgb n , n=1..140, transmitted to the host computer for processing;

(3)以CIE1931规定为标准,通过140组反射率数据,计算测量点相应光谱色度坐标数据(xn,yn,zn),该数据存在于光谱xyz颜色空间内,以色度坐标所在锥体颜色空间内位置来表征泡沫的颜色分布情况;(3) Based on the provisions of CIE1931, through 140 sets of reflectance data, calculate the spectral chromaticity coordinate data (x n , y n , z n ) corresponding to the measurement point. The data exists in the spectral xyz color space, and the chromaticity coordinates The position in the cone color space represents the color distribution of the foam;

(4)将相机颜色三通道分开,以色度坐标x,y,z为最小单位,分别建立十项多项式回归模型,公式如下:(4) Separate the three channels of the camera color, and use the chromaticity coordinates x, y, and z as the smallest unit to establish a ten-term polynomial regression model. The formula is as follows:

xyzxyz == 11 ++ xx 11 ++ ythe y 11 ++ zz 11 ++ xx 11 ythe y 11 ++ xx 11 zz 11 ++ ythe y 11 zz 11 ++ xx 11 22 ++ ythe y 11 22 ++ zz 11 22 11 ++ xx 22 ++ ythe y 22 ++ zz 22 ++ xx 22 ythe y 22 ++ xx 22 zz 22 ++ ythe y 22 zz 22 ++ xx 22 22 ++ ythe y 22 22 ++ zz 22 22 ·&Center Dot; ·&Center Dot; 11 ++ xx nno ++ ythe y nno ++ zz nno ++ xx nno ythe y nno ++ xx nno zz nno ++ ythe y nno zz nno ++ xx nno 22 ++ ythe y nno 22 ++ zz nno 22 -- -- -- (( 11 ))

将多项式的各项作为多元线性回归的各个自变量,将对应色块相机三通道颜色数据分别作为因变量,表达式如下:The terms of the polynomial are used as the independent variables of the multiple linear regression, and the three-channel color data of the corresponding color block camera are respectively used as the dependent variables. The expressions are as follows:

rr == rr 11 ·&Center Dot; ·&Center Dot; rr nno ,, gg == gg 11 ·&Center Dot; ·&Center Dot; gg nno ,, bb == bb 11 ·&Center Dot; ·&Center Dot; bb nno -- -- -- (( 22 ))

在140组数据中,随机挑选100组,作为训练集,求解线性回归方程各项系数。表达式如下:Among the 140 sets of data, 100 sets were randomly selected as the training set to solve the coefficients of the linear regression equation. The expression is as follows:

PP xyzxyz 22 rgbrgb :: rr == xyzxyz ** ee 11 gg == xyzxyz ** ee 22 bb == xyzxyz ** ee 33 ,, EE. == {{ ee 11 ,, ee 22 ,, ee 33 }} ,, -- -- -- (( 33 ))

用剩余40组数据,验证回归精度,完成该工业相机RGB彩色空间与光谱xyz色度坐标颜色空间的转化过程,则任意色度坐标可以转换为相机颜色空间数值,即rgb=xyz*E。Use the remaining 40 sets of data to verify the regression accuracy, and complete the conversion process between the RGB color space of the industrial camera and the spectral xyz chromaticity coordinate color space, then any chromaticity coordinate can be converted into a camera color space value, that is, rgb=xyz*E.

步骤二:工业现场环境下,工业相机采集浮选槽中泡沫图像数据,并传至上位机待处理;Step 2: In the industrial field environment, the industrial camera collects the foam image data in the flotation tank and transmits it to the host computer for processing;

步骤三:由于仪器限制,光谱仪每次只允许测量散点数据,将相机采集图像区域分为10*8个区域,利用光谱系统的光纤探头,采集80个区域内随机某点的浮选泡沫光谱反射率信息kn,其中n=1,2...80,根据说明1.3中的方法求得所有色度坐标(xn,yn,zn);Step 3: Due to the limitations of the instrument, the spectrometer is only allowed to measure scattered point data each time. The image area collected by the camera is divided into 10*8 areas, and the optical fiber probe of the spectrum system is used to collect the flotation foam spectrum of a random point in 80 areas. Reflectance information k n , where n=1,2...80, all chromaticity coordinates (x n ,y n ,z n ) are obtained according to the method in Note 1.3;

步骤四:利用步骤一中求得的转化模型Pxyz2rgb,将步骤3中求得的色度坐标转换为标准RGB颜色数据(rn,gn,bn)n=1,2...80,表征此环境下浮选槽内80个测量散点本身的物理颜色数值;Step 4: Using the conversion model P xyz2rgb obtained in step 1, convert the chromaticity coordinates obtained in step 3 into standard RGB color data (r n , g n , b n )n=1,2...80 , representing the physical color values of the 80 measurement scattered points in the flotation cell in this environment;

步骤五:建立颜色变化模型Step 5: Build a color change model

根据分析将环境对颜色的影响分为反射衰减损耗和环境光模型两部分,结合颜色产生原理和大气散射模型,定义介质传播图像改变模型如下:According to the analysis, the influence of the environment on the color is divided into two parts: the reflection attenuation loss and the ambient light model. Combining the color generation principle and the atmospheric scattering model, the medium propagation image change model is defined as follows:

I(x)=S(x)e-βd(x)+A(1-e-βd(x))   (4)I(x)=S(x)e -βd(x) +A(1-e -βd(x) ) (4)

I(x)为相机原始图像,S(x)为没受到干扰时的图像颜色,即校正后的准确图像颜色。I(x) is the original image of the camera, and S(x) is the color of the image without interference, that is, the accurate color of the image after correction.

A为现场环境大气光。依照大气反射模型,S(x)应为大气光和场景反照率ρ的乘积。场景反照率只取决于物体对光线的物理反射性。A is the atmospheric light of the scene environment. According to the atmospheric reflection model, S(x) should be the product of atmospheric light and scene albedo ρ. Scene albedo depends only on how physically reflective an object is to light.

e-βd(x)为介质传播耗散函数,光线传播距离越远,则散射损耗越大,反射光强越弱,而环境光呈现的光源特性越明显;e -βd(x) is the dissipation function of medium propagation. The farther the light propagation distance is, the greater the scattering loss is, the weaker the reflected light intensity is, and the more obvious the light source characteristics of ambient light are;

步骤六:求解步骤二中相机拍摄原始图像的暗通道图像及大气光A,过程包括:Step 6: Solve the dark channel image and atmospheric light A of the original image captured by the camera in step 2. The process includes:

(1)将原始彩色图像按R、G、B三通道分开,取每个像素点三通道中的最小值作为该像素点的最低亮度值,组成最小亮度矩阵图像J,表达式如下:(1) Separate the original color image by three channels of R, G, and B, and take the minimum value of the three channels of each pixel as the minimum brightness value of the pixel to form the minimum brightness matrix image J, the expression is as follows:

J=minrgb(Ic(x,y))   (5)J=min rgb (I c (x,y)) (5)

其中x,y为图像中每点像素坐标,Ic为原始相机采集彩色图像;Wherein x, y are the pixel coordinates of each point in the image, and Ic is the color image collected by the original camera;

(2)以x,y为滤波中心像素位置,对公式5中最小亮度图像J进行最小值滤波。滤波的窗口大小选择15*15,滤波半径为7,则最小值滤波后每像素点表达式如下:(2) Take x, y as the filter center pixel position, and perform minimum value filtering on the minimum brightness image J in formula 5. The filter window size is 15*15, and the filter radius is 7. The expression of each pixel after the minimum value filter is as follows:

Jdark(x,y)=min(J(x',y'))   (6)J dark (x,y)=min(J(x',y')) (6)

其中x',y'是为以x,y为中心的模版区域内每一点像素。滤波后的图像Jdark即为相机采集原始图像的暗通道图像;求解后的图像如图4所示。Among them, x', y' are each pixel in the template area centered on x, y. The filtered image J dark is the dark channel image of the original image collected by the camera; the solved image is shown in Figure 4.

(3)选出滤波后的Jdark图像数据值升序排列后,占前0.1%的像素值位置,选择原始图像在这些位置中,RGB三通道数据中最大的一个,作为大气光值A。(3) After the filtered J dark image data values are arranged in ascending order, the pixel value positions occupying the first 0.1% are selected, and among these positions in the original image, the largest one among the RGB three-channel data is selected as the atmospheric light value A.

步骤七:求取并校正介质传播耗散量,过程包括:Step 7: Obtain and correct the dissipation of medium propagation, the process includes:

(1)定义t(x)=e-βd(x)为介质传播函数,则图像传播模型表达式如下:(1) Define t(x)=e -βd(x) as the medium propagation function, then the expression of the image propagation model is as follows:

I(x)=S(x)t(x)+A(1-t(x))   (7)I(x)=S(x)t(x)+A(1-t(x)) (7)

对模型两侧进行最小滤波处理,模型变为:Perform minimum filtering on both sides of the model, and the model becomes:

min(min(I(x)))=min(min(S(x)))t(x)+A(1-t(x))   (8)min(min(I(x)))=min(min(S(x)))t(x)+A(1-t(x)) (8)

根据暗原色先验,无雾图像的颜色三通道数值最小化处理后,其暗通道图像数值趋于0。公式(8)左侧为原始图像的暗通道图像Jdark,右侧第一项为无干扰图像S(x)的暗通道图像,其值趋于0,得到粗略介质传播函数t1(x),表达式如下:According to the dark channel prior, after the value of the three color channels of the fog-free image is minimized, the value of the dark channel image tends to 0. The left side of formula (8) is the dark channel image J dark of the original image, and the first item on the right side is the dark channel image of the interference-free image S(x), whose value tends to 0, and the rough medium propagation function t 1 (x) is obtained , the expression is as follows:

tt 11 (( xx )) == AA -- JJ darkdark AA -- -- -- (( 99 ))

x表示像素的坐标,可以计算出一副图像在所有像素点上的粗略耗散量;x represents the coordinates of the pixel, and the rough dissipation of an image on all pixels can be calculated;

(2)光谱颜色信息是泡沫的固有属性,代表了准确的颜色数值。80组散点转化后光谱颜色(rn,gn,bn)即为其准确颜色数值,即(rn,gn,bn)=Sn。将散点颜色数据(rn,gn,bn)代入公式(7),并重复步骤七(1)中操作,则可计算得到准确的80组泡沫散点的介质传播耗散量t2(x),表达式如下:(2) Spectral color information is an inherent property of the foam and represents an accurate color value. The spectral color (r n , g n , b n ) after 80 sets of scatter point conversion is its exact color value, that is , (rn , g n , b n )=S n . Substituting the scattered point color data (r n , g n , b n ) into the formula (7), and repeating the operation in step 7 (1), the accurate medium propagation dissipation t 2 of 80 groups of foam scattered points can be calculated (x), the expression is as follows:

tt 22 (( nno )) == JJ darkdark -- AA minmin (( minmin (( rr nno ,, gg nno ,, bb nno )) )) -- AA -- -- -- (( 1010 ))

这80组耗散量代表了浮选槽不同区域内受环境影响,造成的光线损失和叠加情况;These 80 sets of dissipation represent the light loss and superposition caused by the environment in different areas of the flotation cell;

(3)将所有像素点的耗散量t1(x)按升序排列,绘制曲线s1,绘制出的曲线如图5所示。根据介质传播函数t(x)=e-βd(x),曲线应近似为一条与光线传播距离即景深有关的指数函数,根据此曲线,拟合求得该指数函数各项系数,表达式如下:(3) Arrange the dissipation quantities t 1 (x) of all pixel points in ascending order, and draw a curve s1 , as shown in FIG. 5 . According to the medium propagation function t(x)=e -βd(x) , the curve should be approximated as an exponential function related to the light propagation distance, that is, the depth of field. According to this curve, the coefficients of the exponential function can be obtained by fitting, and the expressions are as follows :

sthe s 11 == ee αα 11 xx ++ ββ 11 -- -- -- (( 1111 ))

(4)将80组准确耗散量t2(n)同样按升序排列,重复中上述过程,绘制出的曲线如图6所示,拟合求得该函数的各项系数,表达式如下:(4) Arrange 80 groups of accurate dissipation quantities t 2 (n) in ascending order, repeat the above process, and draw the curve as shown in Figure 6, and obtain the coefficients of the function by fitting, the expression is as follows:

sthe s 22 == ee αα 22 xx ++ ββ 22 -- -- -- (( 1212 ))

(5)比较两组介质传播函数,将曲线s1进行扭转、移动、放大或缩小,变形原则为使其无限相似于耗散曲线s2。即将函数s1进行整体变形,将其转化为函数s2的形式,具体过程如下:(5) Comparing the two sets of medium propagation functions, the curve s1 is twisted, moved, enlarged or reduced, and the deformation principle is to make it infinitely similar to the dissipation curve s2. That is, the function s1 is transformed as a whole, and converted into the form of the function s2. The specific process is as follows:

s1、s2两边同时取对数,表达式如下Take the logarithm on both sides of s1 and s2 at the same time, the expression is as follows

loglog sthe s 11 == αα 11 xx ++ loglog ββ 11 -- -- -- (( 1313 )) loglog sthe s 22 == αα 22 xx ++ loglog ββ 22 -- -- -- (( 1414 ))

将等式1两边同时变形,使其接近等式2,表达式如下:Transform both sides of Equation 1 to make it close to Equation 2, the expression is as follows:

αα 22 ** (( loglog sthe s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 == αα 22 xx ++ loglog ββ 22 -- -- -- (( 1515 ))

使之与散点的传播耗散函数形式一致,则变形后公式右侧数值为校正后的全部准确耗散量的对数,对其取指数,则新的全部耗散量qt(x),表达式如下:Make it consistent with the form of the propagation and dissipation function of the scattered point, then the value on the right side of the deformed formula is the logarithm of the corrected all accurate dissipation, and taking the exponent, the new total dissipation qt(x), The expression is as follows:

qtqt (( xx )) == ee αα 22 ** (( loglog sthe s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 -- -- -- (( 1616 ))

通过融合泡沫散点的光谱颜色数据,得到一副图像全部像素点的准确大气耗散量qt(x)By fusing the spectral and color data of foam scattered points, the accurate atmospheric dissipation qt(x) of all pixels in an image is obtained

(6)根据步骤(3)中的排序顺序,将qt(x)中不同像素点耗散量值恢复至原始顺序,得到泡沫图像的所有像素点的准确耗散量矩阵t(x);(6) According to the sorting order in step (3), restore the dissipation value of different pixels in qt(x) to the original order, and obtain the accurate dissipation matrix t(x) of all pixels of the foam image;

步骤八:根据图像传播影响模型,I(x)=S(x)t(x)+A(1-t(x)),已知全像素点的介质传播耗散量t(x),以及大气光值A,则图像所有像素点的准确颜色数据S(x)可求,表达式如下:Step 8: According to the image propagation influence model, I(x)=S(x)t(x)+A(1-t(x)), the media propagation dissipation t(x) of all pixels is known, and Atmospheric light value A, then the accurate color data S(x) of all pixels in the image can be obtained, the expression is as follows:

SS (( xx )) == II (( xx )) -- AA (( 11 -- tt (( xx )) )) tt (( xx )) -- -- -- (( 1717 ))

为了衡量模型的准确性,分别采集不同工业环境下两组图像,并分别对两组图像进行颜色校正。将两组校正后数据分别与未受到干扰时的原图像数据相比,图像相同位置与无干扰图像RGB数值接近。表明校正过程有效,达到了很好地效果。对比两组受到不同干扰的图像,校正后图像相同位置RGB颜色数值相近。表示在不同干扰情况下,校正模型都可以将图像校正至较准确水平,鲁棒性、可靠性较好。In order to measure the accuracy of the model, two sets of images in different industrial environments were collected, and color correction was performed on the two sets of images respectively. Comparing the two sets of corrected data with the original image data without interference, the RGB value of the same position of the image is close to that of the interference-free image. It shows that the calibration process is effective and achieves good results. Comparing the two groups of images with different disturbances, the RGB color values at the same position of the corrected images are similar. It means that under different interference conditions, the correction model can correct the image to a more accurate level, and the robustness and reliability are better.

对比以往的数据分析法推测颜色变化趋势的建模过程,本发明从光线传播方式和工厂现场环境干扰角度,用机理建模法模拟工业现场环境因素对泡沫颜色的影响过程,建立颜色校正方程。该方程可以求解每像素收到环境影响所发生的颜色改变,校正精度较高。同时,该装置选用光谱设备采集图像信息,利用光谱设备对环境的无依赖性,将光线传播机理与光谱分析法融合,更准确的求解颜色变化模型的各项参数,摆脱了以往对大量颜色数据的要求,提升了颜色校正精度和校正效果。Compared with the previous data analysis method to infer the modeling process of the color change trend, the present invention simulates the influence process of the industrial site environmental factors on the foam color by using the mechanism modeling method from the perspective of light propagation mode and factory site environmental interference, and establishes a color correction equation. This equation can solve the color change that occurs when each pixel is affected by the environment, and the correction accuracy is high. At the same time, the device selects spectral equipment to collect image information, utilizes the non-dependence of spectral equipment on the environment, integrates the light propagation mechanism and spectral analysis method, and more accurately solves the parameters of the color change model, getting rid of the need for a large amount of color data in the past. requirements, improving the color correction accuracy and correction effect.

Claims (6)

1.一种基于光谱信息融合的泡沫图像颜色校正方法,其特征在于,包含步骤如下:1. a foam image color correction method based on spectral information fusion, is characterized in that, comprises steps as follows: 步骤一:光源光线固定且无雾气干扰条件下,采集色卡不同色块光谱数据和相机颜色数据,建立基于该相机特性的光谱-相机颜色空间转换模型;Step 1: Under the condition of fixed light source and no fog interference, collect the spectral data of different color blocks of the color card and camera color data, and establish a spectrum-camera color space conversion model based on the characteristics of the camera; 步骤二:工业现场,相机采集浮选槽内泡沫原始图像数据I(x),上传至上位机待处理;Step 2: In the industrial site, the camera collects the original image data I(x) of the foam in the flotation tank and uploads it to the host computer for processing; 步骤三:利用可见光光谱系统,采集浮选槽内泡沫散点的光谱反射信息,根据步骤一中颜色空间转换模型,将泡沫的光谱颜色信息转换相机RGB颜色空间数值表征;Step 3: Use the visible light spectrum system to collect the spectral reflection information of the scattered points of the foam in the flotation cell, and convert the spectral color information of the foam into the RGB color space numerical representation of the camera according to the color space conversion model in step 1; 步骤四:根据大气散射原理和环境光模型,建立泡沫颜色变化模型;Step 4: Establish a foam color change model based on the atmospheric scattering principle and the ambient light model; 步骤五:取原始图像I(x)每个像素点三通道的最小值,组成最小颜色值图像,对该图像矩阵的每个像素点进行最小滤波运算处理,得到其暗通道图像,计算介质传播耗散函数;Step 5: Take the minimum value of the three channels of each pixel of the original image I(x) to form a minimum color value image, perform minimum filtering operations on each pixel of the image matrix, obtain its dark channel image, and calculate the medium propagation Dissipation function; 步骤六:利用步骤三中采集并转换到RGB空间的泡沫散点光谱颜色值,校正介质传播耗散函数,求解图像每像素点的准确颜色耗散量;Step 6: Use the foam scatter point spectral color values collected in step 3 and converted to RGB space to correct the medium propagation dissipation function and solve the accurate color dissipation per pixel of the image; 步骤七:将准确颜色耗散量与原始泡沫图像数据代入颜色变化模型中,确定校正后的准确图像颜色数据。Step 7: Substituting the accurate color dissipation amount and the original foam image data into the color change model to determine the corrected accurate image color data. 2.根据权利要求1所述的图像颜色校正方法,其特征在于,步骤一中颜色空间转换模型的建立,过程包括:2. The image color correction method according to claim 1, characterized in that, the establishment of the color space conversion model in step 1 includes: 步骤11:D65光源下,以标准色卡各色块中心为中点,以5*10pix为窗口大小,工业相机采集图像RGB数据,平均后作为该色块颜色数据值rgbn,n=1..140,同时采集不同色块光谱反射率kn,其中n=1,2...140;Step 11: Under the D65 light source, take the center of each color block of the standard color card as the midpoint, and take 5*10pix as the window size, the industrial camera collects the RGB data of the image, and takes the average as the color data value rgb n of the color block, n=1.. 140, collect the spectral reflectance k n of different color blocks at the same time, where n=1,2...140; 步骤12:以CIE1931规定为标准,利用不同色块反射率数据,计算求得各色块的色度坐标(xn,yn,zn),以色度坐标所在锥体颜色空间内位置,来表征泡沫的颜色分布情况;Step 12: Using CIE1931 as the standard, use the reflectance data of different color blocks to calculate the chromaticity coordinates (x n , y n , z n ) of each color block, and use the position in the cone color space where the chromaticity coordinates are located to obtain Characterize the color distribution of the foam; 步骤13:以色度坐标x,y,z为最小单位,建立不同色块的十项多项式模型,表达式如下:Step 13: With the chromaticity coordinates x, y, z as the smallest unit, establish a decaterm polynomial model of different color blocks, the expression is as follows: xyzxyz == 11 ++ xx 11 ++ ythe y 11 ++ zz 11 ++ xx 11 ythe y 11 ++ xx 11 zz 11 ++ ythe y 11 zz 11 ++ xx 11 22 ++ ythe y 11 22 ++ zz 11 22 11 ++ xx 22 ++ ythe y 22 ++ zz 22 ++ xx 22 ythe y 22 ++ xx 22 zz 22 ++ ythe y 22 zz 22 ++ xx 22 22 ++ ythe y 22 22 ++ zz 22 22 .. .. 11 ++ xx nno ++ ythe y nno ++ zz nno ++ xx nno ythe y nno ++ xx nno zz nno ++ ythe y nno zz nno ++ xx nno 22 ++ ythe y nno 22 ++ zz nno 22 -- -- -- (( 11 )) 以多项式的各项为自变量,以相机RGB颜色数据分别为因变量,表达式如下:Taking the items of the polynomial as independent variables and taking the RGB color data of the camera as dependent variables, the expressions are as follows: rr == rr 11 .. .. rr nno ,, gg == gg 11 .. .. gg nno ,, bb == bb 11 .. .. bb nno -- -- -- (( 22 )) 分别建立三个通道的多元线性回归模型,表达式如下:The multiple linear regression models of the three channels are respectively established, and the expressions are as follows: PP xyzxyz 22 rgbrgb :: rr == xyzxyz ** ee 11 gg == xyzxyz ** ee 22 ,, EE. == {{ ee 11 ,, ee 22 ,, ee 33 }} ,, bb == xyzxyz ** ee 33 -- -- -- (( 33 )) E为多元回归方程的各项系数,该模型实现了色度坐标空间到相机颜色空间的转换,任意光谱颜色信息都可以由相机颜色RGB空间表征,即rgb=xyz*E。E is the coefficient of the multiple regression equation. This model realizes the transformation from the chromaticity coordinate space to the camera color space. Any spectral color information can be represented by the camera color RGB space, that is, rgb=xyz*E. 3.根据权利要求1所述的图像颜色校正方法,其特征在于,步骤四中建立泡沫颜色变化模型,过程包括:3. The image color correction method according to claim 1, wherein the foam color variation model is set up in step 4, and the process includes: 步骤41:根据光线传播和颜色形成原理分析,环境对颜色的影响分为反射衰减损耗和环境光模型两部分,结合颜色产生原理和大气散射模型,建立介质传播图像改变模型,表达式如下:Step 41: According to the analysis of the principle of light propagation and color formation, the influence of the environment on the color is divided into two parts: reflection attenuation loss and ambient light model. Combining the principle of color generation and the atmospheric scattering model, a medium propagation image change model is established. The expression is as follows: I(x)=S(x)e-βd(x)+A(1-e-βd(x))                       (4)I(x)=S(x)e -βd(x) +A(1-e -βd(x) ) (4) S(x)为未受到干扰时的图像颜色,即校正后的准确图像颜色,x代表图中每个像素点,A为现场环境大气光值,依照大气反射模型,S(x)应为大气光和场景反照率ρ的乘积,场景反照率ρ只取决于物体对光线的物理反射性,e-βd(x)为介质传播耗散函数;S(x) is the image color when it is not disturbed, that is, the correct image color after correction, x represents each pixel in the picture, A is the atmospheric light value of the scene environment, according to the atmospheric reflection model, S(x) should be the atmospheric The product of light and scene albedo ρ, the scene albedo ρ only depends on the physical reflectivity of the object to light, e -βd(x) is the medium propagation dissipation function; 步骤42:定义t(x)=e-βd(x)为介质传播耗散函数,则颜色变化模型简化为表达式:Step 42: Define t(x)=e -βd(x) as the medium propagation dissipation function, then the color change model is simplified to an expression: I(x)=S(x)t(x)+A(1-t(x))。                       (5)I(x)=S(x)t(x)+A(1-t(x)). (5) 4.根据权利要求1所述的图像颜色校正方法,其特征在于,步骤六中校正介质传播耗散函数的过程包括:4. The image color correction method according to claim 1, wherein the process of correcting the medium propagation dissipation function in step 6 comprises: 步骤61:根据暗原色先验,求解原始图像的每点介质传播耗散量t1(x),表达式如下:Step 61: According to the dark channel prior, solve the media propagation dissipation t 1 (x) of each point of the original image, the expression is as follows: tt 11 (( xx )) == AA -- JJ darkdark AA -- -- -- (( 66 )) Jdark为步骤五中得到的原始图像的暗通道图像;J dark is the dark channel image of the original image obtained in step five; 步骤62:步骤三中测得的多组泡沫光谱RGB颜色数据(rn,gn,bn),作为此情况下的准确泡沫物理颜色属性,重复步骤五,即能求各组泡沫散点处的准确耗散量,表达式如下:Step 62: Multiple groups of foam spectral RGB color data (r n , g n , b n ) measured in step 3 are used as the accurate foam physical color attributes in this case, and step 5 is repeated to obtain the scattered points of each group of foam The exact dissipation at , the expression is as follows: tt 22 (( nno )) == JJ darkdark -- AA minmin (( minmin (( rr nno ,, gg nno ,, bb nno )) )) -- AA -- -- -- (( 77 )) 步骤63:根据介质传播函数t(x)=e-βd(x),将计算得到图像所有像素点的耗散量t(x)按升序排列,绘制一条指数曲线s1;根据此曲线,拟合求得该指数函数各项系数,表达式如下:Step 63: According to the medium propagation function t(x)=e -βd(x) , arrange the calculated dissipation t(x) of all pixels in the image in ascending order, and draw an exponential curve s1; according to this curve, fitting The coefficients of the exponential function are obtained, and the expressions are as follows: sthe s 11 == ee αα 11 xx ++ ββ 11 -- -- -- (( 88 )) 步骤64:将步骤62中求得的各组准确耗散量t2(n),同样按照升序排列,并拟合出准确耗散函数,表达式如下:Step 64: Arrange each group of accurate dissipation quantities t 2 (n) obtained in step 62 in ascending order, and fit the exact dissipation function, the expression is as follows: sthe s 22 == ee αα 22 xx ++ ββ 22 -- -- -- (( 99 )) 步骤65:比较两组耗散函数,将曲线s1进行扭转、移动、放大或缩小,使其无限贴近耗散曲线s2,即将函数s1进行整体变形,将转化为函数s2的形式,校正全部s1中的耗散量,具体过程如下:Step 65: Compare the two sets of dissipation functions, twist, move, enlarge or reduce the curve s1 to make it infinitely close to the dissipation curve s2, that is, transform the function s1 into the form of the function s2, and correct all s1 The specific process is as follows: s1、s2两边同时取对数,表达式如下:Take the logarithm on both sides of s1 and s2 at the same time, the expression is as follows: loglog sthe s 11 == αα 11 xx ++ loglog ββ 11 (( 1010 )) loglog sthe s 22 == αα 22 xx ++ loglog ββ 22 (( 1111 )) 将公式10、11变形,得到表达式如下:Transform the formulas 10 and 11 to get the following expressions: αα 22 ** (( loglog sthe s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 == αα 22 xx ++ loglog ββ 22 -- -- -- (( 1212 )) 使之与散点的介质传播耗散函数形式一致,则变形后公式右侧数值为校正后的全部准确耗散量的对数,对其取指数,则新的全部耗散量qt(x),表达式如下:Make it consistent with the form of the medium propagation dissipation function of the scattered point, then the value on the right side of the deformed formula is the logarithm of the corrected all accurate dissipation, and take the exponent, then the new total dissipation qt(x) , the expression is as follows: qtqt (( xx )) == ee αα 22 ** (( loglog sthe s 11 -- loglog ββ 11 )) αα 11 ++ loglog ββ 22 -- -- -- (( 1313 )) 步骤66:根据步骤62中的排序顺序,将qt(x)中不同像素点耗散量值恢复原始顺序,得到泡沫图像的所有像素点的准确耗散量矩阵t(x)。Step 66: According to the sorting order in step 62, restore the dissipation value of different pixels in qt(x) to the original order, and obtain the accurate dissipation matrix t(x) of all pixels in the foam image. 5.根据权利要求1所述的图像颜色校正方法,其特征在于,步骤七中确定校正后的准确图像颜色数据过程为:根据颜色变化模型,I(x)=S(x)t(x)+A(1-t(x)),已知大气光A与耗散量t(x),得图像的准确颜色数据,S(x)表达式如下:5. The image color correction method according to claim 1, wherein the process of determining the corrected image color data in step 7 is: according to the color change model, I(x)=S(x)t(x) +A(1-t(x)), given the atmospheric light A and dissipation t(x), the accurate color data of the image can be obtained, and the expression of S(x) is as follows: SS (( xx )) == II (( xx )) -- AA (( 11 -- tt (( xx )) )) tt (( xx )) -- -- -- (( 1414 )) 6.一种基于光谱信息融合的泡沫图像颜色校正装置,其特征在于,包括以下模块:6. A foam image color correction device based on spectral information fusion, characterized in that it comprises the following modules: 图像相机颜色采集模块,用于采集泡沫图像的相机RGB颜色,模块利用工业相机采集整幅图像的RGB颜色信息,并将颜色数据传至上位机待处理;The image camera color acquisition module is used to collect the camera RGB color of the foam image. The module uses the industrial camera to collect the RGB color information of the entire image, and transmits the color data to the host computer for processing; 光谱信息采集模块,用于采集图像区域范围内不同位置的散点光谱反射率信息,光谱采集模块将待测图像分割为不同区域,利用可见光微型光谱仪,采集每个区域内的散点光谱反射率信息;The spectral information collection module is used to collect the scattered point spectral reflectance information at different positions within the image area. The spectral collection module divides the image to be measured into different regions, and uses the visible light micro-spectrometer to collect the scattered point spectral reflectance in each region. information; 数据处理模块,用于处理图像的相机RGB信息与光谱信息,利用建立好的模型对相机采集的原始图像数据进行校正,输出校正后的颜色数据。The data processing module is used to process the camera RGB information and spectral information of the image, use the established model to correct the original image data collected by the camera, and output the corrected color data.
CN201510230558.3A 2015-05-08 2015-05-08 A kind of froth images color calibration method and device based on Spectrum Data Fusion Active CN104835124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510230558.3A CN104835124B (en) 2015-05-08 2015-05-08 A kind of froth images color calibration method and device based on Spectrum Data Fusion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510230558.3A CN104835124B (en) 2015-05-08 2015-05-08 A kind of froth images color calibration method and device based on Spectrum Data Fusion

Publications (2)

Publication Number Publication Date
CN104835124A true CN104835124A (en) 2015-08-12
CN104835124B CN104835124B (en) 2018-01-05

Family

ID=53812994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510230558.3A Active CN104835124B (en) 2015-05-08 2015-05-08 A kind of froth images color calibration method and device based on Spectrum Data Fusion

Country Status (1)

Country Link
CN (1) CN104835124B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106739484A (en) * 2016-11-24 2017-05-31 杭州电子科技大学 A kind of method for predicting printed matter drying process color change
CN107131955A (en) * 2016-02-26 2017-09-05 富泰华工业(深圳)有限公司 Optical measuring device and measuring method
CN109671124A (en) * 2018-12-27 2019-04-23 湖南师范大学 A kind of mineral flotation foam image color calibration method and foam color detection system
CN109886351A (en) * 2019-03-04 2019-06-14 北京麦飞科技有限公司 High-spectral data and high-definition picture fusion method
CN110070586A (en) * 2019-02-27 2019-07-30 北京字节跳动网络技术有限公司 Generation method, device and the electronic equipment of colour atla
CN110634165A (en) * 2019-03-25 2019-12-31 清华大学深圳研究生院 Light field image de-scattering method based on RGB three-channel information fusion
CN113790818A (en) * 2021-08-10 2021-12-14 中国电子科技集团公司第十三研究所 Visible light heat reflection temperature measurement method and temperature measurement equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2023336977A1 (en) * 2022-09-08 2025-03-20 Blue Cube Technology (Pty) Ltd Accurate measurement of spectral reflectivity of flotation froth bubbles

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010375A1 (en) * 2002-07-09 2004-01-15 Medispectra, Inc. Methods and apparatus for processing spectral data for use in tissue characterization
US7164428B2 (en) * 2002-03-25 2007-01-16 Seiko Epson Corporation Image display system, projector, image processing method, program and information storage medium
CN102831590A (en) * 2012-08-30 2012-12-19 李勃 Defogging strengthening method for transmissivity/dark channel prior based on spectral characteristic
CN204044085U (en) * 2014-05-27 2014-12-24 中国工程物理研究院流体物理研究所 A kind of foreign matter detection system based on light spectrum image-forming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7164428B2 (en) * 2002-03-25 2007-01-16 Seiko Epson Corporation Image display system, projector, image processing method, program and information storage medium
US20040010375A1 (en) * 2002-07-09 2004-01-15 Medispectra, Inc. Methods and apparatus for processing spectral data for use in tissue characterization
CN102831590A (en) * 2012-08-30 2012-12-19 李勃 Defogging strengthening method for transmissivity/dark channel prior based on spectral characteristic
CN204044085U (en) * 2014-05-27 2014-12-24 中国工程物理研究院流体物理研究所 A kind of foreign matter detection system based on light spectrum image-forming

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107131955A (en) * 2016-02-26 2017-09-05 富泰华工业(深圳)有限公司 Optical measuring device and measuring method
CN106739484A (en) * 2016-11-24 2017-05-31 杭州电子科技大学 A kind of method for predicting printed matter drying process color change
CN106739484B (en) * 2016-11-24 2019-05-14 杭州电子科技大学 A method of prediction printed matter drying process color change
CN109671124A (en) * 2018-12-27 2019-04-23 湖南师范大学 A kind of mineral flotation foam image color calibration method and foam color detection system
CN109671124B (en) * 2018-12-27 2023-03-24 湖南师范大学 Mineral flotation froth image color correction method and froth color detection system
CN110070586A (en) * 2019-02-27 2019-07-30 北京字节跳动网络技术有限公司 Generation method, device and the electronic equipment of colour atla
CN109886351A (en) * 2019-03-04 2019-06-14 北京麦飞科技有限公司 High-spectral data and high-definition picture fusion method
CN110634165A (en) * 2019-03-25 2019-12-31 清华大学深圳研究生院 Light field image de-scattering method based on RGB three-channel information fusion
CN110634165B (en) * 2019-03-25 2021-10-29 清华大学深圳研究生院 Light field image de-scattering method based on RGB three-channel information fusion
CN113790818A (en) * 2021-08-10 2021-12-14 中国电子科技集团公司第十三研究所 Visible light heat reflection temperature measurement method and temperature measurement equipment
CN113790818B (en) * 2021-08-10 2023-09-26 中国电子科技集团公司第十三研究所 Visible light heat reflection temperature measurement method and temperature measurement equipment

Also Published As

Publication number Publication date
CN104835124B (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN104835124B (en) A kind of froth images color calibration method and device based on Spectrum Data Fusion
CN102589705B (en) Single-blackbody temperature-controlled MRTD (Minimum Resolvable Temperature Difference) field online automatic detection device and method for thermal imager
CN111968080B (en) A detection method for internal and external quality of Feicheng peach based on hyperspectral and deep learning
CN103528617B (en) A cockpit instrument automatic identification and detection method and device
CN107423212B (en) Method and device for evaluating response delay of screen of virtual reality equipment
CN103245296A (en) Screw thread parameter measurement method based on image measurement and processing
CN109766909B (en) Analysis method for aging behavior of shore environment microplastic based on spectrogram fusion
CN102855485B (en) The automatic testing method of one grow wheat heading
CN111896549A (en) A system and method for monitoring building cracks based on machine learning
CN104483243B (en) Adhered-rice detection and segmentation method, device and system
CN105509659A (en) Image-processing-based flatness detection system
CN105427306B (en) The image analysis method and device of skin shine
CN106934770B (en) A kind of method and apparatus for evaluating haze image defog effect
CN114111576B (en) Aircraft skin gap surface difference detection method
CN112230236A (en) Spectrum confocal displacement sensor distance measurement calculation method, system, device and storage medium
CN100470578C (en) Monitoring Method of Working Condition of Scientific Instruments Based on Computer Vision
CN104408473A (en) Distance metric learning-based cotton grading method and device
CN106483130A (en) A kind of detection method of rice disease and its automatic detection device
CN109902326A (en) A kind of finite element simulation experiment effect assessment method
CN108007358A (en) Method based on computer vision technique measure rice size
CN119049030A (en) High-precision scale mark recognition method and system based on machine vision
CN102507462B (en) Hyperspectral-analysis-based copper quality detection method and system
CN104751480B (en) The field bit formula liquid crystal display detection method of rice 8 and device of view-based access control model technology
CN108519157B (en) A method and system for generating and evaluating metamerism spectrum for light source detection
CN116593026A (en) A distributed optical fiber sensing system and sensing method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220621

Address after: 410131 No. 502, floor 5, building C1, DreamWorks industrial supporting Park, No. 1 Lantian North Road, Xingsha industrial base, Changsha Economic and Technological Development Zone, Changsha City, Hunan Province

Patentee after: Hunan baihuite Technology Co.,Ltd.

Address before: 410000 Zuojialuo Mountain, Yuelu District, Changsha City, Hunan Province

Patentee before: CENTRAL SOUTH University