[go: up one dir, main page]

CN116363658A - Digital display signal recognition method, system, device and medium based on deep learning - Google Patents

Digital display signal recognition method, system, device and medium based on deep learning Download PDF

Info

Publication number
CN116363658A
CN116363658A CN202310338362.0A CN202310338362A CN116363658A CN 116363658 A CN116363658 A CN 116363658A CN 202310338362 A CN202310338362 A CN 202310338362A CN 116363658 A CN116363658 A CN 116363658A
Authority
CN
China
Prior art keywords
image
digital display
pixel
value
display signal
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.)
Pending
Application number
CN202310338362.0A
Other languages
Chinese (zh)
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.)
China University of Mining and Technology CUMT
Original Assignee
China University of Mining and Technology CUMT
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 China University of Mining and Technology CUMT filed Critical China University of Mining and Technology CUMT
Priority to CN202310338362.0A priority Critical patent/CN116363658A/en
Publication of CN116363658A publication Critical patent/CN116363658A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/16Image preprocessing
    • G06V30/164Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/18105Extraction of features or characteristics of the image related to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19147Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/1916Validation; Performance evaluation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A10/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE at coastal zones; at river basins
    • Y02A10/40Controlling or monitoring, e.g. of flood or hurricane; Forecasting, e.g. risk assessment or mapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及基于深度学习的数显信号识别方法、系统、设备和介质,所述方法包括如下步骤:获取含有多路非色散红外甲烷传感器数显信号的图像;采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;将所述数值区域图像输入预测模型进行匹配得到数值,实现对多个非色散红外甲烷传感器数显信号的精确识别,在无人工参与的情况下,保证了对于传感器示值变化的把控,并实现全程监控。适应性强,稳定性高。

Figure 202310338362

The disclosure relates to a deep learning-based digital display signal recognition method, system, device, and medium. The method includes the following steps: acquiring an image containing a multi-channel non-dispersive infrared methane sensor digital display signal; implementing the image by using a flood filling method Segment and mark the marked area containing the digital display signal; establish the color distribution range of the digital display signal in the marked area based on the H channel of the HSV model, and obtain the numerical area image; input the numerical area image into the prediction model for matching The value is obtained to realize the accurate identification of the digital display signals of multiple non-dispersive infrared methane sensors. Without human participation, it ensures the control of the changes in the sensor's indication value and realizes the whole process of monitoring. Strong adaptability and high stability.

Figure 202310338362

Description

基于深度学习的数显信号识别方法、系统、设备和介质Digital display signal recognition method, system, device and medium based on deep learning

技术领域technical field

本公开涉及图像信号识别领域,具体涉及基于深度学习的数显信号识别方法、系统、设备和介质。The present disclosure relates to the field of image signal recognition, in particular to a deep learning-based digital display signal recognition method, system, device and medium.

背景技术Background technique

在煤矿环境中,瓦斯爆炸一直是矿井下工作人员生命安全的最大威胁。瓦斯爆炸的很大部分原因是矿井下瓦斯浓度过高所引发的灾难,因此,对于避免瓦斯爆炸事故的发生,控制瓦斯浓度是其中一项有效的措施。为精准探测井下甲烷浓度,用于检测甲烷气体浓度的传感器不但要有足够高的精度,而且要通过仪器设备的检定及校准来确保其测量结果的可靠性,仪器设备检定、校准是保证测量结果准确的主要手段,因此对这些传感器进行检定成为了一项基础且必不可少的工作。In coal mine environment, gas explosion has always been the biggest threat to the life safety of underground workers. Most of the causes of gas explosions are disasters caused by high gas concentration in underground mines. Therefore, controlling gas concentration is one of the effective measures to avoid gas explosion accidents. In order to accurately detect the methane concentration in the well, the sensor used to detect the methane gas concentration must not only have a high enough accuracy, but also ensure the reliability of the measurement results through the verification and calibration of the instrument and equipment. The verification and calibration of the instrument and equipment are to ensure the measurement results Accurate primary means, so the verification of these sensors has become a basic and essential work.

传统的甲烷传感器数值信号图像识别中,只能对单一甲烷传感器数值信号进行识别,无法对于数量和位置未知的甲烷传感器数值信号进行有效区分。传统的甲烷传感器数值提取中,是基于RGB颜色空间,通过阈值对图像进行二值化处理,存在噪声大,鲁棒性低,识别不精确,易受干扰等问题。传统的甲烷传感器数值匹配中,先对数码管进行灰度化和二值化,将数字变为255,背景变为0,然后利用穿线法,对abcdefg七个区域依次穿线,判断是否有255的值,有则表示该区域高亮,最后结合七个区域的高亮信息,综合判断数值,而对于一些整体亮度低的数码管灰度化后,会丢失数字信息。In traditional methane sensor numerical signal image recognition, only a single methane sensor numerical signal can be identified, and it is impossible to effectively distinguish the methane sensor numerical signal whose quantity and location are unknown. In the traditional value extraction of methane sensor, it is based on RGB color space, and the image is binarized through the threshold value, which has problems such as large noise, low robustness, inaccurate recognition, and susceptibility to interference. In the traditional value matching of methane sensor, first grayscale and binarize the digital tube, change the number to 255, and change the background to 0, and then use the threading method to thread the seven areas of abcdefg in turn to determine whether there is a value of 255 Value, if there is, it means that the area is highlighted, and finally combined with the highlight information of the seven areas, the value is judged comprehensively, and for some digital tubes with low overall brightness, the digital information will be lost after graying.

目前数显仪表的显示方式主要有数码管和液晶两种。常用的甲烷传感器多为非色散红外甲烷传感器,主要采用数码管显示。甲烷传感器自动检定系统采集传感器数值图像时,由于传感器本身材质存在光反射,且显示面板上有附着物,同时采集到的数值图像质量较差,对字符识别造成困难,降低了识别准确率。采用基于深度学习的图像识别算法,可以很好地解决传统图像处理方法对图像噪声敏感且鲁棒性差的问题。At present, there are mainly two display methods of digital display instruments: digital tube and liquid crystal. The commonly used methane sensors are mostly non-dispersive infrared methane sensors, which mainly use digital tube display. When the methane sensor automatic verification system collects sensor numerical images, due to the light reflection of the sensor itself and the attachment on the display panel, the quality of the collected numerical images is poor, which makes character recognition difficult and reduces the recognition accuracy. The image recognition algorithm based on deep learning can well solve the problem that traditional image processing methods are sensitive to image noise and have poor robustness.

发明内容Contents of the invention

在此本公开提供基于深度学习的数显信号识别方法、系统、设备和介质,能够解决背景技术中提到的最少一个问题。为解决上述技术问题,本公开提供如下技术方案:Herein, the present disclosure provides a digital display signal recognition method, system, device and medium based on deep learning, which can solve at least one of the problems mentioned in the background technology. In order to solve the above technical problems, the present disclosure provides the following technical solutions:

S1.获取含有多路非色散红外甲烷传感器数显信号的图像;S1. Obtain an image containing digital display signals of multiple non-dispersive infrared methane sensors;

S2.采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;S2. Using the flood filling method to realize the segmentation of the image and mark the marked area containing the digital display signal;

采用漫水填充法实现所述图像的分割还包括如下步骤:Adopting flood filling method to realize the segmentation of the image also includes the following steps:

对所述图像进行二值化处理得到灰度图像,对所述图像进行高斯滤波得到模糊图像;performing binary processing on the image to obtain a grayscale image, and performing Gaussian filtering on the image to obtain a blurred image;

获取所述灰度图像相邻像素点的变化,和所述模糊图像相邻像素点的变化;Acquiring the change of adjacent pixels of the grayscale image and the change of adjacent pixels of the blurred image;

根据所述灰度图像相邻像素点的变化和所述模糊图像相邻像素点的变化,将灰度图像和模糊图像的像素值进行归一化处理,若模糊图像中高频分量相比较于灰度图像的高频分量几乎无变化,将其判定为完全模糊图像,不予处理,如果高频分量变化较为明显,则将其判定为部分模糊图像,如果高频分量变化非常大,则将其判定为清晰图像。比较分析后进行归一化处理;得到部分模糊图像、清晰图像和完全模糊图像;According to the changes of the adjacent pixels of the grayscale image and the changes of the adjacent pixels of the blurred image, the pixel values of the grayscale image and the blurred image are normalized. If the high-frequency component of the high-frequency image has almost no change, it will be judged as a completely blurred image and will not be processed. If the high-frequency component changes significantly, it will be judged as a partially blurred image. If the high-frequency component changes very much, it will be Judged as a clear image. After comparison and analysis, normalization processing is performed; partially blurred images, clear images and completely blurred images are obtained;

对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否为清晰图像,若是则进行下一个环节的分割处理,对于完全模糊图像,不予处理。For clear images, the segmentation process of the next step will be directly carried out. For some blurred images, it will be re-judged whether the image is a clear image after deblurring processing. If so, the next step of segmentation processing will be performed. For completely blurred images, no processing .

