CN116908219B - Abnormal data detection method and device based on Hall sensor - Google Patents

Abnormal data detection method and device based on Hall sensor Download PDF

Info

Publication number
CN116908219B
CN116908219B CN202310917675.1A CN202310917675A CN116908219B CN 116908219 B CN116908219 B CN 116908219B CN 202310917675 A CN202310917675 A CN 202310917675A CN 116908219 B CN116908219 B CN 116908219B
Authority
CN
China
Prior art keywords
welding spot
welding
detection
area
artificial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310917675.1A
Other languages
Chinese (zh)
Other versions
CN116908219A (en
Inventor
黄森
王楠
陈智远
江磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING ZHONGXU ELECTRONICS SCIENCE AND TECHNOLOGY CO LTD
Original Assignee
NANJING ZHONGXU ELECTRONICS SCIENCE AND TECHNOLOGY CO LTD
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 NANJING ZHONGXU ELECTRONICS SCIENCE AND TECHNOLOGY CO LTD filed Critical NANJING ZHONGXU ELECTRONICS SCIENCE AND TECHNOLOGY CO LTD
Priority to CN202310917675.1A priority Critical patent/CN116908219B/en
Publication of CN116908219A publication Critical patent/CN116908219A/en
Application granted granted Critical
Publication of CN116908219B publication Critical patent/CN116908219B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan 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/8854Grading and classifying of flaws
    • G01N2021/888Marking defects
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N2021/95638Inspecting patterns on the surface of objects for PCB's
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N2021/95638Inspecting patterns on the surface of objects for PCB's
    • G01N2021/95646Soldering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30152Solder
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention provides an abnormal data detection method and device based on a Hall sensor, which acquire detection templates of detection numbers; receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, and extracting first detection data corresponding to a welding point area of a machine and second detection data of an artificial welding point area and a middle area according to the positioned target detection template; the first detection data is identified by calling an interval identification strategy to obtain a type of identification result, and the second detection data is identified by calling a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to obtain a type of identification result; and determining an abnormal region according to the first-class identification result and the second-class identification result, determining an abnormal welding patch based on the abnormal region, and sending the abnormal welding patch to a detection end for reminding.

Description

Abnormal data detection method and device based on Hall sensor
Technical Field
The invention relates to a data processing technology, in particular to an abnormal data detection method and device based on a Hall sensor.
Background
The Hall sensor is an integrated sensor composed of a Hall element and an accessory circuit thereof, is based on the Hall effect, can be used for detecting a magnetic field and the change thereof, can be used in various occasions related to the magnetic field, such as variable-frequency speed regulation, storage battery detection and the like, and has wide application.
At present, a circuit of a hall sensor is welded mainly by adopting a machine, and residual elements which cannot be finished by manually welding some chip mounters are welded, in the prior art, when abnormal detection is carried out on the hall element, other elements and accessory circuits thereof, all welding areas are required to be visually detected by a welder, and whether the problems of welding omission, welding errors and the like occur or not are checked.
Therefore, how to detect different types of welding areas in the hall sensor, and assist the user in performing efficient detection is a problem to be solved.
Disclosure of Invention
The embodiment of the invention provides an abnormal data detection method and device based on a Hall sensor, which can detect different modes aiming at different types of welding areas in the Hall sensor and assist a user to carry out efficient detection.
In a first aspect of the embodiment of the present invention, there is provided a method for detecting abnormal data based on a hall sensor, including:
the method comprises the steps of obtaining model information of Hall sensors to be detected, generating detection numbers corresponding to the Hall sensors of each model according to the model information, collecting standard solder points of circuit boards corresponding to the detection numbers, and obtaining corresponding detection templates according to the standard solder points, wherein the detection templates comprise a bottom plate area, an artificial solder point area, a machine solder point area and a middle area;
receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, extracting first detection data corresponding to a welding point area of a machine according to the positioned target detection template, and extracting second detection data corresponding to the artificial welding point area and the middle area;
the first detection data is identified by calling an interval identification strategy to obtain a class identification result, and the second detection data is identified by calling a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to obtain a class identification result;
And determining abnormal areas in the artificial welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding.
Optionally, in a possible implementation manner of the first aspect, the obtaining a corresponding detection template according to the standard solder mask diagram, where the detection template includes a base plate area, an artificial solder mask area, a machine solder mask area, and an intermediate area includes:
extracting an edge contour of the standard welding point diagram, and generating a corresponding initial detection template according to the edge contour;
acquiring pixel points in a preset pixel interval in the standard welding spot diagram as first target pixel points, and classifying the adjacent first target pixel points to obtain a plurality of first target sets;
generating a plurality of pin welding spot areas according to the first target sets, extracting standard welding spot contours of the pin welding spot areas, and updating an initial detection template based on the standard welding spot contours to obtain the detection template;
and obtaining welding patches corresponding to the pin welding spot areas and patch attributes corresponding to the welding patches, and carrying out partition treatment on the detection template according to the patch attributes to obtain a bottom plate area, an artificial welding spot area, a machine welding spot area and an intermediate area.
Optionally, in one possible implementation manner of the first aspect, the partitioning processing is performed on the detection template according to the patch attribute to obtain a base plate area, an artificial welding spot area, a machine welding spot area and an intermediate area, including:
if the patch attribute is an artificial welding attribute, the corresponding pin welding spot area is used as an artificial welding spot area, and if the patch attribute is a machine welding attribute, the corresponding pin welding spot area is used as a machine welding spot area;
acquiring intermediate points positioned in each pin welding spot area, determining the pin welding spot areas positioned in the preset range of each artificial welding spot area according to the intermediate points, taking the pin welding spot areas as adjacent welding spot areas corresponding to each artificial welding spot area, and generating a plurality of intermediate lines according to the intermediate point connecting lines of each artificial welding spot area and the corresponding adjacent welding spot areas;
generating a plurality of intermediate areas based on a preset width by taking each intermediate line as a central axis;
and taking the area except the artificial welding spot area, the machine welding spot area and the middle area in the detection template as a bottom plate area.
Optionally, in one possible implementation manner of the first aspect, the positioning the bottom plate area of the target detection template based on the bottom plate contour of the real-time solder joint diagram, extracting, according to the positioned target detection template, first detection data corresponding to the machine solder joint area, and second detection data corresponding to the artificial solder joint area and the middle area, includes:
Extracting a first preset vertex, a second preset vertex, a third preset vertex and a fourth preset vertex in the bottom plate outline of the real-time welding point diagram, and a first template vertex, a second template vertex, a third template vertex and a fourth template vertex in the bottom plate area of the target detection template;
superposing and displaying the target detection template above the real-time welding point diagram, and sequentially positioning the first template vertex, the second template vertex, the third template vertex and the fourth template vertex based on the first preset vertex, the second preset vertex, the third preset vertex and the fourth preset vertex;
and extracting a machine welding spot image in the real-time welding spot diagram according to the machine welding spot area to serve as first detection data, extracting an artificial welding spot image in the real-time welding spot diagram according to the artificial welding spot area to serve as welding spot detection data, extracting a welding spot intermediate image in the real-time welding spot diagram according to the intermediate area to serve as intermediate detection data, and obtaining second detection data based on the welding spot detection data and the intermediate detection data.
Optionally, in a possible implementation manner of the first aspect, the retrieving interval identifying policy identifies the first detection data to obtain a type of identification result, including:
Selecting the first detection data based on a preset identification frequency to obtain first target detection data, and obtaining machine average welding spot pixel values of each machine welding spot image in the first target detection data;
and outputting a type of normal results if the machine average welding spot pixel value is positioned in a preset average pixel interval, outputting a type of abnormal results if the machine average welding spot pixel value is not positioned in the preset average pixel interval, and obtaining a type of identification results according to the type of normal results and the type of abnormal results.
Optionally, in one possible implementation manner of the first aspect, the method further includes:
counting a first number of a class of normal results and a second number of a class of abnormal results in real time based on a preset duration, and obtaining the total number according to the first number and the second number;
obtaining a frequency adjustment coefficient according to the second quantity and the total quantity, and adjusting the preset identification frequency according to the frequency adjustment coefficient to obtain the adjusted preset identification frequency.
Optionally, in one possible implementation manner of the first aspect, the retrieving the pre-judging condition, the intermediate judging condition and the adjacent judging condition in the continuous identifying policy identifies the second detection data, so as to obtain a second type identification result, which includes:
Counting the number of pixels in a preset welding spot pixel interval in the manual welding spot image in each second detection data, and calling a pre-judgment condition in the continuous recognition strategy to judge the number of the pixels;
if the number of the pixel points is smaller than the number of the preset pixel points, outputting a missing welding identification result, and if the number of the pixel points is larger than or equal to the number of the preset pixel points, marking the corresponding artificial welding point image as a first artificial welding point image;
the intermediate judgment conditions in the continuous recognition strategy are called, intermediate point position recognition is conducted on the first artificial welding spot image, and an intermediate recognition result is output;
adjacent judging conditions in the continuous identifying strategy are called, adjacent position identification is carried out on the welding spot intermediate image corresponding to the first artificial welding spot image, and an adjacent identifying result is output;
and obtaining a second-class identification result based on the intermediate identification result and the adjacent identification result or the missing welding identification result.
Optionally, in one possible implementation manner of the first aspect, the invoking the intermediate judgment condition in the continuous recognition policy performs intermediate point position recognition on the first artificial welding spot image, and outputs an intermediate recognition result, which includes:
Calling intermediate judgment conditions in the continuous recognition strategy, and carrying out coordinate processing on the real-time welding spot diagram to obtain a welding spot coordinate set corresponding to the first artificial welding spot image and a first coordinate of an intermediate point corresponding to the artificial welding spot area;
obtaining a middle point abscissa based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, obtaining a middle point ordinate based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, and determining a second coordinate based on the middle point abscissa and the middle point ordinate;
if the second coordinate is not equal to the first coordinate, outputting a middle partial welding identification result corresponding to the first artificial welding spot image;
if the first coordinate is equal to the second coordinate, outputting a middle normal identification result corresponding to the first artificial welding spot image;
and obtaining an intermediate recognition result corresponding to the first artificial welding spot image according to the intermediate bias welding recognition result or the intermediate normal recognition result.
Optionally, in one possible implementation manner of the first aspect, the invoking the adjacent judging condition in the continuous identifying policy performs adjacent position identification on the welding spot intermediate image corresponding to the first artificial welding spot image, and outputs an adjacent identifying result, which includes:
Invoking adjacent judging conditions in the continuous recognition strategy, acquiring first target pixel points which are adjacent in a preset welding spot pixel interval in a welding spot intermediate image corresponding to the first artificial welding spot image, obtaining a first target set of the corresponding welding spot intermediate image, and counting the number of the first target sets to obtain adjacent judging number of the corresponding welding spot intermediate image;
if the adjacent judging quantity is equal to 1, outputting a bridging identification result of the corresponding first artificial welding point diagram;
if the adjacent judging quantity is equal to 2, outputting an independent identification result of the corresponding first artificial welding point diagram;
and obtaining adjacent recognition results of the first artificial welding point diagram according to the bridging recognition results or the independent recognition results.
In a second aspect of the embodiment of the present invention, there is provided an abnormal data detection apparatus based on a hall sensor, including:
the detection module is used for acquiring model information of the Hall sensors to be detected, generating detection numbers corresponding to the Hall sensors of each model according to the model information, collecting standard solder points of circuit boards corresponding to the detection numbers, and obtaining corresponding detection templates according to the standard solder points, wherein the detection templates comprise a bottom plate area, a manual solder point area, a machine solder point area and a middle area;
The positioning module is used for receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, and extracting first detection data corresponding to a welding point area of the machine and second detection data corresponding to the artificial welding point area and the middle area according to the positioned target detection template;
the identification module is used for retrieving an interval identification strategy to identify the first detection data to obtain a type of identification result, and retrieving a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to identify the second detection data to obtain a type of identification result;
the reminding module is used for determining abnormal areas in the artificial welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding.
In a third aspect of the embodiments of the present invention, there is provided a storage medium having stored therein a computer program for implementing the method of the first aspect and the various possible aspects of the first aspect when executed by a processor.
The beneficial effects of the invention are as follows:
1. the invention can automatically carry out partition identification on the manual welding part and the machine welding part in the Hall sensor, and carries out targeted detection on the manual welding area and the machine welding area, so as to assist a user in carrying out high-efficiency detection.
2. According to the invention, the detection templates of the standard welding point diagram corresponding to each detection number are automatically obtained, and the detection templates are fully overlapped above the real-time welding point diagram to be detected, so that the invention can automatically partition a plurality of welding point areas to obtain corresponding bottom plate areas, artificial welding point areas, machine welding point areas and middle areas, and the recognition of different dimensions is conveniently carried out according to the welding points of the machine welding part and the welding points of the artificial welding part, so that the recognition efficiency is higher; according to the invention, the corresponding detection templates are obtained by extracting the edge contours in the standard welding spot diagram and the standard welding spot wheel libraries, so that the corresponding detection templates can be automatically extracted according to the standard welding spot diagram of each Hall sensor, and the detection templates can be automatically partitioned according to the patch attribute corresponding to each pin welding spot region, so that the manual welding spot region corresponding to manual welding and the corresponding middle part as well as the machine welding spot region corresponding to machine welding are obtained.
3. According to the invention, first detection data of machine welding are detected at intervals according to the preset identification frequency, whether the welding spots are whitened and have no metallic luster caused by overheating during welding is checked, and corresponding frequency adjustment coefficients are automatically generated according to the second number corresponding to the abnormal result, so that the preset identification frequency is automatically adjusted, and the detected frequency is matched with the actual welding failure rate with errors.
4. According to the invention, the front judging condition and the middle judging condition in the continuous identifying strategy are automatically fetched aiming at the second detection data of the manual welding, the first manual welding spot image of the manual welding spot area is automatically identified by fetching the adjacent judging condition welding spots, so that whether the welding spots of the manual welding area have errors such as welding missing, partial welding and bridging or not is automatically identified, the number of pixels in the preset welding spot pixel interval in each manual welding spot image is automatically compared with the number of preset pixels, whether the welding missing occurs or not is automatically identified, if the welding missing does not occur, the middle judging condition and the adjacent judging condition are automatically carried out, whether the partial welding occurs or not is checked by comparing the first coordinates of the manual welding spot area with the second coordinates of the corresponding welding spots in the real-time welding spot image, and whether the short circuit and the like caused by bridging welding occur or not is obtained by judging the number of the pixel assembly of the middle image.
Drawings
Fig. 1 is a schematic view of an application scenario of the technical scheme provided by the invention;
FIG. 2 is a flowchart of an abnormal data detection method based on a Hall sensor provided by the invention;
FIG. 3 is a schematic diagram of an extraction detection template provided by the present invention;
FIG. 4 is a schematic diagram of an intermediate line generation according to the present invention;
FIG. 5 is a schematic diagram of an intermediate zone formed in accordance with the present invention;
fig. 6 is a schematic structural diagram of an abnormal data detection device based on a hall sensor according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein.
It should be understood that, in various embodiments of the present invention, the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present invention, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present invention, "plurality" means two or more. "and/or" is merely an association relationship describing an association object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. "comprising A, B and C", "comprising A, B, C" means that all three of A, B, C comprise, "comprising A, B or C" means that one of the three comprises A, B, C, and "comprising A, B and/or C" means that any 1 or any 2 or 3 of the three comprises A, B, C.
It should be understood that in the present invention, "B corresponding to a", "a corresponding to B", or "B corresponding to a" means that B is associated with a, from which B can be determined. Determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information. The matching of A and B is that the similarity of A and B is larger than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection" depending on the context.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
As shown in fig. 1, in an application scenario of the technical solution provided by the present invention, before a circuit board corresponding to a hall sensor is collected, a detection number of the hall sensor to be detected is input to a processor through an input device, so as to call a corresponding detection template, and then a real-time welding point map is collected through an image collection device, where the image collection device may be a CDD camera, without limitation, and a corresponding lighting device may be disposed near the camera during image collection of the circuit board corresponding to the hall sensor, so that the processor may automatically compare the detection template with the collected image, and compare each area to output a corresponding detection result, and display the abnormal detection result on a display device, so as to remind a user to process.
The invention provides an abnormal data detection method based on a Hall sensor, which is shown in FIG. 2 and specifically comprises S1-S4;
s1, model information of Hall sensors to be detected is obtained, detection numbers corresponding to the Hall sensors of all models are generated according to the model information, standard solder dot patterns of circuit boards corresponding to the detection numbers are collected, corresponding detection templates are obtained according to the standard solder dot patterns, and the detection templates comprise a bottom plate area, an artificial solder dot area, a machine solder dot area and a middle area.
The model information of different hall sensors corresponds to different detection numbers, wherein the detection numbers may be number 1, number 2, etc., and the corresponding model information has the detection number corresponding thereto without limitation.
Further, the hall sensor is an integrated sensor composed of a hall element and an accessory circuit thereof, when the circuit is welded, part of welding is completed by a machine, for example, the circuit is processed by a chip mounter, and the rest elements which cannot be completed by some chip mounters are welded by manual welding, such as terminals, potentiometers and other elements, so that model information of different hall sensors corresponds to corresponding detection templates, and each detection template is provided with a machine welding area and a manual welding area corresponding to the detection templates.
It can be understood that the server can acquire model information of the hall sensors to be detected, determine detection numbers corresponding to the hall sensors of each model according to the model information, call a standard welding point diagram of a corresponding circuit board according to the detection numbers, and each detection template is provided with a corresponding bottom plate area, a manual welding point area, a machine welding point area and a middle area, wherein the standard welding point diagram is a standard welding circuit diagram, so that comparison between the standard welding point diagram and the real-time welding point diagram is facilitated, and corresponding welding errors are automatically detected.
Through the implementation mode, the corresponding detection template can be automatically acquired according to the different model information of the Hall sensor, and automatic detection can be conveniently carried out on different areas.
In some embodiments, in step S1 (obtaining a corresponding detection template according to the standard solder mask, where the detection template includes a base plate area, a manual solder mask area, a machine solder mask area, and an intermediate area), the method includes S11-S14:
s11, extracting edge contours of the standard welding point diagram, and generating corresponding initial detection templates according to the edge contours.
It can be understood that the server may extract the edge profile of the standard solder mask diagram as the initial detection template, where the means for extracting the edge profile is in the prior art, for example, extraction is performed by OpenCV, and extraction may be performed by other prior art, which is not described herein.
And S12, acquiring pixel points in a preset pixel interval in the standard welding spot diagram as first target pixel points, and classifying the adjacent first target pixel points to obtain a plurality of first target sets.
It can be understood that the preset pixel interval is a pixel value area corresponding to the welding spot, for example, the color of the solder is generally silvery white, so that the pixel point located in the preset pixel interval in the standard welding spot diagram is obtained as a first target pixel point, and the adjacent first target pixel points are classified to obtain a plurality of first target sets, that is, sets corresponding to a plurality of solder points are obtained.
The first target pixel points are pixel points in a preset pixel interval, namely pixel points corresponding to soldering tin pixel values, and the first target set is a set formed by adjacent first target pixel points.
S13, generating a plurality of pin welding spot areas according to the first target sets, extracting standard welding spot contours of the pin welding spot areas, and updating an initial detection template based on the standard welding spot contours to obtain the detection template.
It can be understood that the plurality of first target sets are a plurality of pin pad areas, so that the plurality of pin pad areas can be determined according to the plurality of first target sets, and the contours of the pin pad areas formed by the first target sets are extracted to obtain corresponding standard pad contours, and as shown in fig. 3, the initial detection template is updated based on the standard pad contours to obtain the detection template.
S14, obtaining welding patches corresponding to the pin welding spot areas and patch attributes corresponding to the welding patches, and carrying out partition processing on the detection template according to the patch attributes to obtain a bottom plate area, an artificial welding spot area, a machine welding spot area and an intermediate area.
It should be noted that, most of the components in the circuit board are directly soldered by a machine, and a small part of the components are soldered by a remaining component which cannot be completed by some machines, such as terminals, potentiometers, and other components.
It can be understood that the welding patches corresponding to the welding spot areas of the pins and the patch attributes corresponding to the welding patches are obtained, and the detection template is partitioned according to the patch attributes to obtain a bottom plate area, an artificial welding spot area, a machine welding spot area and an intermediate area.
Through the embodiment, each area is partitioned according to the welding attribute of the patch attribute, and the corresponding bottom plate area, the artificial welding spot area, the machine welding spot area and the middle area are obtained.
In some embodiments, in step S14 (partitioning the detection template according to the patch attribute to obtain a base plate area, an artificial welding spot area, a machine welding spot area, and an intermediate area), the method includes S141-S144:
And S141, if the patch attribute is an artificial welding attribute, taking the corresponding pin welding spot area as an artificial welding spot area, and if the patch attribute is a machine welding attribute, taking the corresponding pin welding spot area as a machine welding spot area.
S142, obtaining middle points located in the pin welding spot areas, determining the pin welding spot areas located in the preset range of each artificial welding spot area according to the middle points, serving as adjacent welding spot areas corresponding to each artificial welding spot area, and generating a plurality of middle lines according to the connecting lines of the middle points of each artificial welding spot area and the corresponding adjacent welding spot areas.
It may be understood that, at the middle point of each of the pin welding spot areas, a pin welding spot area located in a preset range of each of the artificial welding spot areas is determined according to the middle point, for example, as shown in fig. 4, for example, the middle point of each of the pin welding spot areas may be used as a center of a circle, a corresponding preset range is generated with a preset radius, a pin welding spot area located in each of the preset ranges of the artificial welding spot areas is determined as an adjacent welding spot area corresponding to the artificial welding spot area, and it is easy to understand that welding spots located in the preset range are all adjacent welding spot areas, and a plurality of intermediate lines are generated according to the connection between the artificial welding spot area and the middle point of the corresponding adjacent welding spot area.
S143, generating a plurality of middle areas based on a preset width by taking each middle line as a central axis.
It may be understood that, with each intermediate line as a central axis, the intermediate area is generated by moving towards the 2 end based on a preset width, for example, as shown in fig. 5, moving towards the 2 end by a preset width with the intermediate line as a reference, and copying, so as to obtain a corresponding intermediate area.
It should be noted that, if there are multiple adjacent welding spot areas in the same direction and within the preset range, it will result in selecting multiple adjacent welding spot areas, and generating multiple middle lines and middle areas that overlap partially, where the adjacent welding spot areas closest to the middle point of the corresponding pin welding spot area are selected.
It should be noted that the above-mentioned predetermined range is smaller, so as to determine the adjacent pad areas adjacent to the corresponding pin pad areas, generally, a plurality of adjacent pad areas in the same direction and within the predetermined range will not occur, and if a plurality of adjacent pad areas in the same direction and within the predetermined range occur, the shortest intermediate line in the same direction and completely covered is selected, and the corresponding intermediate area is generated according to the intermediate line.
S144, taking the area except the artificial welding spot area, the machine welding spot area and the middle area in the detection template as a bottom plate area.
S2, receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, and extracting first detection data corresponding to a welding point area of a machine and second detection data corresponding to the artificial welding point area and the middle area according to the positioned target detection template.
It can be understood that the real-time solder plot of the circuit board is obtained, and the four vertexes in the bottom plate area of the target detection template are positioned based on the four vertexes in the bottom plate outline of the real-time solder plot, so that the target detection template is completely overlapped above the real-time solder plot, and because the partitioning of the solder joints is completed on the target detection template, the first detection data corresponding to the solder joint area of the machine and the second detection data corresponding to the manual solder joint area and the middle area are extracted according to the target detection template, thereby facilitating the subsequent automatic detection directly by using the detection data.
In some embodiments, the step S2 (positioning the bottom plate area of the target detection template based on the bottom plate contour of the real-time solder mask, and extracting, according to the positioned target detection template, the first detection data corresponding to the machine solder area, and the second detection data corresponding to the artificial solder area and the intermediate area) includes S21-S23:
S21, extracting a first preset vertex, a second preset vertex, a third preset vertex and a fourth preset vertex in the bottom plate outline of the real-time welding point diagram, and a first template vertex, a second template vertex, a third template vertex and a fourth template vertex in the bottom plate area of the target detection template.
It is to be understood that the bottom plate contour of the real-time solder dot diagram and the bottom plate area of the target detection template are respectively provided with four corresponding vertexes, and the target detection template can be completely overlapped above the real-time solder dot diagram after the four vertexes are in one-to-one correspondence.
S22, superposing and displaying the target detection template above the real-time welding point diagram, and sequentially positioning the first template vertex, the second template vertex, the third template vertex and the fourth template vertex based on the first preset vertex, the second preset vertex, the third preset vertex and the fourth preset vertex.
It is to be understood that the positioning is performed by 4 vertexes, so that the target detection template and the real-time welding point diagram completely coincide.
S23, extracting a machine welding spot image in the real-time welding spot diagram as first detection data according to the machine welding spot area, extracting an artificial welding spot image in the real-time welding spot diagram as welding spot detection data according to the artificial welding spot area, extracting a welding spot intermediate image in the real-time welding spot diagram as intermediate detection data according to the intermediate area, and obtaining second detection data based on the welding spot detection data and the intermediate detection data.
It is to be understood that, according to the artificial welding spot area, the machine welding spot area and the middle area in the target detection template, the welding spot image in the corresponding real-time welding spot diagram is extracted, then the machine welding spot image in the real-time welding spot diagram is extracted through the machine welding spot area in the target detection template to serve as first detection data, the artificial welding spot image in the real-time welding spot diagram is extracted according to the artificial welding spot area to serve as welding spot detection data, the welding spot middle image in the real-time welding spot diagram is extracted according to the middle area to serve as middle detection data, and second detection data are obtained based on the welding spot detection data and the middle detection data.
Wherein the first detection data is a machine welding spot image obtained by welding a welding spot area by a machine, and the second detection data is an artificial welding spot image obtained by manually welding the welding spot area
And S3, the first detection data is identified by the interval identification strategy, a class identification result is obtained, and the second detection data is identified by the prepositive judgment condition, the middle judgment condition and the adjacent judgment condition in the continuous identification strategy, so that a class identification result is obtained.
It should be noted that, the welding error is not easy to occur in the machine welding, so that the interval recognition strategy is called to detect the first detection data at intervals, and the welding error such as missing welding, partial welding, bridging and the like is easy to occur in the manual welding, so that the invention can call the pre-judgment condition, the middle judgment condition and the adjacent judgment condition in the continuous recognition strategy to recognize the second detection data, and obtain the second type recognition result.
It will be appreciated that the present invention may employ different identification strategies for the first detection data and the second detection data.
Through the embodiment, the server respectively carries out interval detection on the machine welding spot images of the machine welding, carries out continuous detection on the manual welding spot images of the manual welding, and improves the accuracy of identifying abnormal data.
In some embodiments, the step S3 (the calling interval identifying policy identifies the first detection data to obtain a type of identification result) includes S31-S32:
s31, selecting the first detection data based on a preset identification frequency to obtain first target detection data, and obtaining machine average welding spot pixel values of the machine welding spot images in the first target detection data.
It can be understood that the present invention selects the first detection data based on the preset identification frequency to obtain the first target detection data, and it is easy to understand that when the preset identification frequency is satisfied, the corresponding circuit board is selected to detect, for example, once every 50 circuit boards are detected, so as to obtain machine solder joint images corresponding to 50 th circuit boards, 100 th circuit boards and the like, and obtain machine average solder joint pixel values of each machine solder joint image, where the machine average solder joint pixel value is an average value of pixel values corresponding to all pixels of the machine solder joint image.
It will be appreciated that when the machine is welding, overheating may occur, resulting in white spots, no metallic luster, rough surfaces, etc., resulting in a change in spot pixel values, and therefore, a machine-averaged spot pixel value of the machine spot image may be detected.
S32, outputting a normal result if the machine average welding spot pixel value is located in a preset average pixel interval, outputting an abnormal result if the machine average welding spot pixel value is not located in the preset average pixel interval, and obtaining an identification result according to the normal result and the abnormal result.
It can be understood that if the machine average welding spot pixel value is located in the preset average pixel interval, a normal result is output, if the machine average welding spot pixel value is not located in the preset average pixel interval, an abnormal result is output, and a recognition result is obtained according to the normal result and the abnormal result. The preset average pixel interval is a pixel interval set manually according to the actual condition of the pixel value of the welding spot.
On the basis of the above embodiment, S33 to S34 are further included:
s33, counting a first number of one type of normal results and a second number of one type of abnormal results in real time based on a preset duration, and obtaining the total number according to the first number and the second number.
It is easy to understand that if the abnormal conditions are detected more, the preset identification frequency of the detection needs to be increased, so that the problem that the machine welding is easy to occur at the moment is described, the detection frequency needs to be increased, and the poor Hall sensor is checked, so that the follow-up adjustment is facilitated.
S34, obtaining a frequency adjustment coefficient according to the second quantity and the total quantity, and adjusting the preset identification frequency according to the frequency adjustment coefficient to obtain the adjusted preset identification frequency.
It can be understood that the frequency adjustment coefficient is obtained according to the product of the ratio of the second number to the total number of the one type of abnormal results and the corresponding weight value, and the preset identification frequency is adjusted according to the frequency adjustment coefficient, so that the adjusted identification frequency is obtained.
It will be understood that the larger the second number of the type of abnormal results is, the larger the corresponding frequency adjustment coefficient is, the higher the preset identification frequency after the corresponding adjustment is, the smaller the second number of the type of abnormal results is, the smaller the corresponding frequency adjustment coefficient is, and the lower the preset identification frequency after the corresponding adjustment is.
In some embodiments, the step S3 (retrieving the pre-judging condition, the intermediate judging condition and the adjacent judging condition in the continuous identifying policy to identify the second detection data and obtain the second type of identifying result) includes S35-S39:
And S35, counting the number of the pixels in the preset welding spot pixel interval in the manual welding spot image in each second detection data, and calling a pre-judgment condition in the continuous recognition strategy to judge the number of the pixels.
It should be noted that, the phenomenon of missing welding easily occurs in manual welding, and if missing welding occurs, the number of pixels of the corresponding welding spot is small.
Therefore, the invention counts the number of the pixel points in the preset welding point pixel interval in the manual welding point image in the second detection data, and invokes the pre-determined condition in the continuous recognition strategy to detect whether welding is missed.
S36, if the number of the pixel points is smaller than the preset number of the pixel points, outputting a missing welding identification result, and if the number of the pixel points is larger than or equal to the preset number of the pixel points, marking the corresponding artificial welding point image as a first artificial welding point image.
It can be understood that if the number of the pixel points is smaller than the preset number of the pixel points, a missing welding identification result is output, and the fact that missing welding occurs by personnel is explained without subsequent detection; if the number of the pixels is greater than or equal to the number of preset pixels, marking the corresponding artificial welding spot image as a first artificial welding spot image, and carrying out subsequent detection on the first artificial welding spot image.
S37, the intermediate judgment conditions in the continuous recognition strategy are called, intermediate point position recognition is conducted on the first artificial welding spot image, and an intermediate recognition result is output.
It should be noted that, when it is detected that no missing welding occurs, the present invention continues to detect whether a partial welding occurs, for example, too much flux is used for one side of the welding spot in the circular welding spot, and too little flux is used for one side of the welding spot, which may cause a deviation of the center point of the welding spot.
It can be understood that the intermediate judgment condition in the continuous recognition strategy is called to perform intermediate point position recognition on the first artificial welding spot image to output an intermediate recognition result.
In some embodiments, the step S37 (retrieving the intermediate judgment condition in the continuous recognition policy, performing intermediate point location recognition on the first artificial welding spot image, and outputting an intermediate recognition result) includes S371-S375:
s371, calling the intermediate judgment condition in the continuous recognition strategy, and carrying out coordinate processing on the real-time welding spot diagram to obtain a welding spot coordinate set corresponding to the first artificial welding spot image and a first coordinate of an intermediate point corresponding to the artificial welding spot area.
It can be understood that the invention can call the intermediate judgment condition in the continuous recognition strategy, and coordinate the real-time welding spot diagram to obtain the welding spot coordinate set corresponding to the first artificial welding spot image and the first coordinate of the intermediate point corresponding to the artificial welding spot area of the standard welding spot diagram.
And S372, obtaining an intermediate point abscissa based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, obtaining an intermediate point ordinate based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, and determining a second coordinate based on the intermediate point abscissa and the intermediate point ordinate.
It can be understood that the maximum value and the minimum value of the abscissas in the welding spot coordinate set are obtained, the abscissa of the intermediate point is obtained according to the average value of the maximum value and the minimum value of the abscissas, the ordinate of the intermediate point is obtained according to the average value of the maximum value and the minimum value of the ordinates in the welding spot coordinate set, and the second coordinate is determined according to the abscissa of the intermediate point and the ordinate of the intermediate point. The second coordinates correspond to the center coordinate points of the welding spots in the real-time welding spot diagram, and the first coordinates correspond to the center coordinate points of the welding spots in the standard welding spot diagram.
And S373, outputting an intermediate partial welding identification result corresponding to the first artificial welding spot image if the second coordinate is not equal to the first coordinate.
It can be understood that if the second coordinate is not equal to the first coordinate, the intermediate partial welding recognition result corresponding to the first artificial welding spot image is output, and in practical application, a corresponding error range is set, and if the second coordinate is not within the corresponding range, the intermediate partial welding recognition result corresponding to the first artificial welding spot image is output.
And S374, outputting a middle normal identification result corresponding to the first artificial welding spot image if the second coordinate is equal to the first coordinate.
It can be understood that if the second coordinate is equal to the first coordinate, the intermediate normal recognition result corresponding to the first artificial welding spot image is output, and in practical application, a corresponding error range is set, and if the second coordinate is within the corresponding range, the intermediate normal recognition result corresponding to the first artificial welding spot image is output.
And S375, obtaining the intermediate recognition result corresponding to the first artificial welding spot image according to the intermediate partial welding recognition result or the intermediate normal recognition result.
S38, adjacent judging conditions in the continuous identifying strategy are called, adjacent position identification is conducted on the welding spot intermediate image corresponding to the first artificial welding spot image, and an adjacent identifying result is output.
When the welding is performed manually, the pins of the element are easy to be welded and short-circuited, and the pins of the element and the pins of other elements are easy to be welded together, so that the invention can call the adjacent judging conditions in the continuous identifying strategy, identify the adjacent positions of the welding spot intermediate images corresponding to the first artificial welding spot image and output the adjacent identifying results.
It is to be understood that the invention also detects intermediate images corresponding to the first artificial welding point diagram and all adjacent welding point areas in the artificial welding area to see whether 2 welding point soldering tin connection occurs, namely bridging welding occurs, so that the patch of the circuit board has short circuit and other conditions, and the invention detects in the following 2 modes, wherein the first mode judges whether the outline of the welding point appearing in the intermediate image is one outline or two outlines, specifically as follows:
in some embodiments, the step S38 (retrieving the adjacency determination condition in the persistent identification policy, performing adjacency location identification on the intermediate image of the welding spot corresponding to the first artificial welding spot image, and outputting an adjacency identification result) includes A1-A4:
a1, calling adjacent judging conditions in the continuous recognition strategy, acquiring first target pixel points which are adjacent in a preset welding spot pixel interval in a welding spot intermediate image corresponding to the first artificial welding spot image, obtaining a first target set of the corresponding welding spot intermediate image, and counting the number of the first target set to obtain the adjacent judging number of the corresponding welding spot intermediate image.
It can be understood that, the adjacent judging conditions in the continuous recognition strategy are called, and for the adjacent first target pixel points in the preset welding point pixel interval in the welding point intermediate image corresponding to the first artificial welding point image, the first target pixel points are the welding point pixel points, so that a first target set corresponding to the welding point intermediate image is obtained, and the number of the first target sets is the adjacent judging number of the corresponding welding point intermediate image.
It will be appreciated that if there is only one first set of targets in the intermediate image of a weld, it is indicated that 2 welds stick together, and if there is 2 first sets of targets in the intermediate image of a weld, it is indicated that 2 welds do not stick and therefore 2 sets of coordinates occur.
A2, outputting a bridging recognition result corresponding to the first artificial welding point diagram if the adjacent judging quantity is equal to 1.
A3, if the adjacent judging number is equal to 2, outputting an independent identification result of the corresponding first artificial welding point diagram.
And A4, obtaining an adjacent recognition result of the first artificial welding point diagram according to the bridging recognition result or the independent recognition result.
It can be understood that the bridging recognition result is that the welding of 2 welding spots is stuck together, and the individual recognition result is that the welding of 2 welding spots is not stuck.
The second method is to judge by detecting the number of pixels with welding spots in the intermediate image, and is specifically as follows:
in some embodiments, step S38 (retrieving the adjacency determination condition in the persistent recognition policy, performing adjacency position recognition on the intermediate image of the welding spot corresponding to the first artificial welding spot image, and outputting an adjacency recognition result) includes B1-B4:
and B1, calling adjacent judging conditions in the continuous recognition strategy, and counting the number of first target pixel points in a preset welding spot pixel interval in a welding spot intermediate image corresponding to the first artificial welding spot image to obtain the intermediate number of the corresponding welding spot intermediate image.
It should be noted that if 2 welding spots are welded together, at this time, the original 2 independent welding spots are connected together, so the number of first target pixel points corresponding to the pixel values of the corresponding welding spots is greater, and the number of corresponding first target pixel points is smaller if the 2 welding spots are not adhered.
Therefore, the invention can call the adjacent judging conditions in the continuous recognition strategy, count the number of the first target pixel points positioned in the preset welding spot pixel interval in the welding spot intermediate image corresponding to the first artificial welding spot image, and obtain the intermediate number of the corresponding welding spot intermediate image.
And B2, outputting a bridging identification result corresponding to the first artificial welding point diagram when the intermediate number is larger than or equal to the preset intermediate number.
It can be understood that if the intermediate number is greater than or equal to the preset intermediate number, the bridging recognition result corresponding to the first artificial solder dot diagram is output.
And B3, outputting an independent identification result corresponding to the first artificial welding point diagram when the intermediate number is less than the preset intermediate number.
It is understood that if the intermediate number is smaller than the preset intermediate number, the individual recognition result corresponding to the first artificial solder dot pattern is output.
And B4, obtaining an adjacent recognition result of the first artificial welding point diagram according to the bridging recognition result or the independent recognition result.
It can be understood that the bridging recognition result is that the welding of 2 welding spots is stuck together, and the individual recognition result is that the welding of 2 welding spots is not stuck.
S39, based on the intermediate recognition result and the adjacent recognition result or the missing welding recognition result, a second-class recognition result is obtained.
It can be understood that, based on the intermediate recognition result and the adjacent recognition result or the missing welding recognition result, the second-class recognition result is obtained, and the second-class recognition result may be the normal, partial welding, bridging, missing welding situation.
S4, determining abnormal areas in the artificial welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding.
It can be understood that the abnormal region in the manual welding spot area and/or the machine welding spot area can be determined according to the first-class recognition result and the second-class recognition result, the abnormal welding patch is determined based on the abnormal region, and the abnormal welding patch is sent to the detection end for reminding, so that a subsequent user can conveniently and directly locate the abnormal patch region for subsequent repair.
On the basis of the embodiment, the method further comprises C1-C3:
and C1, acquiring a patch welding spot area of the welding patch corresponding to the detection number in a preset adjustment time period and the abnormal sub-number of the patch welding spot area.
It should be noted that, the invention can count the patch welding spot areas which are easy to generate problems, reduce the detection times and even do not detect aiming at the patch welding spot areas which are difficult to generate welding abnormality, and increase the detection times for the patch welding spot areas which are easy to generate abnormality.
The invention can obtain the abnormal sub-numbers of the welding spot areas of the welding patches and the welding spot areas of the welding patches corresponding to the detection numbers in the preset adjustment time period.
Through the embodiment, the quantity corresponding to the patch welding spot areas with the abnormal occurrence is counted to be used as the abnormal sub quantity, so that the corresponding detection frequency can be conveniently obtained by subsequent calculation according to the abnormal sub quantity.
And C2, counting the number of the abnormal sub-numbers corresponding to each detection number to obtain the total number of the abnormal sub-numbers corresponding to the detection numbers, obtaining the abnormal occupation ratio of each patch welding spot area according to the ratio of the number of the abnormal sub-numbers to the total number of the abnormal sub-numbers, and obtaining the detection coefficient of each patch welding spot area according to the abnormal occupation ratio and the patch weight value.
It can be understood that the invention calculates the abnormal duty ratio of each patch corresponding to each detection number, and obtains the detection coefficient of each patch welding spot area according to the product of the abnormal duty ratio and the patch weight value. It will be appreciated that the importance of each patch on the corresponding circuit board is different, and the corresponding patch weight value is assigned, which may be manually preset.
And C3, determining the patch identification frequency of each patch welding spot area in each detection number based on the detection coefficient and a preset coefficient detection table, wherein the preset coefficient detection table comprises a one-to-one correspondence between the detection coefficient and the patch identification frequency.
It can be understood that the patch identification frequency of each patch welding spot area in each detection number is determined by comparing the detection coefficient with a preset coefficient detection table, wherein the preset coefficient detection table comprises a one-to-one correspondence between the detection coefficient and the patch identification frequency. It is to be understood that the detection coefficient corresponding to each patch can be obtained through calculation, and the corresponding patch identification frequency is determined from a preset coefficient detection table according to the detection coefficient.
As shown in fig. 6, an abnormal data detection device based on a hall sensor according to an embodiment of the present invention includes:
the detection module is used for acquiring model information of the Hall sensors to be detected, generating detection numbers corresponding to the Hall sensors of each model according to the model information, collecting standard solder points of circuit boards corresponding to the detection numbers, and obtaining corresponding detection templates according to the standard solder points, wherein the detection templates comprise a bottom plate area, a manual solder point area, a machine solder point area and a middle area;
the positioning module is used for receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, and extracting first detection data corresponding to a welding point area of the machine and second detection data corresponding to the artificial welding point area and the middle area according to the positioned target detection template;
The identification module is used for retrieving an interval identification strategy to identify the first detection data to obtain a type of identification result, and retrieving a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to identify the second detection data to obtain a type of identification result;
the reminding module is used for determining abnormal areas in the artificial welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding.
The present invention also provides a storage medium having stored therein a computer program for implementing the methods provided by the various embodiments described above when executed by a processor.
The storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). In addition, the ASIC may reside in a user device. The processor and the storage medium may reside as discrete components in a communication device. The storage medium may be read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tape, floppy disk, optical data storage device, etc.
The present invention also provides a program product comprising execution instructions stored in a storage medium. The at least one processor of the device may read the execution instructions from the storage medium, the execution instructions being executed by the at least one processor to cause the device to implement the methods provided by the various embodiments described above.
In the above embodiment of the apparatus, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (6)

