CN114820669A - Flexible object size detection method and system based on image restoration - Google Patents
Flexible object size detection method and system based on image restoration Download PDFInfo
- Publication number
- CN114820669A CN114820669A CN202210252680.0A CN202210252680A CN114820669A CN 114820669 A CN114820669 A CN 114820669A CN 202210252680 A CN202210252680 A CN 202210252680A CN 114820669 A CN114820669 A CN 114820669A
- Authority
- CN
- China
- Prior art keywords
- contour
- flexible object
- image
- standard
- coordinates
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 37
- 230000009466 transformation Effects 0.000 claims abstract description 48
- 239000011159 matrix material Substances 0.000 claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 12
- 238000000605 extraction Methods 0.000 claims description 11
- 238000003708 edge detection Methods 0.000 claims description 10
- 238000013507 mapping Methods 0.000 abstract 1
- 238000005259 measurement Methods 0.000 description 9
- 238000012360 testing method Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 3
- 238000010146 3D printing Methods 0.000 description 2
- 238000001125 extrusion Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000011897 real-time detection Methods 0.000 description 2
- 210000004872 soft tissue Anatomy 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
Classifications
-
- 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
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- 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
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,特别指一种基于图像复原的柔性物体尺寸检测方法及系统。The invention relates to the field of computer technology, in particular to a flexible object size detection method and system based on image restoration.
背景技术Background technique
柔性物体在生产完成后,需要进行尺寸的检测以判断产品质量是否达标。针对柔性物体的尺寸检测,传统上采用手工拿取尺子来测量并计算误差的方法,但是存在如下缺点:1、人工操作测量会使柔性物体变形,从而导致检测结果不准确;2、在流水线大批量生产柔性物体的过程中,无法通过人工对每件柔性物体进行一一测量,只能进行选择性抽检,导致存在尺寸不合格的漏网之鱼。After the production of flexible objects is completed, size inspection is required to determine whether the product quality meets the standard. For the size detection of flexible objects, traditionally, the method of manually taking a ruler to measure and calculate the error has the following shortcomings: 1. Manual operation measurement will deform the flexible object, resulting in inaccurate detection results; 2. When the assembly line is large In the process of mass production of flexible objects, it is impossible to manually measure each flexible object one by one, and only selective sampling can be carried out, resulting in unqualified fish slipping through the net.
因此,如何提供一种基于图像复原的柔性物体尺寸检测方法及系统,实现提升柔性物体尺寸检测的精度以及效率,成为一个亟待解决的技术问题。Therefore, how to provide a flexible object size detection method and system based on image restoration to improve the accuracy and efficiency of flexible object size detection has become an urgent technical problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题,在于提供一种基于图像复原的柔性物体尺寸检测方法及系统,实现提升柔性物体尺寸测量的精度以及效率。The technical problem to be solved by the present invention is to provide a flexible object size detection method and system based on image restoration, so as to improve the accuracy and efficiency of flexible object size measurement.
第一方面,本发明提供了一种基于图像复原的柔性物体尺寸检测方法,包括如下步骤:In a first aspect, the present invention provides a flexible object size detection method based on image restoration, comprising the following steps:
步骤S10、采集标准柔性物体的标准图像,提取所述标准图像中标准柔性物体的第一轮廓;Step S10, collecting a standard image of the standard flexible object, and extracting the first contour of the standard flexible object in the standard image;
步骤S20、计算所述第一轮廓的第一轮廓顶点坐标,获取标准柔性物体的实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标建立透视变换矩阵;Step S20, calculating the first contour vertex coordinates of the first contour, obtaining the actual vertex coordinates of the standard flexible object, and establishing a perspective transformation matrix based on each of the first contour vertex coordinates and the actual vertex coordinates;
步骤S30、采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像;Step S30, collecting a to-be-measured image of the flexible object to be measured, and using the perspective transformation matrix to map the to-be-measured image to obtain a restored image;
步骤S40、提取所述复原图像中待测柔性物体的第二轮廓,计算所述第二轮廓的第二轮廓顶点坐标;Step S40, extracting the second contour of the flexible object to be measured in the restored image, and calculating the second contour vertex coordinates of the second contour;
步骤S50、基于各所述第二轮廓顶点坐标对待测柔性物体的尺寸进行检测。Step S50: Detect the size of the flexible object to be measured based on the coordinates of each of the second contour vertices.
进一步地,所述步骤S10具体为:Further, the step S10 is specifically:
采集标准柔性物体其中一个面的标准图像,利用AI边缘检测算法提取所述标准图像中标准柔性物体的第一轮廓。A standard image of one of the faces of the standard flexible object is collected, and the AI edge detection algorithm is used to extract the first contour of the standard flexible object in the standard image.
进一步地,所述步骤S20具体为:Further, the step S20 is specifically:
利用直线拟合法拟合所述第一轮廓的四条边,进而计算所述第一轮廓的四个第一轮廓顶点坐标,获取标准柔性物体的四个实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标的对应关系建立透视变换矩阵。Fit the four sides of the first contour by using the straight line fitting method, and then calculate the coordinates of the four first contour vertices of the first contour, and obtain the four actual vertex coordinates of the standard flexible object, based on each of the first contour vertices The correspondence between the coordinates and the actual vertex coordinates establishes a perspective transformation matrix.
进一步地,所述步骤S30具体为:Further, the step S30 is specifically:
基于所述标准图像的同个面,采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像。Based on the same surface of the standard image, a to-be-measured image of the flexible object to be measured is collected, and the to-be-measured image is mapped using the perspective transformation matrix to obtain a restored image.
进一步地,所述步骤S50具体为:Further, the step S50 is specifically:
利用距离公式分别计算处于对角线上的两个第二轮廓顶点坐标的距离并求取差值,基于预设的偏差阈值对所述差值进行校验,并输出尺寸检测结果。The distance between the coordinates of the two second contour vertices on the diagonal line is calculated by using the distance formula, and the difference is obtained, the difference is checked based on the preset deviation threshold, and the size detection result is output.
第二方面,本发明提供了一种基于图像复原的柔性物体尺寸检测系统,包括如下模块:In a second aspect, the present invention provides a flexible object size detection system based on image restoration, including the following modules:
第一轮廓提取模块,用于采集标准柔性物体的标准图像,提取所述标准图像中标准柔性物体的第一轮廓;a first contour extraction module, configured to collect a standard image of the standard flexible object, and extract the first contour of the standard flexible object in the standard image;
透视变换矩阵建立模块,用于计算所述第一轮廓的第一轮廓顶点坐标,获取标准柔性物体的实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标建立透视变换矩阵;a perspective transformation matrix establishment module, used to calculate the first contour vertex coordinates of the first contour, obtain the actual vertex coordinates of the standard flexible object, and establish a perspective transformation matrix based on each of the first contour vertex coordinates and the actual vertex coordinates;
透视变换模块,用于采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像;a perspective transformation module, used for collecting the image to be tested of the flexible object to be tested, and using the perspective transformation matrix to map the image to be tested to obtain a restored image;
第二轮廓提取模块,用于提取所述复原图像中待测柔性物体的第二轮廓,计算所述第二轮廓的第二轮廓顶点坐标;The second contour extraction module is used to extract the second contour of the flexible object to be measured in the restored image, and calculate the second contour vertex coordinates of the second contour;
尺寸检测模块,用于基于各所述第二轮廓顶点坐标对待测柔性物体的尺寸进行检测。A size detection module, configured to detect the size of the flexible object to be measured based on the coordinates of each of the second contour vertices.
进一步地,所述第一轮廓提取模块具体为:Further, the first contour extraction module is specifically:
采集标准柔性物体其中一个面的标准图像,利用AI边缘检测算法提取所述标准图像中标准柔性物体的第一轮廓。A standard image of one of the faces of the standard flexible object is collected, and the AI edge detection algorithm is used to extract the first contour of the standard flexible object in the standard image.
进一步地,所述透视变换矩阵建立模块具体为:Further, the perspective transformation matrix establishment module is specifically:
利用直线拟合法拟合所述第一轮廓的四条边,进而计算所述第一轮廓的四个第一轮廓顶点坐标,获取标准柔性物体的四个实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标的对应关系建立透视变换矩阵。Fit the four sides of the first contour by using the straight line fitting method, and then calculate the coordinates of the four first contour vertices of the first contour, and obtain the four actual vertex coordinates of the standard flexible object, based on each of the first contour vertices The correspondence between the coordinates and the actual vertex coordinates establishes a perspective transformation matrix.
进一步地,所述透视变换模块具体为:Further, the perspective transformation module is specifically:
基于所述标准图像的同个面,采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像。Based on the same surface of the standard image, a to-be-measured image of the flexible object to be measured is collected, and the to-be-measured image is mapped using the perspective transformation matrix to obtain a restored image.
进一步地,所述尺寸检测模块具体为:Further, the size detection module is specifically:
利用距离公式分别计算处于对角线上的两个第二轮廓顶点坐标的距离并求取差值,基于预设的偏差阈值对所述差值进行校验,并输出尺寸检测结果。The distance between the coordinates of the two second contour vertices on the diagonal line is calculated by using the distance formula, and the difference is obtained, the difference is checked based on the preset deviation threshold, and the size detection result is output.
本发明的优点在于:The advantages of the present invention are:
通过提取标准柔性物体的标准图像中的第一轮廓并计算第一轮廓的第一轮廓顶点坐标,基于各第一轮廓顶点坐标以及标准柔性物体的实际顶点坐标建立透视变换矩阵,再利用透视变换矩阵对待测柔性物体的待测图像进行映射得到复原图像,最后基于复原图像的第二轮廓顶点坐标的对角线距离差值对待测柔性物体的尺寸进行检测;即通过采集图像进行计算即可自动对待测柔性物体的尺寸进行检测,避免人工操作而产生的变形,也可批量进行检测,最终极大的提升了柔性物体尺寸测量的精度以及效率。By extracting the first contour in the standard image of the standard flexible object and calculating the first contour vertex coordinates of the first contour, a perspective transformation matrix is established based on the vertex coordinates of each first contour and the actual vertex coordinates of the standard flexible object, and then the perspective transformation matrix is used. The image to be measured of the flexible object to be measured is mapped to obtain a restored image, and finally the size of the flexible object to be measured is detected based on the difference between the diagonal distances of the coordinates of the second contour vertex of the restored image; Measure the size of flexible objects for detection to avoid deformation caused by manual operations, and can also be tested in batches, which ultimately greatly improves the accuracy and efficiency of flexible object size measurement.
附图说明Description of drawings
下面参照附图结合实施例对本发明作进一步的说明。The present invention will be further described below with reference to the accompanying drawings and embodiments.
图1是本发明一种基于图像复原的柔性物体尺寸检测方法的流程图。FIG. 1 is a flow chart of a flexible object size detection method based on image restoration according to the present invention.
图2是本发明一种基于图像复原的柔性物体尺寸检测系统的结构示意图。FIG. 2 is a schematic structural diagram of a flexible object size detection system based on image restoration according to the present invention.
具体实施方式Detailed ways
本申请实施例中的技术方案,总体思路如下:通过标准图像的第一轮廓顶点坐标和标准柔性物体的实际顶点坐标建立透视变换矩阵,再利用透视变换矩阵对待测图像进行映射得到复原图像,最后基于复原图像的第二轮廓顶点坐标的对角线距离差值对待测柔性物体的尺寸进行自动检测,即通过采集图像进行计算即可自动对待测柔性物体的尺寸进行检测,以提升柔性物体尺寸测量的精度以及效率。For the technical solutions in the embodiments of the present application, the general idea is as follows: establish a perspective transformation matrix by using the coordinates of the first contour vertex of the standard image and the actual vertex coordinates of the standard flexible object, and then use the perspective transformation matrix to map the image to be tested to obtain a restored image, and finally The size of the flexible object to be measured can be automatically detected based on the diagonal distance difference between the coordinates of the second contour vertex of the restored image, that is, the size of the flexible object to be measured can be automatically detected by collecting the image for calculation, so as to improve the size measurement of the flexible object accuracy and efficiency.
请参照图1至图2所示,本发明一种基于图像复原的柔性物体尺寸检测方法的较佳实施例,包括如下步骤:Please refer to FIG. 1 to FIG. 2 , a preferred embodiment of a method for detecting the size of a flexible object based on image restoration of the present invention includes the following steps:
步骤S10、采集标准柔性物体的标准图像,提取所述标准图像中标准柔性物体的第一轮廓;所述标准柔性物体可为通过3D打印或者手动制作的硬质模具;Step S10, collecting a standard image of a standard flexible object, and extracting a first outline of the standard flexible object in the standard image; the standard flexible object may be a hard mold made by 3D printing or manually;
步骤S20、计算所述第一轮廓的第一轮廓顶点坐标,获取标准柔性物体的实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标建立透视变换矩阵;Step S20, calculating the first contour vertex coordinates of the first contour, obtaining the actual vertex coordinates of the standard flexible object, and establishing a perspective transformation matrix based on each of the first contour vertex coordinates and the actual vertex coordinates;
步骤S30、采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像;所述标准图像以及待测图像可以采用海康500万像素彩色工业相机MV-CA050-20GC进行采集;Step S30: Collect the image to be tested of the flexible object to be tested, and use the perspective transformation matrix to map the image to be tested to obtain a restored image; the standard image and the image to be tested can be a Hikvision 5-megapixel color industrial camera MV-CA050 -20GC for collection;
步骤S40、利用AI边缘检测算法提取所述复原图像中待测柔性物体的第二轮廓,计算所述第二轮廓的第二轮廓顶点坐标;Step S40, using the AI edge detection algorithm to extract the second contour of the flexible object to be measured in the restored image, and calculating the second contour vertex coordinates of the second contour;
步骤S50、基于各所述第二轮廓顶点坐标对待测柔性物体的尺寸进行检测。Step S50: Detect the size of the flexible object to be measured based on the coordinates of each of the second contour vertices.
通过图像来检测柔性物体尺寸,可以解决柔性物体挤压变形、倾斜、距离测量不准确的问题,通过AI边缘检测算法提取轮廓可以克服背景干扰,避免轮廓提取不准确,最终极大的提升了柔性物体尺寸测量的精度;且计算量小,能够在X86 PC上实时计算,满足在线实时检测要求。Detecting the size of flexible objects through images can solve the problems of extrusion deformation, inclination, and inaccurate distance measurement of flexible objects. Extracting contours through AI edge detection algorithm can overcome background interference, avoid inaccurate contour extraction, and ultimately greatly improve flexibility. The accuracy of object size measurement; and the calculation amount is small, which can be calculated in real time on the X86 PC to meet the requirements of online real-time detection.
所述步骤S10具体为:The step S10 is specifically:
采集标准柔性物体其中一个面的标准图像,利用AI边缘检测算法提取所述标准图像中标准柔性物体的第一轮廓。例如采集长方体软抽纸巾中的露出白色的一侧面作为标准图像。所述AI边缘监测算法包括但不限于DeepEdge算法。A standard image of one of the faces of the standard flexible object is collected, and the AI edge detection algorithm is used to extract the first contour of the standard flexible object in the standard image. For example, the white exposed side of a rectangular soft tissue paper towel is collected as a standard image. The AI edge monitoring algorithm includes but is not limited to the DeepEdge algorithm.
所述步骤S20具体为:The step S20 is specifically:
利用直线拟合法拟合所述第一轮廓的四条边,进而计算所述第一轮廓的四个第一轮廓顶点坐标,获取标准柔性物体的四个实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标的对应关系建立透视变换矩阵。所述透视变换矩阵基于透视变换公式建立。Fit the four sides of the first contour by using the straight line fitting method, and then calculate the coordinates of the four first contour vertices of the first contour, and obtain the four actual vertex coordinates of the standard flexible object, based on each of the first contour vertices The correspondence between the coordinates and the actual vertex coordinates establishes a perspective transformation matrix. The perspective transformation matrix is established based on a perspective transformation formula.
所述步骤S30具体为:The step S30 is specifically:
基于所述标准图像的同个面,采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像。Based on the same surface of the standard image, a to-be-measured image of the flexible object to be measured is collected, and the to-be-measured image is mapped using the perspective transformation matrix to obtain a restored image.
所述步骤S50具体为:The step S50 is specifically:
利用距离公式分别计算处于对角线上的两个第二轮廓顶点坐标的距离并求取差值,基于预设的偏差阈值对所述差值进行校验,并输出尺寸检测结果。The distance between the coordinates of the two second contour vertices on the diagonal line is calculated by using the distance formula, and the difference is obtained, the difference is checked based on the preset deviation threshold, and the size detection result is output.
例如四个第二轮廓顶点坐标分别为a、b、c、d,距离A为距离B为差值为|A-B|;当差值小于等于偏差阈值时输出检测合格的检测结果,当差值大于偏差阈值时输出检测不合格的检测结果。For example, the coordinates of the four second contour vertices are a, b, c, and d, respectively, and the distance A is The distance B is The difference is |AB|; when the difference is less than or equal to the deviation threshold, the test result that passes the test is output, and when the difference is greater than the deviation threshold, the test result that fails the test is output.
本发明一种基于图像复原的柔性物体尺寸检测系统的较佳实施例,包括如下模块:A preferred embodiment of a flexible object size detection system based on image restoration of the present invention includes the following modules:
第一轮廓提取模块,用于采集标准柔性物体的标准图像,提取所述标准图像中标准柔性物体的第一轮廓;所述标准柔性物体可为通过3D打印或者手动制作的硬质模具;a first contour extraction module, used for collecting a standard image of a standard flexible object, and extracting a first contour of the standard flexible object in the standard image; the standard flexible object may be a hard mold made by 3D printing or manually;
透视变换矩阵建立模块,用于计算所述第一轮廓的第一轮廓顶点坐标,获取标准柔性物体的实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标建立透视变换矩阵;a perspective transformation matrix establishment module, used to calculate the first contour vertex coordinates of the first contour, obtain the actual vertex coordinates of the standard flexible object, and establish a perspective transformation matrix based on each of the first contour vertex coordinates and the actual vertex coordinates;
透视变换模块,用于采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像;所述标准图像以及待测图像可以采用海康500万像素彩色工业相机MV-CA050-20GC进行采集;The perspective transformation module is used to collect the to-be-measured image of the flexible object to be measured, and use the perspective transformation matrix to map the to-be-measured image to obtain a restored image; the standard image and the to-be-measured image can use a Hikvision 5-megapixel color industrial camera MV-CA050-20GC for collection;
第二轮廓提取模块,用于利用AI边缘检测算法提取所述复原图像中待测柔性物体的第二轮廓,计算所述第二轮廓的第二轮廓顶点坐标;The second contour extraction module is used to extract the second contour of the flexible object to be measured in the restored image by using the AI edge detection algorithm, and calculate the second contour vertex coordinates of the second contour;
尺寸检测模块,用于基于各所述第二轮廓顶点坐标对待测柔性物体的尺寸进行检测。A size detection module, configured to detect the size of the flexible object to be measured based on the coordinates of each of the second contour vertices.
通过图像来检测柔性物体尺寸,可以解决柔性物体挤压变形、倾斜、距离测量不准确的问题,通过AI边缘检测算法提取轮廓可以克服背景干扰,避免轮廓提取不准确,最终极大的提升了柔性物体尺寸测量的精度;且计算量小,能够在X86 PC上实时计算,满足在线实时检测要求。Detecting the size of flexible objects through images can solve the problems of extrusion deformation, inclination, and inaccurate distance measurement of flexible objects. Extracting contours through AI edge detection algorithm can overcome background interference, avoid inaccurate contour extraction, and ultimately greatly improve flexibility. The accuracy of object size measurement; and the calculation amount is small, which can be calculated in real time on the X86 PC to meet the requirements of online real-time detection.
所述第一轮廓提取模块具体为:The first contour extraction module is specifically:
采集标准柔性物体其中一个面的标准图像,利用AI边缘检测算法提取所述标准图像中标准柔性物体的第一轮廓。例如采集长方体软抽纸巾中的露出白色的一侧面作为标准图像。所述AI边缘监测算法包括但不限于DeepEdge算法。A standard image of one of the faces of the standard flexible object is collected, and the AI edge detection algorithm is used to extract the first contour of the standard flexible object in the standard image. For example, the white exposed side of a rectangular soft tissue paper towel is collected as a standard image. The AI edge monitoring algorithm includes but is not limited to the DeepEdge algorithm.
所述透视变换矩阵建立模块具体为:The perspective transformation matrix establishment module is specifically:
利用直线拟合法拟合所述第一轮廓的四条边,进而计算所述第一轮廓的四个第一轮廓顶点坐标,获取标准柔性物体的四个实际顶点坐标,基于各所述第一轮廓顶点坐标以及实际顶点坐标的对应关系建立透视变换矩阵。所述透视变换矩阵基于透视变换公式建立。Fit the four sides of the first contour by using the straight line fitting method, and then calculate the coordinates of the four first contour vertices of the first contour, and obtain the four actual vertex coordinates of the standard flexible object, based on each of the first contour vertices The correspondence between the coordinates and the actual vertex coordinates establishes a perspective transformation matrix. The perspective transformation matrix is established based on a perspective transformation formula.
所述透视变换模块具体为:The perspective transformation module is specifically:
基于所述标准图像的同个面,采集待测柔性物体的待测图像,利用所述透视变换矩阵对待测图像进行映射,得到复原图像。Based on the same surface of the standard image, a to-be-measured image of the flexible object to be measured is collected, and the to-be-measured image is mapped using the perspective transformation matrix to obtain a restored image.
所述尺寸检测模块具体为:The size detection module is specifically:
利用距离公式分别计算处于对角线上的两个第二轮廓顶点坐标的距离并求取差值,基于预设的偏差阈值对所述差值进行校验,并输出尺寸检测结果。The distance between the coordinates of the two second contour vertices on the diagonal line is calculated by using the distance formula, and the difference is obtained, the difference is checked based on the preset deviation threshold, and the size detection result is output.
例如四个第二轮廓顶点坐标分别为a、b、c、d,距离A为距离B为差值为|A-B|;当差值小于等于偏差阈值时输出检测合格的检测结果,当差值大于偏差阈值时输出检测不合格的检测结果。For example, the coordinates of the four second contour vertices are a, b, c, and d, respectively, and the distance A is The distance B is The difference is |AB|; when the difference is less than or equal to the deviation threshold, the test result that passes the test is output, and when the difference is greater than the deviation threshold, the test result that fails the test is output.
综上所述,本发明的优点在于:To sum up, the advantages of the present invention are:
通过提取标准柔性物体的标准图像中的第一轮廓并计算第一轮廓的第一轮廓顶点坐标,基于各第一轮廓顶点坐标以及标准柔性物体的实际顶点坐标建立透视变换矩阵,再利用透视变换矩阵对待测柔性物体的待测图像进行映射得到复原图像,最后基于复原图像的第二轮廓顶点坐标的对角线距离差值对待测柔性物体的尺寸进行检测;即通过采集图像进行计算即可自动对待测柔性物体的尺寸进行检测,避免人工操作而产生的变形,也可批量进行检测,最终极大的提升了柔性物体尺寸测量的精度以及效率。By extracting the first contour in the standard image of the standard flexible object and calculating the first contour vertex coordinates of the first contour, a perspective transformation matrix is established based on the vertex coordinates of each first contour and the actual vertex coordinates of the standard flexible object, and then the perspective transformation matrix is used. The image to be measured of the flexible object to be measured is mapped to obtain a restored image, and finally the size of the flexible object to be measured is detected based on the difference between the diagonal distances of the coordinates of the second contour vertex of the restored image; Measure the size of flexible objects for detection to avoid deformation caused by manual operations, and can also be tested in batches, which ultimately greatly improves the accuracy and efficiency of flexible object size measurement.
虽然以上描述了本发明的具体实施方式,但是熟悉本技术领域的技术人员应当理解,我们所描述的具体的实施例只是说明性的,而不是用于对本发明的范围的限定,熟悉本领域的技术人员在依照本发明的精神所作的等效的修饰以及变化,都应当涵盖在本发明的权利要求所保护的范围内。Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments we describe are only illustrative, rather than used to limit the scope of the present invention. Equivalent modifications and changes made by a skilled person in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210252680.0A CN114820669A (en) | 2022-03-11 | 2022-03-11 | Flexible object size detection method and system based on image restoration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210252680.0A CN114820669A (en) | 2022-03-11 | 2022-03-11 | Flexible object size detection method and system based on image restoration |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114820669A true CN114820669A (en) | 2022-07-29 |
Family
ID=82529386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210252680.0A Pending CN114820669A (en) | 2022-03-11 | 2022-03-11 | Flexible object size detection method and system based on image restoration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114820669A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004280728A (en) * | 2003-03-18 | 2004-10-07 | Lab:Kk | Image compositing device, and marker setting device for camera parametric calibration |
CN105247342A (en) * | 2013-02-28 | 2016-01-13 | 尼尔·M·戴 | Method and apparatus for determining particle size |
US20190038365A1 (en) * | 2016-02-12 | 2019-02-07 | Intuitive Surgical Operations, Inc | Systems and methods of pose estimation and calibration of perspective imaging system in image guided surgery |
CN110400321A (en) * | 2019-07-26 | 2019-11-01 | 广东工业大学 | Extraction method of leather raw material outline and actual size based on machine vision |
CN112734832A (en) * | 2021-01-22 | 2021-04-30 | 逆可网络科技有限公司 | Method for measuring real size of on-line object in real time |
-
2022
- 2022-03-11 CN CN202210252680.0A patent/CN114820669A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004280728A (en) * | 2003-03-18 | 2004-10-07 | Lab:Kk | Image compositing device, and marker setting device for camera parametric calibration |
CN105247342A (en) * | 2013-02-28 | 2016-01-13 | 尼尔·M·戴 | Method and apparatus for determining particle size |
US20190038365A1 (en) * | 2016-02-12 | 2019-02-07 | Intuitive Surgical Operations, Inc | Systems and methods of pose estimation and calibration of perspective imaging system in image guided surgery |
CN110400321A (en) * | 2019-07-26 | 2019-11-01 | 广东工业大学 | Extraction method of leather raw material outline and actual size based on machine vision |
CN112734832A (en) * | 2021-01-22 | 2021-04-30 | 逆可网络科技有限公司 | Method for measuring real size of on-line object in real time |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112082493B (en) | Visual measurement method for inner radius of pipeline flange based on binocular imaging | |
CN111879241B (en) | Mobile phone battery size measurement method based on machine vision | |
CN114037675B (en) | Airplane sample plate defect detection method and device | |
CN104463845B (en) | A kind of choosing method and system of flame forming plate feature registration point | |
CN106595496A (en) | Man-machine interaction part size flexibility vision measurement method | |
CN111723821A (en) | Method and device for detecting and identifying images of power plant instrumentation | |
CN113074656B (en) | Workpiece hole measuring method | |
CN111623942A (en) | Displacement measurement method for test structure model of unidirectional vibration table | |
CN117115233B (en) | Dimension measurement method and device based on machine vision and electronic equipment | |
CN110276752A (en) | APP detection method of concrete surface crack characteristics based on android system | |
CN117109481A (en) | Method for detecting and evaluating overall flatness and overcurrent capacity of concrete with overcurrent surface | |
CN108020172B (en) | A 3D data-based inspection method for aircraft surface manufacturing quality | |
CN108876842A (en) | A kind of measurement method, system, equipment and the storage medium of sub-pixel edge angle | |
CN116152208A (en) | Defect detection method, device, equipment and storage medium | |
CN108645490A (en) | Cold-water meter vision detection system based on image processing techniques and detection method | |
CN116152697A (en) | Three-dimensional model measuring method and related device for concrete structure cracks | |
CN113390357B (en) | A method for measuring rivet flushness based on binocular multi-line structured light | |
CN115078377A (en) | Automatic bridge damage evaluation system and method based on point cloud fitting | |
CN114820669A (en) | Flexible object size detection method and system based on image restoration | |
CN110060339B (en) | Three-dimensional modeling method based on cloud computing graphic image | |
CN103324941B (en) | A kind of based on facing in-plant remote sensing classification patch border Accuracy Assessment | |
CN113240637B (en) | Wall flatness informatization detection method and system based on machine learning | |
TWI444586B (en) | System and method for detecting form-position tolerances of an object | |
CN108593774A (en) | A kind of compound material ultrasound C sweeps defect area and determines method | |
CN110349174B (en) | Sliding rail multi-parameter measurement method and measurement device |
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 |