去模糊化处理包括:对部分模糊图像进行像素灰度统计,得到其灰度图像的像素概率分布;得到图像累积分布函数,获取变换后的去模糊化的图像;对于部分模糊图像先进行像素灰度统计,计算原始图像的像素概率分布,由像素概率分布得到图像的累计分布函数,根据映射函数得到变换后的去模糊化图像,所述映射函数如下:The deblurring process includes: performing pixel grayscale statistics on part of the blurred image to obtain the pixel probability distribution of the grayscale image; obtaining the cumulative distribution function of the image to obtain the transformed deblurred image; degree statistics, calculate the pixel probability distribution of the original image, obtain the cumulative distribution function of the image from the pixel probability distribution, and obtain the transformed defuzzified image according to the mapping function, and the mapping function is as follows:

Figure SMS_1
k= 0,1,2,3,···L-1
Figure SMS_1
k= 0,1,2,3,···L-1

其中,n是图像中像素的总和,

Figure SMS_2
是当前灰度级的像素个数,L是图像中可能的灰度级总数。where n is the sum of pixels in the image,
Figure SMS_2
is the number of pixels in the current gray level, and L is the total number of possible gray levels in the image.

所述下一个环节的分割处理包括:The segmentation processing of the next link includes:

利用掩码矩阵标记漫水填充区域;Use the mask matrix to mark the flood filled area;

将尺寸比输入图像宽和高各大2个像素点的单通道图像,作为掩码矩阵,通过对掩码矩阵中像素点的像素值填充,来标记漫水填充区域(漫水填充区域为多路甲烷传感器数显信号在图像上的显示区域)Use a single-channel image whose size is 2 pixels wider and higher than the input image as a mask matrix, and mark the flood-filled area by filling the pixel values of the pixels in the mask matrix (the flood-filled area is more The display area of the digital display signal of the methane sensor on the image)

获取种子点区域条件的上下界值,其中,上下界值包括:上界值和下界值;Obtain the upper and lower bound values of the seed point area conditions, where the upper and lower bound values include: upper bound value and lower bound value;

确定种子点的坐标值;Determine the coordinate value of the seed point;

以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;With the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point is greater than the lower limit value, the pixel is added to the area where the seed point is located; When the difference of the pixel value of the point is less than the upper limit value, the pixel point is added to the area where the seed point is located;

若全部像素点未添加完成,标记位置;将新加入的像素点作为新的种子点,返回上一步:以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;直至全部像素点添加完成;If all pixels have not been added, mark the position; use the newly added pixel as a new seed point, and return to the previous step: take the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point When it is greater than the lower bound value, the pixel point is added to the area where the seed point is located; when the difference between the pixel value of the seed point and the pixel value of a pixel in the neighborhood is less than the upper bound value, the pixel point is added to the area where the seed point is located area; until all pixels are added;

若全部像素点添加完成;各区域分离并标记输出;If all the pixels are added; each area is separated and marked for output;

S3. 基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;S3. Based on the H channel of the HSV model, the color distribution range of the digital display signal in the marked area is established, and an image of the numerical value area is obtained;

HSV中,V通道受光照影响最大,H通道基本不受阴影或过高亮度的影响。H 通道将作为本系统颜色提取中的主要依靠,再确立数值信号的颜色分布范围,生成mask掩码,最终对标记区域的数字进行精确提取。In HSV, the V channel is most affected by light, and the H channel is basically not affected by shadows or excessive brightness. The H channel will be used as the main support in the color extraction of this system, and then the color distribution range of the numerical signal will be established, a mask mask will be generated, and finally the numbers in the marked area will be accurately extracted.

S4. 将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。S4. Inputting the image of the numerical value area into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes non-dispersive infrared methane sensors under different environments, positions or illumination Digital signal image.

通过训练数据集对神经网络进行训练得到预测模型之前,还包括如下步骤:采集包括不同环境、位置、光照下的非色散红外甲烷传感器数显信号图像作为测试数据集;将所述测试数据集输入所述预测模型进行测试;在测试结果满足预设识别准确率的要求后停止训练所述预测模型。Before the neural network is trained by the training data set to obtain the prediction model, the following steps are also included: collecting the non-dispersive infrared methane sensor digital display signal image under different environments, positions, and illuminations as a test data set; inputting the test data set The prediction model is tested; the training of the prediction model is stopped after the test result meets the requirement of the preset recognition accuracy.

所述预测模型通过训练数据集对神经网络进行训练得到还包括如下步骤:The prediction model obtained by training the neural network through the training data set also includes the following steps:

采集不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像得到样本库;Collect digital display signal images of non-dispersive infrared methane sensors under different environments, locations or illumination to obtain sample libraries;

根据样本库构建神经网络的训练数据集和测试数据集;Construct the training data set and test data set of the neural network according to the sample library;

根据构建的训练数据集对神经网络进行训练得到数显信号的预测模型。According to the constructed training data set, the neural network is trained to obtain the prediction model of the digital display signal.

将所述数值区域图像输入预测模型进行匹配得到数值,还包括如下步骤:Inputting the numerical value area image into the prediction model for matching to obtain the numerical value also includes the following steps:

获取数值区域图像并进行尺寸缩放得到数值区域向量;Obtain the image of the numerical region and perform size scaling to obtain the numerical region vector;

将数值区域向量代入预测模型进行匹配得出数值;Substitute the value area vector into the prediction model for matching to obtain the value;

根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出。Sorting from left to right according to the pixel coordinates to get the numerical sequence concatenated as a string output.

采集不同环境,位置,光照下的甲烷传感器数显图,建立样本库,用于构建神经网络的训练数据集和测试数据集。根据构建的训练数据集,采用深层的神经网络,通过增加隐层数目来增加神经元连接权,阈值等参数,用于提高激活函数的神经元数目和嵌套层数。通过预训练和微调的方法对参数进行分组,对每组先找到局部较优设置,基于局部较优的结果联合起来进行全局寻优。使得在利用模型大量参数所提供自由度的同时有效节省了训练开销。通过对训练模型的不断迭代来计算损失,并更新模型参数。最终将待识别的甲烷传感器数显图输入模型中进行匹配,得到数显图像的具体数值。Collect digital display images of methane sensors in different environments, locations, and lighting conditions, and establish a sample library for training and testing data sets for neural networks. According to the constructed training data set, a deep neural network is used to increase the number of neuron connection weights, thresholds and other parameters by increasing the number of hidden layers to increase the number of neurons and the number of nested layers of the activation function. The parameters are grouped by pre-training and fine-tuning methods, and the local optimal settings are first found for each group, and the global optimization is jointly performed based on the locally optimal results. It effectively saves training overhead while utilizing the degree of freedom provided by a large number of parameters of the model. Calculate the loss and update the model parameters through continuous iteration of the trained model. Finally, input the digital display image of the methane sensor to be identified into the model for matching, and obtain the specific value of the digital display image.

通过对现场环境下数显图像的多次采集,构建测试数据集和训练数据集,构建数据集对网络经行训练,完成识别所需模型,将上述提取出来的数值区域,尺寸缩放为模型尺寸并代入模型中进行数值匹配并输出。完成对多路甲烷传感器数显信号的识别。Through multiple acquisitions of digital display images in the field environment, build a test data set and a training data set, build a data set to train the network, complete the model required for recognition, and scale the size of the extracted value area to the model size And substitute into the model for numerical matching and output. Complete the identification of digital display signals of multiple methane sensors.

作为本公开实施例的另一个方面,提供一种基于深度学习的数显信号识别系统,包括:As another aspect of the embodiments of the present disclosure, a digital display signal recognition system based on deep learning is provided, including:

图像获取模块,获取含有多路非色散红外甲烷传感器数显信号的图像;The image acquisition module acquires images containing digital display signals of multi-channel non-dispersive infrared methane sensors;

图像分割模块,采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;The image segmentation module implements the segmentation of the image and marks the marked area containing the digital display signal by using the flood filling method;

图像分割模块还包括图像预处理模块:对所述图像进行二值化处理得到灰度图像,对所述图像进行高斯滤波得到模糊图像;The image segmentation module also includes an image preprocessing module: performing binarization processing on the image to obtain a grayscale image, and performing Gaussian filtering on the image to obtain a blurred image;

获取所述灰度图像相邻像素点的变化,和所述模糊图像相邻像素点的变化;Acquiring the change of adjacent pixels of the grayscale image and the change of adjacent pixels of the blurred image;

根据所述灰度图像相邻像素点的变化和所述模糊图像相邻像素点的变化,将灰度图像和模糊图像的像素值进行归一化处理,若模糊图像中高频分量相比较于灰度图像的高频分量几乎无变化,将其判定为完全模糊图像,不予处理,如果高频分量变化较为明显,则将其判定为部分模糊图像,如果高频分量变化非常大,则将其判定为清晰图像。比较分析后进行归一化处理;得到部分模糊图像、清晰图像和完全模糊图像;According to the changes of the adjacent pixels of the grayscale image and the changes of the adjacent pixels of the blurred image, the pixel values of the grayscale image and the blurred image are normalized. If the high-frequency component of the high-frequency image has almost no change, it will be judged as a completely blurred image and will not be processed. If the high-frequency component changes significantly, it will be judged as a partially blurred image. If the high-frequency component changes very much, it will be Judged as a clear image. After comparison and analysis, normalization processing is performed; partially blurred images, clear images and completely blurred images are obtained;