1. The abnormal data detection method based on the Hall sensor is characterized by comprising the following steps of:
the method comprises the steps of obtaining model information of Hall sensors to be detected, generating detection numbers corresponding to the Hall sensors of each model according to the model information, collecting standard solder points of circuit boards corresponding to the detection numbers, and obtaining corresponding detection templates according to the standard solder points, wherein the detection templates comprise a bottom plate area, an artificial solder point area, a machine solder point area and a middle area;
receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, extracting first detection data corresponding to a welding point area of a machine according to the positioned target detection template, and extracting second detection data corresponding to the artificial welding point area and the middle area;
the first detection data is identified by calling an interval identification strategy to obtain a class identification result, and the second detection data is identified by calling a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to obtain a class identification result;
Determining abnormal areas in the real-time welding spot diagram corresponding to the manual welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding;
the retrieving interval identification strategy identifies the first detection data to obtain a type of identification result, and the method comprises the following steps:
selecting the first detection data based on a preset identification frequency to obtain first target detection data, and obtaining machine average welding spot pixel values of machine welding spot images in each real-time welding spot diagram in the first target detection data;
outputting a type of normal results if the machine average welding spot pixel value is located in a preset average pixel interval, outputting a type of abnormal results if the machine average welding spot pixel value is not located in the preset average pixel interval, and obtaining a type of identification results according to the type of normal results and the type of abnormal results;
the step of retrieving the pre-judging condition, the intermediate judging condition and the adjacent judging condition in the continuous identifying strategy to identify the second detection data to obtain a second-class identifying result, which comprises the following steps:
Counting the number of pixels in a preset welding spot pixel interval in the manual welding spot image in each second detection data, and calling a pre-judgment condition in the continuous recognition strategy to judge the number of the pixels;
if the number of the pixel points is smaller than the number of the preset pixel points, outputting a missing welding identification result, and if the number of the pixel points is larger than or equal to the number of the preset pixel points, marking the corresponding artificial welding point image as a first artificial welding point image;
the intermediate judgment conditions in the continuous recognition strategy are called, intermediate point position recognition is conducted on the first artificial welding spot image, and an intermediate recognition result is output;
adjacent judging conditions in the continuous identifying strategy are called, adjacent position identification is carried out on the welding spot intermediate image corresponding to the first artificial welding spot image, and an adjacent identifying result is output;
obtaining a second-class identification result based on the intermediate identification result and the adjacent identification result or the missing welding identification result;
the step of calling the intermediate judgment condition in the continuous recognition strategy, performing intermediate point position recognition on the first artificial welding spot image, and outputting an intermediate recognition result, wherein the step of calling the intermediate judgment condition in the continuous recognition strategy comprises the following steps:
calling intermediate judgment conditions in the continuous recognition strategy, and carrying out coordinated processing on the real-time welding spot diagram to obtain a welding spot coordinate set corresponding to the first artificial welding spot image and a first coordinate of an intermediate point corresponding to the artificial welding spot area of the standard welding spot diagram;
Obtaining a middle point abscissa based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, obtaining a middle point ordinate based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, and determining a second coordinate based on the middle point abscissa and the middle point ordinate;
if the second coordinate is not equal to the first coordinate, outputting a middle partial welding identification result corresponding to the first artificial welding spot image;
if the first coordinate is equal to the second coordinate, outputting a middle normal identification result corresponding to the first artificial welding spot image;
obtaining an intermediate recognition result corresponding to the first artificial welding spot image according to the intermediate bias welding recognition result or the intermediate normal recognition result;
and calling the adjacent judging condition in the continuous identifying strategy, carrying out adjacent position identification on the welding spot intermediate image corresponding to the first artificial welding spot image, and outputting an adjacent identifying result, wherein the method comprises the following steps of:
invoking adjacent judging conditions in the continuous recognition strategy, acquiring first target pixel points which are adjacent in a preset welding spot pixel interval in a welding spot intermediate image corresponding to the first artificial welding spot image, obtaining a first target set of the corresponding welding spot intermediate image, and counting the number of the first target sets to obtain adjacent judging number of the corresponding welding spot intermediate image;
If the adjacent judging number is equal to 1, outputting a bridging identification result corresponding to the first artificial welding spot image;
if the adjacent judging number is equal to 2, outputting an independent identification result corresponding to the first artificial welding spot image;
and obtaining the adjacent recognition result of the first artificial welding spot image according to the bridging recognition result or the independent recognition result.
2. The hall sensor-based abnormality data detection method according to claim 1, wherein,
the corresponding detection template is obtained according to the standard welding point diagram, the detection template comprises a bottom plate area, an artificial welding point area, a machine welding point area and a middle area, and the detection template comprises:
extracting an edge contour of the standard welding point diagram, and generating a corresponding initial detection template according to the edge contour;
acquiring pixel points in a preset pixel interval in the standard welding spot diagram as first target pixel points, and classifying the adjacent first target pixel points to obtain a plurality of first target sets;
generating a plurality of pin welding spot areas according to the first target sets, extracting standard welding spot contours of the pin welding spot areas, and updating an initial detection template based on the standard welding spot contours to obtain the detection template;
And obtaining welding patches corresponding to the pin welding spot areas and patch attributes corresponding to the welding patches, and carrying out partition treatment on the detection template according to the patch attributes to obtain a bottom plate area, an artificial welding spot area, a machine welding spot area and an intermediate area.
3. The hall sensor-based abnormality data detection method according to claim 2, wherein,
the detecting template is partitioned according to the patch attribute to obtain a bottom plate area, an artificial welding spot area, a machine welding spot area and a middle area, and the method comprises the following steps:
if the patch attribute is an artificial welding attribute, the corresponding pin welding spot area is used as an artificial welding spot area, and if the patch attribute is a machine welding attribute, the corresponding pin welding spot area is used as a machine welding spot area;
acquiring intermediate points positioned in each pin welding spot area, determining the pin welding spot areas positioned in the preset range of each artificial welding spot area according to the intermediate points, taking the pin welding spot areas as adjacent welding spot areas corresponding to each artificial welding spot area, and generating a plurality of intermediate lines according to the intermediate point connecting lines of each artificial welding spot area and the corresponding adjacent welding spot areas;
generating a plurality of intermediate areas based on a preset width by taking each intermediate line as a central axis;
And taking the area except the artificial welding spot area, the machine welding spot area and the middle area in the detection template as a bottom plate area.
4. The hall sensor-based abnormality data detection method according to claim 3, wherein,
the positioning the bottom plate area of the target detection template based on the bottom plate contour of the real-time welding point diagram, extracting first detection data corresponding to the welding point area of the machine and second detection data corresponding to the artificial welding point area and the middle area according to the positioned target detection template, and comprising the following steps:
extracting a first preset vertex, a second preset vertex, a third preset vertex and a fourth preset vertex in the bottom plate outline of the real-time welding point diagram, and a first template vertex, a second template vertex, a third template vertex and a fourth template vertex in the bottom plate area of the target detection template;
superposing and displaying the target detection template above the real-time welding point diagram, and sequentially positioning the first template vertex, the second template vertex, the third template vertex and the fourth template vertex based on the first preset vertex, the second preset vertex, the third preset vertex and the fourth preset vertex;
And extracting a machine welding spot image in the real-time welding spot diagram according to the machine welding spot area to serve as first detection data, extracting an artificial welding spot image in the real-time welding spot diagram according to the artificial welding spot area to serve as welding spot detection data, extracting a welding spot intermediate image in the real-time welding spot diagram according to the intermediate area to serve as intermediate detection data, and obtaining second detection data based on the welding spot detection data and the intermediate detection data.
5. The hall sensor-based anomaly data detection method of claim 1, further comprising:
counting a first number of a class of normal results and a second number of a class of abnormal results in real time based on a preset duration, and obtaining the total number according to the first number and the second number;
obtaining a frequency adjustment coefficient according to the second quantity and the total quantity, and adjusting the preset identification frequency according to the frequency adjustment coefficient to obtain the adjusted preset identification frequency.
6. An abnormal data detection device based on a hall sensor, comprising:
the detection module is used for acquiring model information of the Hall sensors to be detected, generating detection numbers corresponding to the Hall sensors of each model according to the model information, collecting standard solder points of circuit boards corresponding to the detection numbers, and obtaining corresponding detection templates according to the standard solder points, wherein the detection templates comprise a bottom plate area, a manual solder point area, a machine solder point area and a middle area;
The positioning module is used for receiving a target detection number input by a detection end at a production line, determining a corresponding target detection template according to the target detection number, acquiring a real-time welding point diagram, positioning a bottom plate area of the target detection template based on a bottom plate contour of the real-time welding point diagram, and extracting first detection data corresponding to a welding point area of the machine and second detection data corresponding to the artificial welding point area and the middle area according to the positioned target detection template;
the identification module is used for retrieving an interval identification strategy to identify the first detection data to obtain a type of identification result, and retrieving a front judgment condition, a middle judgment condition and an adjacent judgment condition in a continuous identification strategy to identify the second detection data to obtain a type of identification result;
the reminding module is used for determining abnormal areas in the real-time welding spot diagram corresponding to the manual welding spot area and/or the machine welding spot area according to the first-class identification result and the second-class identification result, determining abnormal welding patches based on the abnormal areas, and sending the abnormal welding patches to the detection end for reminding;
the retrieving interval identification strategy identifies the first detection data to obtain a type of identification result, and the method comprises the following steps:
Selecting the first detection data based on a preset identification frequency to obtain first target detection data, and obtaining machine average welding spot pixel values of machine welding spot images in each real-time welding spot diagram in the first target detection data;
outputting a type of normal results if the machine average welding spot pixel value is located in a preset average pixel interval, outputting a type of abnormal results if the machine average welding spot pixel value is not located in the preset average pixel interval, and obtaining a type of identification results according to the type of normal results and the type of abnormal results;
the step of retrieving the pre-judging condition, the intermediate judging condition and the adjacent judging condition in the continuous identifying strategy to identify the second detection data to obtain a second-class identifying result, which comprises the following steps:
counting the number of pixels in a preset welding spot pixel interval in the manual welding spot image in each second detection data, and calling a pre-judgment condition in the continuous recognition strategy to judge the number of the pixels;
if the number of the pixel points is smaller than the number of the preset pixel points, outputting a missing welding identification result, and if the number of the pixel points is larger than or equal to the number of the preset pixel points, marking the corresponding artificial welding point image as a first artificial welding point image;
The intermediate judgment conditions in the continuous recognition strategy are called, intermediate point position recognition is conducted on the first artificial welding spot image, and an intermediate recognition result is output;
adjacent judging conditions in the continuous identifying strategy are called, adjacent position identification is carried out on the welding spot intermediate image corresponding to the first artificial welding spot image, and an adjacent identifying result is output;
obtaining a second-class identification result based on the intermediate identification result and the adjacent identification result or the missing welding identification result;
the step of calling the intermediate judgment condition in the continuous recognition strategy, performing intermediate point position recognition on the first artificial welding spot image, and outputting an intermediate recognition result, wherein the step of calling the intermediate judgment condition in the continuous recognition strategy comprises the following steps:
calling intermediate judgment conditions in the continuous recognition strategy, and carrying out coordinated processing on the real-time welding spot diagram to obtain a welding spot coordinate set corresponding to the first artificial welding spot image and a first coordinate of an intermediate point corresponding to the artificial welding spot area of the standard welding spot diagram;
obtaining a middle point abscissa based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, obtaining a middle point ordinate based on the maximum value and the minimum value of the abscissas in the welding point coordinate set, and determining a second coordinate based on the middle point abscissa and the middle point ordinate;
If the second coordinate is not equal to the first coordinate, outputting a middle partial welding identification result corresponding to the first artificial welding spot image;
if the first coordinate is equal to the second coordinate, outputting a middle normal identification result corresponding to the first artificial welding spot image;
obtaining an intermediate recognition result corresponding to the first artificial welding spot image according to the intermediate bias welding recognition result or the intermediate normal recognition result;
and calling the adjacent judging condition in the continuous identifying strategy, carrying out adjacent position identification on the welding spot intermediate image corresponding to the first artificial welding spot image, and outputting an adjacent identifying result, wherein the method comprises the following steps of:
invoking adjacent judging conditions in the continuous recognition strategy, acquiring first target pixel points which are adjacent in a preset welding spot pixel interval in a welding spot intermediate image corresponding to the first artificial welding spot image, obtaining a first target set of the corresponding welding spot intermediate image, and counting the number of the first target sets to obtain adjacent judging number of the corresponding welding spot intermediate image;
if the adjacent judging number is equal to 1, outputting a bridging identification result corresponding to the first artificial welding spot image;
if the adjacent judging number is equal to 2, outputting an independent identification result corresponding to the first artificial welding spot image;
And obtaining the adjacent recognition result of the first artificial welding spot image according to the bridging recognition result or the independent recognition result.
CN202310917675.1A 2023-07-25 2023-07-25 Abnormal data detection method and device based on Hall sensor Active CN116908219B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310917675.1A CN116908219B (en) 2023-07-25 2023-07-25 Abnormal data detection method and device based on Hall sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310917675.1A CN116908219B (en) 2023-07-25 2023-07-25 Abnormal data detection method and device based on Hall sensor

