技术领域technical field
本发明涉及安全检测技术领域,具体为一种基于计算机视觉的车内安全检测方法。The invention relates to the technical field of safety detection, in particular to an in-vehicle safety detection method based on computer vision.
背景技术Background technique
计算机视觉是一门研究如何使机器“看”的科学,更进一步的说,就是是指用摄影机和电脑代替人眼对目标进行识别、跟踪和测量等机器视觉,并进一步做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取‘信息’的人工智能系统。这里所指的信息指Shannon定义的,可以用来帮助做一个“决定”的信息。因为感知可以看作是从感官信号中提取信息,所以计算机视觉也可以看作是研究如何使人工系统从图像或多维数据中“感知”的科学。Computer vision is a science that studies how to make machines "see". More specifically, it refers to the use of cameras and computers instead of human eyes to identify, track, and measure targets, and further graphics processing to make computers. Processed into images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, trying to build artificial intelligence systems that can obtain 'information' from images or multi-dimensional data. The information referred to here refers to Shannon's definition of information that can be used to help make a "decision". Because perception can be viewed as extracting information from sensory signals, computer vision can also be viewed as the science of how to make artificial systems "perceive" from images or multidimensional data.
目前的车内安全判别还需要通过人工来判别,其判别效率低,精度低。The current in-vehicle safety discrimination still needs to be judged manually, which has low discrimination efficiency and low precision.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种基于计算机视觉的车内安全检测方法,以解决上述背景技术中提出的问题。The purpose of the present invention is to provide an in-vehicle safety detection method based on computer vision to solve the problems raised in the above background art.
为实现上述目的,本发明提供如下技术方案:一种基于计算机视觉的车内安全检测方法,包括以下步骤:In order to achieve the above object, the present invention provides the following technical solutions: a computer vision-based in-vehicle safety detection method, comprising the following steps:
A、车内摄像头采集车内图像并将采集的图像发送至处理器中进行处理;A. The in-vehicle camera collects in-vehicle images and sends the captured images to the processor for processing;
B、将处理后的图像进行特征提取;B. Feature extraction is performed on the processed image;
C、将特征提取后的图像传输至深度卷积神经网络进行训练,训练车内安全程度判别模型;C. The image after feature extraction is transmitted to the deep convolutional neural network for training, and the in-vehicle safety degree discrimination model is trained;
D、利用车内安全程度判别模型对采集的车内图像进行安全判别。D. Use the in-vehicle safety degree discrimination model to discriminate the safety of the collected in-vehicle images.
优选的,所述步骤A中图像处理方法包括以下步骤:Preferably, the image processing method in the step A includes the following steps:
a、图像灰度化,把彩色图像变为单通道数据的灰度图像,根据加权平均值法得到灰度图像;a. Grayscale the image, convert the color image into a grayscale image of single-channel data, and obtain the grayscale image according to the weighted average method;
b、图像增强,对原图像变换数据突出图像中轮廓特征,去除图像中不需要的纹理特征;b. Image enhancement, highlighting the contour features in the image for the original image transformation data, and removing the unnecessary texture features in the image;
c、图像滤波,用序贯滤波对图像进行处理,然后进行融合处理,具体公式如下:c. Image filtering, using sequential filtering to process the image, and then performing fusion processing, the specific formula is as follows:
t(x,y)=max(ga(x,y),gb(x,y),gc(x,y),gd(x,y))t(x, y) = max(ga (x, y), gb (x, y), gc (x, y), gd (x, y))
其中,t(x,y)为融合后的图像在坐标点(x,y)处的灰度值,ga(x,y)、gb(x,y)、gc(x,y)、gd(x,y)分别为水平、45度、垂直、135度方向的序贯滤波结果图在坐标点(x,y)处的灰度值;Among them, t(x, y) is the gray value of the fused image at the coordinate point (x, y), ga (x, y), gb (x, y), gc (x, y) , gd (x, y) are the gray value of the sequential filtering result map at the coordinate point (x, y) in the horizontal, 45-degree, vertical, and 135-degree directions respectively;
D、图像二值化,把256个亮度等级的灰度图像通过阈值选取而获得反映图像整体和局部特征的二值化图像,使用基于直方图的自适应阈值分割来获得二值图像。D. Image binarization. The grayscale image of 256 brightness levels is selected by threshold to obtain a binarized image that reflects the overall and local characteristics of the image, and the adaptive threshold segmentation based on histogram is used to obtain a binary image.
优选的,所述步骤C中训练方法如下:Preferably, the training method in the step C is as follows:
a、将图片输入卷积神经网络中,获得图片的识别结果,其中,识别结果包括:经过卷积神经网络获得的图片相似度验证结果和属性关联参数值,属性关联参数值与卷积神经网络对图片的目标属性的预测值相关;a. Input the picture into the convolutional neural network to obtain the recognition result of the picture, wherein the recognition result includes: the image similarity verification result obtained through the convolutional neural network and the attribute correlation parameter value, the attribute correlation parameter value and the convolutional neural network The predicted value of the target attribute of the picture is correlated;
b、根据图片的识别结果,对卷积神经网络的目标网络参数进行调整。b. Adjust the target network parameters of the convolutional neural network according to the recognition result of the picture.
与现有技术相比,本发明的有益效果是:本发明采用的安全检测方法操作简单,检测精度高、效率高,可信度高;其中,本发明采用的图像处理方法处理效率高,处理后的图像质量好,便于后续的高精度识别;此外,本发明采用的神经网络训练方法能够实现有效、精准的训练,有利于提高训练结果的精确度,可提高后期对目标属性的识别精度。,Compared with the prior art, the beneficial effects of the present invention are: the security detection method adopted in the present invention is simple to operate, has high detection accuracy, high efficiency, and high reliability; wherein, the image processing method adopted in the present invention has high processing efficiency and The quality of the resulting image is good, which is convenient for subsequent high-precision identification; in addition, the neural network training method adopted in the present invention can realize effective and accurate training, which is beneficial to improve the accuracy of the training result, and can improve the identification accuracy of the target attribute in the later stage. ,
附图说明Description of drawings
图1为本发明流程图。Fig. 1 is a flow chart of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
请参阅图1,本发明提供如下技术方案:一种基于计算机视觉的车内安全检测方法,包括以下步骤:Please refer to FIG. 1 , the present invention provides the following technical solution: a computer vision-based in-vehicle safety detection method, comprising the following steps:
A、车内摄像头采集车内图像并将采集的图像发送至处理器中进行处理;A. The in-vehicle camera collects in-vehicle images and sends the captured images to the processor for processing;
B、将处理后的图像进行特征提取;B. Feature extraction is performed on the processed image;
C、将特征提取后的图像传输至深度卷积神经网络进行训练,训练车内安全程度判别模型;C. The image after feature extraction is transmitted to the deep convolutional neural network for training, and the in-vehicle safety degree discrimination model is trained;
D、利用车内安全程度判别模型对采集的车内图像进行安全判别。D. Use the in-vehicle safety degree discrimination model to discriminate the safety of the collected in-vehicle images.
本发明中,步骤A中图像处理方法包括以下步骤:In the present invention, the image processing method in step A includes the following steps:
a、图像灰度化,把彩色图像变为单通道数据的灰度图像,根据加权平均值法得到灰度图像;a. Grayscale the image, convert the color image into a grayscale image of single-channel data, and obtain the grayscale image according to the weighted average method;
b、图像增强,对原图像变换数据突出图像中轮廓特征,去除图像中不需要的纹理特征;b. Image enhancement, highlighting the contour features in the image for the original image transformation data, and removing the unnecessary texture features in the image;
c、图像滤波,用序贯滤波对图像进行处理,然后进行融合处理,具体公式如下:c. Image filtering, using sequential filtering to process the image, and then performing fusion processing, the specific formula is as follows:
t(x,y)=max(ga(x,y),gb(x,y),gc(x,y),gd(x,y))t(x, y) = max(ga (x, y), gb (x, y), gc (x, y), gd (x, y))
其中,t(x,y)为融合后的图像在坐标点(x,y)处的灰度值,ga(x,y)、gb(x,y)、gc(x,y)、gd(x,y)分别为水平、45度、垂直、135度方向的序贯滤波结果图在坐标点(x,y)处的灰度值;Among them, t(x, y) is the gray value of the fused image at the coordinate point (x, y), ga (x, y), gb (x, y), gc (x, y) , gd (x, y) are the gray value of the sequential filtering result map at the coordinate point (x, y) in the horizontal, 45-degree, vertical, and 135-degree directions respectively;
D、图像二值化,把256个亮度等级的灰度图像通过阈值选取而获得反映图像整体和局部特征的二值化图像,使用基于直方图的自适应阈值分割来获得二值图像。D. Image binarization. The grayscale image of 256 brightness levels is selected by threshold to obtain a binarized image that reflects the overall and local characteristics of the image, and the adaptive threshold segmentation based on histogram is used to obtain a binary image.
本发明中,步骤C中训练方法如下:In the present invention, the training method in step C is as follows:
a、将图片输入卷积神经网络中,获得图片的识别结果,其中,识别结果包括:经过卷积神经网络获得的图片相似度验证结果和属性关联参数值,属性关联参数值与卷积神经网络对图片的目标属性的预测值相关;a. Input the picture into the convolutional neural network to obtain the recognition result of the picture, wherein the recognition result includes: the image similarity verification result obtained through the convolutional neural network and the attribute correlation parameter value, the attribute correlation parameter value and the convolutional neural network The predicted value of the target attribute of the picture is correlated;
b、根据图片的识别结果,对卷积神经网络的目标网络参数进行调整。b. Adjust the target network parameters of the convolutional neural network according to the recognition result of the picture.
本发明采用的安全检测方法操作简单,检测精度高、效率高,可信度高;其中,本发明采用的图像处理方法处理效率高,处理后的图像质量好,便于后续的高精度识别;此外,本发明采用的神经网络训练方法能够实现有效、精准的训练,有利于提高训练结果的精确度,可提高后期对目标属性的识别精度。The security detection method adopted in the present invention has simple operation, high detection accuracy, high efficiency, and high reliability; wherein, the image processing method adopted in the present invention has high processing efficiency, and the processed image quality is good, which is convenient for subsequent high-precision identification; The neural network training method adopted in the present invention can realize effective and accurate training, is beneficial to improve the accuracy of the training result, and can improve the recognition accuracy of the target attribute in the later stage.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, and substitutions can be made in these embodiments without departing from the principle and spirit of the invention and modifications, the scope of the invention is defined by the appended claims and their equivalents.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810534781.0ACN110533056A (en) | 2018-05-24 | 2018-05-24 | A kind of interior safety detection method based on computer vision |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810534781.0ACN110533056A (en) | 2018-05-24 | 2018-05-24 | A kind of interior safety detection method based on computer vision |
| Publication Number | Publication Date |
|---|---|
| CN110533056Atrue CN110533056A (en) | 2019-12-03 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810534781.0AWithdrawnCN110533056A (en) | 2018-05-24 | 2018-05-24 | A kind of interior safety detection method based on computer vision |
| Country | Link |
|---|---|
| CN (1) | CN110533056A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103150560A (en)* | 2013-03-15 | 2013-06-12 | 福州龙吟信息技术有限公司 | Method for realizing intelligent safe driving of automobile |
| CN105373779A (en)* | 2015-11-10 | 2016-03-02 | 北京汉王智通科技有限公司 | Intelligent vehicle safety belt detection method and intelligent detection system |
| CN106845393A (en)* | 2017-01-19 | 2017-06-13 | 博康智能信息技术有限公司北京海淀分公司 | Safety belt identification model construction method and device |
| CN106886756A (en)* | 2017-01-19 | 2017-06-23 | 博康智能信息技术有限公司北京海淀分公司 | Do not fasten the safety belt behavioral value method and device |
| CN107341509A (en)* | 2017-06-29 | 2017-11-10 | 北京小米移动软件有限公司 | The training method and device of convolutional neural networks |
| CN107609598A (en)* | 2017-09-27 | 2018-01-19 | 武汉斗鱼网络科技有限公司 | Image authentication model training method, device and readable storage medium storing program for executing |
| CN107941808A (en)* | 2017-11-10 | 2018-04-20 | 中国计量大学 | 3D printing Forming Quality detecting system and method based on machine vision |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103150560A (en)* | 2013-03-15 | 2013-06-12 | 福州龙吟信息技术有限公司 | Method for realizing intelligent safe driving of automobile |
| CN105373779A (en)* | 2015-11-10 | 2016-03-02 | 北京汉王智通科技有限公司 | Intelligent vehicle safety belt detection method and intelligent detection system |
| CN106845393A (en)* | 2017-01-19 | 2017-06-13 | 博康智能信息技术有限公司北京海淀分公司 | Safety belt identification model construction method and device |
| CN106886756A (en)* | 2017-01-19 | 2017-06-23 | 博康智能信息技术有限公司北京海淀分公司 | Do not fasten the safety belt behavioral value method and device |
| CN107341509A (en)* | 2017-06-29 | 2017-11-10 | 北京小米移动软件有限公司 | The training method and device of convolutional neural networks |
| CN107609598A (en)* | 2017-09-27 | 2018-01-19 | 武汉斗鱼网络科技有限公司 | Image authentication model training method, device and readable storage medium storing program for executing |
| CN107941808A (en)* | 2017-11-10 | 2018-04-20 | 中国计量大学 | 3D printing Forming Quality detecting system and method based on machine vision |
| Publication | Publication Date | Title |
|---|---|---|
| CN108549874B (en) | Target detection method, target detection equipment and computer-readable storage medium | |
| CN110349207B (en) | A visual localization method in complex environment | |
| CN109241985B (en) | An image recognition method and device | |
| CN110334779B (en) | Multi-focus image fusion method based on PSPNet detail extraction | |
| CN109636824B (en) | Multi-target counting method based on image recognition technology | |
| CN106446952B (en) | A kind of musical score image recognition methods and device | |
| CN109145803B (en) | Gesture recognition method and device, electronic equipment and computer readable storage medium | |
| CN112883824A (en) | Finger vein feature recognition device for intelligent blood sampling and recognition method thereof | |
| CN107862249A (en) | A kind of bifurcated palm grain identification method and device | |
| CN108664839A (en) | A kind of image processing method and equipment | |
| CN111553310B (en) | Security inspection image acquisition method and system based on millimeter wave radar and security inspection equipment | |
| CN111340041B (en) | License plate recognition method and device based on deep learning | |
| CN111639629A (en) | Pig weight measuring method and device based on image processing and storage medium | |
| CN108765392A (en) | A kind of digestive endoscope lesion detection and recognition methods based on sliding window | |
| CN113379640B (en) | Multi-stage filtering image denoising method integrating edge information | |
| CN111950409B (en) | Intelligent identification method and system for road marking line | |
| CN112949451A (en) | Cross-modal target tracking method and system through modal perception feature learning | |
| CN110245600B (en) | Adaptive start fast stroke width UAV road detection method | |
| CN116703895B (en) | Small sample 3D visual detection method and system based on generation countermeasure network | |
| CN116311212B (en) | Ship number identification method and device based on high-speed camera and in motion state | |
| CN110751667B (en) | Method for detecting infrared dim and small targets under complex background based on human visual system | |
| CN109712134B (en) | Iris image quality evaluation method and device and electronic equipment | |
| CN115147613A (en) | Infrared small target detection method based on multidirectional fusion | |
| CN113420582B (en) | Anti-counterfeiting detection method and system for palm vein recognition | |
| CN109522865A (en) | A feature weighted fusion face recognition method based on deep neural network |
| 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 | ||
| WW01 | Invention patent application withdrawn after publication | ||
| WW01 | Invention patent application withdrawn after publication | Application publication date:20191203 |