CN119600012A - Potentiometer visual inspection method for potentiometer production line - Google Patents
Potentiometer visual inspection method for potentiometer production line Download PDFInfo
- Publication number
- CN119600012A CN119600012A CN202411777795.7A CN202411777795A CN119600012A CN 119600012 A CN119600012 A CN 119600012A CN 202411777795 A CN202411777795 A CN 202411777795A CN 119600012 A CN119600012 A CN 119600012A
- Authority
- CN
- China
- Prior art keywords
- area
- pin
- bending
- potentiometer
- image
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/0008—Industrial image inspection checking presence/absence
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8854—Grading and classifying of flaws
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Chemical & Material Sciences (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of industrial visual intelligence, in particular to a visual detection method for a potentiometer, which is used for a potentiometer production line. The method utilizes the difference of the distance between the restored image corresponding to the maximum frequency in the DCT coefficient matrix and the boundary of the pin area to screen out the abnormal pin area. And screening out a local suspected bending region through the overlapping degree of the pixel point region between the comparison image and the reference reduction image. And the bending positioning area can be accurately screened out further based on the distribution discrete degree and the frequency quantity. The invention takes discrete cosine transformation as the basis, extracts pin bending information by screening frequency, transforming and restoring, and realizes accurate positioning of bending defects by screening step by step.
Description
Technical Field
The invention relates to the technical field of industrial visual intelligence, in particular to a visual detection method for a potentiometer, which is used for a potentiometer production line.
Background
The potentiometer is a resistor element with three pins and adjustable resistance according to a certain change rule. Potentiometers are generally composed of a resistor body and a movable brush. When the brush moves along the resistor, a resistance value or voltage which has a certain relation with the displacement is obtained at the output end. When the potentiometer pin is bent, the potentiometer regulating circuit or the adjustment during current is invalid or unstable, and poor contact between the moving sheet and the resistor body can be possibly caused, so that obvious noise is generated. In order to avoid the influence caused by bad potentiometers, the bending condition of the pins should be analyzed and identified in time when the potentiometers are installed.
Because the pins have higher brightness relative to the background area of the circuit board, the prior art can extract the pin area through image processing means such as threshold segmentation and the like, and then screen out the defect area through abnormal image features in the pin area. But in the pin installation process, the abnormal image features on the surface of the pin not only comprise bending features, but also comprise bulges and pits caused by rust and scratch. In the prior art, whether the defective area is a bulge and a recess caused by rust or scratch or a defect caused by bending cannot be effectively identified, so that the pin bending detection is inaccurate.
Disclosure of Invention
In order to solve the technical problem that in the prior art, the bending detection is inaccurate due to the fact that the pin is easily affected by other defect image characteristics in the bending identification process, the invention aims to provide a potentiometer visual detection method for a potentiometer production line, and the adopted technical scheme is as follows:
The invention provides a potentiometer visual detection method for a potentiometer production line, which comprises the following steps:
obtaining a pin area in the pin image by utilizing brightness characteristics;
For each pin area, a DCT coefficient matrix of the pin area is obtained, a restored image corresponding to the maximum frequency in the DCT coefficient matrix is used as a reference restored image, and pin bending probability is obtained according to the distance between a pixel point in the reference restored image and a boundary pixel point of the pin area;
Selecting high-frequency coefficients from the DCT coefficient matrix of the abnormal pin area and traversing according to the frequency, wherein a restored image corresponding to each high-frequency coefficient is used as a comparison image;
And counting the frequency number of each local suspected bending region in the pin image, obtaining the distribution discrete degree between the pixel points corresponding to the local suspected bending region in the comparison image, and screening out the interference region in the local suspected bending region according to the frequency number and the distribution discrete degree to obtain the bending positioning region.
Further, the method for acquiring the pin area comprises the following steps:
dividing pixel points in the pin image into two types of pixel points by using a threshold segmentation algorithm, selecting an area formed by the type of pixel points with the maximum brightness as an initial pin area, and taking an area corresponding to the minimum circumscribed rectangle of the initial pin area as the pin area.
Further, the method for obtaining the pin bending probability comprises the following steps:
referring to the shortest distance between each pixel point in the restored image and the boundary pixel point as a boundary distance, and taking the accumulated value of all the boundary distances as a boundary characteristic value of the pin area;
And for each pin area, obtaining the boundary characteristic value difference between the pin area and other pin areas, and normalizing the accumulated value of all the boundary characteristic value differences to obtain the pin bending probability.
Further, the screening method of the abnormal pin area comprises the following steps:
And if the pin bending probability is larger than a preset bending probability threshold, taking the corresponding pin area as the abnormal pin area.
Further, the screening method of the high-frequency coefficient comprises the following steps:
And performing serpentine traversal on the DCT coefficient matrix of the abnormal pin area by taking the lengths of the two coefficients as step lengths to obtain two groups of coefficients, and taking the group of coefficients with the highest frequency as the high-frequency coefficient.
Further, the method for obtaining the local suspected bending region comprises the following steps:
the pixel point area of the contrast image is used as a contrast area, and the pixel point area in the reference restored image is used as a target area;
and for each target area, obtaining the number of overlapped pixels between the target area and the comparison area, accumulating the number of overlapped pixels of the target area in each comparison image, and then carrying out normalization processing to obtain the overlapping degree, wherein if the overlapping degree of the target area is greater than a preset overlapping degree threshold value, the target area is used as the local suspected bending area.
Further, the pixel point area is obtained by clustering the pixels in the contrast image and the reference restored image through a clustering algorithm.
Further, the method for acquiring the distribution discrete degree comprises the following steps:
And for each pixel point in the local suspected bending region in the comparison image, taking the distance between each pixel point and the nearest pixel point as a local distance, obtaining the distance difference between the local distance of each pixel point and the average local distance of all the pixel points in the local suspected bending region, and accumulating the distance differences in all the comparison images to obtain the distribution discrete degree.
Further, the method for obtaining the bending and positioning area comprises the following steps:
And multiplying the distribution discrete degree by the frequency number, and then carrying out negative correlation mapping to obtain an identification degree, and screening out an interference region in the local suspected bending region according to the identification degree to obtain a bending positioning region.
Further, the screening the interference area in the local suspected bending area according to the identification degree to obtain a bending positioning area includes:
And taking the local suspected bending region with the recognition degree smaller than a preset recognition degree threshold value as an interference region, and taking the local suspected bending region with the recognition degree not smaller than the preset recognition degree threshold value as a bending positioning region.
The invention has the following beneficial effects:
The invention considers that the frequency composition of information in images is different due to different characteristics of defects in different categories, so the invention extracts the pin bending information by screening the frequency, transforming and restoring based on discrete cosine transform (Discrete Cosine Transform, DCT). Because the brightness of the pins is larger, a larger gray level difference is generated between the pins and the background area, the frequency of the boundaries of the pin areas in the DCT algorithm is also larger, so that the characteristics of the boundaries of the pin areas can be represented by utilizing the restored image corresponding to the maximum frequency in the DCT coefficient matrix, and the abnormal pin areas can be screened out through the distance difference between the restored image and the boundaries of the pin areas. Further, the local area on the abnormal pin area is subjected to refinement analysis, and because the defects generally contain more frequency information due to complex characteristics, the local suspected bending area can be screened out through the overlapping degree of the pixel point area between the comparison image and the reference reduction image. Further analyze the image feature in the regional suspected kink, defects such as corrosion or scratch have more complicated image feature than buckling, contain more complicated frequency information to the surface pixel point distribution is also more irregular, therefore further can accurately screen out the location area of buckling based on distribution discrete degree and frequency quantity. The bending defects are accurately positioned through one-step screening.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a visual inspection method for a potentiometer in a potentiometer production line according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a lead area according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a serpentine traversal according to one embodiment of the invention;
fig. 4 is a schematic diagram of pixel region segmentation comparison according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of a potentiometer visual inspection method for a potentiometer production line according to the invention, and the detailed description of the specific implementation, structure, characteristics and effects thereof is as follows. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention solves the technical problem based on the DCT transformation algorithm, wherein the DCT transformation is mainly used for compressing data or images, can convert a spatial domain signal into a frequency domain, and has good decorrelation performance. The DCT transformation itself is lossless, creating good conditions for quantization, huffman coding, etc. in the field of image coding, etc. Meanwhile, since the DCT transform is symmetrical, the original image information can be restored at the receiving end by using the DCT inverse transform after the quantization encoding. The DCT transform has very wide application in the field of current image analysis and compression, and the DCT transform is used in common JPEG still image coding, MJPEG, MPEG dynamic coding and other standards. The algorithm is a technical means well known to those skilled in the art, and the embodiment of the present invention is only an application, and specific algorithm contents are not described here.
The invention provides a specific scheme of a potentiometer visual detection method for a potentiometer production line, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a potentiometer visual inspection method for a potentiometer production line according to an embodiment of the invention is shown, and the method includes:
Step S1, obtaining a pin image of a potentiometer on a potentiometer production line, and obtaining a pin area in the pin image by utilizing brightness characteristics.
In the embodiment of the invention, a camera is arranged right above a potentiometer group processing and assembling line to collect images of the positions of the pins of the potentiometer, and the acquired pin images are gray images for facilitating subsequent image processing.
The existing potentiometer assembly procedures comprise potentiometer shell feeding, carrying, adjusting, moving, gear feeding, vacuum pressing into surgery, ceramic substrate feeding and pressing into an inner gear of the shell. After the above process is executed, the potentiometer product with rough machining is sent to a production line for pin bending detection, and finally products containing defects can be screened according to detection results.
In the pin image, the pins are made of copper, iron, tin plating, silver plating and other metals, so that the pins have higher brightness relative to the background area on the potentiometer, and therefore, the pin area can be directly obtained in the pin image by using a conventional image feature extraction algorithm such as a threshold segmentation algorithm.
Preferably, in order to avoid information loss caused by directly classifying the brightness of the pixel points as the pin area, in one embodiment of the present invention, the pixel points in the pin image are divided into two types of pixel points by using a threshold segmentation algorithm, an area composed of one type of pixel points with the maximum brightness is selected as an initial pin area, and an area corresponding to the minimum circumscribed rectangle of the initial pin area is selected as the pin area. More image information is determined as a pin area by utilizing the minimum circumscribed rectangle. Referring to fig. 2, a schematic diagram of a lead area according to an embodiment of the invention is shown.
Step S2, for each pin area, a DCT coefficient matrix of the pin area is obtained, a restored image corresponding to the maximum frequency in the DCT coefficient matrix is used as a reference restored image, pin bending probability is obtained according to the distance between a pixel point in the reference restored image and a boundary pixel point of the pin area, and abnormal pin areas are screened out according to the pin bending probability.
After the processing of step S1, a plurality of pin areas of pins are obtained, and normal pin areas and defective pin areas may exist in the pin areas, so that the pin areas need to be further screened. For the defective lead area, the shape of the defective lead area is greatly different from that of the normal lead area, and the bending defect can shorten the boundary of the lead area, so that the boundary is not a complete rectangle. It is therefore necessary to determine whether the lead area is bent according to the shape of the lead boundary. The lead area extracted in step S1 is directly extracted only from the image features, and the boundary area thereof cannot be directly analyzed as a lead boundary in order to ensure accuracy. Considering that the boundary of the pin has radian problem, the reflection degree should be stronger compared with other areas of the pin. Therefore, the frequency corresponding to the DCT coefficient matrix should be the largest, so after the DCT coefficient matrix of the pin area is obtained, the coefficient of the largest frequency in the DCT coefficient matrix is extracted and subjected to image restoration to obtain the reference restored image. The pixel points in the reference restored image are pin boundary pixel points, and the pin bending probability can be obtained by further comparing the distances between the boundary pixel points of the pin area. Namely, the larger the distance is, the larger the bending probability of the pins is, and the abnormal pin area can be screened out according to the bending probability of the pins. It should be noted that, the abnormal pin area is not completely determined as the area where the pin is bent, and because the shape of the pin area is changed due to rust or scratch, the abnormal pin area only represents that the pin area is abnormal, and whether the pin is bent or not needs to be further analyzed and localized by the subsequent steps.
Preferably, in one embodiment of the present invention, the method for obtaining the pin bending probability includes:
And referring to the shortest distance between each pixel point in the restored image and the boundary pixel point as a boundary distance, and taking the accumulated value of all the boundary distances as the boundary characteristic value of the pin area. The boundary feature value characterizes a distance feature between a true pin boundary in the current pin region and the region boundary.
For all pins on a potentiometer, the defect should be a small probability event compared to the normal pin area, i.e. the distance features in the abnormal pin area have very pronounced variability with respect to the other pin areas. Therefore, for each pin area, the boundary characteristic value difference between the pin area and other pin areas is obtained, and the accumulated value of all the boundary characteristic value differences is normalized to obtain the pin bending probability. If the difference between the boundary characteristic values of a certain lead area and other lead areas is larger, the final accumulated value will be larger, which means that the more likely the lead area is an abnormal lead area containing defects, i.e. the greater the probability of bending the lead.
It should be noted that, the normalization method in the embodiment of the present invention may be a sigmoid function mapping method, and in other embodiments of the present invention, normalization methods such as polar error normalization may be also used, which are technical means well known to those skilled in the art, and are not described and limited herein.
Preferably, in one embodiment of the present invention, the screening method of the abnormal pin area includes:
And if the pin bending probability is larger than a preset bending probability threshold, taking the corresponding pin area as the abnormal pin area. Because the pin bending probability is a normalized value in one embodiment of the present invention, the bending probability threshold is set to 0.7.
And step S3, screening out high-frequency coefficients from the DCT coefficient matrix of the abnormal pin area, traversing according to the frequency, taking a restored image corresponding to each high-frequency coefficient as a comparison image, and screening out a local suspected bending area according to the overlapping degree of the pixel point area in the comparison image and the reference restored image.
Compared with other pin areas, the defect area has more complex information, and can be seen as the defect area in the DCT conversion algorithm to be composed of pixel points with a plurality of frequencies, wherein the pixel points with each frequency can embody the outline of the boundary of the defect area to a certain extent. Therefore, for the defect area, whether a certain local area is the defect area can be judged by comparing the superposition condition of the forming areas among different frequency information.
The embodiment of the invention further screens out high-frequency coefficients in the DCT coefficient matrix of the abnormal pin area, can avoid the interference of low-frequency information by screening out the high-frequency coefficients, saves the calculated amount, and because the pin area is an obvious high-brightness area, the low-frequency information is fewer and possibly is a background area, so that the unnecessary operation amount can be reduced by screening out the high-frequency coefficients. And traversing according to the frequency, namely, each high-frequency coefficient needs to be subjected to a restoration operation, and obtaining a corresponding restoration image as a comparison image. If a defect abnormality occurs at a local position in the abnormal pin area, pixel point information exists at the local position in the comparison image between different frequencies, and because the reference reduction image is information corresponding to the maximum frequency, the area formed by the pixel points in the reference reduction image is a more complete area, so that the reference reduction image can be taken as a basis, and a local suspected bending area can be screened out according to the overlapping degree of the pixel point areas in the comparison image and the reference reduction image.
Preferably, in the embodiment of the present invention, the method for screening the high frequency coefficient is:
And performing serpentine traversal on the DCT coefficient matrix of the abnormal pin area by taking the lengths of the two coefficients as step lengths to obtain two groups of coefficients, and taking the group of coefficients with the highest frequency as high-frequency coefficients. Referring to fig. 3, a serpentine traversal diagram according to one embodiment of the invention is shown. By serpentine traversal, two sets of coefficients are obtained, one set being the coefficients of the first half of the traversal process and the other set being the coefficients of the second half of the traversal process, with half of the number of coefficients in the matrix as a partition.
Preferably, in the embodiment of the present invention, the pixel point area is obtained by clustering the pixels in the contrast image and the reference restored image through a clustering algorithm. According to the embodiment of the invention, clustering is carried out by using a DBSCAN clustering algorithm according to the distance between the pixel points, and each obtained cluster forms a corresponding pixel point area. Referring to fig. 4, a schematic diagram of pixel region segmentation comparison provided by an embodiment of the present invention is shown, wherein the right image includes more pixel information, i.e. more pixel regions, than the left image, and fig. 4 shows that the pixel regions are not regions simply composed of pixels, but have regions with a certain width and a certain range, so that errors caused by too small pixel regions are avoided, and those skilled in the art can set the specific width and the range by themselves, which are not repeated herein.
Preferably, in an embodiment of the present invention, the method for obtaining a local suspected bending region includes:
The pixel point area of the comparison image is used as a comparison area, and the pixel point area in the reference restored image is used as a target area;
And for each target area, obtaining the number of overlapped pixel points between the target area and the comparison area, accumulating the number of the overlapped pixel points of the target area in each comparison image, and then carrying out normalization processing to obtain the overlapping degree. In the embodiment of the invention, the normalization method of the overlapping degree can select the number of the overlapped pixels after accumulation as a numerator, and the maximum number of the overlapped pixels after accumulation in all the target areas as a denominator, wherein the ratio is the overlapping degree after normalization.
And if the overlapping degree of the target area is greater than the preset overlapping degree threshold value, taking the target area as a local suspected bending area. In the embodiment of the present invention, the overlapping degree threshold is set to 0.7.
And S4, counting the frequency number of the local suspected bending areas in each local suspected bending area in the pin image, obtaining the distribution discrete degree between the pixel points corresponding to the local suspected bending areas in the comparison image, and screening out the interference areas in the local suspected bending areas according to the frequency number and the distribution discrete degree to obtain the bending positioning areas.
The local suspected bending area represents a local area of the pin with an abnormal defect, but the defect cannot be directly judged to be generated by bending, and scratch or rust on the surface of the pin also has the characteristic of more frequency overlapping information. Therefore, further analysis is needed, and compared with bending defects, the scratch or rust is considered to have richer texture features on the surface, uneven pixel point distribution is achieved, and the defect areas are relatively more in frequency information due to the richer texture features. Therefore, the embodiment of the invention further counts the frequency number in the local suspected bending region in the pin image, and obtains the distribution discrete degree between the pixel points corresponding to the local suspected bending region in the comparison image. It should be noted that, because the complexity of the information of the local suspected bending region needs to be represented by the frequency number, the information needs to be obtained in the original pin image, and the discrete degree of distribution needs to represent the detailed texture representation, whereas the local suspected bending region is a complete region in the pin image, and therefore, the information cannot be obtained in the pin image, so that the discrete degree of distribution of the local suspected bending region needs to be analyzed in each comparison image.
The larger the number of frequencies is, the larger the distribution dispersion degree is, which indicates that the local suspected bending region is more likely to be an interference region caused by non-bending defects such as scratch or rust, so that the interference region can be screened out, a bending positioning region is obtained, and the accurate positioning of the bending of the potentiometer pin is completed. After the positioning is finished, the corresponding positions can be selected in a frame mode in the pin image through methods such as an image mask and the like, and visual display is carried out on the terminal so as to remind workers.
Preferably, in one embodiment of the present invention, the method for acquiring the distribution discretization degree includes:
And for each pixel point in the local suspected bending region in the comparison image, taking the distance between each pixel point and the nearest pixel point as the local distance, and obtaining the distance difference between the local distance of each pixel point and the average local distance of all the pixel points in the local suspected bending region. That is, the larger the distance difference between the local distance and the average local distance, the more discrete the distribution of the pixel points, and the more the distributed and discrete pixel points in the local suspected bending region, the larger the distribution dispersion. In the embodiment of the invention, the information in all the contrast images needs to be counted, so that all the distance differences in all the contrast images are accumulated to obtain the distribution discrete degree of the local suspected bending region.
Preferably, in an embodiment of the present invention, the method for acquiring the bending location area includes:
And multiplying the distribution discrete degree by the frequency number, performing negative correlation mapping to obtain the identification degree, and screening out the interference region in the local suspected bending region according to the identification degree to obtain the bending positioning region. The greater the recognition degree, the less the local suspected bending region is an interference region, so further, the interference region in the local suspected bending region is screened out according to the recognition degree, and a bending positioning region is obtained, including:
And taking the local suspected bending region with the recognition degree smaller than the preset recognition degree threshold value as an interference region, and taking the local suspected bending region with the recognition degree not smaller than the preset recognition degree threshold value as a bending positioning region. In the embodiment of the invention, after the recognition degree normalization processing, the recognition degree threshold is set to 0.6.
It should be noted that, the negative correlation mapping method in the embodiment of the present invention may be in the form of reciprocal, and in order to avoid that the denominator is 0, the reciprocal after the product is added with the positive integer 1 is required to be used as the recognition degree.
In summary, the embodiment of the present invention screens out the abnormal pin area by using the distance difference between the restored image corresponding to the maximum frequency in the DCT coefficient matrix and the boundary of the pin area. And screening out a local suspected bending region through the overlapping degree of the pixel point region between the comparison image and the reference reduction image. And the bending positioning area can be accurately screened out further based on the distribution discrete degree and the frequency quantity. The invention takes discrete cosine transformation as the basis, extracts pin bending information by screening frequency, transforming and restoring, and realizes accurate positioning of bending defects by screening step by step.
It should be noted that the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411777795.7A CN119600012B (en) | 2024-12-05 | 2024-12-05 | Potentiometer visual detection method for potentiometer production line |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411777795.7A CN119600012B (en) | 2024-12-05 | 2024-12-05 | Potentiometer visual detection method for potentiometer production line |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN119600012A true CN119600012A (en) | 2025-03-11 |
| CN119600012B CN119600012B (en) | 2025-06-27 |
Family
ID=94840491
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411777795.7A Active CN119600012B (en) | 2024-12-05 | 2024-12-05 | Potentiometer visual detection method for potentiometer production line |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119600012B (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH1048149A (en) * | 1996-08-02 | 1998-02-20 | Ricoh Co Ltd | Image defect detection method and apparatus |
| US20080107328A1 (en) * | 2006-11-03 | 2008-05-08 | Liang-Chia Chen | Non-uniform Image Defect Inspection Method |
| CN105144681A (en) * | 2013-03-15 | 2015-12-09 | 三星电子株式会社 | Creating details in an image with frequency lifting |
| CN109459970A (en) * | 2018-10-26 | 2019-03-12 | 常州机电职业技术学院 | Elliptical hole potentiometer angle reset system and reset method based on vision |
| CN110572652A (en) * | 2019-09-04 | 2019-12-13 | 锐捷网络股份有限公司 | Static image processing method and device |
| CN111316093A (en) * | 2018-12-14 | 2020-06-19 | 合刃科技(深圳)有限公司 | Structural defect detection system and structural defect detection method |
| CN114429649A (en) * | 2022-04-07 | 2022-05-03 | 青岛美迪康数字工程有限公司 | Target image identification method and device |
-
2024
- 2024-12-05 CN CN202411777795.7A patent/CN119600012B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH1048149A (en) * | 1996-08-02 | 1998-02-20 | Ricoh Co Ltd | Image defect detection method and apparatus |
| US20080107328A1 (en) * | 2006-11-03 | 2008-05-08 | Liang-Chia Chen | Non-uniform Image Defect Inspection Method |
| CN105144681A (en) * | 2013-03-15 | 2015-12-09 | 三星电子株式会社 | Creating details in an image with frequency lifting |
| CN109459970A (en) * | 2018-10-26 | 2019-03-12 | 常州机电职业技术学院 | Elliptical hole potentiometer angle reset system and reset method based on vision |
| CN111316093A (en) * | 2018-12-14 | 2020-06-19 | 合刃科技(深圳)有限公司 | Structural defect detection system and structural defect detection method |
| CN110572652A (en) * | 2019-09-04 | 2019-12-13 | 锐捷网络股份有限公司 | Static image processing method and device |
| CN114429649A (en) * | 2022-04-07 | 2022-05-03 | 青岛美迪康数字工程有限公司 | Target image identification method and device |
Non-Patent Citations (1)
| Title |
|---|
| 吴文轩等: "基于MATLAB软件的图像处理技术在电子元器件引脚缺陷检测的应用", 《福建轻纺》, no. 01, 25 January 2018 (2018-01-25) * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119600012B (en) | 2025-06-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111383209B (en) | An Unsupervised Flaw Detection Method Based on Fully Convolutional Autoencoder Network | |
| CN113628189B (en) | Rapid strip steel scratch defect detection method based on image recognition | |
| CN115564767B (en) | Inductance winding quality monitoring method based on machine vision | |
| CN118628500B (en) | Method and system for detecting vacuum coating defects of watch case based on image processing | |
| CN115598025B (en) | Image processing method and calcium carbonate powder quality inspection system using same | |
| CN113808138A (en) | Artificial intelligence-based wire and cable surface defect detection method | |
| CN115330767A (en) | Method for identifying production abnormity of corrosion foil | |
| CN117011292B (en) | Method for rapidly detecting surface quality of composite board | |
| CN114372983A (en) | A method and system for detecting coating quality of shielding box based on image processing | |
| CN117274262B (en) | Wire welding method for acoustic horn circuit board | |
| CN114565563B (en) | Color steel plate surface abnormity detection method based on artificial intelligence | |
| CN116402810A (en) | Image processing-based lubricating oil anti-abrasive particle quality detection method | |
| CN119600012B (en) | Potentiometer visual detection method for potentiometer production line | |
| CN119131012B (en) | Busbar surface quality inspection method based on machine vision | |
| CN118628483B (en) | A method for identifying surface defects of steel structures | |
| CN117372422B (en) | Material bending degree detection method for part production | |
| CN118392834B (en) | A detection method for integrated circuit transparent flexible substrate | |
| CN117237350B (en) | Real-time detection method for quality of steel castings | |
| CN113920118B (en) | Hollow glass spacer glue-shortage detection method based on image processing | |
| CN115511884A (en) | Punching compound die surface quality detection method based on computer vision | |
| CN120355706B (en) | A method for detecting defects in optical module packaging materials | |
| CN118658801B (en) | A wafer residue detection method for cleaning etching machine | |
| CN119648690B (en) | Substrate surface cleanliness detection method and device for PVD coating | |
| CN118864466B (en) | A method for intelligently identifying surface defects of nanoimprint wafers | |
| CN120807352B (en) | Image enhancement-based automobile mold production quality control method |
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 |