CN111871848A - Machine vision part sorting method and system based on serial port communication control - Google Patents

Machine vision part sorting method and system based on serial port communication control Download PDF

Info

Publication number
CN111871848A
CN111871848A CN202010582246.XA CN202010582246A CN111871848A CN 111871848 A CN111871848 A CN 111871848A CN 202010582246 A CN202010582246 A CN 202010582246A CN 111871848 A CN111871848 A CN 111871848A
Authority
CN
China
Prior art keywords
image
sorted
module
parts
machine vision
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010582246.XA
Other languages
Chinese (zh)
Inventor
李梦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Institute of Information Engineering
Original Assignee
Anhui Institute of Information Engineering
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 Anhui Institute of Information Engineering filed Critical Anhui Institute of Information Engineering
Priority to CN202010582246.XA priority Critical patent/CN111871848A/en
Publication of CN111871848A publication Critical patent/CN111871848A/en
Pending legal-status Critical Current

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/04Sorting according to size
    • B07C5/10Sorting according to size measured by light-responsive means
    • 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/361Processing or control devices therefor, e.g. escort memory
    • B07C5/362Separating or distributor mechanisms

Landscapes

  • Sorting Of Articles (AREA)

Abstract

The invention discloses a machine vision part sorting method and system based on serial port communication control, wherein the method comprises the following steps: acquiring image information of a part to be sorted; preprocessing image information; analyzing the preprocessed image to obtain the outer contour size of the part to be sorted; setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts to form a cascade classifier; detecting a plurality of key sizes of parts to be sorted by utilizing a cascade classifier; when all the critical dimensions are detected within the detection threshold range, the output of the cascade classifier is true; otherwise, the output is false; and effectively separating out the parts to be sorted which are output as false by the cascade classifier by using the PLC sorting system. The method overcomes the problems that in the prior art, although a visual-based sorting system has a plurality of devices, the price is high enough, the design is complex, and the detection and sorting speed is limited.

Description

