CN115452844B - Injection molding part detection method and system based on machine vision - Google Patents
Injection molding part detection method and system based on machine vision Download PDFInfo
- Publication number
- CN115452844B CN115452844B CN202211409675.2A CN202211409675A CN115452844B CN 115452844 B CN115452844 B CN 115452844B CN 202211409675 A CN202211409675 A CN 202211409675A CN 115452844 B CN115452844 B CN 115452844B
- Authority
- CN
- China
- Prior art keywords
- image
- highlight
- annular
- collected
- injection molding
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Signal Processing (AREA)
- Artificial Intelligence (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Quality & Reliability (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Geometry (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Injection Moulding Of Plastics Or The Like (AREA)
Abstract
本发明公开了一种基于机器视觉的注塑件检测方法及系统,本发明技术方案通过对同一待测环形注塑件采集由不同光源照射的两个图像分别进行处理,利用光源照射后可以将环形注塑件上反光点放大的特点,根据两个采集图像中各个高亮位置点的亮度值过滤反光点,排除了环形注塑件上反光点对于气泡缺陷形状识别的影响噪声,克服现有技术无法对注塑件上的气泡缺陷,特别是环形注塑件上的气泡缺陷进行精准识别的技术问题,实现对注塑件上的气泡缺陷进行精准识别,特别是环形注塑件的气泡缺陷识别,可以提高注塑件的检测成功率和准确性。
The invention discloses a method and system for detecting injection molded parts based on machine vision. The technical scheme of the invention processes two images irradiated by different light sources by collecting two images of the same ring-shaped injection molded part to be tested. According to the feature of enlarged reflective points on the part, the reflective points are filtered according to the brightness value of each highlighted position point in the two collected images, which eliminates the impact noise of the reflective points on the ring-shaped injection molded part on the recognition of the shape of the bubble defect, and overcomes the inability of the existing technology to analyze the injection molding The technical problem of accurately identifying the bubble defects on the injection molded parts, especially the bubble defects on the annular injection molded parts, realizes the accurate identification of the bubble defects on the injection molded parts, especially the bubble defect recognition of the annular injection molded parts, which can improve the detection of injection molded parts success rate and accuracy.
Description
技术领域technical field
本发明涉及图像处理技术领域,尤其涉及一种基于机器视觉的注塑件检测方法及系统。The invention relates to the technical field of image processing, in particular to a method and system for detecting injection molded parts based on machine vision.
背景技术Background technique
注塑件在制作时是由聚丙烯和聚乙烯等材料通过融合多种有机物溶剂后制作而成的工件。其制作原理是将塑胶粒经过高温熔化后注入到模型中,经机器挤压并冷却后成件,其制作过程受温度、压强压力和模型等其他因素影响较大,生产出来的注塑件表面大概率会出现缺胶或者多胶的情况,所以生产出来后的注塑件通常需要通过检测的方式发现缺陷。Injection molded parts are workpieces made of materials such as polypropylene and polyethylene by fusing a variety of organic solvents. The production principle is to inject plastic pellets into the model after high-temperature melting, extrude the machine and cool it to form a piece. The production process is greatly affected by other factors such as temperature, pressure and model, and the surface of the produced injection molded parts is large. There may be a lack of glue or too much glue in the probability, so the injection molded parts after production usually need to find defects through inspection.
目前关于注塑件的缺陷类型,常见于:缩小、气纹、缺料、披锋、夹线等。面对上述常见的缺陷类型,现有的注塑件检测策略基本上都是以人工检测的方式为主,工作人员通过观察生产出来的注塑件表面情况,将存在缺陷的注塑件进行分类出去。上述明显缺陷或许还能通过人工的方式进行检测,但遇到特殊缺陷类型,例如“气泡”。由于物料注射过快而形成气泡,或者产出成型时体积收缩不均而引起空洞,使得气泡存在于注塑件内部。而一些精密度较高的注塑件,对成品的要求很高,气泡的出现会应该注塑件安装后设备的使用。但传统的这种人工检测的方式效率极低,而且肉眼可见的准确度有限,无法对气泡缺陷点进行准确识别。虽然随着图像处理技术的发展,目前市面上有一些针对气泡缺陷在注塑件上的研究,但均只局限于气泡产生的成因分析等方向,并不能发现注塑件上的气泡缺陷;再加上在面对环形注塑件的图像检测过程中,由于环形注塑件本身的反光点会对气泡识别产生一定影响,令环形注塑件的气泡缺陷检测更为艰难。At present, the types of defects in injection molded parts are common in: shrinkage, air marks, lack of material, drape, and line clamping. In the face of the above-mentioned common defect types, the existing inspection strategies for injection molded parts are basically based on manual inspection. The staff observe the surface conditions of the produced injection molded parts and classify the defective injection molded parts. The above-mentioned obvious defects may still be detected manually, but special defect types such as "bubbles" are encountered. Bubbles are formed because the material is injected too fast, or voids are caused by uneven volume shrinkage during molding, so that the bubbles exist inside the injection molded part. However, some high-precision injection molded parts have high requirements for finished products, and the appearance of air bubbles will require the use of equipment after the injection molded parts are installed. However, the traditional manual detection method is extremely inefficient and has limited accuracy visible to the naked eye, making it impossible to accurately identify bubble defect points. Although with the development of image processing technology, there are currently some researches on injection molded parts on the market for bubble defects, but they are all limited to the analysis of the cause of bubble generation, and cannot find bubble defects on injection molded parts; plus In the image detection process of annular injection molded parts, since the reflective points of the annular injection molded part itself will have a certain impact on bubble recognition, it is more difficult to detect bubble defects in annular injection molded parts.
因此,目前市面上亟需一种新的注塑件检测策略,可以对注塑件上的气泡缺陷进行精准识别,特别是环形注塑件的气泡缺陷识别,提高注塑件的检测成功率和准确性。Therefore, there is an urgent need for a new detection strategy for injection molded parts on the market, which can accurately identify bubble defects on injection molded parts, especially for ring-shaped injection molded parts, and improve the detection success rate and accuracy of injection molded parts.
发明内容Contents of the invention
本发明提供了一种基于机器视觉的注塑件检测方法及系统,实现对注塑件上的气泡缺陷进行精准识别,特别是环形注塑件的气泡缺陷识别,可以提高注塑件的检测成功率和准确性。The invention provides a method and system for detecting injection molded parts based on machine vision, which can accurately identify bubble defects on injection molded parts, especially the recognition of bubble defects on ring-shaped injection molded parts, which can improve the detection success rate and accuracy of injection molded parts .
为了解决上述技术问题,本发明实施例提供了一种基于机器视觉的注塑件检测方法,对环形注塑件上的气泡缺陷进行检测,所述方法包括:In order to solve the above-mentioned technical problems, an embodiment of the present invention provides a machine vision-based inspection method for injection molded parts to detect bubble defects on ring-shaped injection molded parts. The method includes:
通过拍摄设备在封闭空间对待测环形注塑件进行图像采集,得到第一采集图像;保持所述拍摄设备和所述待测环形注塑件的位置不变,在所述封闭空间中投放光源后,对所述待测环形注塑件进行二次图像采集,得到第二采集图像;The image acquisition of the annular injection molded part to be tested is carried out by the photographing device in a closed space to obtain the first captured image; the positions of the photographing device and the annular injection molded part to be tested are kept unchanged, and after a light source is placed in the closed space, the The annular injection molded part to be tested is subjected to secondary image acquisition to obtain a second acquired image;
对所述第一采集图像和所述第二采集图像中的环形边界特征进行识别并标记,分别在所述第一采集图像和所述第二采集图像中确定所述待测环形注塑件的环形边界;Recognizing and marking the annular boundary features in the first collected image and the second collected image, respectively determining the ring shape of the annular injection molded part to be tested in the first collected image and the second collected image boundary;
对所述第一采集图像和所述第二采集图像进行预处理后输入到预先建立的高亮区域模型中进行识别,分别标记并输出第一采集图像和第二采集图像上存在的高亮位置点;After preprocessing the first collected image and the second collected image, input them into a pre-established highlight area model for identification, respectively mark and output the highlighted positions existing on the first collected image and the second collected image point;
分别确定所述第一采集图像和所述第二采集图像在环形边界上的高亮位置点,并确定环形边界上各个高亮位置点的亮度值;Respectively determine the highlighted position points of the first captured image and the second captured image on the circular boundary, and determine the brightness value of each highlighted position point on the circular boundary;
根据所述第一采集图像和所述第二采集图像在环形边界上同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像;According to the difference between the luminance values of the highlighted position points at the same position on the circular boundary between the first captured image and the second captured image, the highlighted position points whose difference value is greater than a preset threshold are used as influencing factors in the second captured image. - filtering in the collected image to obtain the filtered image;
将所述过滤图像输入到预先建立的气泡形状识别模型中进行识别,标记并输出所述过滤图像中形状满足气泡缺陷形状的高亮位置点,作为待测环形注塑件上的气泡缺陷。The filtered image is input into a pre-established bubble shape recognition model for recognition, and the highlighted position points in the filtered image whose shape meets the shape of the bubble defect are marked and output as the bubble defect on the annular injection molded part to be tested.
作为优选方案,所述对所述第一采集图像和所述第二采集图像中的环形边界特征进行识别并标记,分别在所述第一采集图像和所述第二采集图像中确定所述待测环形注塑件的环形边界的步骤中,具体包括:As a preferred solution, the identifying and marking the annular boundary features in the first collected image and the second collected image determine the to-be In the step of measuring the annular boundary of the annular injection molded part, it specifically includes:
分别对所述第一采集图像和所述第二采集图像进行网格化处理,并确定基准点;Carrying out grid processing on the first collected image and the second collected image respectively, and determining a reference point;
建立三维坐标系,以所述基准点为原点,分别将所述第一采集图像和所述第二采集图像移动到所述三维坐标系当中,并确定各个网格化点在所述三维坐标系中的坐标位置;Establishing a three-dimensional coordinate system, using the reference point as the origin, respectively moving the first captured image and the second captured image into the three-dimensional coordinate system, and determining that each gridded point is in the three-dimensional coordinate system The coordinate position in;
在所述第一采集图像中确定色度相同的连续多个网格化点之间形成的连线,且所述连线与不在所述连线上的相邻网格化点之间色度的差值达到色度阈值的,将所述连线确定为环形边界;Determining a connection line formed between a plurality of consecutive gridded points with the same chromaticity in the first captured image, and the chromaticity between the connection line and adjacent gridded points not on the connection line If the difference reaches the chromaticity threshold, the connection is determined as a ring boundary;
根据所述第一采集图像中确定的环形边界,在所述三维坐标系中以所述基准点为基准,移动到所述第二采集图像中,确定所述待测环形注塑件在第二采集图像中的环形边界。According to the circular boundary determined in the first captured image, move to the second captured image with the reference point as a reference in the three-dimensional coordinate system, and determine that the ring-shaped injection molded part to be tested is in the second captured image The circular boundary in the image.
作为优选方案,所述对所述第一采集图像和所述第二采集图像进行预处理的步骤中,具体包括:As a preferred solution, the step of preprocessing the first collected image and the second collected image specifically includes:
对所述第一采集图像和所述第二采集图像进行灰度化处理,分别得到对应的灰度图像;performing grayscale processing on the first collected image and the second collected image to obtain corresponding grayscale images respectively;
在所述三维坐标系中,以所述基准点为中点,将所述灰度图像进行横向拉伸一定倍数后,得到拉伸图像;In the three-dimensional coordinate system, taking the reference point as a midpoint, stretching the grayscale image horizontally by a certain multiple to obtain a stretched image;
对所述拉伸图像中存在的光斑特征进行识别,将所述拉伸图像中的光斑特征进行过滤,得到过滤图像;Identifying the spot features existing in the stretched image, and filtering the spot features in the stretched image to obtain a filtered image;
根据所述横向拉伸的倍数,将所述过滤图像进行横向缩小后,得到预处理后的图像输入到预先建立的高亮区域模型。According to the multiple of the horizontal stretching, after the filtered image is horizontally reduced, the preprocessed image is input to the pre-established highlight area model.
作为优选方案,所述高亮区域模型的建立步骤,包括:As a preferred solution, the step of establishing the highlighted region model includes:
获取训练图像,其中,所述训练图像是在封闭空间中投放光源后,由拍摄设备对训练环形注塑件进行图像采集而得到;Acquiring a training image, wherein the training image is obtained by capturing images of the training ring-shaped injection molded part by a shooting device after placing a light source in a closed space;
根据所述训练图像的色度,在所述训练图像中标记发生高亮区域的形状边界,并分别确定每个高亮区域的中心点与所述训练环形注塑件的环形边界上最近的距离点,将所述距离点与对应的高亮区域进行相关联;According to the chromaticity of the training image, mark the shape boundary of the highlight region in the training image, and determine the closest distance point between the center point of each highlight region and the ring boundary of the training annular injection molded part , associating the distance point with the corresponding highlighted region;
通过机器学习算法建立初始高亮模型,将关联后的训练图像输入到所述初始高亮模型中进行训练,直到训练次数达到阈值后,生成训练高亮模型;Establishing an initial highlight model through a machine learning algorithm, inputting associated training images into the initial highlight model for training, until the number of training times reaches a threshold, and generating a training highlight model;
获取测试图像,其中,所述测试图像是通过拍摄设备在封闭空间对训练环形注塑件进行图像采集而得到;Obtaining a test image, wherein the test image is obtained by capturing images of training annular injection molded parts in a closed space by a photographing device;
将所述测试图像输入到所述训练高亮模型中进行测试,当输出图像中由训练高亮模型在所述测试图像中标记存在高亮区域的高亮位置点的准确度达到预设阈值时,生成高亮区域模型。The test image is input into the training highlight model for testing, when the accuracy of the highlight position points in the test image marked by the training highlight model in the output image reaches a preset threshold , to generate a highlighted region model.
作为优选方案,所述对所述拉伸图像中存在的光斑特征进行识别的步骤中,具体包括:As a preferred solution, the step of identifying the spot features existing in the stretched image specifically includes:
对所述拉伸图像中存在的不规则图形进行识别,确定存在于所述拉伸图像中的不规则图形;Identifying the irregular graphics existing in the stretched image, and determining the irregular graphics existing in the stretched image;
分别对每一个不规则图形中划分多层圆环区域,并在每一层圆环区域中确定多个测试点,同时,确定每个测试点所在的色度;Divide a multi-layer ring area for each irregular figure, and determine multiple test points in each layer of ring area, and at the same time, determine the chromaticity of each test point;
计算每一层圆环区域中所有测试点的平均色度,将所述平均色度作为所在圆环区域的色度值;Calculate the average chromaticity of all test points in the circular area of each layer, and use the average chromaticity as the chromaticity value of the circular area;
当确定同一个不规则图形中,最外层的圆环区域上的色度值往最内层的圆环区域依次递减,则确定该不规则图形为所述拉伸图像中存在的光斑特征。When it is determined that in the same irregular figure, the chromaticity value on the outermost circular area decreases successively toward the innermost circular area, then it is determined that the irregular figure is a spot feature existing in the stretched image.
作为优选方案,所述分别确定所述第一采集图像和所述第二采集图像在环形边界上的高亮位置点,并确定环形边界上各个高亮位置点的亮度值的步骤中,具体包括:As a preferred solution, the step of respectively determining the highlighted position points of the first captured image and the second captured image on the circular boundary, and determining the brightness value of each highlighted position point on the circular boundary, specifically includes :
分别确定所述第一采集图像和所述第二采集图像在环形边界上每个高亮位置点所在的区域范围;Respectively determining the area range where each highlighted position point on the circular boundary of the first captured image and the second captured image is located;
针对每个高亮位置点的区域范围确定外接圆,将所述外接圆的圆心所在位置上对应的亮度值,作为对应高亮位置点的亮度值。A circumscribed circle is determined for the area range of each highlighted position point, and the brightness value corresponding to the position of the center of the circumscribed circle is used as the brightness value of the corresponding highlighted position point.
作为优选方案,所述根据所述第一采集图像和所述第二采集图像在环形边界上同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像的步骤中,具体包括:As a preferred solution, according to the difference between the brightness values of the highlighted position points at the same position on the circular boundary between the first acquired image and the second acquired image, the highlighted position points whose difference is greater than a preset threshold are taken as In the step of filtering the impact factor in the first collected image to obtain the filtered image, it specifically includes:
将所述第一采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第一坐标位置;Taking the coordinate position of each highlighted position point in the three-dimensional coordinate system in the first collected image as a whole, defining it as the first coordinate position;
将所述第二采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第二坐标位置;Taking the coordinate position of each highlighted position point in the second captured image in the three-dimensional coordinate system as a whole as a second coordinate position;
以所述第一坐标位置为基准,将所述第二坐标位置在三维坐标系中进行整体移动,直至所述第二坐标位置与所述第一坐标位置重合;Taking the first coordinate position as a reference, moving the second coordinate position in a three-dimensional coordinate system as a whole until the second coordinate position coincides with the first coordinate position;
确定重合后处于同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。Determining the difference between the brightness values of the highlighted position points at the same position after overlapping, and filtering the highlighted position points whose difference value is greater than a preset threshold as an influencing factor in the first collected image to obtain a filtered image.
作为优选方案,所述气泡形状识别模型的建立步骤,包括:As a preferred solution, the step of establishing the bubble shape recognition model includes:
在对气泡形状识别模型进行预先建立的过程中,获取由上述步骤执行后得到的过滤图像;In the process of pre-establishing the bubble shape recognition model, the filtered image obtained after the execution of the above steps is obtained;
通过人工识别的方式对所述过滤图像中存在的气泡进行标记,确定气泡缺陷范围;Marking the air bubbles existing in the filtered image by means of manual identification to determine the range of air bubble defects;
对每一个气泡缺陷范围中的灰度值进行识别,根据气泡缺陷范围中灰度值的变化,将所述气泡缺陷范围划分为两个区域;Identifying the gray value in each bubble defect range, and dividing the bubble defect range into two regions according to the change of the gray value in the bubble defect range;
分别对同一个气泡缺陷范围所在的两个区域确定外接圆,将两个区域对应外接圆的圆心进行相关联;Determine the circumscribed circles for the two areas where the same bubble defect range is located, and correlate the centers of the circumscribed circles corresponding to the two areas;
通过机器学习算法建立初始气泡模型,将关联后的过滤图像输入到所述初始气泡模型中进行训练和测试,直到训练和测试的次数达到阈值后,生成气泡形状识别模型。An initial bubble model is established through a machine learning algorithm, and the associated filtered images are input into the initial bubble model for training and testing, until the number of training and testing reaches a threshold, and a bubble shape recognition model is generated.
相应地,本发明另一实施例还提供了一种基于机器视觉的注塑件检测系统,用于对环形注塑件上的气泡缺陷进行检测,所述系统包括:图像采集模块、环形边界模块、高亮识别模块、高亮确定模块、图像过滤模块和气泡识别模块;Correspondingly, another embodiment of the present invention also provides a machine vision-based injection molded part detection system for detecting bubble defects on annular injection molded parts. The system includes: an image acquisition module, a ring boundary module, a high A bright recognition module, a highlight determination module, an image filter module and a bubble recognition module;
所述图像采集模块,用于通过拍摄设备在封闭空间对待测环形注塑件进行图像采集,得到第一采集图像;保持所述拍摄设备和所述待测环形注塑件的位置不变,在所述封闭空间中投放光源后,对所述待测环形注塑件进行二次图像采集,得到第二采集图像;The image acquisition module is used to acquire the image of the annular injection molded part to be tested in a closed space by a photographing device to obtain a first captured image; keeping the positions of the photographing device and the annular injection molded part to be tested unchanged, in the After the light source is placed in the closed space, a secondary image acquisition is performed on the annular injection molded part to be tested to obtain a second acquired image;
所述环形边界模块,用于对所述第一采集图像和所述第二采集图像中的环形边界特征进行识别并标记,分别在所述第一采集图像和所述第二采集图像中确定所述待测环形注塑件的环形边界;The circular boundary module is configured to identify and mark the circular boundary features in the first collected image and the second collected image, and determine the circular boundary features in the first collected image and the second collected image respectively. Describe the annular boundary of the annular injection molded part to be tested;
所述高亮识别模块,用于对所述第一采集图像和所述第二采集图像进行预处理后输入到预先建立的高亮区域模型中进行识别,分别标记并输出第一采集图像和第二采集图像上存在的高亮位置点;The highlight recognition module is configured to preprocess the first captured image and the second captured image and then input them into a pre-established highlight area model for recognition, respectively mark and output the first captured image and the second captured image 2. Acquire the highlighted position points existing on the image;
所述高亮确定模块,用于分别确定所述第一采集图像和所述第二采集图像在环形边界上的高亮位置点,并确定环形边界上各个高亮位置点的亮度值;The highlight determination module is configured to respectively determine the highlight position points of the first captured image and the second captured image on the circular boundary, and determine the brightness value of each highlighted position point on the circular boundary;
所述图像过滤模块,用于根据所述第一采集图像和所述第二采集图像在环形边界上同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像;The image filtering module is configured to, according to the difference between the brightness values of the highlighted position points at the same position on the circular boundary between the first captured image and the second captured image, select the highlighted position whose difference is greater than a preset threshold Points are used as influencing factors to filter in the first collected image to obtain a filtered image;
所述气泡识别模块,用于将所述过滤图像输入到预先建立的气泡形状识别模型中进行识别,标记并输出所述过滤图像中形状满足气泡缺陷形状的高亮位置点,作为待测环形注塑件上的气泡缺陷。The bubble recognition module is used to input the filtered image into the pre-established bubble shape recognition model for recognition, mark and output the highlighted position points in the filtered image whose shape meets the shape of the bubble defect, as the annular injection molding to be tested Bubble defects on parts.
作为优选方案,所述环形边界模块具体用于:分别对所述第一采集图像和所述第二采集图像进行网格化处理,并确定基准点;建立三维坐标系,以所述基准点为原点,分别将所述第一采集图像和所述第二采集图像移动到所述三维坐标系当中,并确定各个网格化点在所述三维坐标系中的坐标位置;在所述第一采集图像中确定色度相同的连续多个网格化点之间形成的连线,且所述连线与不在所述连线上的相邻网格化点之间色度的差值达到色度阈值的,将所述连线确定为环形边界;根据所述第一采集图像中确定的环形边界,在所述三维坐标系中以所述基准点为基准,移动到所述第二采集图像中,确定所述待测环形注塑件在第二采集图像中的环形边界。As a preferred solution, the annular boundary module is specifically configured to: perform grid processing on the first acquired image and the second acquired image respectively, and determine a reference point; establish a three-dimensional coordinate system, with the reference point as origin, respectively moving the first acquired image and the second acquired image into the three-dimensional coordinate system, and determining the coordinate positions of each gridded point in the three-dimensional coordinate system; Determine the connection line formed between multiple consecutive grid points with the same chromaticity in the image, and the chromaticity difference between the connection line and the adjacent grid points that are not on the connection line reaches the chromaticity Threshold, determining the connecting line as a circular boundary; according to the circular boundary determined in the first captured image, moving to the second captured image in the three-dimensional coordinate system with the reference point as a reference , determining the annular boundary of the annular injection molded part to be tested in the second collected image.
作为优选方案,所述高亮识别模块用于对所述第一采集图像和所述第二采集图像进行预处理的步骤中,具体包括:对所述第一采集图像和所述第二采集图像进行灰度化处理,分别得到对应的灰度图像;在所述三维坐标系中,以所述基准点为中点,将所述灰度图像进行横向拉伸一定倍数后,得到拉伸图像;对所述拉伸图像中存在的光斑特征进行识别,将所述拉伸图像中的光斑特征进行过滤,得到过滤图像;根据所述横向拉伸的倍数,将所述过滤图像进行横向缩小后,得到预处理后的图像输入到预先建立的高亮区域模型。As a preferred solution, the highlight recognition module is used in the step of preprocessing the first collected image and the second collected image, which specifically includes: processing the first collected image and the second collected image performing grayscale processing to obtain corresponding grayscale images respectively; in the three-dimensional coordinate system, taking the reference point as the midpoint, stretching the grayscale image horizontally by a certain multiple to obtain a stretched image; Identifying the spot features existing in the stretched image, and filtering the spot features in the stretched image to obtain a filtered image; according to the multiple of the horizontal stretching, after horizontally reducing the filtered image, The preprocessed image is input to the pre-established highlight region model.
作为优选方案,所述高亮区域模型的建立步骤,包括:获取训练图像,其中,所述训练图像是在封闭空间中投放光源后,由拍摄设备对训练环形注塑件进行图像采集而得到;根据所述训练图像的色度,在所述训练图像中标记发生高亮区域的形状边界,并分别确定每个高亮区域的中心点与所述训练环形注塑件的环形边界上最近的距离点,将所述距离点与对应的高亮区域进行相关联;通过机器学习算法建立初始高亮模型,将关联后的训练图像输入到所述初始高亮模型中进行训练,直到训练次数达到阈值后,生成训练高亮模型;获取测试图像,其中,所述测试图像是通过拍摄设备在封闭空间对训练环形注塑件进行图像采集而得到;将所述测试图像输入到所述训练高亮模型中进行测试,当输出图像中由训练高亮模型在所述测试图像中标记存在高亮区域的高亮位置点的准确度达到预设阈值时,生成高亮区域模型。As a preferred solution, the step of establishing the highlighted area model includes: acquiring a training image, wherein the training image is obtained by capturing images of training annular injection molded parts by a shooting device after placing a light source in a closed space; The chromaticity of the training image, marking the shape boundary of the highlighted area in the training image, and determining the shortest distance point between the center point of each highlighted area and the annular boundary of the training annular injection molded part, Associating the distance point with the corresponding highlight area; establishing an initial highlight model through a machine learning algorithm, and inputting the associated training image into the initial highlight model for training until the number of training times reaches a threshold, Generate a training highlight model; acquire a test image, wherein the test image is obtained by capturing images of the training annular injection molded part in a closed space by a shooting device; input the test image into the training highlight model for testing , when in the output image the accuracy of marking the highlighted position points in the test image with the highlighted region by the training highlighted model reaches a preset threshold, a highlighted region model is generated.
作为优选方案,所述高亮识别模块用于对所述拉伸图像中存在的光斑特征进行识别的步骤中,具体包括:对所述拉伸图像中存在的不规则图形进行识别,确定存在于所述拉伸图像中的不规则图形;分别对每一个不规则图形中划分多层圆环区域,并在每一层圆环区域中确定多个测试点,同时,确定每个测试点所在的色度;计算每一层圆环区域中所有测试点的平均色度,将所述平均色度作为所在圆环区域的色度值;当确定同一个不规则图形中,最外层的圆环区域上的色度值往最内层的圆环区域依次递减,则确定该不规则图形为所述拉伸图像中存在的光斑特征。As a preferred solution, the highlight identification module is used in the step of identifying the spot features existing in the stretched image, which specifically includes: identifying irregular patterns existing in the stretched image, and determining the presence of Irregular figures in the stretched image; each irregular figure is divided into multi-layer ring regions, and a plurality of test points are determined in each layer of ring regions, and at the same time, the location of each test point is determined Chromaticity; Calculate the average chromaticity of all test points in the ring area of each layer, and use the average chromaticity as the chromaticity value of the ring area; when determining the same irregular figure, the outermost ring If the chromaticity value on the area decreases successively toward the innermost circular area, then it is determined that the irregular figure is the spot feature existing in the stretched image.
作为优选方案,所述高亮确定模块具体用于:分别确定所述第一采集图像和所述第二采集图像在环形边界上每个高亮位置点所在的区域范围;针对每个高亮位置点的区域范围确定外接圆,将所述外接圆的圆心所在位置上对应的亮度值,作为对应高亮位置点的亮度值。As a preferred solution, the highlight determination module is specifically configured to: respectively determine the area range where each highlight position point on the circular boundary of the first captured image and the second captured image is located; for each highlight position The circumscribed circle is determined by the area range of the point, and the brightness value corresponding to the position of the center of the circumscribed circle is used as the brightness value of the point corresponding to the highlighted position.
作为优选方案,所述图像过滤模块具体用于:将所述第一采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第一坐标位置;将所述第二采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第二坐标位置;以所述第一坐标位置为基准,将所述第二坐标位置在三维坐标系中进行整体移动,直至所述第二坐标位置与所述第一坐标位置重合;确定重合后处于同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。As a preferred solution, the image filtering module is specifically configured to: define the coordinate position of each highlighted position point in the first captured image in the three-dimensional coordinate system as a whole as the first coordinate position; define the second The coordinate position of each highlighted position point in the collected image in the three-dimensional coordinate system is defined as a second coordinate position as a whole; taking the first coordinate position as a reference, the second coordinate position is carried out in the three-dimensional coordinate system Move as a whole until the second coordinate position coincides with the first coordinate position; determine the difference between the brightness values of the highlighted position points at the same position after the coincidence, and use the highlighted position points whose difference is greater than the preset threshold as the influence Factors are filtered in the first acquired image to obtain a filtered image.
作为优选方案,所述气泡形状识别模型的建立步骤,包括:在对气泡形状识别模型进行预先建立的过程中,获取由上述步骤执行后得到的过滤图像;通过人工识别的方式对所述过滤图像中存在的气泡进行标记,确定气泡缺陷范围;对每一个气泡缺陷范围中的灰度值进行识别,根据气泡缺陷范围中灰度值的变化,将所述气泡缺陷范围划分为两个区域;分别对同一个气泡缺陷范围所在的两个区域确定外接圆,将两个区域对应外接圆的圆心进行相关联;通过机器学习算法建立初始气泡模型,将关联后的过滤图像输入到所述初始气泡模型中进行训练和测试,直到训练和测试的次数达到阈值后,生成气泡形状识别模型。As a preferred solution, the step of establishing the bubble shape recognition model includes: in the process of pre-establishing the bubble shape recognition model, obtaining the filtered image obtained after the execution of the above steps; manually identifying the filtered image Mark the bubbles existing in the bubble to determine the bubble defect range; identify the gray value in each bubble defect range, and divide the bubble defect range into two regions according to the change of the gray value in the bubble defect range; Determine the circumscribed circles for the two areas where the same bubble defect range is located, and correlate the centers of the circumscribed circles corresponding to the two areas; establish an initial bubble model through a machine learning algorithm, and input the associated filtered image into the initial bubble model Perform training and testing in , until the number of training and testing reaches the threshold, a bubble shape recognition model is generated.
本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序;其中,所述计算机程序在运行时控制所述计算机可读存储介质所在的设备执行如上述任一项所述的基于机器视觉的注塑件检测方法。An embodiment of the present invention also provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; wherein, when running, the computer program controls the device where the computer-readable storage medium is located to execute the following steps: The machine vision-based inspection method for injection molded parts described in any one of the above.
本发明实施例还提供了一种终端设备,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器在执行所述计算机程序时实现如上述任一项所述的基于机器视觉的注塑件检测方法。An embodiment of the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the A machine vision-based inspection method for injection molded parts as described in any one of the above.
相比于现有技术,本发明实施例具有如下有益效果:Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
本发明技术方案通过对同一待测环形注塑件采集由不同光源照射的两个图像分别进行处理,利用光源照射后可以将环形注塑件上反光点放大的特点,根据两个采集图像中各个高亮位置点的亮度值过滤反光点,排除了环形注塑件上反光点对于气泡缺陷形状识别的影响噪声,克服现有技术无法对注塑件上的气泡缺陷,特别是环形注塑件上的气泡缺陷进行精准识别的技术问题,实现对注塑件上的气泡缺陷进行精准识别,特别是环形注塑件的气泡缺陷识别,可以提高注塑件的检测成功率和准确性。The technical scheme of the present invention processes two images of the same ring-shaped injection molded part to be tested, which are irradiated by different light sources, respectively, and utilizes the feature that the reflective points on the ring-shaped injection molded part can be enlarged after being irradiated by the light source. The brightness value of the position point filters the reflective point, which eliminates the influence noise of the reflective point on the ring-shaped injection molded part for the shape recognition of the bubble defect, and overcomes the inability of the existing technology to accurately detect the bubble defect on the injection molded part, especially the bubble defect on the ring-shaped injection molded part To solve the technical problems of identification, realize accurate identification of bubble defects on injection molded parts, especially the identification of bubble defects on annular injection molded parts, which can improve the detection success rate and accuracy of injection molded parts.
附图说明Description of drawings
图1 :为本发明实施例提供的一种基于机器视觉的注塑件检测方法的步骤流程图;Fig. 1: a flow chart of the steps of a machine vision-based injection molded part detection method provided by an embodiment of the present invention;
图2 :为本发明实施例提供的一种基于机器视觉的注塑件检测系统的结构示意图;Fig. 2: a schematic structural diagram of a machine vision-based injection molding inspection system provided by an embodiment of the present invention;
图3 :为本发明实施例提供的终端设备的一种实施例的结构示意图。FIG. 3 is a schematic structural diagram of an embodiment of a terminal device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例一Embodiment one
请参照图1,为本发明实施例提供的一种基于机器视觉的注塑件检测方法的步骤流程图。所述方法用于对环形注塑件上的气泡缺陷进行检测,包括步骤101至步骤106,各步骤具体如下:Please refer to FIG. 1 , which is a flow chart of steps of a machine vision-based inspection method for injection molded parts provided by an embodiment of the present invention. The method is used to detect bubble defects on annular injection molded parts, including steps 101 to 106, and each step is specifically as follows:
步骤101,通过拍摄设备在封闭空间对待测环形注塑件进行图像采集,得到第一采集图像;保持所述拍摄设备和所述待测环形注塑件的位置不变,在所述封闭空间中投放光源后,对所述待测环形注塑件进行二次图像采集,得到第二采集图像。Step 101: Collecting images of the annular injection molded part to be tested in a closed space by a photographing device to obtain a first captured image; keeping the positions of the photographing device and the annular injection molded part to be tested unchanged, and placing a light source in the closed space Afterwards, a second image acquisition is performed on the annular injection molded part to be tested to obtain a second acquired image.
具体地,由于注塑件图像在识别缺陷过程中,会产生反光点,而环形注塑件由于本身存在弧度的原因,其产生反光点的问题会更加严重。当注塑件图像产生反光点时,在识别过程中往往会将部分反光点错误识别成气泡缺陷,或者由于反光点覆盖范围过大而影响气泡缺陷的识别。基于上述原因,我们在对注塑件检测的过程中,尤其是环形注塑件检测的过程中,特别需要剔除反光点对注塑件图像本身带来的影响。本步骤需要采集两个图像,一个图像是基于封闭空间对环形注塑件的采集,另一个图像是在外加光源的情况下采集的图像。通过研究发现,在对原来拍摄的图像外加光源之后,会对注塑件图像上的反光点进行放大,更利于我们识别和去除反光点。Specifically, since the image of the injection molded part will produce reflective points during the process of identifying defects, and the problem of generating reflective points in the ring-shaped injection molded part will be more serious due to the radian itself. When the image of the injection molded part produces reflective points, some of the reflective points are often misidentified as bubble defects during the recognition process, or the recognition of bubble defects is affected due to the excessive coverage of the reflective points. Based on the above reasons, in the process of inspecting injection molded parts, especially in the process of inspecting annular injection molded parts, it is especially necessary to eliminate the influence of reflective points on the image of the injection molded part itself. This step needs to collect two images, one image is based on the collection of annular injection molded parts in a closed space, and the other image is an image collected under the condition of an external light source. Through research, it is found that after adding a light source to the original image, the reflective points on the image of the injection molded part will be enlarged, which is more conducive to our identification and removal of reflective points.
步骤102,对所述第一采集图像和所述第二采集图像中的环形边界特征进行识别并标记,分别在所述第一采集图像和所述第二采集图像中确定所述待测环形注塑件的环形边界。Step 102: Identify and mark the annular boundary features in the first collected image and the second collected image, and determine the annular injection mold to be tested in the first collected image and the second collected image respectively. The circular boundary of the piece.
在本实施例中,所述步骤102具体包括:步骤1021,分别对所述第一采集图像和所述第二采集图像进行网格化处理,并确定基准点;步骤1022,建立三维坐标系,以所述基准点为原点,分别将所述第一采集图像和所述第二采集图像移动到所述三维坐标系当中,并确定各个网格化点在所述三维坐标系中的坐标位置;步骤1023,在所述第一采集图像中确定色度相同的连续多个网格化点之间形成的连线,且所述连线与不在所述连线上的相邻网格化点之间色度的差值达到色度阈值的,将所述连线确定为环形边界;步骤1024,根据所述第一采集图像中确定的环形边界,在所述三维坐标系中以所述基准点为基准,移动到所述第二采集图像中,确定所述待测环形注塑件在第二采集图像中的环形边界。In this embodiment, the step 102 specifically includes: step 1021, performing grid processing on the first collected image and the second collected image respectively, and determining a reference point; step 1022, establishing a three-dimensional coordinate system, Taking the reference point as the origin, respectively moving the first captured image and the second captured image into the three-dimensional coordinate system, and determining the coordinate positions of each gridded point in the three-dimensional coordinate system; Step 1023, determining a connection line formed between a plurality of consecutive gridded points with the same chromaticity in the first captured image, and the distance between the connection line and adjacent gridded points that are not on the connection line If the difference between the chromaticity reaches the chromaticity threshold, the connecting line is determined as a circular boundary; step 1024, according to the circular boundary determined in the first captured image, in the three-dimensional coordinate system with the reference point As a reference, move to the second captured image, and determine the annular boundary of the annular injection molded part to be tested in the second captured image.
具体地,通过上述步骤101可以将注塑件的反光点进行放大。而为了进一步识别环形边界对于反光点的影响,专门针对环形注塑件,也就是对更难突破的环形注塑件上的反光点进行识别,我们需要先确定环形注塑件上的环形边界。在具体识别过程中,为了消除外加光源对环形边界识别的影响(例如,曝光时间过长容易使环形边界出现模糊化),在本步骤中,我们利用第一采集图像和第二采集图像在基准点位置上进行对准。再根据环形边界与周围非边界上的网格区域形成的色差,从而识别出完整的环形边界,防止后续对环形边界上出现的反光点进行识别过程中无法完全识别。Specifically, through the above step 101, the reflection point of the injection molded part can be enlarged. In order to further identify the impact of the annular boundary on the reflective point, specifically for the annular injection molded part, that is, to identify the reflective point on the annular injection molded part that is more difficult to break through, we need to first determine the annular boundary on the annular injection molded part. In the specific recognition process, in order to eliminate the impact of external light sources on the recognition of the ring boundary (for example, if the exposure time is too long, the ring boundary will be blurred), in this step, we use the first and second collected images to compare Align at the point position. Then, according to the color difference formed by the circular boundary and the surrounding grid area on the non-boundary, the complete circular boundary can be identified to prevent the inability to fully identify the reflective points that appear on the circular boundary in the subsequent identification process.
步骤103,对所述第一采集图像和所述第二采集图像进行预处理后输入到预先建立的高亮区域模型中进行识别,分别标记并输出第一采集图像和第二采集图像上存在的高亮位置点。Step 103, preprocessing the first collected image and the second collected image and inputting them into a pre-established highlight area model for identification, respectively marking and outputting the Highlight the location point.
在本实施例中,所述步骤103用于对所述第一采集图像和所述第二采集图像进行预处理的步骤中,具体包括:步骤1031,对所述第一采集图像和所述第二采集图像进行灰度化处理,分别得到对应的灰度图像;步骤1032,在所述三维坐标系中,以所述基准点为中点,将所述灰度图像进行横向拉伸一定倍数后,得到拉伸图像;步骤1033,对所述拉伸图像中存在的光斑特征进行识别,将所述拉伸图像中的光斑特征进行过滤,得到过滤图像;步骤1034,根据所述横向拉伸的倍数,将所述过滤图像进行横向缩小后,得到预处理后的图像输入到预先建立的高亮区域模型。In this embodiment, the step 103 is used in the step of preprocessing the first collected image and the second collected image, which specifically includes: Step 1031, processing the first collected image and the second collected image 2. Gather images and perform grayscale processing to obtain corresponding grayscale images respectively; step 1032, in the three-dimensional coordinate system, take the reference point as the midpoint, and stretch the grayscale image horizontally by a certain multiple , to obtain a stretched image; step 1033, identify the spot features existing in the stretched image, and filter the spot features in the stretched image to obtain a filtered image; step 1034, according to the horizontally stretched After the filtered image is reduced horizontally, the preprocessed image is input to the pre-established highlight area model.
其中,在本实施例的另一方面中,所述步骤1033用于对所述拉伸图像中存在的光斑特征进行识别的步骤中,具体包括:对所述拉伸图像中存在的不规则图形进行识别,确定存在于所述拉伸图像中的不规则图形;分别对每一个不规则图形中划分多层圆环区域,并在每一层圆环区域中确定多个测试点,同时,确定每个测试点所在的色度;计算每一层圆环区域中所有测试点的平均色度,将所述平均色度作为所在圆环区域的色度值;当确定同一个不规则图形中,最外层的圆环区域上的色度值往最内层的圆环区域依次递减,则确定该不规则图形为所述拉伸图像中存在的光斑特征。Wherein, in another aspect of this embodiment, the step 1033 is used in the step of identifying the spot features existing in the stretched image, which specifically includes: identifying irregular patterns existing in the stretched image Identify and determine the irregular graphics that exist in the stretched image; divide each irregular graphic into a multi-layer ring area, and determine a plurality of test points in each layer of ring area, and at the same time, determine The chromaticity of each test point; calculate the average chromaticity of all test points in the circular area of each layer, and use the average chromaticity as the chromaticity value of the circular area; when determining the same irregular figure, If the chromaticity values on the outermost ring area decrease successively toward the innermost ring area, then it is determined that the irregular pattern is a spot feature existing in the stretched image.
具体地,为了在后续步骤中确定在环形边界上的反光点(基本上所有的反光点都集中在环形边界上了,因为光源照射过程中,环形界面会反射光源形成反光。所以环形注塑件上的反光点基本都集中在环形边界上),我们需要通过模型对注塑件上出现反光点进行识别。而为了更准确地识别高亮位置点(即疑似反光点,后续再判断),需要先对图像进行预处理。在预处理过程中,为了降噪,需要对图像中除环形注塑件以外的图像区域而存在的其他影响因子进行去除(例如,噪点等光斑)。这个时候可以利用图像拉伸后,将光斑拉伸为不规则图像,利用光斑在图像中色度从外层向内递减的特点进行判断出图像中存在的光斑噪点,进行过滤。Specifically, in order to determine the reflective points on the annular boundary in the subsequent steps (basically all the reflective points are concentrated on the annular boundary, because during the light source irradiation process, the annular interface will reflect the light source to form reflection. Therefore, on the annular injection molded part The reflective points are basically concentrated on the circular boundary), we need to use the model to identify the reflective points on the injection molded parts. In order to more accurately identify the highlighted position point (that is, the suspected reflective point, which will be judged later), the image needs to be preprocessed first. In the preprocessing process, in order to reduce noise, it is necessary to remove other influencing factors in the image area other than the annular injection molded part (for example, noise and other light spots). At this time, after the image is stretched, the light spot can be stretched into an irregular image, and the light spot noise in the image can be judged and filtered by using the characteristic that the chromaticity of the light spot in the image decreases from the outer layer to the inside.
在本实施例中,所述高亮区域模型的建立步骤,包括:获取训练图像,其中,所述训练图像是在封闭空间中投放光源后,由拍摄设备对训练环形注塑件进行图像采集而得到;根据所述训练图像的色度,在所述训练图像中标记发生高亮区域的形状边界,并分别确定每个高亮区域的中心点与所述训练环形注塑件的环形边界上最近的距离点,将所述距离点与对应的高亮区域进行相关联;通过机器学习算法建立初始高亮模型,将关联后的训练图像输入到所述初始高亮模型中进行训练,直到训练次数达到阈值后,生成训练高亮模型;获取测试图像,其中,所述测试图像是通过拍摄设备在封闭空间对训练环形注塑件进行图像采集而得到;将所述测试图像输入到所述训练高亮模型中进行测试,当输出图像中由训练高亮模型在所述测试图像中标记存在高亮区域的高亮位置点的准确度达到预设阈值时,生成高亮区域模型。In this embodiment, the step of establishing the highlighted area model includes: acquiring a training image, wherein the training image is obtained by capturing images of the training annular injection molded part by a shooting device after placing a light source in a closed space ; According to the chromaticity of the training image, mark the shape boundary of the highlight region in the training image, and determine the shortest distance between the center point of each highlight region and the ring boundary of the training annular injection molded part point, associate the distance point with the corresponding highlight area; establish an initial highlight model through a machine learning algorithm, and input the associated training images into the initial highlight model for training until the number of training times reaches the threshold Afterwards, generate a training highlight model; obtain a test image, wherein the test image is obtained by capturing images of the training annular injection molded part in a closed space by a shooting device; input the test image into the training highlight model A test is performed, and when the accuracy of marking the highlight position points in the test image by the training highlight model in the output image reaches a preset threshold, a highlight area model is generated.
具体地,本方案的关键点也存在于高亮区域模型的建立这个环节。因为高亮区域模型的功能用于对高亮位置点进行精准识别,那么我们在训练这个模型时,需要对训练图像中存在高亮区域的位置与环形边界上的关联特征进行指引。模型连续环形边界对于图像产生高亮区域的位置进行学习,最后生成的高亮区域模型可以对输入图像进行识别,生成标识的高亮位置点。Specifically, the key points of this solution also exist in the link of establishing the highlighted area model. Because the function of the highlight area model is used to accurately identify the highlight position points, when we train this model, we need to guide the position of the highlight area in the training image and the associated features on the circular boundary. The continuous circular boundary of the model learns the position of the highlighted area of the image, and the finally generated highlighted area model can recognize the input image and generate the marked highlighted position point.
步骤104,分别确定所述第一采集图像和所述第二采集图像在环形边界上的高亮位置点,并确定环形边界上各个高亮位置点的亮度值。Step 104, respectively determine the highlighted position points on the circular boundary of the first captured image and the second captured image, and determine the brightness value of each highlighted position point on the circular boundary.
在本实施例中,所述步骤104具体包括:步骤1041,分别确定所述第一采集图像和所述第二采集图像在环形边界上每个高亮位置点所在的区域范围;步骤1042,针对每个高亮位置点的区域范围确定外接圆,将所述外接圆的圆心所在位置上对应的亮度值,作为对应高亮位置点的亮度值。In this embodiment, the step 104 specifically includes: step 1041, respectively determining the area range of each highlighted position point on the circular boundary of the first captured image and the second captured image; step 1042, for The area range of each highlighted position point determines a circumscribed circle, and the brightness value corresponding to the position of the center of the circumscribed circle is used as the brightness value of the corresponding highlighted position point.
具体地,通过外接圆的方式确定高亮位置点,其实际是利用外接圆的圆心作为对应高亮位置点的亮度值,可以使得各个高亮位置点的亮度值赋值更为准确,以便于下一步分辨出这些高亮位置点哪一些是真正的反光点。Specifically, the highlighted position points are determined by means of circumscribed circles, which actually uses the center of the circumscribed circle as the brightness value of the corresponding highlighted position points, which can make the brightness value assignment of each highlighted position point more accurate, so that the following One step to distinguish which of these highlighted points are the real reflective points.
步骤105,根据所述第一采集图像和所述第二采集图像在环形边界上同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。Step 105, according to the difference between the brightness values of the highlighted position points at the same position on the circular boundary between the first acquired image and the second acquired image, use the highlighted position points whose difference is greater than a preset threshold as the influencing factors in the filtering in the first collected image to obtain a filtered image.
在本实施例中,所述步骤105具体包括:步骤1051,将所述第一采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第一坐标位置;步骤1052,将所述第二采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第二坐标位置;步骤1053,以所述第一坐标位置为基准,将所述第二坐标位置在三维坐标系中进行整体移动,直至所述第二坐标位置与所述第一坐标位置重合;步骤1054,确定重合后处于同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。In this embodiment, the step 105 specifically includes: step 1051, taking the coordinate position of each highlighted position point in the first captured image in the three-dimensional coordinate system as a whole, and defining it as the first coordinate position; step 1052 , define the coordinate position of each highlighted position point in the three-dimensional coordinate system in the second captured image as a whole as a second coordinate position; step 1053, take the first coordinate position as a reference, and define the first coordinate position The two coordinate positions move as a whole in the three-dimensional coordinate system until the second coordinate position coincides with the first coordinate position; step 1054, determine the difference in brightness values of the highlighted position points at the same position after the coincidence, and convert the difference The highlighted position points whose values are greater than the preset threshold are used as influencing factors and filtered in the first collected image to obtain a filtered image.
具体地,利用反光点经外加光源后放大的特性,通过计算同一位置上两个采集图像中对应的亮度值之差,可以确定出这些高亮位置点哪一些是真正的反光点,然后进行过滤后留下无噪声的图像(去除反光点)。为了数据更加准确,我们还会考虑到在确定“同一位置”的步骤上,避免图像在多次采集和处理过程中出现移动的情况,我们利用三维坐标系的移动对等关系,将第一采集图像的整体移动直至与第二采集图像重合,然后同一坐标点上的位置即可视为“同一位置”。Specifically, by using the characteristic that the reflective points are enlarged after adding a light source, by calculating the difference between the corresponding brightness values in the two captured images at the same position, it can be determined which of these highlighted positions are the real reflective points, and then filtered After leaving a noise-free image (remove the reflective points). In order to make the data more accurate, we will also consider the step of determining the "same position" to avoid image movement during multiple acquisitions and processing. We use the mobile equivalence relationship of the three-dimensional coordinate system to convert the first acquisition The image is moved as a whole until it coincides with the second collected image, and then the position on the same coordinate point can be regarded as the "same position".
步骤106,将所述过滤图像输入到预先建立的气泡形状识别模型中进行识别,标记并输出所述过滤图像中形状满足气泡缺陷形状的高亮位置点,作为待测环形注塑件上的气泡缺陷。Step 106, input the filtered image into the pre-established bubble shape recognition model for recognition, mark and output the highlighted position points in the filtered image whose shape satisfies the shape of the bubble defect, as the bubble defect on the annular injection molded part to be tested .
在本实施例中,所述气泡形状识别模型的建立步骤,包括:在对气泡形状识别模型进行预先建立的过程中,获取由上述步骤执行后得到的过滤图像;通过人工识别的方式对所述过滤图像中存在的气泡进行标记,确定气泡缺陷范围;对每一个气泡缺陷范围中的灰度值进行识别,根据气泡缺陷范围中灰度值的变化,将所述气泡缺陷范围划分为两个区域;分别对同一个气泡缺陷范围所在的两个区域确定外接圆,将两个区域对应外接圆的圆心进行相关联;通过机器学习算法建立初始气泡模型,将关联后的过滤图像输入到所述初始气泡模型中进行训练和测试,直到训练和测试的次数达到阈值后,生成气泡形状识别模型。In this embodiment, the step of establishing the bubble shape recognition model includes: in the process of pre-establishing the bubble shape recognition model, obtaining the filtered image obtained after the execution of the above steps; Filter the bubbles in the image to mark and determine the bubble defect range; identify the gray value of each bubble defect range, and divide the bubble defect range into two regions according to the change of the gray value in the bubble defect range ; Determine the circumscribed circles for the two areas where the same bubble defect range is located, and correlate the centers of the circumscribed circles corresponding to the two areas; establish an initial bubble model through a machine learning algorithm, and input the associated filtered image to the initial Train and test in the bubble model, until the number of training and testing reaches the threshold, a bubble shape recognition model is generated.
具体地,通过上述步骤101至105,我们已经拿到了无噪声的图像了,此时我们只需要对无噪声图像(即过滤图像)输入到识别气泡缺陷形状的模型中进行识别即可。可以理解的是,在对气泡形状识别模型进行识别的过程中,我们是预先操作了步骤101至105,然后将步骤105输出的“过滤图像”作为气泡形状识别模型的训练图像,当模型训练完成后,在对后续需要检测的待测环形注塑件进行检索过程中,就无需重新建立和训练气泡形状识别模型了,即可直接利用。而在构建气泡形状识别模型的过程中,可以通过人工的方式先非常准确地标记图像中存在的气泡缺陷。考虑到在实际应用中,气泡缺陷在图像中的表现会由于阴影部分的出现,使气泡在注塑件上呈现两个明显分层的区域,而通过两个区域相对的外接圆心的关联,模型经过训练后可以根据气泡本身的形状和气泡形成两个分层区域对应外接圆心之间的关系,识别到过滤图像中存在的气泡缺陷,从而做到精准识别环形注塑件上的气泡缺陷。Specifically, through the above steps 101 to 105, we have obtained a noise-free image, and now we only need to input the noise-free image (ie, the filtered image) into the model for identifying the shape of the bubble defect for recognition. It can be understood that in the process of recognizing the bubble shape recognition model, we pre-operated steps 101 to 105, and then used the "filtered image" output in step 105 as the training image of the bubble shape recognition model. When the model training is completed Finally, in the process of retrieving the annular injection molded parts that need to be tested, there is no need to re-establish and train the bubble shape recognition model, and it can be used directly. In the process of building the bubble shape recognition model, the bubble defects in the image can be marked very accurately first by artificial means. Considering that in practical applications, the performance of bubble defects in the image will be due to the appearance of the shadow part, so that the bubbles will present two obviously layered areas on the injection molded part, and through the correlation of the circumscribed centers of the two areas, the model passes through After training, the bubble defects in the filtered image can be identified according to the shape of the bubble itself and the relationship between the two layered areas corresponding to the circumcenter of the bubbles, so as to accurately identify the bubble defects on the annular injection molded parts.
本发明技术方案通过对同一待测环形注塑件采集由不同光源照射的两个图像分别进行处理,利用光源照射后可以将环形注塑件上反光点放大的特点,根据两个采集图像中各个高亮位置点的亮度值过滤反光点,排除了环形注塑件上反光点对于气泡缺陷形状识别的影响噪声,克服现有技术无法对注塑件上的气泡缺陷,特别是环形注塑件上的气泡缺陷进行精准识别的技术问题,实现对注塑件上的气泡缺陷进行精准识别,特别是环形注塑件的气泡缺陷识别,可以提高注塑件的检测成功率和准确性。The technical scheme of the present invention processes two images of the same ring-shaped injection molded part to be tested, which are irradiated by different light sources, respectively, and utilizes the feature that the reflective points on the ring-shaped injection molded part can be enlarged after being irradiated by the light source. The brightness value of the position point filters the reflective point, which eliminates the influence noise of the reflective point on the ring-shaped injection molded part for the shape recognition of the bubble defect, and overcomes the inability of the existing technology to accurately detect the bubble defect on the injection molded part, especially the bubble defect on the ring-shaped injection molded part To solve the technical problems of identification, realize accurate identification of bubble defects on injection molded parts, especially the identification of bubble defects on annular injection molded parts, which can improve the detection success rate and accuracy of injection molded parts.
实施例二Embodiment two
请参照图2,为本发明另一实施例提供的一种基于机器视觉的注塑件检测系统的结构示意图。所述系统用于对环形注塑件上的气泡缺陷进行检测,包括:图像采集模块、环形边界模块、高亮识别模块、高亮确定模块、图像过滤模块和气泡识别模块。Please refer to FIG. 2 , which is a schematic structural diagram of a machine vision-based injection molding inspection system provided by another embodiment of the present invention. The system is used to detect bubble defects on annular injection molded parts, including: an image acquisition module, a ring boundary module, a highlight recognition module, a highlight determination module, an image filter module and a bubble recognition module.
所述图像采集模块,用于通过拍摄设备在封闭空间对待测环形注塑件进行图像采集,得到第一采集图像;保持所述拍摄设备和所述待测环形注塑件的位置不变,在所述封闭空间中投放光源后,对所述待测环形注塑件进行二次图像采集,得到第二采集图像。The image acquisition module is used to acquire the image of the annular injection molded part to be tested in a closed space by a photographing device to obtain a first captured image; keeping the positions of the photographing device and the annular injection molded part to be tested unchanged, in the After the light source is placed in the closed space, a secondary image acquisition is performed on the annular injection molded part to be tested to obtain a second acquired image.
所述环形边界模块,用于对所述第一采集图像和所述第二采集图像中的环形边界特征进行识别并标记,分别在所述第一采集图像和所述第二采集图像中确定所述待测环形注塑件的环形边界。The circular boundary module is configured to identify and mark the circular boundary features in the first collected image and the second collected image, and determine the circular boundary features in the first collected image and the second collected image respectively. Describe the annular boundary of the annular injection molded part to be tested.
在本实施例中,所述环形边界模块具体用于:分别对所述第一采集图像和所述第二采集图像进行网格化处理,并确定基准点;建立三维坐标系,以所述基准点为原点,分别将所述第一采集图像和所述第二采集图像移动到所述三维坐标系当中,并确定各个网格化点在所述三维坐标系中的坐标位置;在所述第一采集图像中确定色度相同的连续多个网格化点之间形成的连线,且所述连线与不在所述连线上的相邻网格化点之间色度的差值达到色度阈值的,将所述连线确定为环形边界;根据所述第一采集图像中确定的环形边界,在所述三维坐标系中以所述基准点为基准,移动到所述第二采集图像中,确定所述待测环形注塑件在第二采集图像中的环形边界。In this embodiment, the annular boundary module is specifically configured to: perform grid processing on the first acquired image and the second acquired image respectively, and determine a reference point; establish a three-dimensional coordinate system, and use the reference point point as the origin, respectively move the first captured image and the second captured image into the three-dimensional coordinate system, and determine the coordinate positions of each gridded point in the three-dimensional coordinate system; A connection line formed between a plurality of consecutive grid points with the same chromaticity is determined in an acquired image, and the chromaticity difference between the connection line and adjacent grid points not on the connection line reaches If the chromaticity threshold is used, the connecting line is determined as a circular boundary; according to the circular boundary determined in the first captured image, move to the second captured image with the reference point as a reference in the three-dimensional coordinate system In the image, the annular boundary of the annular injection molded part to be tested in the second collected image is determined.
所述高亮识别模块,用于对所述第一采集图像和所述第二采集图像进行预处理后输入到预先建立的高亮区域模型中进行识别,分别标记并输出第一采集图像和第二采集图像上存在的高亮位置点。The highlight recognition module is configured to preprocess the first captured image and the second captured image and then input them into a pre-established highlight area model for recognition, respectively mark and output the first captured image and the second captured image 2. Acquire the highlighted position points existing on the image.
在本实施例中,所述高亮识别模块用于对所述第一采集图像和所述第二采集图像进行预处理的步骤中,具体包括:对所述第一采集图像和所述第二采集图像进行灰度化处理,分别得到对应的灰度图像;在所述三维坐标系中,以所述基准点为中点,将所述灰度图像进行横向拉伸一定倍数后,得到拉伸图像;对所述拉伸图像中存在的光斑特征进行识别,将所述拉伸图像中的光斑特征进行过滤,得到过滤图像;根据所述横向拉伸的倍数,将所述过滤图像进行横向缩小后,得到预处理后的图像输入到预先建立的高亮区域模型。In this embodiment, the highlight recognition module is used in the step of preprocessing the first captured image and the second captured image, specifically including: Collecting images and performing grayscale processing to obtain corresponding grayscale images respectively; in the three-dimensional coordinate system, taking the reference point as the midpoint, stretching the grayscale image horizontally by a certain multiple to obtain the stretched Image; identifying the spot features existing in the stretched image, filtering the spot features in the stretched image to obtain a filtered image; horizontally shrinking the filtered image according to the multiple of the horizontal stretch After that, the preprocessed image is input to the pre-established highlight region model.
其中,在本实施例另一方面中,所述高亮识别模块用于对所述拉伸图像中存在的光斑特征进行识别的步骤中,具体包括:对所述拉伸图像中存在的不规则图形进行识别,确定存在于所述拉伸图像中的不规则图形;分别对每一个不规则图形中划分多层圆环区域,并在每一层圆环区域中确定多个测试点,同时,确定每个测试点所在的色度;计算每一层圆环区域中所有测试点的平均色度,将所述平均色度作为所在圆环区域的色度值;当确定同一个不规则图形中,最外层的圆环区域上的色度值往最内层的圆环区域依次递减,则确定该不规则图形为所述拉伸图像中存在的光斑特征。Wherein, in another aspect of this embodiment, the step of identifying the spot features existing in the stretched image by the highlight recognition module specifically includes: identifying irregularities in the stretched image Graphics are identified to determine the irregular graphics that exist in the stretched image; each irregular graphic is divided into a multi-layer ring area, and a plurality of test points are determined in each layer of the ring area, and at the same time, Determine the chromaticity where each test point is located; calculate the average chromaticity of all test points in the circular area of each layer, and use the average chromaticity as the chromaticity value of the circular area; when determining the same irregular figure , the chromaticity value on the outermost ring area decreases successively toward the innermost ring area, then it is determined that the irregular figure is a spot feature existing in the stretched image.
在本实施例中,所述高亮区域模型的建立步骤,包括:获取训练图像,其中,所述训练图像是在封闭空间中投放光源后,由拍摄设备对训练环形注塑件进行图像采集而得到;根据所述训练图像的色度,在所述训练图像中标记发生高亮区域的形状边界,并分别确定每个高亮区域的中心点与所述训练环形注塑件的环形边界上最近的距离点,将所述距离点与对应的高亮区域进行相关联;通过机器学习算法建立初始高亮模型,将关联后的训练图像输入到所述初始高亮模型中进行训练,直到训练次数达到阈值后,生成训练高亮模型;获取测试图像,其中,所述测试图像是通过拍摄设备在封闭空间对训练环形注塑件进行图像采集而得到;将所述测试图像输入到所述训练高亮模型中进行测试,当输出图像中由训练高亮模型在所述测试图像中标记存在高亮区域的高亮位置点的准确度达到预设阈值时,生成高亮区域模型。In this embodiment, the step of establishing the highlighted area model includes: acquiring a training image, wherein the training image is obtained by capturing images of the training annular injection molded part by a shooting device after placing a light source in a closed space ; According to the chromaticity of the training image, mark the shape boundary of the highlight region in the training image, and determine the shortest distance between the center point of each highlight region and the ring boundary of the training annular injection molded part point, associate the distance point with the corresponding highlight area; establish an initial highlight model through a machine learning algorithm, and input the associated training images into the initial highlight model for training until the number of training times reaches the threshold Afterwards, generate a training highlight model; obtain a test image, wherein the test image is obtained by capturing images of the training annular injection molded part in a closed space by a shooting device; input the test image into the training highlight model A test is performed, and when the accuracy of marking the highlight position points in the test image by the training highlight model in the output image reaches a preset threshold, a highlight area model is generated.
所述高亮确定模块,用于分别确定所述第一采集图像和所述第二采集图像在环形边界上的高亮位置点,并确定环形边界上各个高亮位置点的亮度值。The highlight determination module is configured to respectively determine the highlight position points of the first captured image and the second captured image on the circular boundary, and determine the brightness value of each highlight position point on the circular boundary.
在本实施例中,所述高亮确定模块具体用于:分别确定所述第一采集图像和所述第二采集图像在环形边界上每个高亮位置点所在的区域范围;针对每个高亮位置点的区域范围确定外接圆,将所述外接圆的圆心所在位置上对应的亮度值,作为对应高亮位置点的亮度值。In this embodiment, the highlight determination module is specifically configured to: respectively determine the area range where each highlight position point on the circular boundary of the first captured image and the second captured image is located; The circumscribed circle is determined by the area range of the bright position point, and the brightness value corresponding to the position of the center of the circumscribed circle is used as the brightness value corresponding to the highlighted position point.
所述图像过滤模块,用于根据所述第一采集图像和所述第二采集图像在环形边界上同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。The image filtering module is configured to, according to the difference between the brightness values of the highlighted position points at the same position on the circular boundary between the first captured image and the second captured image, select the highlighted position whose difference is greater than a preset threshold Points are used as influencing factors to filter in the first collected image to obtain a filtered image.
在本实施例中,所述图像过滤模块具体用于:将所述第一采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第一坐标位置;将所述第二采集图像中各个高亮位置点在三维坐标系中的坐标位置作为一个整体,定义为第二坐标位置;以所述第一坐标位置为基准,将所述第二坐标位置在三维坐标系中进行整体移动,直至所述第二坐标位置与所述第一坐标位置重合;确定重合后处于同一位置的高亮位置点的亮度值之差,将差值大于预设阈值的高亮位置点作为影响因子在所述第一采集图像中过滤,得到过滤图像。In this embodiment, the image filtering module is specifically configured to: define the coordinate positions of each highlighted position point in the first captured image in the three-dimensional coordinate system as a whole as a first coordinate position; The coordinate position of each highlighted position point in the second captured image in the three-dimensional coordinate system is defined as a second coordinate position as a whole; taking the first coordinate position as a reference, the second coordinate position is placed in the three-dimensional coordinate system Carry out overall movement in the center until the second coordinate position coincides with the first coordinate position; determine the difference between the brightness values of the highlighted position points at the same position after the coincidence, and select the highlighted position points whose difference value is greater than the preset threshold Filtering in the first collected image as an impact factor to obtain a filtered image.
所述气泡识别模块,用于将所述过滤图像输入到预先建立的气泡形状识别模型中进行识别,标记并输出所述过滤图像中形状满足气泡缺陷形状的高亮位置点,作为待测环形注塑件上的气泡缺陷。The bubble recognition module is used to input the filtered image into the pre-established bubble shape recognition model for recognition, mark and output the highlighted position points in the filtered image whose shape meets the shape of the bubble defect, as the annular injection molding to be tested Bubble defects on parts.
在本实施例中,所述气泡形状识别模型的建立步骤,包括:在对气泡形状识别模型进行预先建立的过程中,获取由上述步骤执行后得到的过滤图像;通过人工识别的方式对所述过滤图像中存在的气泡进行标记,确定气泡缺陷范围;对每一个气泡缺陷范围中的灰度值进行识别,根据气泡缺陷范围中灰度值的变化,将所述气泡缺陷范围划分为两个区域;分别对同一个气泡缺陷范围所在的两个区域确定外接圆,将两个区域对应外接圆的圆心进行相关联;通过机器学习算法建立初始气泡模型,将关联后的过滤图像输入到所述初始气泡模型中进行训练和测试,直到训练和测试的次数达到阈值后,生成气泡形状识别模型。In this embodiment, the step of establishing the bubble shape recognition model includes: in the process of pre-establishing the bubble shape recognition model, obtaining the filtered image obtained after the execution of the above steps; Filter the bubbles in the image to mark and determine the bubble defect range; identify the gray value of each bubble defect range, and divide the bubble defect range into two regions according to the change of the gray value in the bubble defect range ; Determine the circumscribed circles for the two areas where the same bubble defect range is located, and correlate the centers of the circumscribed circles corresponding to the two areas; establish an initial bubble model through a machine learning algorithm, and input the associated filtered image to the initial Train and test in the bubble model, until the number of training and testing reaches the threshold, a bubble shape recognition model is generated.
实施例三Embodiment Three
本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序;其中,所述计算机程序在运行时控制所述计算机可读存储介质所在的设备执行上述任一实施例所述的基于机器视觉的注塑件检测方法。An embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program; wherein, when running, the computer program controls the device where the computer-readable storage medium is located to execute the above-mentioned The machine vision-based inspection method for injection molded parts described in any one of the embodiments.
实施例四Embodiment four
请参照图3,是本发明实施例提供的终端设备的一种实施例的结构示意图,所述终端设备包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器在执行所述计算机程序时实现上述任一实施例所述的基于机器视觉的注塑件检测方法。Please refer to FIG. 3 , which is a schematic structural diagram of an embodiment of a terminal device provided by an embodiment of the present invention. The terminal device includes a processor, a memory, and a program stored in the memory and configured to be executed by the processor. A computer program, when the processor executes the computer program, it implements the machine vision-based injection molded part inspection method described in any one of the above embodiments.
优选地,所述计算机程序可以被分割成一个或多个模块/单元(如计算机程序、计算机程序),所述一个或者多个模块/单元被存储在所述存储器中,并由所述处理器执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述终端设备中的执行过程。Preferably, the computer program can be divided into one or more modules/units (such as computer programs, computer programs), and the one or more modules/units are stored in the memory and executed by the processor Execute to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
所述处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,通用处理器可以是微处理器,或者所述处理器也可以是任何常规的处理器,所述处理器是所述终端设备的控制中心,利用各种接口和线路连接所述终端设备的各个部分。The processor may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., the general-purpose processor can be a microprocessor, or the processor can be any A conventional processor, the processor is the control center of the terminal equipment, and uses various interfaces and lines to connect various parts of the terminal equipment.
所述存储器主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序等,数据存储区可存储相关数据等。此外,所述存储器可以是高速随机存取存储器,还可以是非易失性存储器,例如插接式硬盘,智能存储卡(SmartMedia Card,SMC)、安全数字(Secure Digital,SD)卡和闪存卡(Flash Card)等,或所述存储器也可以是其他易失性固态存储器件。The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application program required by at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card and a flash memory card ( Flash Card), etc., or the memory may also be other volatile solid-state memory devices.
需要说明的是,上述终端设备可包括,但不仅限于,处理器、存储器,本领域技术人员可以理解,上述终端设备仅仅是示例,并不构成对终端设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件。It should be noted that the above-mentioned terminal device may include, but not limited to, a processor and a memory. Those skilled in the art can understand that the above-mentioned terminal device is only an example and does not constitute a limitation on the terminal device, and may include more or less parts, or a combination of certain parts, or different parts.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步的详细说明,应当理解,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围。特别指出,对于本领域技术人员来说,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention and are not intended to limit the protection scope of the present invention. . In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211409675.2A CN115452844B (en) | 2022-11-11 | 2022-11-11 | Injection molding part detection method and system based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211409675.2A CN115452844B (en) | 2022-11-11 | 2022-11-11 | Injection molding part detection method and system based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115452844A CN115452844A (en) | 2022-12-09 |
CN115452844B true CN115452844B (en) | 2023-02-03 |
Family
ID=84295658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211409675.2A Active CN115452844B (en) | 2022-11-11 | 2022-11-11 | Injection molding part detection method and system based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115452844B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116945521B (en) * | 2023-09-15 | 2023-12-08 | 张家港市神舟机械有限公司 | Injection molding defect detection method |
CN118549436B (en) * | 2024-05-21 | 2024-11-15 | 浙江元盛塑业股份有限公司 | Automobile plastic injection molding defect detection system based on machine vision technology |
CN119992465A (en) * | 2025-04-11 | 2025-05-13 | 北京玻钢院复合材料有限公司 | Straight-groove type gum dipping system suitable for pultrusion process |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201251555Y (en) * | 2008-08-28 | 2009-06-03 | 赵永先 | Chip welding-quality measuring instrument |
CN104510447A (en) * | 2015-01-13 | 2015-04-15 | 哈尔滨工业大学 | Visible light and near-infrared light sublingual image acquisition system |
CN107490582A (en) * | 2017-09-20 | 2017-12-19 | 深圳市晟达机械设计有限公司 | A kind of streamline Work Piece Verification System Based |
JP2020085470A (en) * | 2018-11-15 | 2020-06-04 | 三井化学株式会社 | Bubble detection device, method and program |
CN114004826A (en) * | 2021-11-13 | 2022-02-01 | 博科视(苏州)技术有限公司 | Appearance defect detection method for medical injection molded parts based on vision |
CN115082485A (en) * | 2022-08-23 | 2022-09-20 | 南通华烨塑料工业有限公司 | Method and system for detecting bubble defects on surface of injection molding product |
CN115201212A (en) * | 2022-09-19 | 2022-10-18 | 江苏华彬新材料有限公司 | Plastic product defect detection device based on machine vision |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5861462B2 (en) * | 2012-01-17 | 2016-02-16 | オムロン株式会社 | Inspection standard registration method for solder inspection and board inspection apparatus using the method |
-
2022
- 2022-11-11 CN CN202211409675.2A patent/CN115452844B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201251555Y (en) * | 2008-08-28 | 2009-06-03 | 赵永先 | Chip welding-quality measuring instrument |
CN104510447A (en) * | 2015-01-13 | 2015-04-15 | 哈尔滨工业大学 | Visible light and near-infrared light sublingual image acquisition system |
CN107490582A (en) * | 2017-09-20 | 2017-12-19 | 深圳市晟达机械设计有限公司 | A kind of streamline Work Piece Verification System Based |
JP2020085470A (en) * | 2018-11-15 | 2020-06-04 | 三井化学株式会社 | Bubble detection device, method and program |
CN114004826A (en) * | 2021-11-13 | 2022-02-01 | 博科视(苏州)技术有限公司 | Appearance defect detection method for medical injection molded parts based on vision |
CN115082485A (en) * | 2022-08-23 | 2022-09-20 | 南通华烨塑料工业有限公司 | Method and system for detecting bubble defects on surface of injection molding product |
CN115201212A (en) * | 2022-09-19 | 2022-10-18 | 江苏华彬新材料有限公司 | Plastic product defect detection device based on machine vision |
Non-Patent Citations (1)
Title |
---|
注塑件常见外观缺陷检测系统的研究与开发;崔炽标;《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》;20190315(第03期);第1-76页 * |
Also Published As
Publication number | Publication date |
---|---|
CN115452844A (en) | 2022-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115452844B (en) | Injection molding part detection method and system based on machine vision | |
CN106949848B (en) | A kind of high-precision laser 3D profile phone structural detection method | |
CN111325713A (en) | Wood defect detection method, system and storage medium based on neural network | |
CN109544533A (en) | A kind of metal plate defect detection and measure based on deep learning | |
CN112634203A (en) | Image detection method, electronic device and computer-readable storage medium | |
CN107895362A (en) | A kind of machine vision method of miniature binding post quality testing | |
CN111724358A (en) | Concrete quality detection method and system based on image and convolutional neural network | |
CN105303573B (en) | Pin detection method and system for gold needle type element | |
CN106651849A (en) | PCB bare board defect detection method based on area array camera | |
CN113284094A (en) | Method, device, storage medium and equipment for acquiring defect information of glass substrate | |
CN115908432A (en) | Material output quality detection system and prediction method | |
CN114219758A (en) | Defect detection method, system, electronic device and computer readable storage medium | |
Caliskan et al. | Design and realization of an automatic optical inspection system for PCB solder joints | |
CN114612427B (en) | Nameplate defect detection method, device, electronic equipment and storage medium | |
CN119086591B (en) | Rubber whole mold appearance defect detection method and system based on machine vision | |
CN118089546B (en) | Method and system for monitoring medicine stability through image analysis | |
CN118608457A (en) | A special equipment detection method and system based on machine vision | |
CN108428247A (en) | Method and system for detecting direction of soldering tin point | |
CN116558777B (en) | Optical fiber conductivity test method and system | |
CN117372770A (en) | PCB micro defect detection and identification method based on photometric stereo and deep learning | |
CN116486141A (en) | Plank grade classification and cutting method and system based on multi-mode image recognition | |
CN115797280A (en) | Transformer surface defect detection system based on image AI recognition algorithm | |
CN115690077A (en) | Bubble plate back defect detection method and system | |
TWI816549B (en) | Automated defect detection methods | |
TW202100991A (en) | Appearance inspection management system, appearance inspection management device, appearance inspection management method and program which can support a user to select a feature amount used as a defect determination index in an appearance inspection device and set a threshold value for each feature amount |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250430 Address after: 230000 B-1015, wo Yuan Garden, 81 Ganquan Road, Shushan District, Hefei, Anhui. Patentee after: HEFEI MINGLONG ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region after: China Address before: 524088 No. 1 Haida Road, Mazhang District, Zhanjiang City, Guangdong Province Patentee before: Guangdong Ocean University Country or region before: China |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250514 Address after: 425000 Hunan Province Yongzhou City Qiyang City High-tech Industrial Development Zone Dengta Road Science and Technology Innovation Park Phase 1.3 C1 Building 1st Floor Patentee after: Hunan Xinjinhong Intelligent Technology Co.,Ltd. Country or region after: China Address before: Ganquan road Shushan District of Hefei City, Anhui Province, Jiangmen 230000 Business Garden No. 81 floor B-1015 Patentee before: HEFEI MINGLONG ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region before: China |