对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否为清晰图像,若是则进行下一个环节的分割处理,对于完全模糊图像,不予处理。For clear images, the segmentation process of the next step will be directly carried out. For some blurred images, it will be re-judged whether the image is a clear image after deblurring processing. If so, the next step of segmentation processing will be performed. For completely blurred images, no processing .

图像分割模块还包括去模糊化处理模块:对部分模糊图像进行像素灰度统计,得到其灰度图像的像素概率分布;得到图像累积分布函数,获取变换后的去模糊化的图像;对于部分模糊图像先进行像素灰度统计,计算原始图像的像素概率分布,由像素概率分布得到图像的累计分布函数,根据映射函数得到变换后的去模糊化图像,所述映射函数如下:The image segmentation module also includes a deblurring processing module: perform pixel grayscale statistics on a part of the blurred image to obtain the pixel probability distribution of the grayscale image; obtain the cumulative distribution function of the image to obtain the transformed deblurred image; The image is first subjected to pixel grayscale statistics, the pixel probability distribution of the original image is calculated, the cumulative distribution function of the image is obtained from the pixel probability distribution, and the transformed deblurred image is obtained according to the mapping function. The mapping function is as follows:

Figure SMS_3
k= 0,1,2,3,···L-1
Figure SMS_3
k= 0,1,2,3,···L-1

其中,n是图像中像素的总和,

Figure SMS_4
是当前灰度级的像素个数,L是图像中可能的灰度级总数。where n is the sum of pixels in the image,
Figure SMS_4
is the number of pixels in the current gray level, and L is the total number of possible gray levels in the image.

图像分割模块还包括下一个环节的分割处理模块,用于:The image segmentation module also includes the segmentation processing module of the next link, which is used for:

利用掩码矩阵标记漫水填充区域;Use the mask matrix to mark the flood filled area;

将尺寸比输入图像宽和高各大2个像素点的单通道图像,作为掩码矩阵,通过对掩码矩阵中像素点的像素值填充,来标记漫水填充区域(漫水填充区域为多路甲烷传感器数显信号在图像上的显示区域)Use a single-channel image whose size is 2 pixels wider and higher than the input image as a mask matrix, and mark the flood-filled area by filling the pixel values of the pixels in the mask matrix (the flood-filled area is more The display area of the digital display signal of the methane sensor on the image)

获取种子点区域条件的上下界值,其中,上下界值包括:上界值和下界值;Obtain the upper and lower bound values of the seed point area conditions, where the upper and lower bound values include: upper bound value and lower bound value;

确定种子点的坐标值;Determine the coordinate value of the seed point;

以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;With the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point is greater than the lower limit value, the pixel is added to the area where the seed point is located; When the difference of the pixel value of the point is less than the upper limit value, the pixel point is added to the area where the seed point is located;

若全部像素点未添加完成,标记位置;将新加入的像素点作为新的种子点,返回上一步:以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;直至全部像素点添加完成;If all pixels have not been added, mark the position; use the newly added pixel as a new seed point, and return to the previous step: take the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point When it is greater than the lower bound value, the pixel point is added to the area where the seed point is located; when the difference between the pixel value of the seed point and the pixel value of a pixel in the neighborhood is less than the upper bound value, the pixel point is added to the area where the seed point is located area; until all pixels are added;

若全部像素点添加完成;各区域分离并标记输出;If all the pixels are added; each area is separated and marked for output;

提取模块,基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;The extraction module establishes the color distribution range of the digital display signal in the marked area based on the H channel of the HSV model, and obtains a numerical area image;

HSV中,V通道受光照影响最大,H通道基本不受阴影或过高亮度的影响。H 通道将作为本系统颜色提取中的主要依靠,再确立数值信号的颜色分布范围,生成mask掩码,最终对标记区域的数字进行精确提取。In HSV, the V channel is most affected by light, and the H channel is basically not affected by shadows or excessive brightness. The H channel will be used as the main support in the color extraction of this system, and then the color distribution range of the numerical signal will be established, a mask mask will be generated, and finally the numbers in the marked area will be accurately extracted.

对于待识别区域内数值的提取,基于HSV 模型,通过分析H分量的分布直方图,找出数值颜色的分布范围。基于H通道完成对区域数值的提取工作。For the extraction of the value in the area to be identified, based on the HSV model, the distribution range of the value color is found by analyzing the distribution histogram of the H component. The extraction of regional values is completed based on the H channel.

匹配模块,将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。A matching module, inputting the image of the value region into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes non-dispersive infrared methane under different environments, positions or illumination Sensor digital display signal image.

匹配模块还包括训练模块:采集包括不同环境、位置、光照下的非色散红外甲烷传感器数显信号图像作为测试数据集;将所述测试数据集输入所述预测模型进行测试;在测试结果满足预设识别准确率的要求后停止训练所述预测模型。The matching module also includes a training module: collection includes non-dispersive infrared methane sensor digital display signal images under different environments, positions and illuminations as a test data set; the test data set is input into the prediction model for testing; when the test results meet the predetermined Stop training the prediction model after setting the recognition accuracy requirement.

匹配模块还包括模型预测模块:The matching module also includes the model prediction module:

采集不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像得到样本库;Collect digital display signal images of non-dispersive infrared methane sensors under different environments, locations or illumination to obtain sample libraries;

根据样本库构建神经网络的训练数据集和测试数据集;Construct the training data set and test data set of the neural network according to the sample library;

根据构建的训练数据集对神经网络进行训练得到数显信号的预测模型。According to the constructed training data set, the neural network is trained to obtain the prediction model of the digital display signal.

匹配模块还包括结果输出模块:The matching module also includes the result output module:

获取数值区域图像并进行尺寸缩放得到数值区域向量;Obtain the image of the numerical region and perform size scaling to obtain the numerical region vector;

将数值区域向量代入预测模型进行匹配得出数值;Substitute the value area vector into the prediction model for matching to obtain the value;

根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出。Sorting from left to right according to the pixel coordinates to get the numerical sequence concatenated as a string output.

采集不同环境,位置,光照下的甲烷传感器数显图,建立样本库,用于构建神经网络的训练数据集和测试数据集。根据构建的训练数据集,采用深层的神经网络,通过增加隐层数目来增加神经元连接权,阈值等参数,用于提高激活函数的神经元数目和嵌套层数。通过预训练和微调的方法对参数进行分组,对每组先找到局部较优设置,基于局部较优的结果联合起来进行全局寻优。使得在利用模型大量参数所提供自由度的同时有效节省了训练开销。通过对训练模型的不断迭代来计算损失,并更新模型参数。最终将待识别的甲烷传感器数显图输入模型中进行匹配,得到数显图像的具体数值。Collect digital display images of methane sensors in different environments, locations, and lighting conditions, and establish a sample library for training and testing data sets for neural networks. According to the constructed training data set, a deep neural network is used to increase the number of neuron connection weights, thresholds and other parameters by increasing the number of hidden layers to increase the number of neurons and the number of nested layers of the activation function. The parameters are grouped by pre-training and fine-tuning methods, and the local optimal settings are first found for each group, and the global optimization is jointly performed based on the locally optimal results. It effectively saves training overhead while utilizing the degree of freedom provided by a large number of parameters of the model. Calculate the loss and update the model parameters through continuous iteration of the trained model. Finally, input the digital display image of the methane sensor to be identified into the model for matching, and obtain the specific value of the digital display image.

本公开提供一种对于多路甲烷传感器数显信号图像分割采集并精确识别的方法,目的在于灵活处理多个甲烷传感器数值信号的识别,实现监控甲烷传感器的数值变化任务。通过基于深度学习的多路甲烷传感器识别系统,去实现对多个非色散红外甲烷传感器数显信号的精确识别,在无人工参与的情况下,保证了对于传感器示值变化的把控,并实现全程监控。适应性强,稳定性高。The present disclosure provides a method for segmenting, collecting and accurately identifying images of digital display signals of multiple methane sensors. Through the multi-channel methane sensor recognition system based on deep learning, the accurate recognition of the digital display signals of multiple non-dispersive infrared methane sensors is realized, and the control of the change of the sensor indication value is guaranteed without human participation, and the realization Full monitoring. Strong adaptability and high stability.

附图说明Description of drawings

图1为本公开实施例1中的基于深度学习的数显信号识别方法的流程图;FIG. 1 is a flowchart of a deep learning-based digital display signal recognition method in Embodiment 1 of the present disclosure;

图2为本公开实施例1中的图像分割步骤流程图;FIG. 2 is a flow chart of image segmentation steps in Embodiment 1 of the present disclosure;

图3为本公开实施例2中基于深度学习的数显信号识别系统图。Fig. 3 is a diagram of a digital display signal recognition system based on deep learning in Embodiment 2 of the present disclosure.

图4为本公开实施例2中基于深度学习的数显信号识别系统框图。Fig. 4 is a block diagram of a digital display signal recognition system based on deep learning in Embodiment 2 of the present disclosure.

实施方式Implementation

以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.

另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present disclosure may be practiced without some of the specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as to obscure the gist of the present disclosure.

可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。It can be understood that the above-mentioned method embodiments mentioned in this disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic. Due to space limitations, this disclosure will not repeat them.

此外,本公开还提供了一种基于深度学习的数显信号识别方法系统、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种基于深度学习的数显信号识别方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides a deep learning-based digital display signal recognition method system, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any deep learning-based digital display signal provided by the present disclosure. The identification method, corresponding technical solutions and descriptions refer to the corresponding records in the method section, and will not be repeated here.