Machine vision part sorting method and system based on serial port communication control
Technical Field
The invention relates to the technical field of part sorting, in particular to a machine vision part sorting method and system based on serial port communication control.
Background
The part sorting is an indispensable part in industrial production, and most domestic factories adopt manual sorting, so that the sorting efficiency is low and the error rate is high. With the increase of the production speed, the actual production requirements cannot be met. With the gradual and wide application of machine vision in the industrial field, particularly industrial control classification, automatic information acquisition and identification classification are achieved by means of vision classification and robot control technology at present, a robot can make a decision efficiently and accurately according to image processing information to finish automatic sorting and code object carrying actions, the flexibility degree is high, and the method is widely applied to part identification in industries such as packaging, electronics, machinery and the like.
In the prior art, visual-based sorting system equipment is not few, but the price is high enough, the design is complex, and the detection and sorting speed is limited.
Therefore, the invention provides a machine vision part sorting method and system based on serial port communication control, which detect the key size of the axis of a part through machine vision in the using process, judge the part to be qualified by constructing a cascading error precision system, and have low cost and high sorting efficiency.
Disclosure of Invention
Aiming at the technical problems, the invention aims to solve the problems that in the prior art, although a visual sorting system is not few, the price is high enough, the design is complex, and the detection and sorting speed is limited, so that the machine visual part sorting method and the machine visual part sorting system based on serial port communication control are provided, wherein the machine visual part sorting method and the machine visual part sorting system are characterized in that the key size of the axis of a part is detected through machine vision in the using process, the qualification is judged through constructing a cascade error precision system, the cost is low, and the sorting efficiency is high.
In order to achieve the purpose, the invention provides a machine vision part sorting method based on serial port communication control, which comprises the following steps:
acquiring image information of a part to be sorted;
preprocessing the image information;
analyzing and processing the preprocessed image to obtain the outer contour size of the part to be sorted;
setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts to form a cascade classifier;
detecting a plurality of key sizes of the parts to be sorted by utilizing the cascade classifier; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and effectively separating out the parts to be sorted, which are output as false by the cascade classifier, by utilizing a PLC sorting system.
Preferably, before the acquiring the image information of the part to be sorted, the method further comprises:
selecting a circular calibration plate to construct a template in the VBAI to finish the correction setting of the CCD camera, and training after forming the calibration template;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
Preferably, the preprocessing the image information comprises the following steps:
carrying out graying processing on the image information of the parts to be sorted;
carrying out brightness setting and image optimization on the image subjected to the graying processing;
and carrying out reverse setting on the optimized image, and displaying the image as an image negative pixel value.
Preferably, the step of analyzing and processing the preprocessed image to obtain the size of the outer contour of the part to be sorted comprises the following steps:
measuring the gray scale change of the preprocessed image through an edge detection algorithm;
extracting discontinuous edge points in the image, and adopting a Fit Line linear fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting linear Line;
and measuring the pixel distance of the fitted straight line, and converting the pixel distance into an actual size.
Preferably, the effectively separating out the parts to be sorted, which are output as false by the cascade classifier, by using the PLC sorting system includes:
according to the Modbus ASCII protocol, an RS485 serial port communication mode is selected, a control instruction of a PC end is sent to a PLC module in the PLC sorting system, and the PLC module controls a two-position four-way solenoid valve to enable a piston to drive a mechanical actuating mechanism to do linear reciprocating motion so as to push out a fake part to be sorted to a unqualified product area and then reset.
The invention also provides a machine vision part sorting system based on serial port communication control, which comprises:
the CCD camera is used for acquiring image information of the parts to be sorted;
the image preprocessing module is used for preprocessing the image information;
the size detection module is used for analyzing and processing the preprocessed image to obtain the size of the outer contour of the part to be sorted;
the cascade classifier is used for setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts and detecting a plurality of critical dimensions of the parts to be sorted; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and the PLC sorting system is used for effectively separating out the parts to be sorted, which are output by the cascade classifier and are false.
Preferably, the system further comprises:
the camera calibration module is used for selecting a circular calibration plate to construct a template in the VBAI so as to finish the correction setting of the CCD camera, and training after the calibration template is formed;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
Preferably, the image preprocessing module comprises:
the graying module is used for performing graying processing on the image information of the parts to be sorted;
and the image optimization module is used for carrying out brightness setting and image optimization on the grayed image, carrying out reverse setting on the optimized image and displaying the image as an image negative pixel value.
Preferably, the size detection module includes:
the measurement module is used for measuring the gray level change of the preprocessed image through an edge detection algorithm;
the Line fitting module is used for extracting discontinuous edge points in the image and adopting a Fit Line fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting Line;
and the measurement conversion module is used for measuring the pixel pitch of the fitted straight line and converting the pixel pitch into an actual size.
Preferably, the system further comprises:
and the communication module is used for finishing communication and output control between the PC end and the lower computer PLC module.
According to the technical scheme, the machine vision part sorting method and system based on serial port communication control have the beneficial effects that when in use: the invention utilizes visual dimension measurement, has small measurement error and high precision, compares the actual measurement with a micrometer, has the measurement precision error value within the range of-0.0006 to-0.00264 mm and the length average error of-0.002 mm, and can realize high-precision measurement. After manual repeated inspection and sorting verification, the number of unqualified products is the same as the sorting result detected by the vision system. The sorting accuracy is 100%. When the unqualified products are identified, the lower computer controls the cylinder to act through the electromagnetic valve, and the piston reciprocates to complete separation of the unqualified products. 10 unqualified parts are selected to measure the sorting time, the system operation time for sorting the single unqualified part is within 1.5s, the efficiency is high, and the production requirement is met. The system obtains all size values of the parts based on image processing, can quickly extract the required key size to perform qualified judgment according to actual requirements, and has better adaptability and flexibility.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flow chart of a machine vision part sorting method based on serial communication control according to a preferred embodiment of the present invention;
fig. 2 is a flowchart of an outer contour dimension obtaining method for a part to be sorted, provided in a preferred embodiment of the present invention;
FIG. 3 is a block diagram of a machine vision parts sorting system based on serial communication control according to a preferred embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a size detection module provided in a preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of the operation of a machine vision parts sorting system based on serial communication control according to a preferred embodiment of the present invention;
fig. 6 is a schematic structural diagram of a machine vision part sorting production line based on serial communication control according to a preferred embodiment of the present invention.
Description of the reference numerals
1 piston rod 2 conveyor belt
3 collecting tray 4 sensor
5 push plate
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
As shown in fig. 1 and 2, the present invention provides a machine vision part sorting method based on serial port communication control, the method includes:
acquiring image information of a part to be sorted;
preprocessing the image information;
analyzing and processing the preprocessed image to obtain the outer contour size of the part to be sorted;
setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts to form a cascade classifier;
detecting a plurality of key sizes of the parts to be sorted by utilizing the cascade classifier; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and effectively separating out the parts to be sorted, which are output as false by the cascade classifier, by utilizing a PLC sorting system.
In a preferred embodiment of the present invention, before the acquiring the image information of the part to be sorted, the method further includes:
selecting a circular calibration plate to construct a template in the VBAI to finish the correction setting of the CCD camera, and training after forming the calibration template;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
In a preferred embodiment of the present invention, the preprocessing the image information includes:
carrying out graying processing on the image information of the parts to be sorted;
carrying out brightness setting and image optimization on the image subjected to the graying processing;
and carrying out reverse setting on the optimized image, and displaying the image as an image negative pixel value.
In a preferred embodiment of the present invention, the analyzing the preprocessed image to obtain the size of the outer contour of the part to be sorted includes the following steps:
measuring the gray scale change of the preprocessed image through an edge detection algorithm;
extracting discontinuous edge points in the image, and adopting a Fit Line linear fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting linear Line;
and measuring the pixel distance of the fitted straight line, and converting the pixel distance into an actual size.
In a preferred embodiment of the present invention, the effectively separating the parts to be sorted, which are outputted as false by the cascade classifier, by using the PLC sorting system includes:
according to the Modbus ASCII protocol, an RS485 serial port communication mode is selected, a control instruction of a PC end is sent to a PLC module in the PLC sorting system, and the PLC module controls a two-position four-way solenoid valve to enable a piston to drive a mechanical actuating mechanism to do linear reciprocating motion so as to push out a fake part to be sorted to a unqualified product area and then reset. The PLC sorting system comprises: the PLC module is used for receiving a control command of the PC end, the electromagnetic valve is used for controlling the on-off of the mechanical actuating mechanism, and the mechanical actuating mechanism is used for driving sorting out unqualified parts.
Fig. 6 shows an actual production line device corresponding to the method of the present invention: the part to be sorted is transported on the conveyor belt 2, the sensor 4 senses that the part to be sorted is conveyed and then triggers the CCD camera to acquire images, then after size acquisition and quality judgment are carried out, if the part is an unqualified product, the piston rod 1 on the air cylinder extends to drive the mechanical executing mechanisms such as the push plate 5 to push the unqualified parts on the conveyor belt 2 to the collecting tray 3 for centralized processing, and then the piston rod 1 drives the push plate 5 to shorten to an initial position to wait for next sorting work.
According to the content, the machine vision part sorting method based on the serial communication control provided by the invention has the working principle that: before acquiring a part image, correcting and calibrating a CCD camera; the correction is generally realized by selecting a circular calibration plate to construct a template in the VBAI to finish the correction setting of the lens, training is carried out after the calibration template is formed, the obtained corrected average error is 0.0003mm, and the measurement precision of the lens of the CCD camera is greatly improved. And the calibration completes the calibration of the pixel equivalent according to the conversion relation with the pixel coordinate. A chessboard calibration board of OpenCV 55mm can be generally selected for calibrating the linear distance.
After the operation is completed, the processed CCD camera is used for acquiring images of the part, the images are color RGB images, the overall calculation time and the memory usage amount are increased, and the final detection effect is affected. And carrying out graying processing on the original color image. According to the characteristics of human eyes and the psychological response research of human beings to colors, the brightness Y of an object can be expressed by RGB three primary colors with different specific gravities, wherein the specific gravities of RGB are respectively as follows: 0.299,0.587,0.114 processes the acquired image. Then Brightness setting and image optimization: for the parameters of the gray scale map: the brightness value Brightens, the Contrast value Contrast and the Gamma value Gamma are set, the image processing result is strengthened, and the logic operation is carried out on the existing metal reflection part on the basis to remove the metal reflection part. In order to improve the accuracy of the boundary detection, the threshold value is more convenient to set when being extracted, and the image is reversely set and displayed as the pixel value of the image negative film.
After the preprocessing of the image is completed, acquiring the size of the part, measuring the gray change of the image result obtained in the preprocessing step through an edge detection algorithm to extract discontinuous edge points in the image, and fitting and solving all discrete edge data points by adopting a Fit Line linear fitting optimization algorithm; and evaluating the fitting precision of the straight line after the peripheral far points are removed through the straight line fitting result LFS to obtain the optimal fitting straight line. And finally, measuring the pixel distance of the fitted straight line, and converting the pixel distance into a physical distance on the basis. And optimizing the candidate straight Line, continuously removing the straight Line fitted after the farthest peripheral point is removed by an algorithm, and solving the straight Line with the highest precision by calculating the straight Line fitting performance (LSF). And returning the best fitting straight line when the achievement of the fitting straight line reaches the required score. The fitting straight line is evaluated to obtain the optimal fitting straight line, so that the obtained result of the part size is more accurate, and the accuracy of judging the size qualified rate is improved.
It should be noted that the invention obtains the key dimensions of the parts, and the key dimensions can be set according to the actual production requirements; after the critical dimensions are obtained, the dimensions need to be compared with preset dimension thresholds one by one, and the output of the cascade classifier is true only under the condition that all the dimensions meet the requirements.
After size measurement and qualification judgment, communication and output control between the PC and the PLC of the lower computer are completed by means of LabVIEW software programming, and an RS485 serial port communication mode is selected according to a Modbus ASCII protocol to control the two-position four-way solenoid valve. The piston drives the mechanical actuating mechanism to do linear reciprocating motion, unqualified products are pushed out to the unqualified product area and then reset, and sorting action is completed. And according to the message format specified in the PLC manual, the upper computer sends data to the lower computer. And continuously running the upper computer program by using a while loop body to complete the related parameter setting of the serial port. And the lower computer controls the running state of each load through ladder diagram programming. The lower computer adopts the Taida programming software WPL for programming. When the upper computer presses a 'PLC starting button', the LabVIEW calls a VISA function to send Modbus ASCII data to the lower computer for control, when the upper computer successfully writes M0 data, the M2 and the M3 are set, and the conveyor belt is driven by the direct current motor to run. And if the camera monitors an unqualified signal, the electromagnetic valve acts to drive the cylinder to separate an unqualified product, when the upper computer program writes M5 data, the ladder diagram is reset, and all actions are stopped until the upper computer continuously sends a starting instruction.
The system claim:
as shown in fig. 2-3, the present invention further provides a machine vision parts sorting system based on serial communication control, the system includes:
the CCD camera is used for acquiring image information of the parts to be sorted;
the image preprocessing module is used for preprocessing the image information;
the size detection module is used for analyzing and processing the preprocessed image to obtain the size of the outer contour of the part to be sorted;
the cascade classifier is used for setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts and detecting a plurality of critical dimensions of the parts to be sorted; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and the PLC sorting system is used for effectively separating out the parts to be sorted, which are output by the cascade classifier and are false.
In a preferred embodiment of the present invention, the system further comprises:
the camera calibration module is used for selecting a circular calibration plate to construct a template in the VBAI so as to finish the correction setting of the CCD camera, and training after the calibration template is formed;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
In a preferred embodiment of the present invention, the image preprocessing module includes:
the graying module is used for performing graying processing on the image information of the parts to be sorted;
and the image optimization module is used for carrying out brightness setting and image optimization on the grayed image, carrying out reverse setting on the optimized image and displaying the image as an image negative pixel value.
In a preferred embodiment of the present invention, the size detection module includes:
the measurement module is used for measuring the gray level change of the preprocessed image through an edge detection algorithm;
the Line fitting module is used for extracting discontinuous edge points in the image and adopting a Fit Line fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting Line;
and the measurement conversion module is used for measuring the pixel pitch of the fitted straight line and converting the pixel pitch into an actual size.
In a preferred embodiment of the present invention, the system further comprises:
and the communication module is used for finishing communication and output control between the PC end and the lower computer PLC module.
As shown in fig. 5, which is a working schematic diagram of the machine vision part sorting system based on serial communication control provided by the present invention, the driving motor drives the power transmission belt to move, after the parts to be sorted are loaded, sorting is performed, and only the qualified parts can complete the unloading work; the CCD camera needs to be corrected and calibrated before acquiring a part image; the correction is generally realized by selecting a circular calibration plate to construct a template in the VBAI to finish the correction setting of the lens, training is carried out after the calibration template is formed, the obtained corrected average error is 0.0003mm, and the measurement precision of the lens of the CCD camera is greatly improved. And the calibration completes the calibration of the pixel equivalent according to the conversion relation with the pixel coordinate. A chessboard calibration board of OpenCV 55mm can be generally selected for calibrating the linear distance.
After the operation is completed, the processed CCD camera is used for acquiring images of the part, the images are color RGB images, the overall calculation time and the memory usage amount are increased, and the final detection effect is affected. And carrying out graying processing on the original color image. According to the characteristics of human eyes and the psychological response research of human beings to colors, the brightness Y of an object can be expressed by RGB three primary colors with different specific gravities, wherein the specific gravities of RGB are respectively as follows: 0.299,0.587,0.114 processes the acquired image. Then Brightness setting and image optimization: for the parameters of the gray scale map: the brightness value Brightens, the Contrast value Contrast and the Gamma value Gamma are set, the image processing result is strengthened, and the logic operation is carried out on the existing metal reflection part on the basis to remove the metal reflection part. In order to improve the accuracy of the boundary detection, the threshold value is more convenient to set when being extracted, and the image is reversely set and displayed as the pixel value of the image negative film.
After the preprocessing of the image is completed, acquiring the size of the part, measuring the gray change of the image result obtained in the preprocessing step through an edge detection algorithm to extract discontinuous edge points in the image, and fitting and solving all discrete edge data points by adopting a Fit Line linear fitting optimization algorithm; and evaluating the fitting precision of the straight line after the peripheral far points are removed through the straight line fitting result LFS to obtain the optimal fitting straight line. And finally, measuring the pixel distance of the fitted straight line, and converting the pixel distance into a physical distance on the basis. And optimizing the candidate straight Line, continuously removing the straight Line fitted after the farthest peripheral point is removed by an algorithm, and solving the straight Line with the highest precision by calculating the straight Line fitting performance (LSF). And returning the best fitting straight line when the achievement of the fitting straight line reaches the required score. The fitting straight line is evaluated to obtain the optimal fitting straight line, so that the obtained result of the part size is more accurate, and the accuracy of judging the size qualified rate is improved.
It should be noted that the invention obtains the key dimensions of the parts, and the key dimensions can be set according to the actual production requirements; after the critical dimensions are obtained, the dimensions need to be compared with preset dimension thresholds one by one, and the output of the cascade classifier is true only under the condition that all the dimensions meet the requirements.
After size measurement and qualification judgment, communication and output control between the PC and the PLC of the lower computer are completed by means of LabVIEW software programming, and an RS485 serial port communication mode is selected according to a Modbus ASCII protocol to control the two-position four-way solenoid valve. The piston drives the mechanical actuating mechanism to do linear reciprocating motion, unqualified products are pushed out to the unqualified product area and then reset, and sorting action is completed. And according to the message format specified in the PLC manual, the upper computer sends data to the lower computer. And continuously running the upper computer program by using a while loop body to complete the related parameter setting of the serial port. And the lower computer controls the running state of each load through ladder diagram programming. The lower computer adopts the Taida programming software WPL for programming. When the upper computer presses a 'PLC starting button', the LabVIEW calls a VISA function to send Modbus ASCII data to the lower computer for control, when the upper computer successfully writes M0 data, the M2 and the M3 are set, and the conveyor belt is driven by the direct current motor to run. And if the camera monitors an unqualified signal, the electromagnetic valve acts to drive the cylinder to separate an unqualified product, when the upper computer program writes M5 data, the ladder diagram is reset, and all actions are stopped until the upper computer continuously sends a starting instruction.
In summary, the machine vision part sorting method and system based on serial communication control provided by the invention overcome the problems that in the prior art, although a visual sorting system is not few, the price is high enough, the design is complex, and the detection and sorting speed is limited.
The preferred embodiments of the present invention have been described in detail with reference to the accompanying drawings, however, the present invention is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solution of the present invention within the technical idea of the present invention, and these simple modifications are within the protective scope of the present invention.
It should be noted that the various technical features described in the above embodiments can be combined in any suitable manner without contradiction, and the invention is not described in any way for the possible combinations in order to avoid unnecessary repetition.
In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.