Publications (2)

Publication Number Publication Date
CN116908219A CN116908219A (en) 2023-10-20
CN116908219B true CN116908219B (en) 2024-02-23

Family

ID=88364513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310917675.1A Active CN116908219B (en) 2023-07-25 2023-07-25 Abnormal data detection method and device based on Hall sensor

Country Status (1)

Country Link
CN (1) CN116908219B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008155285A (en) * 1997-02-25 2008-07-10 Sanyo Mach Works Ltd Method for inspecting welding state
EP2241878A2 (en) * 2009-04-15 2010-10-20 Göpel electronic GmbH Method for inspecting soldering points of electric and electronic components
CN109813728A (en) * 2019-03-01 2019-05-28 沈阳建筑大学 A kind of circuit board solder joint detection method and system
CN111060515A (en) * 2019-12-04 2020-04-24 深圳市铭华航电工艺技术有限公司 PCBA quality detection method, system and computer equipment
CN111122607A (en) * 2019-12-31 2020-05-08 麦格纳电子(张家港)有限公司 Circuit board welding quality detection method
CN113664323A (en) * 2021-07-23 2021-11-19 深圳市兆兴博拓科技股份有限公司 Automatic welding instrument control method, device, equipment and storage medium
CN115018833A (en) * 2022-08-05 2022-09-06 山东鲁芯之光半导体制造有限公司 Processing defect detection method of semiconductor device
CN115184380A (en) * 2022-08-01 2022-10-14 国网上海市电力公司 Printed circuit board welding spot abnormity detection method based on machine vision
KR20230013206A (en) * 2021-07-15 2023-01-26 주식회사 씨피에스 Welding area inspection system and method thereof for assessing the risk based on artificial intelligence

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008155285A (en) * 1997-02-25 2008-07-10 Sanyo Mach Works Ltd Method for inspecting welding state
EP2241878A2 (en) * 2009-04-15 2010-10-20 Göpel electronic GmbH Method for inspecting soldering points of electric and electronic components
CN109813728A (en) * 2019-03-01 2019-05-28 沈阳建筑大学 A kind of circuit board solder joint detection method and system
CN111060515A (en) * 2019-12-04 2020-04-24 深圳市铭华航电工艺技术有限公司 PCBA quality detection method, system and computer equipment
CN111122607A (en) * 2019-12-31 2020-05-08 麦格纳电子(张家港)有限公司 Circuit board welding quality detection method
KR20230013206A (en) * 2021-07-15 2023-01-26 주식회사 씨피에스 Welding area inspection system and method thereof for assessing the risk based on artificial intelligence
CN113664323A (en) * 2021-07-23 2021-11-19 深圳市兆兴博拓科技股份有限公司 Automatic welding instrument control method, device, equipment and storage medium
CN115184380A (en) * 2022-08-01 2022-10-14 国网上海市电力公司 Printed circuit board welding spot abnormity detection method based on machine vision
CN115018833A (en) * 2022-08-05 2022-09-06 山东鲁芯之光半导体制造有限公司 Processing defect detection method of semiconductor device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蒋超 等.电能表贴片电阻及焊点异常检测分析系统.《现代电子技术》.2023,第46卷(第10期),54-60. *