一种基于深度学习的数显信号识别方法的执行主体可以是计算机或者其他能够实现所述方法的装置,例如,方法可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。A digital display signal recognition method based on deep learning may be executed by a computer or other device capable of implementing the method. For example, the method may be executed by a terminal device or a server or other processing device, wherein the terminal device may be a user device (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. In some possible implementation manners, the method may be implemented by a processor invoking computer-readable instructions stored in a memory.

实施例Example

作为本公开实施例的一个方面,提供一种基于深度学习的数显信号识别方法,如图1所示,包括如下步骤:As an aspect of the embodiments of the present disclosure, a deep learning-based digital display signal recognition method is provided, as shown in FIG. 1 , including the following steps:

S1.获取含有多路非色散红外甲烷传感器数显信号的图像;S1. Obtain an image containing digital display signals of multiple non-dispersive infrared methane sensors;

S2.采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;S2. Using the flood filling method to realize the segmentation of the image and mark the marked area containing the digital display signal;

采用漫水填充法实现所述图像的分割还包括如下步骤:Adopting flood filling method to realize the segmentation of the image also includes the following steps:

对所述图像进行二值化处理得到灰度图像,对所述图像进行高斯滤波得到模糊图像;performing binary processing on the image to obtain a grayscale image, and performing Gaussian filtering on the image to obtain a blurred image;

获取所述灰度图像相邻像素点的变化,和所述模糊图像相邻像素点的变化;Acquiring the change of adjacent pixels of the grayscale image and the change of adjacent pixels of the blurred image;

根据所述灰度图像相邻像素点的变化和所述模糊图像相邻像素点的变化,将灰度图像和模糊图像的像素值进行归一化处理,若模糊图像中高频分量相比较于灰度图像的高频分量几乎无变化,将其判定为完全模糊图像,不予处理,如果高频分量变化较为明显,则将其判定为部分模糊图像,如果高频分量变化非常大,则将其判定为清晰图像;According to the changes of the adjacent pixels of the grayscale image and the changes of the adjacent pixels of the blurred image, the pixel values of the grayscale image and the blurred image are normalized. If the high-frequency component of the high-frequency image has almost no change, it will be judged as a completely blurred image and will not be processed. If the high-frequency component changes significantly, it will be judged as a partially blurred image. If the high-frequency component changes very much, it will be judged as a clear image;

对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否为清晰图像,若是则进行下一个环节的分割处理,对于完全模糊图像,不予处理。For clear images, the segmentation process of the next step will be directly carried out. For some blurred images, it will be re-judged whether the image is a clear image after deblurring processing. If so, the next step of segmentation processing will be performed. For completely blurred images, no processing .

去模糊化处理包括:对部分模糊图像进行像素灰度统计,得到其灰度图像的像素概率分布;得到图像累积分布函数,获取变换后的去模糊化的图像;对于部分模糊图像先进行像素灰度统计,计算原始图像的像素概率分布,由像素概率分布得到图像的累计分布函数,根据映射函数得到变换后的去模糊化图像,所述映射函数如下:The deblurring process includes: performing pixel grayscale statistics on part of the blurred image to obtain the pixel probability distribution of the grayscale image; obtaining the cumulative distribution function of the image to obtain the transformed deblurred image; degree statistics, calculate the pixel probability distribution of the original image, obtain the cumulative distribution function of the image from the pixel probability distribution, and obtain the transformed defuzzified image according to the mapping function, and the mapping function is as follows:

Figure SMS_5
k= 0,1,2,3,···L-1
Figure SMS_5
k= 0,1,2,3,···L-1

其中,n是图像中像素的总和,

Figure SMS_6
是当前灰度级的像素个数,L是图像中可能的灰度级总数。where n is the sum of pixels in the image,
Figure SMS_6
is the number of pixels in the current gray level, and L is the total number of possible gray levels in the image.

如图2所示,为本实施例中的图像分割步骤流程图,下一个环节的分割处理包括:As shown in Figure 2, it is a flowchart of image segmentation steps in this embodiment, and the segmentation processing of the next link includes:

利用掩码矩阵标记漫水填充区域;将尺寸比输入图像宽和高各大2个像素点的单通道图像,作为掩码矩阵,通过对掩码矩阵中像素点的像素值填充,来标记漫水填充区域(漫水填充区域为多路甲烷传感器数显信号在图像上的显示区域)Use the mask matrix to mark the flood filling area; use a single-channel image whose size is 2 pixels wider and higher than the input image as a mask matrix, and mark the flood by filling the pixel values of the pixels in the mask matrix Water-filled area (the area filled with water is the display area of digital display signals of multiple methane sensors on the image)

获取种子点区域条件的上下界值,其中,上下界值包括:上界值和下界值;Obtain the upper and lower bound values of the seed point area conditions, where the upper and lower bound values include: upper bound value and lower bound value;

确定种子点的坐标值;Determine the coordinate value of the seed point;

以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;With the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point is greater than the lower limit value, the pixel is added to the area where the seed point is located; When the difference of the pixel value of the point is less than the upper limit value, the pixel point is added to the area where the seed point is located;

若全部像素点未添加完成,标记位置;将新加入的像素点作为新的种子点,返回上一步:以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;直至全部像素点添加完成;例如,以种子点为中心,以种子点为中心,判断4-领域内像素值与种子点像素值的差值,所述差值小于上界值和大于下界值,将该像素点添加至种子点所在的区域内;并将新加入的像素点作为新的种子点。If all pixels have not been added, mark the position; use the newly added pixel as a new seed point, and return to the previous step: take the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point When it is greater than the lower bound value, the pixel point is added to the area where the seed point is located; when the difference between the pixel value of the seed point and the pixel value of a pixel in the neighborhood is less than the upper bound value, the pixel point is added to the area where the seed point is located Area; until all pixel points are added; for example, with the seed point as the center, and with the seed point as the center, judge the difference between the pixel value in the 4-field and the pixel value of the seed point, and the difference is less than the upper bound and greater than the lower bound Value, add this pixel point to the area where the seed point is located; and use the newly added pixel point as a new seed point.

若全部像素点添加完成;各区域分离并标记输出;If all the pixels are added; each area is separated and marked for output;

采用漫水填充法对图像进行分割处理,对含多路甲烷传感器数显信号的图像帧,分割出数值所在的区域块。根据像素灰度值之间的差值寻找相同区域,将像素点的灰度理解为像素点的高度,将一帧图像视为崎岖不平的山地,向地面某一处低洼地段注入一定量水,水面将掩盖低于某个高度的区域,基于此原理在图像中选择一个注水像素,该像素为种子点。种子点将按照一定规则不断向外扩散,以形成具有相似特征的独立区域,进而实现图像分割并框选和标记出需要进行识别的区域。The flood filling method is used to segment the image, and for the image frame containing the digital display signal of multiple methane sensors, the area block where the value is located is segmented. Find the same area according to the difference between the pixel gray values, understand the gray value of the pixel as the height of the pixel, regard a frame of image as a rugged mountain, inject a certain amount of water into a low-lying area on the ground, The water surface will cover the area below a certain height. Based on this principle, a water injection pixel is selected in the image, which is the seed point. The seed points will continue to spread outward according to certain rules to form independent regions with similar characteristics, and then realize image segmentation and frame selection and mark out the regions that need to be identified.

通过上位机发送指定指令到处理器中,摄像头将连续并间隔拍摄多次甲烷传感器数显图像,对于原始图像进行第一次清晰度识别处理,对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否合格,对于完全模糊图像,没有处理意义,不予处理。完成对图像的筛选后,基于数值的分布情况对图片进行分割处理,找出待识别区域并进行标记。Send specified instructions to the processor through the host computer, the camera will continuously and intermittently take multiple digital display images of the methane sensor, and perform the first sharpness recognition processing on the original image, and directly perform the segmentation processing on the next link for the clear image, For partially blurred images, it will be re-judged whether the image is qualified after deblurring processing. For completely blurred images, there is no processing meaning and will not be processed. After completing the screening of the image, the image is segmented based on the distribution of the value, and the area to be recognized is found and marked.

S3. 基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;S3. Based on the H channel of the HSV model, the color distribution range of the digital display signal in the marked area is established, and an image of the numerical value area is obtained;

在一些实施例中,在HSV色彩空间中,色调H的取值范围是[0,360]。8位图像内每个像素点所能表示的灰度级有256个,所以在8位图像内表示HSV图像时,要把色调的角度映射到[0,255]范围内。确定值范围后,就可以直接在图像的H通道内找对应的值,从而找到特定的颜色。在饱和度S中,灰度颜色所包含R、G、B的成分是相当的,相当于一种极不饱和的颜色。所以,灰度颜色的饱和度是0。作为灰度图像显示时,较亮区域对应的颜色具有较高的饱和度。如果颜色的饱和度很低,那么它计算所得色调就不可靠。亮度V范围与饱和度范围一致.亮度值越大,图像越亮;亮度值越低,图像越暗。In some embodiments, in the HSV color space, the value range of the hue H is [0, 360]. There are 256 gray levels that can be represented by each pixel in an 8-bit image, so when representing an HSV image in an 8-bit image, the angle of the hue must be mapped to the range [0,255]. After determining the value range, you can directly find the corresponding value in the H channel of the image to find a specific color. In the saturation S, the components of R, G, and B contained in the grayscale color are equivalent, which is equivalent to an extremely unsaturated color. So, the saturation of a grayscale color is 0. When displayed as a grayscale image, lighter areas correspond to colors with higher saturation. If the color is low in saturation, then it will not be able to reliably calculate the hue. The brightness V range is consistent with the saturation range. The larger the brightness value, the brighter the image; the lower the brightness value, the darker the image.

在一些实施例中,HSV中,V通道受光照影响最大,H通道基本不受阴影或过高亮度的影响。H 通道将作为本系统颜色提取中的主要依靠,再确立数值信号的颜色分布范围,生成mask掩码,最终对标记区域的数字进行精确提取。In some embodiments, in HSV, the V channel is most affected by light, and the H channel is basically not affected by shadows or excessive brightness. The H channel will be used as the main support in the color extraction of this system, and then the color distribution range of the numerical signal will be established, a mask mask will be generated, and finally the numbers in the marked area will be accurately extracted.

在一些实施例中,对于待识别区域内数值的提取,基于HSV 模型,通过分析H分量的分布直方图,找出数值颜色的分布范围。基于H通道完成对区域数值的提取工作。In some embodiments, for the extraction of numerical values in the area to be identified, based on the HSV model, the distribution range of the numerical color is found by analyzing the distribution histogram of the H component. The extraction of regional values is completed based on the H channel.

S4. 将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。S4. Inputting the image of the numerical value area into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes non-dispersive infrared methane sensors under different environments, positions or illumination Digital signal image.

通过训练数据集对神经网络进行训练得到预测模型之前,还包括如下步骤:采集包括不同环境、位置、光照下的非色散红外甲烷传感器数显信号图像作为测试数据集;将所述测试数据集输入所述预测模型进行测试;在测试结果满足预设识别准确率的要求后停止训练所述预测模型。Before the neural network is trained by the training data set to obtain the prediction model, the following steps are also included: collecting the non-dispersive infrared methane sensor digital display signal image under different environments, positions, and illuminations as a test data set; inputting the test data set The prediction model is tested; the training of the prediction model is stopped after the test result meets the requirement of the preset recognition accuracy.

所述预测模型通过训练数据集对神经网络进行训练得到还包括如下步骤:The prediction model obtained by training the neural network through the training data set also includes the following steps:

采集不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像得到样本库;Collect digital display signal images of non-dispersive infrared methane sensors under different environments, locations or illumination to obtain sample libraries;

根据样本库构建神经网络的训练数据集和测试数据集;Construct the training data set and test data set of the neural network according to the sample library;

根据构建的训练数据集对神经网络进行训练得到数显信号的预测模型。According to the constructed training data set, the neural network is trained to obtain the prediction model of the digital display signal.

将所述数值区域图像输入预测模型进行匹配得到数值,还包括如下步骤:Inputting the numerical value area image into the prediction model for matching to obtain the numerical value also includes the following steps:

获取数值区域图像并进行尺寸缩放得到数值区域向量;Obtain the image of the numerical region and perform size scaling to obtain the numerical region vector;

将数值区域向量代入预测模型进行匹配得出数值;Substitute the value area vector into the prediction model for matching to obtain the value;

根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出。Sorting from left to right according to the pixel coordinates to get the numerical sequence concatenated as a string output.

在一些实施例中,采集不同环境,位置,光照下的甲烷传感器数显图,建立样本库,用于构建神经网络的训练数据集和测试数据集。根据构建的训练数据集,采用深层的神经网络,通过增加隐层数目来增加神经元连接权,阈值等参数,用于提高激活函数的神经元数目和嵌套层数。通过预训练和微调的方法对参数进行分组,对每组先找到局部较优设置,基于局部较优的结果联合起来进行全局寻优。使得在利用模型大量参数所提供自由度的同时有效节省了训练开销。通过对训练模型的不断迭代来计算损失,并更新模型参数。最终将待识别的甲烷传感器数显图输入模型中进行匹配,得到数显图像的具体数值。In some embodiments, the digital display images of the methane sensor under different environments, locations, and illuminations are collected, and a sample library is established, which is used to construct training data sets and test data sets of the neural network. According to the constructed training data set, a deep neural network is used to increase the number of neuron connection weights, thresholds and other parameters by increasing the number of hidden layers to increase the number of neurons and the number of nested layers of the activation function. The parameters are grouped by pre-training and fine-tuning methods, and the local optimal settings are first found for each group, and the global optimization is jointly performed based on the locally optimal results. It effectively saves training overhead while utilizing the degree of freedom provided by a large number of parameters of the model. Calculate the loss and update the model parameters through continuous iteration of the trained model. Finally, input the digital display image of the methane sensor to be identified into the model for matching, and obtain the specific value of the digital display image.

数值匹配流程包括:The numerical matching process includes:

S301.采集不同环境下的甲烷传感器数显信号图S301. Collect digital display signal diagrams of methane sensors in different environments

S302.根据样本库构建神经网络的训练和测试数据集S302. Construct training and testing data sets of the neural network according to the sample library

S303.根据构建的训练集对神经网络进行训练得到甲烷传感器数显信号预测模型S303. Train the neural network according to the constructed training set to obtain a methane sensor digital display signal prediction model

S304.将待识别的图像代入预测模型S304. Substituting the image to be recognized into the prediction model

S305.获取数值区域进行尺寸缩放处理为向量形式S305. Acquire the value area and perform size scaling processing into vector form

S306.将数值区域向量代入模型进行匹配得出数值S306. Substituting the numerical region vector into the model for matching to obtain a numerical value

S307.根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出S307. Sorting from left to right according to the pixel coordinates to obtain a numerical sequence and connect it as a string output

通过对现场环境下数显图像的多次采集,构建测试数据集和训练数据集,构建数据集对网络经行训练,完成识别所需模型,将上述提取出来的数值区域,尺寸缩放为模型尺寸并代入模型中进行数值匹配并输出。完成对多路甲烷传感器数显信号的识别。Through multiple acquisitions of digital display images in the field environment, build a test data set and a training data set, build a data set to train the network, complete the model required for recognition, and scale the size of the extracted value area to the model size And substitute into the model for numerical matching and output. Complete the identification of digital display signals of multiple methane sensors.

本方法测试在计量检定测试中心的实验室内完成,环境温度保持在15到35℃之间,相对湿度不大于85%,压强为标准大气压。试验过程中,将带检验的传感器悬挂于系统设计的检定柜中,为保证同时对十二路传感器进行检定,柜中固定了四排,通过挂钩悬挂待检定的传感器。将用于检测的广角摄像头的置于12路传感器之前,通过信号线连接到处理器中。The test of this method is completed in the laboratory of the metrological verification test center, the ambient temperature is kept between 15 and 35°C, the relative humidity is not more than 85%, and the pressure is standard atmospheric pressure. During the test, the sensors with inspection are hung in the verification cabinet designed by the system. In order to ensure the verification of twelve sensors at the same time, four rows are fixed in the cabinet, and the sensors to be verified are hung by hooks. Place the wide-angle camera used for detection in front of the 12-way sensor, and connect it to the processor through a signal line.

实施例Example

作为本公开实施例的另一个方面,提供一种基于深度学习的多路甲烷传感器数显信号识别系统,如图3所示,包括:As another aspect of the embodiments of the present disclosure, a multi-channel methane sensor digital display signal recognition system based on deep learning is provided, as shown in FIG. 3 , including:

图像获取模块,获取含有多路非色散红外甲烷传感器数显信号的图像;The image acquisition module acquires images containing digital display signals of multi-channel non-dispersive infrared methane sensors;

图像分割模块,采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;The image segmentation module implements the segmentation of the image and marks the marked area containing the digital display signal by using the flood filling method;

对含多路甲烷传感器数显信号的图像帧,分割出数值所在的区域块。根据像素灰度值之间的差值寻找相同区域,将像素点的灰度理解为像素点的高度,将一帧图像视为崎岖不平的山地,向地面某一处低洼地段注入一定量水,水面将掩盖低于某个高度的区域,基于此原理在图像中选择一个注水像素,该像素为种子点。种子点将按照一定规则不断向外扩散,以形成具有相似特征的独立区域,进而实现图像分割并框选和标记出需要进行识别的区域。For the image frame containing the digital display signal of multiple methane sensors, the area block where the value is located is segmented. Find the same area according to the difference between the pixel gray values, understand the gray value of the pixel as the height of the pixel, regard a frame of image as a rugged mountain, inject a certain amount of water into a low-lying area on the ground, The water surface will cover the area below a certain height. Based on this principle, a water injection pixel is selected in the image, which is the seed point. The seed points will continue to spread outward according to certain rules to form independent regions with similar characteristics, and then realize image segmentation and frame selection and mark out the regions that need to be identified.

通过上位机发送指定指令到处理器中,摄像头将连续并间隔拍摄多次甲烷传感器数显图像,对于原始图像进行第一次清晰度识别处理,对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否合格,对于完全模糊图像,没有处理意义,不予处理。完成对图像的筛选后,基于数值的分布情况对图片进行分割处理,找出待识别区域并进行标记。Send specified instructions to the processor through the host computer, the camera will continuously and intermittently take multiple digital display images of the methane sensor, and perform the first sharpness recognition processing on the original image, and directly perform the segmentation processing on the next link for the clear image, For partially blurred images, it will be re-judged whether the image is qualified after deblurring processing. For completely blurred images, there is no processing meaning and will not be processed. After completing the screening of the image, the image is segmented based on the distribution of the value, and the area to be recognized is found and marked.

图像分割模块还包括图像预处理模块:对所述图像进行二值化处理得到灰度图像,对所述图像进行高斯滤波得到模糊图像;The image segmentation module also includes an image preprocessing module: performing binarization processing on the image to obtain a grayscale image, and performing Gaussian filtering on the image to obtain a blurred image;

获取所述灰度图像相邻像素点的变化,和所述模糊图像相邻像素点的变化;Acquiring the change of adjacent pixels of the grayscale image and the change of adjacent pixels of the blurred image;

根据所述灰度图像相邻像素点的变化和所述模糊图像相邻像素点的变化,将灰度图像和模糊图像的像素值进行归一化处理,若模糊图像中高频分量相比较于灰度图像的高频分量几乎无变化,将其判定为完全模糊图像,不予处理,如果高频分量变化较为明显,则将其判定为部分模糊图像,如果高频分量变化非常大,则将其判定为清晰图像;According to the changes of the adjacent pixels of the grayscale image and the changes of the adjacent pixels of the blurred image, the pixel values of the grayscale image and the blurred image are normalized. If the high-frequency component of the high-frequency image has almost no change, it will be judged as a completely blurred image and will not be processed. If the high-frequency component changes significantly, it will be judged as a partially blurred image. If the high-frequency component changes very much, it will be judged as a clear image;

对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否为清晰图像,若是则进行下一个环节的分割处理,对于完全模糊图像,不予处理。For clear images, the segmentation process of the next step will be directly carried out. For some blurred images, it will be re-judged whether the image is a clear image after deblurring processing. If so, the next step of segmentation processing will be performed. For completely blurred images, no processing .

图像分割模块还包括去模糊化处理模块包括:对部分模糊图像进行像素灰度统计,得到其灰度图像的像素概率分布;得到图像累积分布函数,获取变换后的图像。The image segmentation module also includes a defuzzification processing module including: performing pixel gray level statistics on part of the blurred image to obtain the pixel probability distribution of the gray level image; obtaining an image cumulative distribution function to obtain a transformed image.

图像分割模块,还包括下一个环节的分割处理模块,用于:The image segmentation module also includes the segmentation processing module of the next link, which is used for:

利用掩码矩阵标记漫水填充区域;Use the mask matrix to mark the flood filled area;

将尺寸比输入图像宽和高各大2个像素点的单通道图像,作为掩码矩阵,通过对掩码矩阵中像素点的像素值填充,来标记漫水填充区域(漫水填充区域为多路甲烷传感器数显信号在图像上的显示区域)Use a single-channel image whose size is 2 pixels wider and higher than the input image as a mask matrix, and mark the flood-filled area by filling the pixel values of the pixels in the mask matrix (the flood-filled area is more The display area of the digital display signal of the methane sensor on the image)

获取种子点区域条件的上下界值,其中,上下界值包括:上界值和下界值;Obtain the upper and lower bound values of the seed point area conditions, where the upper and lower bound values include: upper bound value and lower bound value;

确定种子点的坐标值;Determine the coordinate value of the seed point;

以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;With the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point is greater than the lower limit value, the pixel is added to the area where the seed point is located; When the difference of the pixel value of the point is less than the upper limit value, the pixel point is added to the area where the seed point is located;

若全部像素点未添加完成,标记位置;将新加入的像素点作为新的种子点,返回上一步:以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;直至全部像素点添加完成;例如,以种子点为中心,以种子点为中心,判断4-领域内像素值与种子点像素值的差值,所述差值小于上界值和大于下界值,将该像素点添加至种子点所在的区域内;并将新加入的像素点作为新的种子点。If all pixels have not been added, mark the position; use the newly added pixel as a new seed point, and return to the previous step: take the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point When it is greater than the lower bound value, the pixel point is added to the area where the seed point is located; when the difference between the pixel value of the seed point and the pixel value of a pixel in the neighborhood is less than the upper bound value, the pixel point is added to the area where the seed point is located Area; until all pixel points are added; for example, with the seed point as the center, and with the seed point as the center, judge the difference between the pixel value in the 4-field and the pixel value of the seed point, and the difference is less than the upper bound and greater than the lower bound Value, add this pixel point to the area where the seed point is located; and use the newly added pixel point as a new seed point.

若全部像素点添加完成;各区域分离并标记输出;If all the pixels are added; each area is separated and marked for output;

提取模块,基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;The extraction module establishes the color distribution range of the digital display signal in the marked area based on the H channel of the HSV model, and obtains a numerical area image;

HSV中,V通道受光照影响最大,H通道基本不受阴影或过高亮度的影响。H 通道将作为本系统颜色提取中的主要依靠,再确立数值信号的颜色分布范围,生成mask掩码,最终对标记区域的数字进行精确提取。In HSV, the V channel is most affected by light, and the H channel is basically not affected by shadows or excessive brightness. The H channel will be used as the main support in the color extraction of this system, and then the color distribution range of the numerical signal will be established, a mask mask will be generated, and finally the numbers in the marked area will be accurately extracted.

对于待识别区域内数值的提取,基于HSV 模型,通过分析H分量的分布直方图,找出数值颜色的分布范围。基于H通道完成对区域数值的提取工作。For the extraction of the value in the area to be identified, based on the HSV model, the distribution range of the value color is found by analyzing the distribution histogram of the H component. The extraction of regional values is completed based on the H channel.

在一些实施例中,在HSV色彩空间中,色调H的取值范围是[0,360]。8位图像内每个像素点所能表示的灰度级有256个,所以在8位图像内表示HSV图像时,要把色调的角度映射到[0,255]范围内。确定值范围后,就可以直接在图像的H通道内找对应的值,从而找到特定的颜色。在饱和度S中,灰度颜色所包含R、G、B的成分是相当的,相当于一种极不饱和的颜色。所以,灰度颜色的饱和度是0。作为灰度图像显示时,较亮区域对应的颜色具有较高的饱和度。如果颜色的饱和度很低,那么它计算所得色调就不可靠。亮度V范围与饱和度范围一致.亮度值越大,图像越亮;亮度值越低,图像越暗。In some embodiments, in the HSV color space, the value range of the hue H is [0, 360]. There are 256 gray levels that can be represented by each pixel in an 8-bit image, so when representing an HSV image in an 8-bit image, the angle of the hue must be mapped to the range [0,255]. After determining the value range, you can directly find the corresponding value in the H channel of the image to find a specific color. In the saturation S, the components of R, G, and B contained in the grayscale color are equivalent, which is equivalent to an extremely unsaturated color. So, the saturation of a grayscale color is 0. When displayed as a grayscale image, lighter areas correspond to colors with higher saturation. If the color is low in saturation, then it will not be able to reliably calculate the hue. The brightness V range is consistent with the saturation range. The larger the brightness value, the brighter the image; the lower the brightness value, the darker the image.

匹配模块,将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。A matching module, inputting the image of the value region into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes non-dispersive infrared methane under different environments, positions or illumination Sensor digital display signal image.

所述匹配模块还包括训练模块:采集包括不同环境、位置、光照下的非色散红外甲烷传感器数显信号图像作为测试数据集;将所述测试数据集输入所述预测模型进行测试;在测试结果满足预设识别准确率的要求后停止训练所述预测模型。The matching module also includes a training module: collection includes non-dispersive infrared methane sensor digital display signal images under different environments, positions and illuminations as a test data set; the test data set is input into the predictive model for testing; The training of the predictive model is stopped after the requirement of the preset recognition accuracy is met.

匹配模块还包括模型预测模块:The matching module also includes the model prediction module:

采集不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像得到样本库;Collect digital display signal images of non-dispersive infrared methane sensors under different environments, locations or illumination to obtain sample libraries;

根据样本库构建神经网络的训练数据集和测试数据集;Construct the training data set and test data set of the neural network according to the sample library;

根据构建的训练数据集对神经网络进行训练得到数显信号的预测模型。According to the constructed training data set, the neural network is trained to obtain the prediction model of the digital display signal.

匹配模块还包括结果输出模块:The matching module also includes the result output module:

获取数值区域图像并进行尺寸缩放得到数值区域向量;Obtain the image of the numerical region and perform size scaling to obtain the numerical region vector;

将数值区域向量代入预测模型进行匹配得出数值;Substitute the value area vector into the prediction model for matching to obtain the value;

根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出。Sorting from left to right according to the pixel coordinates to get the numerical sequence concatenated as a string output.

在一些实施例中,采集不同环境,位置,光照下的甲烷传感器数显图,建立样本库,用于构建神经网络的训练数据集和测试数据集。根据构建的训练数据集,采用深层的神经网络,通过增加隐层数目来增加神经元连接权,阈值等参数,用于提高激活函数的神经元数目和嵌套层数。通过预训练和微调的方法对参数进行分组,对每组先找到局部较优设置,基于局部较优的结果联合起来进行全局寻优。使得在利用模型大量参数所提供自由度的同时有效节省了训练开销。通过对训练模型的不断迭代来计算损失,并更新模型参数。最终将待识别的甲烷传感器数显图输入模型中进行匹配,得到数显图像的具体数值。In some embodiments, the digital display images of the methane sensor under different environments, locations, and illuminations are collected, and a sample library is established, which is used to construct training data sets and test data sets of the neural network. According to the constructed training data set, a deep neural network is used to increase the number of neuron connection weights, thresholds and other parameters by increasing the number of hidden layers to increase the number of neurons and the number of nested layers of the activation function. The parameters are grouped by pre-training and fine-tuning methods, and the local optimal settings are first found for each group, and the global optimization is jointly performed based on the locally optimal results. It effectively saves training overhead while utilizing the degree of freedom provided by a large number of parameters of the model. Calculate the loss and update the model parameters through continuous iteration of the trained model. Finally, input the digital display image of the methane sensor to be identified into the model for matching, and obtain the specific value of the digital display image.

通过对现场环境下数显图像的多次采集,构建测试数据集和训练数据集,构建数据集对网络经行训练,完成识别所需模型,将上述提取出来的数值区域,尺寸缩放为模型尺寸并代入模型中进行数值匹配并输出。完成对多路甲烷传感器数显信号的识别。如图4所述,为本系统的结构图。Through multiple acquisitions of digital display images in the field environment, build a test data set and a training data set, build a data set to train the network, complete the model required for recognition, and scale the size of the extracted value area to the model size And substitute into the model for numerical matching and output. Complete the identification of digital display signals of multiple methane sensors. As shown in Figure 4, it is a structural diagram of the system.

实施例Example

一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现实施例1中的一种基于深度学习的数显信号识别方法。An electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, a digital display based on deep learning in Embodiment 1 is realized Signal recognition method.

本公开实施例3仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Embodiment 3 of the present disclosure is only an example, and should not impose any limitation on the functions and application ranges of the embodiments of the present disclosure.

电子设备可以以通用计算设备的形式表现,例如其可以为服务器设备。电子设备的组件可以包括但不限于:至少一个处理器、至少一个存储器、连接不同系统组件(包括存储器和处理器)的总线。An electronic device may take the form of a general computing device, which may be a server device, for example. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, a bus connecting different system components (including memory and processor).

总线包括数据总线、地址总线和控制总线。The bus includes data bus, address bus and control bus.

存储器可以包括易失性存储器,例如随机存取存储器(RAM)和/或高速缓存存储器,还可以进一步包括只读存储器(ROM)。The memory may include volatile memory, such as random access memory (RAM) and/or cache memory, and may further include read only memory (ROM).

存储器还可以包括具有一组(至少一个)程序模块的程序工具,这样的程序模块包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The memory may also include program means having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of these examples or Implementations of network environments may be included in some combination.

处理器通过运行存储在存储器中的计算机程序,从而执行各种功能应用以及数据处理。The processor executes various functional applications and data processing by running computer programs stored in the memory.

电子设备也可以与一个或多个外部设备(例如键盘、指向设备等)通信。这种通信可以通过输入/输出(I/O)接口进行。并且,电子设备还可以通过网络适配器与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器通过总线与电子设备的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理器、外部磁盘驱动阵列、RAID(磁盘阵列)系统、磁带驱动器以及数据备份存储系统等。Electronic devices may also communicate with one or more external devices (eg, keyboards, pointing devices, etc.). This communication can take place through an input/output (I/O) interface. Moreover, the electronic device can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and/or a public network such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through the bus. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (array of disks) systems , tape drives, and data backup storage systems.

应当注意,尽管在上文详细描述中提及了电子设备的若干单元/模块或子单元/模块,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多单元/模块的特征和功能可以在一个单元/模块中具体化。反之,上文描述的一个单元/模块的特征和功能可以进一步划分为由多个单元/模块来具体化。It should be noted that although several units/modules or subunits/modules of an electronic device are mentioned in the above detailed description, such division is only exemplary and not mandatory. Actually, according to the embodiment of the present application, the features and functions of two or more units/modules described above may be embodied in one unit/module. Conversely, the features and functions of one unit/module described above can be further divided to be embodied by a plurality of units/modules.

实施例Example

一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述程序被处理器执行时实现实施例1中的一种基于深度学习的数显信号识别方法的步骤。A computer-readable storage medium, the readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the deep learning-based digital display signal recognition method in Embodiment 1 are implemented.

其中,可读存储介质可以采用的更具体可以包括但不限于:便携式盘、硬盘、随机存取存储器、只读存储器、可擦拭可编程只读存储器、光存储器件、磁存储器件或上述的任意合适的组合。Wherein, the readable storage medium may more specifically include but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device or any of the above-mentioned the right combination.

在可能的实施方式中,本公开还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行实现实施例1中所述的基于深度学习的数显信号识别方法的步骤。In a possible implementation manner, the present disclosure may also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the terminal device execute The steps of the digital display signal recognition method based on deep learning described in Embodiment 1.

其中,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开的程序代码,所述程序代码可以完全地在用户设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户设备上部分在远程设备上执行或完全在远程设备上执行。Wherein, the program code for executing the present disclosure may be written in any combination of one or more programming languages, and the program code may be completely executed on the user equipment, partially executed on the user equipment, or used as an independent The package executes, partly on the user device and partly on the remote device, or entirely on the remote device.

Claims (10)

1.基于深度学习的数显信号识别方法,其特征在于,包括如下步骤:1. The digital display signal recognition method based on deep learning, is characterized in that, comprises the steps: 获取含有多路非色散红外甲烷传感器数显信号的图像;Obtain images containing digital display signals of multi-channel non-dispersive infrared methane sensors; 采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;Using the flood filling method to realize the segmentation of the image and mark the marked area containing the digital display signal; 基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;Based on the H channel of the HSV model, the color distribution range of the digital display signal in the marked area is established, and an image of the numerical value area is obtained; 将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。Inputting the image of the numerical value region into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes digital display of non-dispersive infrared methane sensors under different environments, positions or illumination Signal image. 2.如权利要求1所述的基于深度学习的数显信号识别方法,其特征在于,通过训练数据集对神经网络进行训练得到预测模型之前,还包括如下步骤:采集包括不同环境、位置、光照下的非色散红外甲烷传感器数显信号图像作为测试数据集;将所述测试数据集输入所述预测模型进行测试;在测试结果满足预设识别准确率的要求后停止训练所述预测模型。2. The digital display signal recognition method based on deep learning as claimed in claim 1, characterized in that, before the neural network is trained to obtain the prediction model through the training data set, the following steps are also included: the acquisition includes different environments, positions, illumination The non-dispersive infrared methane sensor digital display signal image below is used as a test data set; the test data set is input into the prediction model for testing; the training of the prediction model is stopped after the test results meet the requirements of the preset recognition accuracy. 3.如权利要求1所述的基于深度学习的数显信号识别方法,其特征在于,采用漫水填充法实现所述图像的分割还包括如下步骤:3. the digital display signal recognition method based on deep learning as claimed in claim 1, is characterized in that, adopts flood filling method to realize the segmentation of described image and also comprises the steps: 对所述图像进行二值化处理得到灰度图像,对所述图像进行高斯滤波得到模糊图像;performing binary processing on the image to obtain a grayscale image, and performing Gaussian filtering on the image to obtain a blurred image; 获取所述灰度图像相邻像素点的变化,和所述模糊图像相邻像素点的变化;Acquiring the change of adjacent pixels of the grayscale image and the change of adjacent pixels of the blurred image; 根据所述灰度图像相邻像素点的变化和所述模糊图像相邻像素点的变化,将灰度图像和模糊图像的像素值进行归一化处理,若模糊图像中高频分量相比较于灰度图像的高频分量几乎无变化,将其判定为完全模糊图像,不予处理,如果高频分量变化较为明显,则将其判定为部分模糊图像,如果高频分量变化非常大,则将其判定为清晰图像;According to the changes of the adjacent pixels of the grayscale image and the changes of the adjacent pixels of the blurred image, the pixel values of the grayscale image and the blurred image are normalized. If the high-frequency component of the high-frequency image has almost no change, it will be judged as a completely blurred image and will not be processed. If the high-frequency component changes significantly, it will be judged as a partially blurred image. If the high-frequency component changes very much, it will be judged as a clear image; 对于清晰图像将直接进行下一个环节的分割处理,对于部分模糊图像将通过去模糊化处理后重新判断图像是否为清晰图像,若是则进行下一个环节的分割处理,对于完全模糊图像,不予处理。For clear images, the segmentation process of the next step will be directly carried out. For some blurred images, it will be re-judged whether the image is a clear image after deblurring processing. If so, the next step of segmentation processing will be performed. For completely blurred images, no processing . 4.如权利要求3所述的基于深度学习的数显信号识别方法,其特征在于,所述去模糊化处理包括如下步骤:对部分模糊图像进行像素灰度统计,得到所述灰度图像的像素概率分布;得到图像累积分布函数,获取变换后的去模糊化的图像;对于部分模糊图像先进行像素灰度统计,计算原始图像的像素概率分布,由像素概率分布得到图像的累计分布函数,根据映射函数得到变换后的去模糊化图像,所述映射函数如下:4. The digital display signal recognition method based on deep learning as claimed in claim 3, wherein the deblurring process comprises the steps of: performing pixel grayscale statistics on a part of the blurred image to obtain the grayscale of the grayscale image Pixel probability distribution; obtain the cumulative distribution function of the image, and obtain the transformed deblurred image; first perform pixel grayscale statistics on the partial blurred image, calculate the pixel probability distribution of the original image, and obtain the cumulative distribution function of the image from the pixel probability distribution, The transformed deblurred image is obtained according to the mapping function, and the mapping function is as follows:
Figure QLYQS_1
k= 0,1,2,3,···L-1
Figure QLYQS_1
k= 0,1,2,3,···L-1
其中,n是图像中像素的总和,
Figure QLYQS_2
是当前灰度级的像素个数,L是图像中可能的灰度级总数。
where n is the sum of pixels in the image,
Figure QLYQS_2
is the number of pixels in the current gray level, and L is the total number of possible gray levels in the image.
5.如权利要求3所述的基于深度学习的数显信号识别方法,其特征在于,所述下一个环节的分割处理包括:5. the digital display signal recognition method based on deep learning as claimed in claim 3, is characterized in that, the segmentation processing of described next link comprises: 将尺寸比输入图像宽和高各大2个像素点的单通道图像,作为掩码矩阵,通过对掩码矩阵中像素点的像素值填充,来标记漫水填充区域利用掩码矩阵标记漫水填充的区域;Use a single-channel image whose size is 2 pixels wider and higher than the input image as a mask matrix, and mark the flooded area by filling the pixel values of the pixels in the mask matrix. Use the mask matrix to mark the flooded area filled area; 获取种子点区域条件的上下界值,其中,上下界值包括:上界值和下界值;Obtain the upper and lower bound values of the seed point area conditions, where the upper and lower bound values include: upper bound value and lower bound value; 确定种子点的坐标值;Determine the coordinate value of the seed point; 以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;With the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point is greater than the lower limit value, the pixel is added to the area where the seed point is located; When the difference of the pixel value of the point is less than the upper limit value, the pixel point is added to the area where the seed point is located; 若全部像素点未添加完成,标记位置;将新加入的像素点作为新的种子点,返回上一步:以种子点为中心,当邻域某像素点的像素值与种子点像素值的差值大于下界值时,该像素点被添加进种子点所在的区域;当种子点像素值与邻域某像素点的像素值的差值小于上界值时,该像素点被添加进种子点所在的区域;直至全部像素点添加完成;If all pixels have not been added, mark the position; use the newly added pixel as a new seed point, and return to the previous step: take the seed point as the center, when the difference between the pixel value of a pixel in the neighborhood and the pixel value of the seed point When it is greater than the lower bound value, the pixel point is added to the area where the seed point is located; when the difference between the pixel value of the seed point and the pixel value of a pixel in the neighborhood is less than the upper bound value, the pixel point is added to the area where the seed point is located area; until all pixels are added; 若全部像素点添加完成;各区域分离并标记输出。If all the pixels are added, each area is separated and marked for output. 6.如权利要求1所述的基于深度学习的数显信号识别方法,其特征在于,所述预测模型通过训练数据集对神经网络进行训练得到还包括如下步骤:6. the digital display signal recognition method based on deep learning as claimed in claim 1, is characterized in that, described prediction model obtains by training data set to neural network and also comprises the steps: 采集不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像得到样本库;Collect digital display signal images of non-dispersive infrared methane sensors under different environments, locations or illumination to obtain sample libraries; 根据样本库构建神经网络的训练数据集和测试数据集;Construct the training data set and test data set of the neural network according to the sample library; 根据构建的训练数据集对神经网络进行训练得到数显信号的预测模型。According to the constructed training data set, the neural network is trained to obtain the prediction model of the digital display signal. 7.如权利要求1或6所述的基于深度学习的数显信号识别方法,其特征在于,将所述数值区域图像输入预测模型进行匹配得到数值,还包括如下步骤:7. The digital display signal recognition method based on deep learning as claimed in claim 1 or 6, wherein the input prediction model of the numerical value region image is matched to obtain a numerical value, further comprising the steps of: 获取数值区域图像并进行尺寸缩放得到数值区域向量;Obtain the image of the numerical region and perform size scaling to obtain the numerical region vector; 将数值区域向量代入预测模型进行匹配得出数值;Substitute the value area vector into the prediction model for matching to obtain the value; 根据像素坐标从左到右进行排序得到数字顺序连接为字符串输出。Sorting from left to right according to the pixel coordinates to get the numerical sequence concatenated as a string output. 8.一种基于深度学习的数显信号识别系统,其特征在于,包括:8. A digital display signal recognition system based on deep learning, characterized in that, comprising: 图像获取模块,获取含有多路非色散红外甲烷传感器数显信号的图像;The image acquisition module acquires images containing digital display signals of multi-channel non-dispersive infrared methane sensors; 图像分割模块,采用漫水填充法实现所述图像的分割并标记出含有数显信号的标记区域;The image segmentation module implements the segmentation of the image and marks the marked area containing the digital display signal by using the flood filling method; 提取模块,基于HSV模型的H通道确立所述标记区域中数显信号的颜色分布范围,并获取数值区域图像;The extraction module establishes the color distribution range of the digital display signal in the marked area based on the H channel of the HSV model, and obtains a numerical area image; 匹配模块,将所述数值区域图像输入预测模型进行匹配得到数值,所述预测模型通过训练数据集对神经网络进行训练得到,所述训练数据集包括不同环境、位置或光照下的非色散红外甲烷传感器数显信号图像。A matching module, inputting the image of the value region into a prediction model for matching to obtain a value, the prediction model is obtained by training the neural network through a training data set, and the training data set includes non-dispersive infrared methane under different environments, positions or illumination Sensor digital display signal image. 9.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7任一项所述的基于深度学习的数显信号识别方法。9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements any one of claims 1 to 7 when executing the computer program. The digital display signal recognition method based on deep learning described in the item. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现权利要求1至7任一项所述的基于深度学习的数显信号识别方法。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the deep learning-based digital display signal recognition method according to any one of claims 1 to 7 is implemented .
CN202310338362.0A 2023-03-31 2023-03-31 Digital display signal recognition method, system, device and medium based on deep learning Pending CN116363658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310338362.0A CN116363658A (en) 2023-03-31 2023-03-31 Digital display signal recognition method, system, device and medium based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310338362.0A CN116363658A (en) 2023-03-31 2023-03-31 Digital display signal recognition method, system, device and medium based on deep learning

Publications (1)

Publication Number Publication Date
CN116363658A true CN116363658A (en) 2023-06-30

Family

ID=86936174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310338362.0A Pending CN116363658A (en) 2023-03-31 2023-03-31 Digital display signal recognition method, system, device and medium based on deep learning

Country Status (1)

Country Link
CN (1) CN116363658A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117905526A (en) * 2023-12-29 2024-04-19 南京信息工程大学 A method and device for monitoring and early warning of gas concentration in coal mine construction

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117905526A (en) * 2023-12-29 2024-04-19 南京信息工程大学 A method and device for monitoring and early warning of gas concentration in coal mine construction
CN117905526B (en) * 2023-12-29 2024-06-11 南京信息工程大学 A method and device for monitoring and early warning of gas concentration in coal mine construction

Similar Documents

Publication Publication Date Title
CN109977191B (en) Problem map detection method, device, electronic equipment and medium
CN110060237B (en) Fault detection method, device, equipment and system
CN108564085B (en) A method of automatically reading the reading of a pointer-type meter
CN111325717B (en) Mobile phone defect location identification method and device
CN112613569B (en) Image recognition method, training method and device for image classification model
CN114549993B (en) Method, system and device for grading line segment image in experiment and readable storage medium
CN110348522A (en) A kind of image detection recognition methods and system, electronic equipment, image classification network optimized approach and system
CN113537026B (en) Method, device, equipment and medium for detecting graphic elements in building plan
CN111339902A (en) Liquid crystal display number identification method and device of digital display instrument
CN117876848B (en) A complex environment rockfall detection method based on improved yolov5
CN113469087A (en) Method, device, equipment and medium for detecting picture frame in building drawing
CN115019294A (en) A method and system for recognizing reading of a pointer-type meter
CN115841488A (en) Hole checking method of PCB (printed Circuit Board) based on computer vision
CN116363658A (en) Digital display signal recognition method, system, device and medium based on deep learning
CN115082729B (en) A method and device for identifying and classifying regional fractures
CN111121797A (en) Road screening method, device, server and storage medium
CN112052730A (en) 3D dynamic portrait recognition monitoring device and method
CN114266941A (en) A method for fast detection of image sample annotation results data
CN117788444A (en) SMT patch offset detection method, SMT patch offset detection device and SMT patch offset detection system
CN118229623A (en) Apparent defect detection method and system for realizing liquid crystal display screen based on artificial intelligence
Lemy et al. Image analysis of drill core
CN120344992A (en) Chip quality detection method and device, electronic device and storage medium
CN114359166A (en) Screen color detection method, device, equipment and storage medium
CN113128315B (en) Sensor model performance evaluation method, device, equipment and storage medium
CN115512189A (en) Image recognition model evaluation method, device and storage medium

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