Claims (10)

1. A machine vision part sorting method based on serial port communication control is characterized by comprising the following steps:
acquiring image information of a part to be sorted;
preprocessing the image information;
analyzing and processing the preprocessed image to obtain the outer contour size of the part to be sorted;
setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts to form a cascade classifier;
detecting a plurality of key sizes of the parts to be sorted by utilizing the cascade classifier; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and effectively separating out the parts to be sorted, which are output as false by the cascade classifier, by utilizing a PLC sorting system.
2. The machine vision part sorting method based on serial port communication control as claimed in claim 1, wherein before the obtaining of the image information of the part to be sorted, the method further comprises:
selecting a circular calibration plate to construct a template in the VBAI to finish the correction setting of the CCD camera, and training after forming the calibration template;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
3. The machine vision part sorting method based on serial port communication control as claimed in claim 1, wherein the preprocessing of the image information comprises the following steps:
carrying out graying processing on the image information of the parts to be sorted;
carrying out brightness setting and image optimization on the image subjected to the graying processing;
and carrying out reverse setting on the optimized image, and displaying the image as an image negative pixel value.
4. The machine vision part sorting method based on serial port communication control according to claim 1 or 3, wherein the step of analyzing the preprocessed image to obtain the outer contour dimension of the part to be sorted comprises the following steps:
measuring the gray scale change of the preprocessed image through an edge detection algorithm;
extracting discontinuous edge points in the image, and adopting a Fit Line linear fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting linear Line;
and measuring the pixel distance of the fitted straight line, and converting the pixel distance into an actual size.
5. The serial communication control-based machine vision part sorting method according to claim 1, wherein the effectively separating out the parts to be sorted with the output of the cascade classifier being false by using the PLC sorting system comprises:
according to the Modbus ASCII protocol, an RS485 serial port communication mode is selected, a control instruction of a PC end is sent to a PLC module in the PLC sorting system, and the PLC module controls a two-position four-way solenoid valve to enable a piston to drive a mechanical actuating mechanism to do linear reciprocating motion so as to push out a fake part to be sorted to a unqualified product area and then reset.
6. A machine vision part sorting system based on serial port communication control is characterized by comprising:
the CCD camera is used for acquiring image information of the parts to be sorted;
the image preprocessing module is used for preprocessing the image information;
the size detection module is used for analyzing and processing the preprocessed image to obtain the size of the outer contour of the part to be sorted;
the cascade classifier is used for setting a plurality of critical dimension detection threshold ranges according to the outer contour dimension data of the qualified parts and detecting a plurality of critical dimensions of the parts to be sorted; wherein the content of the first and second substances,
when all of the critical dimensions are detected within the detection threshold range, the cascade classifier output is true; otherwise, the output is false;
and the PLC sorting system is used for effectively separating out the parts to be sorted, which are output by the cascade classifier and are false.
7. The serial-communication-control-based machine vision part sorting system of claim 6, further comprising:
the camera calibration module is used for selecting a circular calibration plate to construct a template in the VBAI so as to finish the correction setting of the CCD camera, and training after the calibration template is formed;
and finishing pixel equivalent calibration according to the conversion relation between the actual size of the part to be sorted and the pixel coordinate.
8. The serial-communication-control-based machine vision part sorting system according to claim 6, wherein the image preprocessing module comprises:
the graying module is used for performing graying processing on the image information of the parts to be sorted;
and the image optimization module is used for carrying out brightness setting and image optimization on the grayed image, carrying out reverse setting on the optimized image and displaying the image as an image negative pixel value.
9. The serial port communication control-based machine vision part sorting system of claim 6, wherein the size detection module comprises:
the measurement module is used for measuring the gray level change of the preprocessed image through an edge detection algorithm;
the Line fitting module is used for extracting discontinuous edge points in the image and adopting a Fit Line fitting optimization algorithm to perform fitting solution on all the discrete edge data points to obtain a fitting Line;
and the measurement conversion module is used for measuring the pixel pitch of the fitted straight line and converting the pixel pitch into an actual size.
10. The serial-communication-control-based machine vision part sorting system of claim 6, further comprising:
and the communication module is used for finishing communication and output control between the PC end and the lower computer PLC module.
CN202010582246.XA 2020-06-23 2020-06-23 Machine vision part sorting method and system based on serial port communication control Pending CN111871848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010582246.XA CN111871848A (en) 2020-06-23 2020-06-23 Machine vision part sorting method and system based on serial port communication control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010582246.XA CN111871848A (en) 2020-06-23 2020-06-23 Machine vision part sorting method and system based on serial port communication control