Also Published As

Publication number Publication date
CN116908219A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN107945184B (en) Surface-mounted component detection method based on color image segmentation and gradient projection positioning
JP4165538B2 (en) Component mounting inspection method and component mounting inspection device
JP4596029B2 (en) Soldering inspection method, inspection data creation method for soldering inspection, and soldering inspection apparatus
US7110591B2 (en) System and method for recognizing markers on printed circuit boards
EP1388738B1 (en) Inspection data producing method and board inspection apparatus using the method
CN115205290B (en) Online detection method and system for PCB production process
CN111060515A (en) PCBA quality detection method, system and computer equipment
JP2006208362A (en) Method of image processing, method of substrate inspection, substrate inspecting device and inspection data forming method for substrate inspection
CN108871185B (en) Method, device and equipment for detecting parts and computer readable storage medium
CN107895362A (en) A kind of machine vision method of miniature binding post quality testing
CN116908219B (en) Abnormal data detection method and device based on Hall sensor
CN102893292B (en) For compensating method and the device of eye color defects
CN114187253A (en) Circuit board part installation detection method
CN113469991B (en) Visual online detection method for laser welding spot of lithium battery tab
JP2010027964A (en) Forming method of region setting data for inspection region and substrate appearance inspection device
CN113674260A (en) SMT welding spot defect detection method
JP4613466B2 (en) Mounting component inspection method and apparatus
CN105136818A (en) Printing substrate image detecting method
CN117169246A (en) Fault detection method and device for PCBA circuit board
JP4040732B2 (en) Measuring method by image recognition and recording medium
CN115100166A (en) Welding spot defect detection method and device
JPH07174516A (en) Method for extracting characteristic point of ring-shaped work
JP2001024321A (en) Method for generating inspection data
CN116205835A (en) Circuit board flaw detection method and device and electronic equipment
KR101383827B1 (en) System and method for automatic extraction of soldering regions in pcb

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