[go: up one dir, main page]

CN109622404B - A system and method for automatic sorting of micro workpieces based on machine vision - Google Patents

A system and method for automatic sorting of micro workpieces based on machine vision Download PDF

Info

Publication number
CN109622404B
CN109622404B CN201811378064.XA CN201811378064A CN109622404B CN 109622404 B CN109622404 B CN 109622404B CN 201811378064 A CN201811378064 A CN 201811378064A CN 109622404 B CN109622404 B CN 109622404B
Authority
CN
China
Prior art keywords
workpiece
contour
chamfering
module
length
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
Application number
CN201811378064.XA
Other languages
Chinese (zh)
Other versions
CN109622404A (en
Inventor
徐今强
陈宜斌
欧兴锦
梁金坤
朱志发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ocean University
Original Assignee
Guangdong Ocean University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Ocean University filed Critical Guangdong Ocean University
Priority to CN201811378064.XA priority Critical patent/CN109622404B/en
Publication of CN109622404A publication Critical patent/CN109622404A/en
Application granted granted Critical
Publication of CN109622404B publication Critical patent/CN109622404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/02Measures preceding sorting, e.g. arranging articles in a stream orientating
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/36Sorting apparatus characterised by the means used for distribution
    • B07C5/361Processing or control devices therefor, e.g. escort memory
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/36Sorting apparatus characterised by the means used for distribution
    • B07C5/363Sorting apparatus characterised by the means used for distribution by means of air
    • B07C5/365Sorting apparatus characterised by the means used for distribution by means of air using a single separation means

Landscapes

  • Sorting Of Articles (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及自动分拣系统的技术领域,更具体地,涉及一种基于机器视觉的微工件自动化分拣系统及方法,包括工件运输模块、图像采集模块、图像处理模块、中央控制模块、工件筛选模块和直流稳压模块;所述工件运输模块包括振动盘和步进电机转盘,所述图像采集模块包括光纤传感器、光源和工业相机,所述图像处理模块为PC上位机,所述中央控制模块为PLC控制器,所述工件筛选模块包括气枪和挡板,所述直流稳压模块为12V直流稳压模块;本发明系统运用了摄像机标定,亚像素边缘检测和多边形逼近算法,提高了微工件的分拣精度。

Figure 201811378064

The invention relates to the technical field of automatic sorting systems, and more particularly, to an automatic sorting system and method for micro workpieces based on machine vision, including a workpiece transport module, an image acquisition module, an image processing module, a central control module, and a workpiece screening module. module and DC voltage stabilization module; the workpiece transport module includes a vibration plate and a stepping motor turntable, the image acquisition module includes an optical fiber sensor, a light source and an industrial camera, the image processing module is a PC host computer, and the central control module It is a PLC controller, the workpiece screening module includes an air gun and a baffle, and the DC voltage stabilization module is a 12V DC voltage stabilization module; the system of the present invention uses camera calibration, sub-pixel edge detection and polygon approximation algorithms to improve the performance of micro workpieces. sorting accuracy.

Figure 201811378064

Description

Automatic sorting system and method for micro-workpieces based on machine vision
Technical Field
The invention relates to the technical field of automatic sorting systems, in particular to a micro-workpiece automatic sorting system and method based on machine vision.
Background
At present, the shape defects of parts are mainly detected manually in China, and the manual detection method has low efficiency and low precision, is easy to fatigue and is easily influenced by subjective factors; while some methods of piezoelectric conversion are adopted for detecting the sizes of parts, the detection of precise workpieces with smaller sizes is difficult due to the limitations of sensor processes and mechanical structures.
Disclosure of Invention
The invention provides a high-efficiency and high-precision automatic sorting system and method for micro workpieces, aiming at overcoming at least one defect in the prior art. The specific technical scheme is as follows:
a micro-workpiece automatic sorting system based on machine vision comprises a workpiece transportation module, an image acquisition module, an image processing module, a central control module, a workpiece screening module and a direct-current voltage stabilizing module;
the workpiece conveying module is used for conveying workpieces to working stations of the image acquisition module and the workpiece screening module;
the image acquisition module is connected with the image processing module and the central control module and is used for acquiring picture information of the workpiece and sending the picture information to the image processing module;
the image processing module is connected with the central control module and is used for analyzing whether the workpiece is a qualified workpiece or not and sending an analysis result to the central control module;
the central control module is used for controlling the on-off of the image acquisition module, receiving the information sent by the image processing module and controlling the on-off of the workpiece screening module;
the workpiece screening module is used for distributing workpieces to a certified product area and a defective product area;
the direct current voltage stabilizing module is connected with the central control module and the image acquisition module and used for providing stable direct current voltage for the central control module and the image acquisition module.
The invention can acquire the contour information of the workpiece by utilizing the image acquisition module, accurately identify whether the workpiece is qualified or not by utilizing the image processing module and utilizing the computer technology, and then partition the workpiece by utilizing the central control module and the workpiece screening module. The invention can detect small precise workpieces with high efficiency and high precision, and overcomes the problems of low efficiency, low precision, easy fatigue and easy influence of subjective factors of a manual detection method.
Preferably, the workpiece transportation module comprises a vibration disc and a stepping motor turntable, the image acquisition module comprises an optical fiber sensor, a light source and an industrial camera, the image processing module is a PC upper computer, the central control module is a PLC controller, the workpiece screening module comprises an air gun and a baffle, and the direct current voltage stabilizing module is a 12V direct current voltage stabilizing module;
the vibration disc is connected with the stepping motor turntable and can convey workpieces to the stepping motor turntable, the optical fiber sensor and the industrial camera are arranged above the stepping motor turntable, the light source is arranged below the stepping motor turntable, the optical fiber sensor, the light source and the industrial camera are electrically connected with the PLC, the industrial camera is further electrically connected with the PC upper computer, the PC upper computer is electrically connected with the PLC, the air gun and the baffle are arranged on the side face of the stepping motor turntable, the air gun and the baffle are matched to convey the workpieces to a genuine product area or a defective product area, and the 12V direct-current voltage stabilizing module is electrically connected with the optical fiber sensor and the PLC.
The industrial CCD camera is ingeniously utilized to collect data of a workpiece, the collected data are sent to an industrial PC upper computer through internet access communication, the PC upper computer calls an image processing algorithm to analyze and process the data and then sends out a control signal, the PLC controller is utilized to process the control signal, and the air gun is controlled to screen out defective products. The invention comprehensively applies the technologies of digital image processing, mechanical control, computer software and hardware and the like, is suitable for the automatic sorting work of precise workpieces with smaller size, and has high sorting precision.
Furthermore, the industrial camera is a Basler 200 ten thousand pixel industrial CCD camera, a telecentric lens is adopted, the visual field is 13.5mm, a gigabit Ethernet transmission line is used for transmitting images, and the industrial camera has high image acquisition quality and fast data transmission speed.
Furthermore, the stepping motor turntable is composed of a stepping motor and high-flatness transparent glass, the stepping motor drives the turntable to rotate through a linkage relation, the high-flatness glass is good in transparency, a light source is favorable for irradiating a workpiece to form a clear outline, and a camera can acquire a high-quality workpiece outline picture.
Furthermore, the light source is a background light source, and can provide a good light source for a camera to form a high-contrast contour workpiece image.
A micro-workpiece sorting method based on machine vision by utilizing the micro-workpiece sorting system comprises the following steps:
step 1: setting relevant parameters on a PC (personal computer) according to user requirements and field environment factors, and operating the system;
step 2: the vibration disc vibrates the workpiece to enable the workpiece to automatically fall to the stepping motor turntable, and meanwhile, the stepping motor turntable rotates at a fixed speed;
and step 3: the stepping motor turntable drives the workpiece to rotate, and the optical fiber sensor senses the arrival of the workpiece and informs the PLC controller of the arrival;
and 4, step 4: after sensing the arrival of a workpiece, the PLC starts a background light source after a period of time and triggers an industrial camera to take a picture;
and 5: the industrial camera captures a high-contrast contour map of a background light source penetrating through a workpiece and sends the high-contrast contour map to a PC (personal computer) for image processing;
step 6: after the PC upper computer is used for processing, the quality/defective product signals are sent to the PLC controller, the PLC controller controls the air gun and the baffle, and the workpieces are sent to a quality area or a defective product area.
The method provided by the invention can accurately acquire the workpiece contour image, and then the acquired workpiece contour image is analyzed by utilizing the PC upper computer, so that the precise detection of the micro-workpiece can be realized, and the function of automatic sorting is realized.
Further, the graphic processing process of the PC upper computer comprises camera calibration, preprocessing, sub-pixel edge detection and polygon approximation algorithm processing in sequence;
the camera calibration is used for obtaining the size and coordinate information of the workpiece, the preprocessing is used for removing noise points, the sub-pixel edge detection is used for obtaining the chamfering outline of the workpiece, and the polygon approximation algorithm processing is used for analyzing whether the chamfering outline of the workpiece is qualified or not. The sub-pixel edge detection method has high precision of obtaining the chamfering outline of the workpiece, which can reach +/-0.02 mm, and the accuracy of analyzing the defect information of the outline of the workpiece by a polygon approximation algorithm is high.
Furthermore, the camera calibration is based on a rectangular grid-shaped circular target plane calibration method, the size and coordinate information of the outline of the workpiece can be obtained, the parameters are optimized in a nonlinear mode, the camera distortion is reduced, and the visual measurement accuracy is improved.
Further, the method for detecting the sub-pixel edge is used for extracting the chamfer outline of the workpiece, and comprises the following specific steps:
calculating to obtain a minimum circumscribed rectangle of the workpiece outline based on the size and coordinate information of the workpiece outline obtained by calibrating the camera, and solving the edge point coordinate and the center point coordinate of the minimum circumscribed rectangle;
obtaining a second rectangle which is intersected with the contour of the workpiece and has a length shorter than that of the minimum circumscribed rectangle according to the edge point coordinate and the center point coordinate of the minimum circumscribed rectangle of the contour of the workpiece and the length of the chamfer of the workpiece, wherein the center point coordinate of the second rectangle is the same as that of the minimum circumscribed rectangle, the length of the second rectangle is equal to the length of the minimum circumscribed rectangle minus 2 times of the length of the chamfer of the workpiece, and the width of the second rectangle is not less than the width of the minimum circumscribed rectangle;
subtracting the second rectangular contour from the edge contour of the workpiece to obtain a difference value, wherein the difference value is two closed and disjoint contours;
and acquiring a workpiece chamfering profile according to the characteristics of the chamfering profile, selecting the profile with short length and small area as the workpiece chamfering profile if the workpiece chamfering length is short and the area is small, and selecting the profile with long length and large area as the workpiece chamfering profile if the workpiece chamfering length is long and the area is large.
The polygon approximation algorithm is used for analyzing whether the chamfer contour is qualified or not, and the specific method is as follows:
calculating to obtain a connecting line of two end points of the chamfer profile curve of the workpiece;
calculating the distance from the farthest point of the workpiece chamfer contour curve from the connecting line to the connecting line;
comparing whether the distance from the farthest point to the connecting line is smaller than a set value; if the curve is larger than the set value, dividing the workpiece chamfer contour curve into two sections by taking the farthest point as a dividing point;
repeating the 3 steps until the distance from the farthest point of the new curve to the connecting line of the corresponding new curve end point is smaller than a set value;
analyzing whether the chamfering profile has defects, and if the workpiece chamfering profile is divided into two sections of arcs, determining the workpiece chamfering profile is qualified; if the workpiece chamfer profile is divided into three or more arc sections, the workpiece chamfer profile is an unqualified chamfer profile.
Compared with the prior art, the beneficial effects are:
the industrial CCD camera is skillfully utilized to collect data of the workpiece, the collected data is sent to the industrial PC through internet access communication, the PC calls a designed image processing algorithm to analyze and process the data and then sends out a control signal, and the PLC is utilized to process the control signal and control the air gun to screen out defective products. An illumination module is also arranged to enhance the characteristics of the workpiece and eliminate the interference of other natural light. The system applies image processing technologies such as camera calibration, sub-pixel edge detection and the like to process, analyze and detect the contour picture of the workpiece, and the precision of the measured external dimension of the workpiece can reach +/-0.02 mm. When the arc chamfer is detected, the system creatively uses a polygon approximation algorithm to analyze the defect condition of the workpiece according to the shape of the arc, thereby greatly improving the identification accuracy of the arc of the workpiece.
Drawings
Fig. 1 is a control framework diagram of the automatic micro-workpiece sorting system based on machine vision according to the invention.
Fig. 2 is a flow chart of image processing of the automatic sorting system for micro workpieces based on machine vision according to the present invention.
FIG. 3 is a schematic diagram of a sub-pixel edge detection method.
FIG. 4 is a schematic diagram of a polygon detection algorithm.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent; for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted. The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent.
As shown in fig. 1, an automatic sorting system for micro-workpieces based on machine vision comprises a vibration disc, a stepping motor turntable, an optical fiber sensor, a light source, an industrial camera, a PC upper computer, a PLC controller, an air gun, a baffle and a 12V dc voltage stabilizing module.
The vibration disc is connected with the stepping motor rotary disc and can convey workpieces to the stepping motor rotary disc, the optical fiber sensor and the industrial camera are arranged above the stepping motor rotary disc, the light source is arranged below the stepping motor rotary disc, the optical fiber sensor, the light source and the industrial camera are electrically connected with the PLC, the industrial camera is further electrically connected with the PC upper computer, the PC upper computer is electrically connected with the PLC, the air gun and the baffle are arranged on the side face of the stepping motor rotary disc, the air gun and the baffle are matched to convey the workpieces to a genuine product area or a defective product area, and the 12V direct-current voltage stabilizing module is electrically connected with the optical fiber sensor and the PLC.
Specifically, the industrial camera is a Basler 200 ten thousand pixel industrial CCD camera, a telecentric lens is adopted, the visual field is 13.5mm, and a gigabit Ethernet transmission line is used for transmitting images.
Specifically, the stepping motor turntable is composed of a stepping motor and high-flatness transparent glass, and the stepping motor drives the turntable to rotate through a linkage relation.
Specifically, the light source is a background light source.
As shown in fig. 2, a method for sorting micro workpieces based on machine vision by using the micro workpiece sorting system includes the following steps:
a micro-workpiece sorting method based on machine vision by utilizing the micro-workpiece sorting system comprises the following steps:
step 1: setting relevant parameters on a PC (personal computer) according to user requirements and field environment factors, and operating the system;
step 2: the vibration disc vibrates the workpiece to enable the workpiece to automatically fall down to the stepping motor turntable, and meanwhile, the turntable rotates at a fixed speed;
and step 3: the stepping motor turntable drives the workpiece to rotate, and the optical fiber sensor senses the arrival of the workpiece and informs the PLC controller of the arrival;
and 4, step 4: after sensing the arrival of a workpiece, the PLC starts a background light source after a period of time and triggers an industrial camera to take a picture;
and 5: the industrial camera captures a high-contrast contour map of a background light source penetrating through a workpiece and sends the high-contrast contour map to a PC (personal computer) for image processing;
step 6: after the PC upper computer is used for processing, the quality/defective product signals are sent to the PLC controller, the PLC controller controls the air gun and the baffle, and the workpieces are sent to a quality area or a defective product area.
Specifically, the graphic processing process of the PC upper computer comprises camera calibration, preprocessing, sub-pixel edge detection and polygon approximation algorithm processing in sequence;
the camera calibration is used for obtaining the size and coordinate information of the workpiece, the preprocessing is used for removing noise points, the sub-pixel edge detection is used for obtaining the chamfering outline of the workpiece, and the polygon approximation algorithm processing is used for analyzing whether the chamfering outline of the workpiece is qualified or not.
Specifically, the camera calibration is based on a rectangular grid-shaped circular target plane calibration method, and the dimension and coordinate information of the workpiece outline can be obtained.
Specifically, as shown in fig. 3, the method for detecting the sub-pixel edge is used to extract the chamfer profile of the workpiece, and the specific method is as follows:
calculating to obtain a minimum circumscribed rectangle of the workpiece outline based on the size and coordinate information of the workpiece outline obtained by calibrating the camera, and solving the edge point coordinate and the center point coordinate of the minimum circumscribed rectangle;
obtaining a second rectangle which is intersected with the workpiece outline and has a length shorter than that of the minimum circumscribed rectangle according to the edge point coordinate and the center point coordinate of the minimum circumscribed rectangle of the workpiece outline and the length of the workpiece chamfer (the length of the workpiece chamfer is a known condition and can be determined according to the type of the workpiece), wherein the center point coordinate of the second rectangle is the same as that of the minimum circumscribed rectangle, the length of the second rectangle is equal to the length of the minimum circumscribed rectangle minus 2 times of the length of the workpiece chamfer, and the width of the second rectangle is not less than the width of the minimum circumscribed rectangle;
subtracting the second rectangular contour from the edge contour of the workpiece to obtain a difference value, wherein the difference value is two closed and disjoint contours;
and acquiring a workpiece chamfering profile according to the characteristics of the chamfering profile, selecting the profile with short length and small area as the workpiece chamfering profile if the workpiece chamfering length is short and the area is small, and selecting the profile with long length and large area as the workpiece chamfering profile if the workpiece chamfering length is long and the area is large. The workpiece chamfering feature of the present embodiment (the feature is a known condition, and may be determined according to the type of the workpiece) is short in length and small in area, and therefore the left-hand contour is selected as the workpiece chamfering contour.
Specifically, the polygon approximation algorithm is used for analyzing whether the chamfer contour is qualified, and the specific method is as follows:
calculating to obtain a connecting line of two end points of the chamfer profile curve of the workpiece;
calculating the distance from the farthest point of the workpiece chamfer contour curve from the connecting line to the connecting line;
comparing whether the distance from the farthest point to the connecting line is smaller than a set value; if the set value is larger than the set value, dividing the workpiece chamfer contour curve into two sections by taking the farthest point as a dividing point, wherein the set value can be predetermined according to the type of the workpiece;
repeating the 3 steps until the distance from the farthest point of the new curve to the connecting line of the corresponding new curve end point is smaller than a set value;
analyzing whether the chamfering profile has defects, and if the workpiece chamfering profile is divided into two sections of arcs, determining the workpiece chamfering profile is qualified; if the workpiece chamfer profile is divided into three or more arc sections, the workpiece chamfer profile is an unqualified chamfer profile.
As shown in fig. 4, for convenience of description, the workpiece chamfer contour may be subjected to dimension reduction processing, and replaced with points 1-6, that is, the workpiece chamfer contour has only six points, and the specific process of the polygon approximation algorithm is as follows: firstly, a line segment 16 is formed by connecting a point 1 and a point 6, a point 3 is assumed to be the farthest point from the workpiece chamfering outline to the line segment 16, and the distance from the point 3 to the line segment 16 is larger than a set value, so that the workpiece chamfering outline is divided into two sections by taking the point 3 as a dividing point, namely, the left half part of the workpiece chamfering outline and the right half part of the workpiece chamfering outline, then the point 1 and the point 3 are connected to form a line segment 13, the point 3 and the point 6 are connected to form a line segment 36, a point 2 is assumed to be the farthest point from the left half part of the workpiece chamfering outline to the line segment 13, a point 4 is the farthest point from the right half part of the workpiece chamfering outline to the line segment 36, the distance from the point 2 to the line segment 13 is smaller than the set value, the distance from the point 4 to the line segment 36 is smaller than the set value, the dividing process is finished, and the workpiece chamfering outline is divided into two sections, so that the workpiece chamfering is qualified.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (2)

1.一种基于机器视觉的微工件分拣方法,其特征在于,包括以下步骤:1. a micro workpiece sorting method based on machine vision, is characterized in that, comprises the following steps: 步骤1:根据用户要求和现场环境因素,在PC上位机设置相关参数,运行系统;Step 1: According to user requirements and on-site environmental factors, set relevant parameters on the PC to run the system; 步骤2:振动盘震动工件以使工件自动下落至步进电机转盘,与此同时,步进电机转盘以固定速度旋转;Step 2: The vibration plate vibrates the workpiece to automatically drop the workpiece to the stepper motor turntable, and at the same time, the stepper motor turntable rotates at a fixed speed; 步骤3:步进电机转盘带动工件旋转,光纤传感器感知工件到来,告知PLC控制器;Step 3: The stepper motor turntable drives the workpiece to rotate, and the optical fiber sensor senses the arrival of the workpiece and informs the PLC controller; 步骤4:PLC控制器感知工件到来后,在一段时间后启动背景光源,并触发工业相机拍照;Step 4: After the PLC controller senses the arrival of the workpiece, it starts the background light source after a period of time, and triggers the industrial camera to take pictures; 步骤5:工业相机捕捉背景光源透过工件的高反差轮廓图,并发送至PC上位机进行图像处理;Step 5: The industrial camera captures the high-contrast contour map of the background light source passing through the workpiece, and sends it to the PC host computer for image processing; 所述PC上位机的图形处理的过程依次是摄像机标定、预处理、亚像素边缘检测、多边形逼近算法处理;The process of graphics processing of the PC host computer is camera calibration, preprocessing, sub-pixel edge detection, and polygon approximation algorithm processing in sequence; 所述摄像机标定用于获取工件的尺寸和坐标信息,所述预处理用于去除噪点,所述亚像素边缘检测用于获得工件倒角轮廓,所述多边形逼近算法处理用于分析工件倒角轮廓是否合格;The camera calibration is used to obtain the size and coordinate information of the workpiece, the preprocessing is used to remove noise, the sub-pixel edge detection is used to obtain the workpiece chamfer contour, and the polygon approximation algorithm processing is used to analyze the workpiece chamfer contour. Eligibility; 其中,所述亚像素边缘检测的方法用于提取工件倒角轮廓,具体方法如下:Wherein, the sub-pixel edge detection method is used to extract the workpiece chamfering contour, and the specific method is as follows: 基于摄像机标定获得的工件轮廓的尺寸和坐标信息,计算得出工件轮廓最小外接矩形,求得最小外接矩形的边缘点坐标和中心点坐标;Based on the size and coordinate information of the workpiece contour obtained by the camera calibration, the minimum circumscribed rectangle of the workpiece contour is calculated, and the edge point coordinates and center point coordinates of the minimum circumscribed rectangle are obtained; 根据工件轮廓的最小外接矩形边缘点坐标、中心点坐标和工件倒角的长度,获得出一个与工件轮廓相交且长度比最小外接矩形短的第二矩形,第二矩形和最小外接矩形中心点坐标相同,第二矩形的长度等于最小外接矩形的长度减去2倍的工件倒角长度,第二矩形的宽度不小于最小外接矩形的宽度;According to the minimum circumscribed rectangle edge point coordinates, center point coordinates and the length of the workpiece chamfer of the workpiece contour, a second rectangle that intersects with the workpiece contour and whose length is shorter than the minimum circumscribed rectangle is obtained. The second rectangle and the minimum circumscribed rectangle center point coordinates The same, the length of the second rectangle is equal to the length of the smallest circumscribed rectangle minus 2 times the length of the workpiece chamfer, and the width of the second rectangle is not less than the width of the smallest circumscribed rectangle; 由工件轮廓减去第二矩形轮廓,得到差值,差值为两个闭合且不相交的轮廓;Subtract the second rectangular contour from the workpiece contour to obtain the difference, and the difference is two closed and disjoint contours; 根据倒角轮廓的特点获取工件倒角轮廓,若工件倒角长度短、面积小,则选择长度短、面积小的轮廓为工件倒角轮廓,若工件倒角长度长、面积大,则选择长度长、面积大的轮廓为工件倒角轮廓;Obtain the workpiece chamfering contour according to the characteristics of the chamfering contour. If the workpiece chamfering length is short and the area is small, the contour with the short length and the small area is selected as the workpiece chamfering contour. If the workpiece chamfering length is long and the area is large, the length is selected. The long and large contour is the workpiece chamfering contour; 其中,所述多边形逼近算法用于分析倒角轮廓的是否合格,具体方法如下:Wherein, the polygon approximation algorithm is used to analyze whether the chamfered contour is qualified, and the specific method is as follows: 计算得到工件倒角轮廓曲线两端点的连线;Calculate the connection line between the two ends of the workpiece chamfering contour curve; 计算工件倒角轮廓曲线距离连线最远点到连线的距离;Calculate the distance from the farthest point of the workpiece chamfering contour curve to the connecting line; 比较最远点到连线的距离是否小于设定值;如果大于设定值,则把工件倒角轮廓曲线以最远点为分割点分为两段;Compare whether the distance from the farthest point to the connecting line is less than the set value; if it is greater than the set value, divide the workpiece chamfering contour curve into two sections with the farthest point as the dividing point; 重复以上3个步骤,直到新曲线的最远点到对应新曲线端点连线的距离小于设定值;Repeat the above 3 steps until the distance between the farthest point of the new curve and the connecting line corresponding to the end point of the new curve is less than the set value; 分析倒角轮廓是否有缺陷,若工件倒角轮廓被分成两段弧形,则为合格倒角轮廓;若工件倒角轮廓被分成三段或者更多段弧形,则为不合格倒角轮廓;Analyze whether the chamfering contour is defective. If the workpiece chamfering contour is divided into two arcs, it is a qualified chamfering contour; if the workpiece chamfering contour is divided into three or more arcs, it is an unqualified chamfering contour. ; 步骤6:PC上位机处理后,将正品/次品信号发送PLC控制器,PLC控制器操控气枪和挡板,将工件送到正品区域或次品区域。Step 6: After the PC host computer processes, the genuine/defective product signal is sent to the PLC controller, and the PLC controller controls the air gun and the baffle, and sends the workpiece to the genuine product area or the defective product area. 2.根据权利要求1所述的基于机器视觉的微工件分拣方法,其特征在于,所述的摄像机标定是基于矩形网格状圆靶平面标定法,可以获得工件轮廓的尺寸和坐标信息。2 . The method for sorting micro workpieces based on machine vision according to claim 1 , wherein the camera calibration is based on a rectangular grid-shaped target plane calibration method, and the size and coordinate information of the workpiece contour can be obtained. 3 .
CN201811378064.XA 2018-11-19 2018-11-19 A system and method for automatic sorting of micro workpieces based on machine vision Active CN109622404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811378064.XA CN109622404B (en) 2018-11-19 2018-11-19 A system and method for automatic sorting of micro workpieces based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811378064.XA CN109622404B (en) 2018-11-19 2018-11-19 A system and method for automatic sorting of micro workpieces based on machine vision

Publications (2)

Publication Number Publication Date
CN109622404A CN109622404A (en) 2019-04-16
CN109622404B true CN109622404B (en) 2021-08-13

Family

ID=66068478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811378064.XA Active CN109622404B (en) 2018-11-19 2018-11-19 A system and method for automatic sorting of micro workpieces based on machine vision

Country Status (1)

Country Link
CN (1) CN109622404B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111871841A (en) * 2020-08-12 2020-11-03 安徽信息工程学院 A machine vision parts sorting system, method and device for rotary sorting
CN112084964A (en) * 2020-09-11 2020-12-15 浙江水晶光电科技股份有限公司 Product identification apparatus, method and storage medium
CN113822180B (en) * 2021-09-07 2024-07-16 深圳市长龙铁路电子工程有限公司 Air switch on-off state identification method and device, electronic equipment and storage medium
CN116823766A (en) * 2023-06-26 2023-09-29 浙江华睿科技股份有限公司 A chamfer determination method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105783786A (en) * 2016-04-26 2016-07-20 北方工业大学 Part chamfering measuring method and device based on structured light vision
CN206583812U (en) * 2017-03-02 2017-10-24 河南西普电气有限公司 A kind of two-sided visual detection equipment of silver contact

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2036034A1 (en) * 1991-02-12 1992-08-09 Katsumi Tokoyama Powder material inspection apparatus
CN102637300B (en) * 2012-04-26 2014-08-06 重庆大学 Improved Zernike moment edge detection method
CN103512888B (en) * 2013-06-05 2015-11-11 北京化工大学 A kind of cigarette packet seal defect detecting system based on image recognition technology
CN203842839U (en) * 2014-04-15 2014-09-24 宁波韩华磁电有限公司 Full-automatic appearance screening device for tiny product
CN203830307U (en) * 2014-05-16 2014-09-17 歌尔声学股份有限公司 Precision workpiece detection separator

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105783786A (en) * 2016-04-26 2016-07-20 北方工业大学 Part chamfering measuring method and device based on structured light vision
CN206583812U (en) * 2017-03-02 2017-10-24 河南西普电气有限公司 A kind of two-sided visual detection equipment of silver contact

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于轮廓跟踪链码表的多边形逼近新方法;田金文等;《全国第五届遥感遥测遥控技术年会论文集 上集》;19951231;第156-160页 *

Also Published As

Publication number Publication date
CN109622404A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109622404B (en) A system and method for automatic sorting of micro workpieces based on machine vision
CN105783723B (en) Precision die surface processing accuracy detection device and method based on machine vision
CN104634787B (en) A kind of automobile body external panel spray painting flaw automatic detection device and method
CN106949848B (en) A kind of high-precision laser 3D profile phone structural detection method
CN108230324B (en) Visual detection method for microdefect on surface of magnetic shoe
CN106705847B (en) Gap geometric dimension measurement method and device in a kind of free form surface
CN106248686A (en) Glass surface defects based on machine vision detection device and method
CN102529019B (en) A method for mold detection, protection and parts detection and removal
CN107123114A (en) A kind of cloth defect inspection method and device based on machine learning
CN115388778B (en) Computer screen quality control device
CN103630544B (en) A kind of vision on-line detecting system
CN108844961A (en) A kind of temperature controller case vision detection system and method
JP2017032548A (en) Use of 3D vision in automated industrial inspection
WO2021179400A1 (en) Computer vision-based adaptive measurement system and method for geometric parameters in assembly process
CN115035092A (en) Image-based bottle detection method, device, equipment and storage medium
CN106767564A (en) A kind of detection method for being applied to phone housing surface roughness
CN114280075B (en) Online visual detection system and detection method for surface defects of pipe parts
CN105181713A (en) Detection device used for optical fiber image inverter surface defects
CN110096980A (en) Character machining identifying system
CN118882520B (en) A three-dimensional detection device and method for surface defects of large-aperture curved optical elements
JP2014203311A (en) Image processor, image processing method, and program
CN111426693A (en) Quality defect detection system and detection method thereof
CN115791801A (en) 3D glass online monitoring platform based on machine vision
CN103091332B (en) Detection method and detection system of U-shaped powder pipe based on machine vision
CN107891012A (en) Pearl size and circularity sorting equipment based on equivalent algorithm

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