Publications (1)

Publication Number Publication Date
CN111871848A true CN111871848A (en) 2020-11-03

Family

ID=73157830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010582246.XA Pending CN111871848A (en) 2020-06-23 2020-06-23 Machine vision part sorting method and system based on serial port communication control

Country Status (1)

Country Link
CN (1) CN111871848A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112403934A (en) * 2020-11-18 2021-02-26 安徽信息工程学院 Machine vision part sorting method
CN112464805A (en) * 2020-11-26 2021-03-09 江苏卓高新材料科技有限公司 Intelligent classification method, device, memory, processor, system and equipment
CN112589803A (en) * 2020-12-15 2021-04-02 广汽本田汽车有限公司 Control method and device of mechanical arm and mechanical arm equipment
CN113466241A (en) * 2021-06-25 2021-10-01 滁州沃博自动化科技有限公司 System for static detection product defects on visual detection belt conveyor
CN114371173A (en) * 2021-12-14 2022-04-19 信利光电股份有限公司 Detection method for multiple-sample mixing prevention materials
CN114472203A (en) * 2021-03-03 2022-05-13 北京软体机器人科技有限公司 Sorting method and device
CN114798474A (en) * 2022-04-22 2022-07-29 铜陵诚峰电子科技有限公司 Capacitor pin distance measuring and sorting method based on machine vision

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5207331A (en) * 1991-08-28 1993-05-04 Westinghouse Electric Corp. Automatic system and method for sorting and stacking reusable cartons
CN101814149A (en) * 2010-05-10 2010-08-25 华中科技大学 Self-adaptive cascade classifier training method based on online learning
CN105588840A (en) * 2015-12-04 2016-05-18 广州视源电子科技股份有限公司 Electronic element positioning method and device
CN106984556A (en) * 2017-04-28 2017-07-28 福州大学 A kind of plastic bottle intelligent sorting system and its method of work
CN111189387A (en) * 2020-01-02 2020-05-22 西安工程大学 Industrial part size detection method based on machine vision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5207331A (en) * 1991-08-28 1993-05-04 Westinghouse Electric Corp. Automatic system and method for sorting and stacking reusable cartons
CN101814149A (en) * 2010-05-10 2010-08-25 华中科技大学 Self-adaptive cascade classifier training method based on online learning
CN105588840A (en) * 2015-12-04 2016-05-18 广州视源电子科技股份有限公司 Electronic element positioning method and device
CN106984556A (en) * 2017-04-28 2017-07-28 福州大学 A kind of plastic bottle intelligent sorting system and its method of work
CN111189387A (en) * 2020-01-02 2020-05-22 西安工程大学 Industrial part size detection method based on machine vision

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
万刚等: "《无人机测绘技术及应用》", 31 December 2015, 测绘出版社 *
杨磊: "《数字媒体技术概论》", 31 July 2017, 中国铁道出版社 *
郝晓剑等: "《光电探测技术与应用》", 31 August 2009, 国防工业出版社 *
陈慧岩等: "《无人驾驶车辆理论与设计》", 31 March 2018, 北京理工大学出版社 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112403934A (en) * 2020-11-18 2021-02-26 安徽信息工程学院 Machine vision part sorting method
CN112464805A (en) * 2020-11-26 2021-03-09 江苏卓高新材料科技有限公司 Intelligent classification method, device, memory, processor, system and equipment
CN112464805B (en) * 2020-11-26 2024-06-07 江苏卓高新材料科技有限公司 Intelligent classification method, device, memory, processor, system and equipment
CN112589803A (en) * 2020-12-15 2021-04-02 广汽本田汽车有限公司 Control method and device of mechanical arm and mechanical arm equipment
CN112589803B (en) * 2020-12-15 2022-03-18 广汽本田汽车有限公司 Control method and device of mechanical arm and mechanical arm equipment
CN114472203A (en) * 2021-03-03 2022-05-13 北京软体机器人科技有限公司 Sorting method and device
CN114472203B (en) * 2021-03-03 2024-02-20 北京软体机器人科技股份有限公司 Sorting method and device thereof
CN113466241A (en) * 2021-06-25 2021-10-01 滁州沃博自动化科技有限公司 System for static detection product defects on visual detection belt conveyor
CN114371173A (en) * 2021-12-14 2022-04-19 信利光电股份有限公司 Detection method for multiple-sample mixing prevention materials
CN114798474A (en) * 2022-04-22 2022-07-29 铜陵诚峰电子科技有限公司 Capacitor pin distance measuring and sorting method based on machine vision

