CN-121994815-A - Socket assembly defect online detection method based on industrial visual detection
Abstract
The invention discloses an on-line socket assembly defect detection method based on industrial vision detection, which comprises the steps of collecting images of an assembly stage to generate an image sequence of the assembly stage of a socket, preprocessing to generate an assembly alignment image sequence, extracting relative spatial relation characteristics and assembly beat characteristics of components to generate assembly evidence, carrying out stage association on the assembly evidence to form an assembly evidence chain, defining an evidence supporting relation and an evidence conflict relation to generate a consistency constraint set, executing consistency verification to generate a consistency verification result, generating an assembly defect judgment result when assembly evidence which cannot be supported by adjacent post assembly stages or assembly evidence which conflicts with each other exists, and completing on-line detection based on the assembly defect judgment result. The invention builds an assembly evidence chain consistency judging mechanism based on industrial vision, realizes the on-line identification of socket assembly defects, and has the advantages of timely detection and high accuracy.
Inventors
- FENG YONGDONG
- Huan Yuwei
Assignees
- 东莞市九琪龙电子科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260122
Claims (9)
- 1. An on-line detection method for socket assembly defects based on industrial visual detection is characterized by comprising the following steps: Determining an assembly stage set of the socket on a socket assembly production line, acquiring assembly stage images of all assembly stages according to an assembly sequence, writing a socket identifier, an assembly stage identifier and a time index, and generating a socket-level assembly stage image sequence; Preprocessing the image sequence of the socket-level assembly stage to generate an assembly alignment image sequence; Based on the assembly alignment image sequence, extracting the relative spatial relationship characteristics and the assembly beat characteristics of the components at each assembly stage to generate assembly evidence; according to the sequence of the assembly phase set, carrying out phase association on assembly evidences generated in each assembly phase to form an assembly evidence chain; Defining an evidence support relationship and an evidence conflict relationship crossing the assembly phase for the assembly evidence chain based on the sequence relationship of the assembly phase set, and generating a consistency constraint set; According to the consistency constraint set, consistency verification is carried out on the assembly evidence chain, and a consistency verification result is generated; when the consistency check result shows that assembly evidence which cannot be supported by the adjacent post assembly stage exists in the assembly evidence chain or the assembly evidence which conflicts with each other exists, an assembly defect judging result of the corresponding socket is generated; based on the assembly defect judging result, generating on-line treatment information corresponding to the socket identifier and the assembly stage identifier, and sending the on-line treatment information to an execution node of an assembly production line to finish on-line detection.
- 2. The method for on-line detection of socket assembly defects based on industrial visual inspection according to claim 1, wherein the generating of the socket-level assembly phase image sequence specifically comprises: acquiring an assembly process flow of the socket on a socket assembly production line, determining an assembly stage set of the socket according to the process flow, and arranging according to an assembly sequence; configuring corresponding image acquisition positions and acquisition opportunities for each assembly stage in the assembly stage set, and establishing corresponding image acquisition conditions for each assembly stage to ensure that images of each assembly stage can be accurately acquired; Distributing unique socket identifiers for each socket when the sockets enter an assembly production line, ensuring that each socket is uniquely tracked in the socket assembly process, and keeping consistency of the socket identifiers in the whole assembly process; When the socket reaches any assembly stage in the assembly stage set, triggering image acquisition operation according to acquisition conditions of the assembly stage to acquire an assembly stage image of the assembly stage; When an assembly phase image is acquired, writing a socket identifier into a corresponding assembly phase image, and identifying a socket object corresponding to the assembly phase image; When an assembly phase image is acquired, writing a phase number of the current assembly phase in an assembly phase set into the assembly phase image to be used as an assembly phase identifier for identifying which assembly phase the image belongs to; when an assembly phase image is acquired, acquiring corresponding acquisition time information, writing the acquisition time information into the assembly phase image as a time index, and marking the time sequence relationship of the image in the socket assembly process; under the same socket identifier, all collected assembly stage images are collected according to the sequence relation between the assembly sequence of the assembly stage identifiers and the time index to form a socket-level assembly stage image set; And under the same socket identifier, sequencing the socket-level assembly stage image sets according to the assembly sequence corresponding to the assembly stage identifier and in combination with the time index sequence relationship to generate a socket-level assembly stage image sequence.
- 3. The method for on-line detection of socket assembly defects based on industrial vision detection according to claim 1, wherein the preprocessing specifically comprises image distortion correction, image scale unification, image brightness and contrast normalization, image denoising processing and assembly stage image alignment processing.
- 4. The method for on-line detection of socket assembly defects based on industrial visual detection according to claim 1, wherein the generation of the assembly evidence specifically comprises: reading assembly alignment images corresponding to each assembly stage of the same socket in the assembly stage set from the assembly alignment image sequence by taking the socket identification as an index; aiming at each assembly alignment image, determining a component area set in the image according to the socket structure and the assembly position, extracting component contour, edge trend, hole slot position and component relative position information in each component area, and generating component relative spatial relation characteristics; Under the same socket identifier, based on time indexes corresponding to all assembly stages in an assembly alignment image sequence, acquiring time interval information between adjacent assembly stages according to the assembly sequence of an assembly stage set, and collecting the time interval information to generate an assembly beat characteristic; combining the relative spatial relationship characteristics of the components with the assembly beat characteristics to form an assembly state representation result corresponding to the current assembly stage; And under the same socket identifier, sorting and packaging the assembly state characterization results corresponding to each assembly stage in the assembly stage set, and generating assembly evidence corresponding to the socket in each assembly stage.
- 5. The method for on-line detection of socket assembly defects based on industrial visual detection according to claim 1, wherein the generation of the assembly evidence chain specifically comprises: reading assembly evidences under the same socket identifier by taking the socket identifier as an index, binding corresponding assembly stage identifiers and time indexes for each assembly evidence, and generating an assembly evidence record set; Based on the assembly sequence of the assembly stage set, carrying out assembly stage mapping on the assembly evidence record set to obtain an assembly evidence record corresponding to each assembly stage in the assembly stage set; under the same socket identifier, sequentially arranging the assembly evidence records corresponding to each assembly stage according to the sequence of the assembly stage set to generate an assembly evidence sequence orderly according to the assembly stage identifiers; Establishing a stage association pair for two assembly evidence records corresponding to adjacent assembly stages in an assembly evidence sequence, writing a previous assembly stage identifier, a next assembly stage identifier and a corresponding time index sequence relationship in each stage association pair, and generating a stage association record sequence; When a plurality of assembly evidence records exist under the same assembly stage mark, internal sequencing is carried out on the assembly evidence records corresponding to the assembly stage mark according to the time index, and the assembly evidence records with the time index consistent with the assembly stage set sequence are selected to be written into an assembly evidence sequence; and combining the assembly evidence sequence with the stage association record sequence to form an assembly evidence chain for representing the sequential association relation between the assembly evidence of each assembly stage under the same socket identifier.
- 6. The method for on-line detection of socket assembly defects based on industrial visual inspection according to claim 1, wherein the generating of the consistency constraint set specifically comprises: Determining an assembly evidence pair corresponding to any adjacent assembly stage in an assembly evidence chain based on the sequence relation of each assembly stage in the assembly stage set, wherein the assembly evidence pair consists of an assembly evidence corresponding to the previous assembly stage and an assembly evidence corresponding to the subsequent assembly stage; For each assembly evidence pair, judging the continuity of the assembly state of the components between adjacent assembly stages according to the relative spatial relationship characteristics of the components contained in the assembly evidence corresponding to the previous assembly stage and the assembly evidence corresponding to the subsequent assembly stage, marking the assembly evidence pair meeting the continuity requirement of the assembly state of the components as a candidate evidence supporting relationship, and marking the assembly evidence pair not meeting the continuity requirement of the assembly state of the components as a candidate evidence conflict relationship; For each assembly evidence pair, judging the time engagement rationality between adjacent assembly stages according to the assembly beat characteristics contained in the assembly evidence corresponding to the previous assembly stage and the subsequent assembly stage, and confirming or correcting the candidate evidence supporting relationship and the candidate evidence conflict relationship according to the judging result of the assembly beat characteristics; When the assembly evidence pair meets the assembly continuity requirement defined by the assembly stage set sequence relation in two dimensions of the relative spatial relation characteristic and the assembly beat characteristic of the component, the assembly evidence pair is determined to be an evidence support relation, and when the assembly evidence pair does not meet the assembly continuity requirement in any dimension, the assembly evidence pair is determined to be an evidence conflict relation; And collecting and arranging the evidence supporting relationship and the evidence conflict relationship corresponding to each adjacent assembly stage in the assembly evidence chain to generate a consistency constraint set.
- 7. The method for on-line detecting socket assembly defects based on industrial visual inspection according to claim 1, wherein the generating of the consistency check result specifically comprises: Based on the socket identification, establishing a mapping relation between each assembly evidence in the assembly evidence chain and a corresponding constraint relation in the consistency constraint set according to the sequence of the assembly stage set; For each evidence supporting relation defined in the consistency constraint set, extracting a corresponding assembly evidence pair from an assembly evidence chain, checking whether the assembly evidence pair meets the evidence supporting relation in the component relative space relation characteristic and the assembly beat characteristic dimension, and generating a corresponding supporting check result; For each evidence conflict relation defined in the consistency constraint set, a corresponding assembly evidence pair is extracted from an assembly evidence chain, whether the assembly evidence pair presents a conflict state on the component relative space relation feature or assembly beat feature dimension is checked, and a corresponding conflict check result is generated; Collecting supporting verification results corresponding to the evidence supporting relations and conflict verification results corresponding to the evidence conflict relations according to the sequence of the assembly stage set to form a relation-by-relation consistency verification record of an assembly evidence chain; Based on the relation-by-relation consistency check records, identifying the association positions of the assembly phases in the assembly evidence chain, which do not meet the requirements of the consistency constraint set, and generating local consistency mismatch records containing the assembly phase identifiers, the relation types and the check states; and integrating the relation-by-relation consistency check record and the local consistency mismatch record to generate a consistency check result used for representing the overall consistency state of the assembly evidence chain.
- 8. The method for on-line detecting a socket assembly defect based on industrial visual inspection according to claim 1, wherein the generating of the assembly defect determination result specifically comprises: Based on the consistency verification result, judging the assembly evidence corresponding to each assembly stage in the assembly evidence chain stage by stage, identifying the assembly evidence which is not supported by the assembly evidence corresponding to the subsequent assembly stage in the assembly evidence chain, and marking the assembly evidence as unsupported assembly evidence; according to the consistency verification result, carrying out relation judgment on assembly evidence pairs corresponding to the assembly stage of the assembly evidence chain, identifying the assembly evidence pairs judged to have evidence conflict relations in the assembly evidence chain, and marking the assembly evidence pairs as conflict assembly evidence pairs; collecting unsupported assembly evidence according to the sequence of the assembly stage set to generate an unsupported assembly evidence set; assembling the conflict assembly evidence pairs according to the sequence of the assembly stage sets to generate a conflict assembly evidence pair set; determining an assembly stage identification range for triggering assembly abnormality based on the unsupported assembly evidence set and the conflict assembly evidence pair set, and forming assembly abnormality triggering information of a corresponding socket; And when the assembly evidence set is not supported or the conflict assembly evidence pair set is not empty, generating an assembly defect judging result of the corresponding socket based on the assembly abnormality triggering information.
- 9. The method for on-line detection of socket assembly defects based on industrial visual inspection according to claim 1, wherein the on-line detection specifically comprises: based on the socket identification, extracting socket identification associated with the assembly defect judgment result and assembly stage identification information triggering assembly defect judgment; determining a corresponding target assembly stage identifier under the sequential relation of the assembly stage set according to the assembly stage identifier information; generating an online treatment identifier pair corresponding to the socket identifier and the target assembly stage identifier based on the target assembly stage identifier; generating on-line treatment information comprising a socket identifier and a target assembly stage identifier according to the on-line treatment identifier pair; Aligning the sequence relation between the on-line treatment information and the assembly phase set, and determining the triggering sequence of the on-line treatment information in the assembly production line; and sending the aligned on-line treatment information to an execution node of the assembly production line, and executing on-line treatment on the corresponding socket in the corresponding assembly stage by the execution node according to the on-line treatment information to complete the on-line detection process of the socket assembly defect.
Description
Socket assembly defect online detection method based on industrial visual detection Technical Field The invention relates to the field of on-line detection of socket assembly defects, in particular to an on-line detection method of socket assembly defects based on industrial visual detection. Background The existing on-line detection technology in the socket assembly process mainly relies on industrial vision to detect the appearance of a single assembly station or a finished product after assembly, and usually judges whether missing parts, wrong parts or obvious position deviation exists by comparing an appearance image in the current assembly stage with a preset template or a threshold rule. Because socket assembly has obvious stage sequence and assembly dependency, partial assembly defects can not be directly displayed in a single assembly stage or a final appearance, but are caused by logic inconsistency or assembly state transmission abnormality between front and rear assembly stages, the prior art cannot effectively utilize the time sequence relationship and assembly behavior consistency between different assembly stages, and is difficult to identify the hidden assembly defects, and the hidden assembly defects are often only passively discovered after assembly is finished or when a product fails, so that defect discovery lag and rework cost are high, and the requirements of modern automatic assembly production lines on instantaneity and accuracy are difficult to meet. Disclosure of Invention The invention aims to provide an on-line detection method for socket assembly defects based on industrial vision detection, and the on-line detection method for socket assembly defects based on industrial vision construction assembly evidence chain consistency judging mechanism has the advantages of timely detection and high accuracy. According to the embodiment of the invention, the socket assembly defect on-line detection method based on industrial visual detection comprises the following steps of: Determining an assembly stage set of the socket on a socket assembly production line, acquiring assembly stage images of all assembly stages according to an assembly sequence, writing a socket identifier, an assembly stage identifier and a time index, and generating a socket-level assembly stage image sequence; Preprocessing the image sequence of the socket-level assembly stage to generate an assembly alignment image sequence; Based on the assembly alignment image sequence, extracting the relative spatial relationship characteristics and the assembly beat characteristics of the components at each assembly stage to generate assembly evidence; according to the sequence of the assembly phase set, carrying out phase association on assembly evidences generated in each assembly phase to form an assembly evidence chain; Defining an evidence support relationship and an evidence conflict relationship crossing the assembly phase for the assembly evidence chain based on the sequence relationship of the assembly phase set, and generating a consistency constraint set; According to the consistency constraint set, consistency verification is carried out on the assembly evidence chain, and a consistency verification result is generated; when the consistency check result shows that assembly evidence which cannot be supported by the adjacent post assembly stage exists in the assembly evidence chain or the assembly evidence which conflicts with each other exists, an assembly defect judging result of the corresponding socket is generated; based on the assembly defect judging result, generating on-line treatment information corresponding to the socket identifier and the assembly stage identifier, and sending the on-line treatment information to an execution node of an assembly production line to finish on-line detection. Optionally, the generating of the socket-level assembly stage image sequence specifically includes: acquiring an assembly process flow of the socket on a socket assembly production line, determining an assembly stage set of the socket according to the process flow, and arranging according to an assembly sequence; configuring corresponding image acquisition positions and acquisition opportunities for each assembly stage in the assembly stage set, and establishing corresponding image acquisition conditions for each assembly stage to ensure that images of each assembly stage can be accurately acquired; Distributing unique socket identifiers for each socket when the sockets enter an assembly production line, ensuring that each socket is uniquely tracked in the socket assembly process, and keeping consistency of the socket identifiers in the whole assembly process; When the socket reaches any assembly stage in the assembly stage set, triggering image acquisition operation according to acquisition conditions of the assembly stage to acquire an assembly stage image of the assembly stage; When an assembly phase image is acquired,