Similar Documents

Publication Publication Date Title
CN111871848A (en) Machine vision part sorting method and system based on serial port communication control
CN106568783B (en) A kind of hardware defect detecting system and method
CN103776841B (en) Synthetic leather automatic defect detecting device and detection method
CN113239930B (en) Glass paper defect identification method, system, device and storage medium
CN106290394B (en) System and method for detecting aluminum extrusion molding defects of CPU radiator
EP0327069A2 (en) Object recognition system for a robot
CN110018172B (en) Product detection system and method
CN106770321B (en) A kind of plastic part defect inspection method based on multi-threshold section
CN109211110A (en) A kind of flat-type workpiece size detection system and method based on machine vision
CN111645111A (en) Intelligent manufacturing system and method based on industrial robot
CN109332211A (en) A kind of part size detection system and method based on image processing techniques
CN105631893A (en) Method and device for detecting whether capacitor is correctly mounted through photographing
CN106875441A (en) A kind of online PE bottles of recognition positioning method based on machine vision
CN112150439A (en) Automatic sorting equipment and sorting method for injection molding parts
CN110935646A (en) Full-automatic crab grading system based on image recognition
CN113702393A (en) Intrinsic safety type mining conveyor belt surface damage detection system and detection method
CN208555097U (en) A kind of workpiece shapes based on computer vision detection and sorting device
CN114596243A (en) Defect detection method, device, equipment and computer readable storage medium
CN110096057A (en) A kind of Intelligent carrier control system
CN113406920A (en) Box positioning control system and method based on machine vision
CN111609812B (en) Detection system for detecting bending of steering gear input shaft
CN114345717A (en) Goods sorting device
CN112037197A (en) Hot-rolled bar cold-shearing material accumulation detection method, system and medium
Magadum et al. Intelligent color based object sorting using robotics
CN112893178B (en) Pen core quality detection system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103