CN116912230B - Patch welding quality detection method and device, electronic equipment and storage medium - Google Patents

Patch welding quality detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116912230B
CN116912230B CN202311007734.8A CN202311007734A CN116912230B CN 116912230 B CN116912230 B CN 116912230B CN 202311007734 A CN202311007734 A CN 202311007734A CN 116912230 B CN116912230 B CN 116912230B
Authority
CN
China
Prior art keywords
patch
area
preset
determining
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311007734.8A
Other languages
Chinese (zh)
Other versions
CN116912230A (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.)
Hegoem Tianjin Electronics Co ltd
Original Assignee
Hegoem Tianjin Electronics Co ltd
Filing date
Publication date
Application filed by Hegoem Tianjin Electronics Co ltd filed Critical Hegoem Tianjin Electronics Co ltd
Priority to CN202311007734.8A priority Critical patent/CN116912230B/en
Publication of CN116912230A publication Critical patent/CN116912230A/en
Application granted granted Critical
Publication of CN116912230B publication Critical patent/CN116912230B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application relates to a patch welding quality detection method, a patch welding quality detection device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an image to be detected, which comprises a PCB welded with a patch; dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas; inputting each area image into a neural network model based on deep learning for recognition, and determining patches and/or soldering tin; judging whether the welding of the patches in each detection area is abnormal or not according to the positions of the patches and/or the soldering tin; if so, generating mark information in the detection area with the abnormality. The application has the effect of improving the detection efficiency.

Description

Patch welding quality detection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of circuit board detection, and in particular, to a method and apparatus for detecting quality of chip soldering, an electronic device, and a storage medium.
Background
Surface mount technology (SMT, surface MountTechnology) has become the most common assembly method in the electronics manufacturing industry, and high quality SMT patch inspection is critical to ensure performance and reliability of electronic products. The SMT paster inspection is mainly used for ensuring the welding quality of components and parts and avoiding welding defects.
At present, an automatic optical detection method is applied, and is a detection method based on an image processing technology, wherein an image of the surface of a component is captured through a high-speed camera, and then analysis and judgment are carried out through image processing software. The automatic optical detection system has the characteristics of high speed and high precision, and can detect the problems of component position deviation, missing components and the like.
However, a plurality of patches may be provided on the PCB (Printed Circuit Board, i.e., the printed circuit board) and the layout is complex, the system analyzes the soldering conditions of the patches one by one, the detection speed is slow, and the detection efficiency is low.
Disclosure of Invention
In order to improve detection efficiency, the application provides a patch welding quality detection method, a patch welding quality detection device, electronic equipment and a storage medium.
In a first aspect, the present application provides a patch welding quality detection method, which adopts the following technical scheme:
Acquiring an image to be detected, which comprises a PCB welded with a patch;
Dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas;
Inputting each area image into a neural network model based on deep learning for recognition, and determining patches and/or soldering tin;
Judging whether the welding of the patches in each detection area is abnormal or not according to the positions of the patches and/or the soldering tin; if so, generating mark information in the detection area with the abnormality.
Through adopting above-mentioned technical scheme, electronic equipment acquires to-be-detected image, divides to wait to detect the image after, obtains the regional image that a plurality of detection areas correspond, and then can discern paster and soldering tin in the regional image through neural network model to according to paster and/or soldering tin's position, judge the paster welding condition of detection area, confirm whether detection area has welding unusual, and mark unusual detection area, be convenient for follow-up arrangement. Meanwhile, the patches of each detection area are detected, and the detection efficiency is improved.
Further, before dividing the image to be detected according to a preset rule, the method further includes:
carrying out grey value treatment on the image to be detected, and identifying the edge of the PCB according to the image to be detected after the grey value treatment;
placing the image to be detected after the gray value treatment into a coordinate system;
Judging whether one side of the PCB is parallel to any coordinate axis or not; if yes, no correction is needed;
otherwise, determining an included angle between one side of the PCB and any coordinate axis;
And rotating the image to be detected according to the opposite direction of the included angle, and obtaining the corrected image to be detected after the included angle is zero.
Through adopting above-mentioned technical scheme, electronic equipment is before dividing the image that waits to detect, at first through grey value processing, discernment PCB board's edge, and then whether the edge of judging the PCB board is parallel with one of them coordinate axis, confirm whether the PCB board is standard in the image that waits to detect to when not standard, rotate the image that waits to detect, correct the image that waits to detect, consequently can unify each image that waits to detect, be convenient for follow-up quick processing.
Further, the dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas includes:
obtaining the model of the PCB;
Calling a preset cutting frame according to the model of the PCB; the cutting frame comprises an outer frame with the same shape as the edge of the PCB and a plurality of cutting lines arranged in the outer frame;
Scaling the image to be detected to enable the outer frame to coincide with the edge of the image to be detected;
And dividing the image to be detected along the cutting line to obtain area images corresponding to the detection areas.
Through adopting above-mentioned technical scheme, electronic equipment is when waiting to detect the image and dividing, selects corresponding cutting frame according to the model of PCB, obtains a plurality of regional images after cutting according to the cutting frame, and every regional image corresponds a detection region, and then can treat the image of detecting fast and divide the processing, carries out the analysis to a plurality of regional images respectively, simplifies the testing process, improves speed.
Further, the abnormal soldering of the patch includes that the patch is lost, the position of the patch is offset and the soldering tin is abnormal, judge whether every the soldering of the patch of the detection area has abnormality according to the position of the patch and/or the soldering tin, include:
judging whether a preset number of patches exist or not; if the preset number of patches does not exist, determining that the patches are lost;
if the patches with the preset number exist, judging whether the patches are located in a preset range of a preset patch area or not; if the position is located, determining that the patch position is correct; if not, determining the offset direction and the angle of the patch;
Judging whether soldering tin is positioned in a preset welding area or not; if the soldering tin is positioned in the preset soldering area, the soldering tin is determined to be normal; if the soldering tin is not in the preset soldering area, determining that soldering tin is abnormal;
Judging whether the soldering tin is connected with soldering tin in other preset patch areas when the soldering tin is abnormal; if yes, determining a short circuit.
Through adopting above-mentioned technical scheme, electronic equipment judges whether the paster quantity in the detection area is correct, obtains the conclusion that the paster was lost, and then judges whether the paster is in the preset scope of predetermineeing the paster area, and confirm the skew direction and the angle of paster when incorrect, whether there is the abnormality to soldering tin, electronic equipment compares the position of soldering tin with predetermineeing the welding area and confirms, and further judges whether there is the short circuit condition when soldering tin is unusual, consequently can obtain the testing result of paster welding quality more carefully.
Further, the determining the offset direction and angle of the patch includes:
determining at least one exceeding area of the patch exceeding a preset range of the preset welding area;
Determining the area of each exceeding area;
determining the position corresponding to the exceeding area with the largest area as the offset direction of the patch;
determining one of the first edges of the patch in a coordinate system;
determining one of the second edges of the preset welding area in a coordinate system; the first side and the second side are the same long side or wide side of a rectangle;
and determining an acute included angle between the first edge and the second edge as an offset angle.
Through adopting above-mentioned technical scheme, electronic equipment confirms that the paster surpasses the area that surpasss of predetermineeing the welded area's of predetermineeing the scope, when there are a plurality of areas that surpass, confirm that the position that the biggest surpassed the area corresponds is the paster offset direction, further confirm offset angle according to the contained angle between the limit of paster in the coordinate system and the coordinate axis to obtain accurate recognition result, the staff of being convenient for learn the unusual specific information of paster welding.
Further, the determining whether the soldering tin is connected with the soldering tin in other preset patch areas includes:
Acquiring the shape of the soldering tin;
comparing the shape of the soldering tin with the preset shape in the corresponding preset welding area, and determining the similarity;
if the similarity is within the preset range, determining that the soldering tin is not connected with other soldering tin;
If the similarity is not in the preset range, judging whether the soldering tin is positioned in the adjacent preset patch area, and if so, determining to connect.
Through adopting above-mentioned technical scheme, when electronic equipment is confirm that soldering tin is continuous with the soldering tin of other preset paster areas, confirm the similarity according to the shape of soldering tin and preset shape, judge whether link to each other according to the similarity.
Further, the patch welding quality includes a patch height, and determining whether an abnormality exists in the patch welding of each detection area according to a position of the patch and/or the solder, including:
establishing a database; the database comprises preset side lengths corresponding to the area images when the patches with the unit side lengths are at a plurality of heights;
Acquiring the actual side length and the normal height of the patch, and acquiring the corresponding first side length in the area image when the patch with the unit side length is at the normal height based on the database;
Calculating the product of the quotient and the first side length based on the quotient of the actual side length and the unit side length of the patch to obtain a second side length in the area image when the patch is at the normal height;
acquiring the image side length of the patch in the area image;
Calculating the ratio of the image side length to the second side length;
determining an actual height according to the ratio;
Judging whether the actual height is within a height allowable range or not; if yes, determining that the patch height is normal; otherwise, determining that the patch height is abnormal.
Through adopting above-mentioned technical scheme, electronic equipment establishes and keeps the preset side length when unit side length paster is in different height, and then according to the actual side length of paster, confirms the second side length in regional image when the paster is in normal height, and then according to the difference of image side length in the regional image and second side length, confirm whether the actual height of paster is normal, accurately detect the paster height through the mode of image analysis.
In a second aspect, the present application provides a patch welding quality detection apparatus, which adopts the following technical scheme:
The acquisition module is used for acquiring an image to be detected, which comprises a PCB welded with a patch;
The dividing module is used for dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas;
the recognition module is used for inputting each area image into the neural network model based on deep learning for recognition and determining the patches and/or soldering tin;
the judging module is used for judging whether the patch welding of each detection area is abnormal or not according to the positions of the patches and/or the soldering tin;
And the marking module is used for generating marking information in the detection area with the abnormality when the judging module judges that the abnormality exists.
Through adopting above-mentioned technical scheme, obtain the module and obtain waiting to detect the image, divide the module and divide waiting to detect the image after, obtain the regional image that a plurality of detection areas correspond, and then the recognition module can discern paster and soldering tin in the regional image through neural network model to judge the module according to the position of paster and/or soldering tin, judge the paster welding condition of detection area, confirm whether there is welding unusual, and mark unusual detection area, be convenient for follow-up arrangement. Meanwhile, the patches of each detection area are detected, and the detection efficiency is improved.
In a third aspect, the present application provides an electronic device, which adopts the following technical scheme:
an electronic device, comprising:
At least one processor;
A memory;
at least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program configured to: performing the method of any of the first aspects.
Through adopting above-mentioned technical scheme, the computer program in the treater execution memory obtains waiting to detect the image, divides waiting to detect the image after, obtains the regional image that a plurality of detection areas correspond, and then can discern paster and soldering tin in the regional image through neural network model to according to the position of paster and/or soldering tin, judge the paster welding situation of detection area, confirm whether there is welding unusual, and mark unusual detection area, be convenient for follow-up arrangement. Meanwhile, the patches of each detection area are detected, and the detection efficiency is improved.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium storing a computer program capable of being loaded by a processor and executing the method according to any one of the first aspects.
By adopting the technical scheme, the processor executes the computer program in the computer readable storage medium to acquire the image to be detected, the image to be detected is divided to obtain the area images corresponding to the detection areas, and then the patches and the soldering tin in the area images can be identified through the neural network model, so that the patch welding condition of the detection areas is judged according to the positions of the patches and/or the soldering tin, whether welding abnormality exists is determined, and the abnormal detection areas are marked, so that the follow-up arrangement is facilitated. Meanwhile, the patches of each detection area are detected, and the detection efficiency is improved.
In summary, the present application includes at least one of the following beneficial technical effects:
1. Obtaining an image to be detected, dividing the image to be detected to obtain area images corresponding to a plurality of detection areas, and further identifying patches and soldering tin in the area images through a neural network model, judging the welding condition of the patches of the detection areas according to the positions of the patches and/or the soldering tin, determining whether welding abnormality exists or not, marking the abnormal detection areas, facilitating subsequent arrangement, detecting the patches of each detection area, and improving detection efficiency;
2. When the electronic equipment divides the image to be detected, a corresponding cutting frame is selected according to the model of the PCB, a plurality of area images are obtained after the cutting frame is used for cutting, each area image corresponds to one detection area, and then the image to be detected can be rapidly divided and processed, the plurality of area images are respectively analyzed, so that the detection process is simplified, and the speed is improved.
Drawings
Fig. 1 is a flow chart of a patch welding quality detection method according to an embodiment of the application.
Fig. 2 is a schematic diagram of a preset patch area, a preset range, and a preset welding area in an embodiment of the present application.
Fig. 3 is a block diagram of a patch welding quality detecting apparatus in an embodiment of the present application.
Fig. 4 is a block diagram of an electronic device in an embodiment of the application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In this context, unless otherwise specified, the term "/" generally indicates that the associated object is an "or" relationship.
The embodiment of the application discloses a patch welding quality detection method. Referring to fig. 1, the method is performed by an electronic device, and the electronic device may be a server or a terminal device, where the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides a cloud computing service. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a desktop computer, etc. The method comprises the following steps (step S101 to step S105):
step S101: and acquiring an image to be detected, which comprises the PCB welded with the patch.
Specifically, after the surface mount is welded on the PCB, an image is shot from the position right above the PCB by adopting a high-speed camera, and the shot image is received by the electronic equipment and is used as an image to be detected.
In another possible implementation manner, if the position of the PCB is not correct, there may be PCBs biased in various directions in the image to be detected, which takes more time in subsequent recognition, and in order to obtain a unified image to be detected, the electronic device first corrects the image to be detected, where the method further includes (steps Sa to Sd):
Step Sa: and carrying out grey value treatment on the image to be detected, and identifying the edge of the PCB according to the image to be detected after the grey value treatment.
Specifically, when shooting the PCB, the PCB is placed on a shallow and solid-color desktop, after the image is subjected to grey-value treatment, the boundary between the desktop and the PCB is more obvious, and then the electronic equipment can rapidly identify the edge of the PCB.
Step Sb: and placing the image to be detected after the grey value treatment into a coordinate system.
Step Sc: judging whether one side of the PCB is parallel to any coordinate axis or not; if yes, no correction is needed; otherwise, determining an included angle between one side of the PCB and any coordinate axis.
Specifically, if one side of the PCB is parallel to any coordinate axis, the position of the PCB is standard.
Step Sd: and rotating the image to be detected according to the opposite direction of the included angle, and obtaining the corrected image to be detected after the included angle is zero.
Specifically, if an included angle exists between one side of the PCB and any coordinate axis, the PCB is standard at the moment after the included angle is zero by rotating the region image. Further, the electronic equipment cuts redundant parts in the area image to obtain an image to be detected, which only comprises the PCB.
Step S102: dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas, wherein the method specifically comprises the following steps of:
step S1021: and obtaining the model of the PCB.
Specifically, in actual production, multiple types of PCB boards can be produced, the number and layout of patches on each type of PCB board are different, and the electronic device pre-stores the layout of PCBs of each type.
Step S1022: calling a preset cutting frame according to the model of the PCB; the cutting frame comprises an outer frame with the same shape as the edge of the PCB and a plurality of cutting lines arranged in the outer frame.
Specifically, a plurality of patches may be welded on one PCB, and a worker may divide the PCB into a plurality of areas according to actual conditions, and at least one patch is provided in each area, and a frame between two adjacent areas is used as a cutting line, and the cutting line is formed according to the plurality of cutting lines and the outer frame. The electronic device stores rules of dividing areas of the PCB.
Step S1023: and scaling the image to be detected to enable the outer frame to coincide with the edge of the image to be detected.
Specifically, the image to be detected may not be consistent with the size of the cutting frame, and in order to be able to complete the area image obtained by cutting according to the cutting frame, the electronic device scales the image to be detected.
For example, in the actual detection process, the cutting frame can be set to be in a larger shape, and the structure such as the patch and the soldering tin can be conveniently identified after the detected image is amplified to a certain extent.
Step S1024: and dividing the image to be detected along the cutting line to obtain area images corresponding to the detection areas.
Specifically, after the image to be detected is obtained, the electronic device divides the image to be detected according to a preset rule to obtain a plurality of area images, and each area image comprises at least one patch with welding quality to be detected. Therefore, a plurality of area images can be obtained, and the electronic equipment detects the deviation adjustment in each area image, so that the detection speed is improved.
Step S103: and inputting each area image into a neural network model based on deep learning for recognition, and determining the patch and/or the soldering tin.
Specifically, the electronic device establishes a neural network model for each region, establishes a training set and a verification set for the image and the patches and the soldering tin in the image, trains the neural network model based on deep learning by applying the training set, and further verifies by applying the verification set to obtain the neural network model based on deep learning.
The electronic equipment inputs the region image into a corresponding neural network model, and the neural network model outputs patches and/or solder in the region image.
Step S104: judging whether the welding of the patches in each detection area is abnormal or not according to the positions of the patches and/or the soldering tin; if yes, step S105 is executed: generating mark information in a detection area where abnormality exists; if not, determining that no abnormality exists.
Specifically, after detection is completed, the electronic device combines all detection areas and displays marking information, so that workers can directly acquire the positions with the abnormality.
The abnormal patch welding comprises patch loss, patch position deviation and abnormal soldering tin, and specifically comprises the following processes (step S1041 to step S1045):
Step S1041: judging whether a patch exists or not; if not, the step S1042 is executed: determining that the patch is lost; if so, step S1043 is performed.
Specifically, if 2 patches should exist in the detection area, the electronic device determines whether the number of the patches is equal to the preset number after identifying the patches in the detection area, and if the number of the patches is smaller than the preset number, determines that the patches are lost.
Step S1043 is performed: judging whether the patch is positioned in a preset range of a preset welding area or not; if so, the step S1044 is performed: determining that the patch position is correct; if not, the step S1045 is executed: the offset direction and angle of the patch are determined.
Specifically, when the bonding position of the patch is correct, the patch should be located within a preset range of a preset bonding area.
When determining whether the patch is located within the preset range of the preset patch area, the electronic device includes (step S11 to step S13):
Step S11: and acquiring a comparison frame corresponding to the detection area, wherein the comparison frame is provided with a preset range frame in a preset welding area.
Specifically, the preset patch area is an area for welding the patch, and generally, the area of the preset patch area is slightly larger than the area of the patch, for example, after the patch is welded in the center of the preset patch area, the remaining preset patch area around the patch is used for setting solder. The preset range is located in a preset patch area, and the two ends of the patch are still contacted with the soldering tin although the patch is not located at the center in the area.
For example, in fig. 2, a is a preset patch area, B is a preset range, and C is a preset welding area.
Step S12: the contrast box is overlaid with the area image.
Step S13: determining whether the patch is within a preset range; if yes, determining that the patch is positioned in a preset range of a preset patch area; otherwise, determining that the patch is not in the preset range of the preset patch area.
Further, step S1045 includes (step S21 to step S26):
step S21: at least one out-of-range area of the patch beyond the preset patch area is determined.
Specifically, when the patch is not within the preset range of the preset patch area, part or all of the patches are beyond the preset range. When the center of the patch is not in the center of the preset range, the patch may be wholly displaced, and the electronic device may determine an out-of-range area; while the center of the patch is still in the center of the preset range, for example, the patch is rotated, there may be two out-of-range areas.
Step S22: the area of each excess area is determined.
Specifically, the electronic device places the region image in a coordinate system, and then calculates the area according to the coordinates beyond the region edge.
Step S23: and determining the position corresponding to the exceeding area with the largest area as the offset direction of the patch.
Specifically, when an exceeding area exists, the exceeding area is the exceeding area with the largest area, and the patch can be determined to be shifted to the direction corresponding to the exceeding area; when two exceeding areas exist, if the area of one exceeding area is larger, the position of the patch shifting to the corresponding direction is larger, so that the shifting direction is determined.
Step S24: one of the first sides of the patch is determined in a coordinate system.
In general, the patch may be approximately rectangular, and the electronic device determines one of the sides of the patch as the first side.
Step S25: determining one second side of a preset patch area in a coordinate system; the first side and the second side are the same long side or wide side of the rectangle.
For example, when the first side is a long side of the patch, the second side is a long side of the preset patch area.
Step S26: and determining the acute included angle between the first side and the second side as an offset angle.
Specifically, after determining a first edge and a second edge in a coordinate system, the electronic device extends the first edge and the second edge, so that the first edge and the second edge intersect, and an included angle is obtained.
Step S1045: judging whether soldering tin is positioned in a preset welding area or not; if the soldering tin is positioned in the preset soldering area, the soldering tin is determined to be normal; if the solder is not in the preset welding area, determining that the soldering tin is abnormal.
Specifically, referring to fig. 2, as above, the preset patch area further includes a preset soldering area, and solder needs to be laid on the preset soldering area to solder the patch located in the preset area on the PCB board. The electronic equipment compares the soldering tin area with a preset soldering area, determines whether the soldering tin area is covered on the preset soldering tin area, if yes, determines that the soldering tin area is located in the preset soldering tin area, and if not, determines that the soldering tin area is not located in the preset soldering tin area.
Step S1046: judging whether the soldering tin is connected with the soldering tin in other preset patch areas when the soldering tin is abnormal; if yes, determining a short circuit, specifically comprising the following processes (step S31 to step S34):
Step S31: the shape of the solder is obtained.
Typically, the solder is rectangular, oval or circular. If the solder is irregularly shaped, it is approximated as one of the most similar rectangle, oval, or circle.
Step S32: and comparing the shape of the soldering tin with the corresponding preset shape in the preset welding area, and determining the similarity.
Specifically, the electronic device presets the shape of solder in the preset soldering area under the normal soldering condition. The electronic equipment compares the shape of the soldering tin with a preset shape, and determines the similarity.
When the similarity is determined, the electronic equipment firstly determines the ratio of the area of the soldering tin area to the area of the preset shape, and determines the ratio as a first similarity; if the solder is rectangular, determining the ratio of the length-width ratio of the solder to the length-width ratio of the preset shape, and determining the ratio as the second similarity; if the solder shape is elliptical, determining the ratio of the eccentricity of the solder to the eccentricity of the preset shape, and determining the ratio as a second similarity; if the solder shape is circular, determining the ratio of the diameter of the solder to the diameter of the preset shape, and determining the second similarity.
Further, a mean value of the first similarity and the second similarity is calculated, and the mean value is determined as the similarity between the shape of the soldering tin and the preset shape.
Step S33: if the similarity is within the preset range, the solder is determined not to be connected with other solders.
Step S34: if the similarity is not in the preset range, judging whether the soldering tin is positioned in the adjacent preset patch area or not; if yes, determining connection.
Specifically, if the solder is connected with other solders, the area and shape of the solder identified by the electronic device will be larger, and the obtained similarity will be larger, i.e. not located in the preset range. In order to further determine, the electronic device further determines whether the solder region coincides with an adjacent preset patch region, and if so, can further determine that the solder is connected.
In another possible implementation, the height of the patch also needs to be satisfactory, and step S104 further includes (steps S1041 to S1047):
Step S1041: establishing a database; the database comprises preset side lengths corresponding to the area images when the patches with the unit side lengths are at a plurality of heights.
Specifically, to determine the zoom in and out of the image captured by the camera, the electronic device creates a database. The unit side length can be 1cm, the heights are 1mm and 1.2mm … …, and when the electronic equipment respectively stores the patches with the unit side length at each height, the side length in the image.
Step S1042: and acquiring the actual side length and the normal height of the patch, and acquiring the corresponding first side length in the area image when the patch with the unit side length is at the normal height based on the database.
Specifically, the electronic device stores the size and the normal height of the patch corresponding to each detection area, and further can acquire the actual side length of any side of the patch, and further acquire the first side length of the patch with the unit side length in the area image when the electronic device is at the normal height according to the data in the database.
Step S1043: and calculating the product of the quotient and the first side length based on the quotient of the actual side length and the unit side length of the patch, and obtaining the second side length in the area image when the patch is at the normal height.
Step S1044: and acquiring the image side length of the patch in the area image.
Specifically, the image side length is the actual length of the side length of the patch in the area image.
Step S1045: and calculating the ratio of the side length of the image to the second side length.
Step S1046: the actual height is determined from the ratio.
Specifically, the electronic device multiplies the ratio by the normal height, and calculates the actual height.
Step S1047: judging whether the actual height is within a height allowable range or not; if yes, determining that the patch height is normal; otherwise, determining that the patch height is abnormal.
The electronic equipment is preset with a height allowable range according to actual conditions.
In order to better perform the above method, an embodiment of the present application further provides a patch welding quality detection apparatus, referring to fig. 3, a patch welding quality detection apparatus 200 includes:
An acquisition module 201, configured to acquire an image to be detected including a PCB board welded with a patch;
The dividing module 202 is configured to divide the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas;
The recognition module 203 is configured to input each area image into a neural network model based on deep learning to perform recognition, and determine a patch and/or solder;
a judging module 204, configured to judge whether the patch welding of each detection area is abnormal according to the positions of the patches and/or the solder;
and a marking module 205, configured to generate marking information in the detection area where the abnormality exists when the judgment module 204 judges yes.
Further, the patch welding quality detection apparatus 200 further includes:
the edge recognition module is used for carrying out grey value processing on the image to be detected and recognizing the edge of the PCB according to the image to be detected after the grey value processing;
the processing module is used for placing the image to be detected after the grey value processing into a coordinate system;
the parallel judging module is used for judging whether one side of the PCB is parallel to any coordinate axis; if yes, no correction is needed; otherwise, determining an included angle between one side of the PCB and any coordinate axis;
and the correction module is used for rotating the image to be detected according to the opposite direction of the included angle, so that the corrected image to be detected is obtained after the included angle is zero.
Further, the dividing module 202 is specifically configured to:
obtaining the model of the PCB;
calling a preset cutting frame according to the model of the PCB; the cutting frame comprises an outer frame with the same shape as the edge of the PCB and a plurality of cutting lines arranged in the outer frame;
scaling the image to be detected to enable the outer frame to coincide with the edge of the image to be detected;
And dividing the image to be detected along the cutting line to obtain area images corresponding to the detection areas.
Further, the determining module 204 is specifically configured to, when determining whether there is an abnormality in the die bonding of each detection area:
judging whether a preset number of patches exist or not; if the preset number of patches does not exist, determining that the patches are lost;
If the patches with the preset number exist, judging whether the patches are located in a preset range of a preset patch area or not; if the position is located, determining that the patch position is correct; if not, determining the offset direction and the angle of the patch;
Judging whether soldering tin is positioned in a preset welding area or not; if the soldering tin is positioned in the preset soldering area, the soldering tin is determined to be normal; if the soldering tin is not in the preset soldering area, determining that soldering tin is abnormal;
Judging whether the soldering tin is connected with soldering tin in other preset patch areas when the soldering tin is abnormal; if yes, determining a short circuit.
Further, when the determining module 204 determines the offset direction and the angle of the patch, the determining module is specifically configured to:
determining at least one exceeding area of the patch exceeding a preset range of the preset welding area;
Determining the area of each exceeding area;
determining the position corresponding to the exceeding area with the largest area as the offset direction of the patch;
determining one of the first edges of the patch in a coordinate system;
Determining one of the second edges of the preset welding area in a coordinate system; the first side and the second side are the same long side or wide side of the rectangle;
And determining the acute included angle between the first side and the second side as an offset angle.
Further, when the determining module 204 determines whether the solder is connected to the solder in other preset patch areas, the determining module is specifically configured to:
Acquiring the shape of soldering tin;
comparing the shape of the soldering tin with the corresponding preset shape in the preset welding area, and determining the similarity;
If the similarity is within the preset range, determining that the soldering tin is not connected with other soldering tin;
If the similarity is not in the preset range, judging whether the soldering tin is positioned in the adjacent preset patch area, and if so, determining to connect.
Further, when the judging module 204 judges whether the soldering of the patch in each detection area is abnormal, the judging module is specifically configured to:
Establishing a database; the database comprises preset side lengths corresponding to the area images when the patches with the unit side lengths are at a plurality of heights;
Acquiring the actual side length and the normal height of the patch, and acquiring the corresponding first side length in the area image when the patch with the unit side length is at the normal height based on the database;
Calculating the product of the quotient and the first side length based on the quotient of the actual side length and the unit side length of the patch to obtain the second side length in the area image when the patch is at the normal height;
acquiring the image side length of the patch in the area image;
calculating the ratio of the side length of the image to the second side length;
Determining an actual height according to the ratio;
Judging whether the actual height is within a height allowable range or not; if yes, determining that the patch height is normal; otherwise, determining that the patch height is abnormal.
The various modifications and specific examples of the method in the foregoing embodiment are equally applicable to the patch welding quality detection apparatus of the present embodiment, and the implementation method of the patch welding quality detection apparatus of the present embodiment will be apparent to those skilled in the art from the foregoing detailed description of the patch welding quality detection method, so that the detailed description thereof will not be repeated for the sake of brevity.
To better implement the above method, an embodiment of the present application provides an electronic device, referring to fig. 4, an electronic device 300 includes: a processor 301, a memory 303, and a display screen 305. Wherein the memory 303 and the display 305 are both coupled to the processor 301, such as via a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that, in practical applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 is not limited to the embodiment of the present application.
The Processor 301 may be a CPU (Central Processing Unit ), general purpose Processor, DSP (DIGITAL SIGNAL Processor, data signal Processor), ASIC (Application SPECIFIC INTEGRATED Circuit), FPGA (Field Programmable GATE ARRAY ) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. Processor 301 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 302 may include a path to transfer information between the components. Bus 302 may be a PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. Bus 302 may be divided into an address bus, a data bus, a control bus, and the like.
The Memory 303 may be, but is not limited to, a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY MEMORY ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 303 is used for storing application program codes for executing the inventive arrangements and is controlled to be executed by the processor 301. The processor 301 is configured to execute the application code stored in the memory 303 to implement what is shown in the foregoing method embodiments.
The electronic device 300 shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the application.
The embodiment of the application also provides a computer readable storage medium, which stores a computer program, when the program is executed by a processor, the method provided by the embodiment is realized, the processor executes the computer program in the computer readable storage medium, acquires an image to be detected, divides the image to be detected, and then obtains area images corresponding to a plurality of detection areas, and further can identify patches and soldering tin in the area images through a neural network model, so that the welding condition of the patches of the detection areas is judged according to the positions of the patches and/or the soldering tin, whether welding abnormality exists is determined, and the abnormal detection areas are marked, thereby facilitating subsequent arrangement. Meanwhile, the patches of each detection area are detected, and the detection efficiency is improved.
In this embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions for use by the instruction execution device. The computer readable storage medium may be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the preceding. In particular, the computer readable storage medium may be a portable computer disk, hard disk, USB flash disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), podium random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital Versatile Disk (DVD), memory stick, floppy disk, optical disk, magnetic disk, mechanical coding device, and any combination of the foregoing.
The computer program in this embodiment contains program code for executing all the methods described above, and the program code may include instructions corresponding to the execution of the steps of the methods provided in the embodiments described above. The computer program may be downloaded from a computer readable storage medium to the respective computing/processing device or to an external computer or external storage device via a network (e.g., the internet, a local area network, a wide area network, and/or a wireless network). The computer program may execute entirely on the user's computer and as a stand-alone software package.
The above embodiments are not intended to limit the scope of the present application, so: all equivalent changes in structure, shape and principle of the application should be covered in the scope of protection of the application.
In addition, it is to be understood that relational terms such as first and second are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (5)

1. A patch welding quality detection method, comprising:
Acquiring an image to be detected, which comprises a PCB welded with a patch;
Dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas;
Inputting each area image into a neural network model based on deep learning for recognition, and determining patches and/or soldering tin;
Judging whether the welding of the patches in each detection area is abnormal or not according to the positions of the patches and/or the soldering tin; if yes, generating marking information in a detection area with abnormality;
Dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas, wherein the method comprises the following steps:
obtaining the model of the PCB;
Calling a preset cutting frame according to the model of the PCB; the cutting frame comprises an outer frame with the same shape as the edge of the PCB and a plurality of cutting lines arranged in the outer frame;
scaling the image to be detected to enable the outer frame to coincide with the edge of the image to be detected;
Dividing the image to be detected along the cutting line to obtain area images corresponding to a plurality of detection areas;
the patch welding abnormality comprises patch loss, patch position offset and soldering tin abnormality, and the patch welding abnormality judging of each detection area comprises:
judging whether a preset number of patches exist or not; if the preset number of patches does not exist, determining that the patches are lost;
if the patches with the preset number exist, judging whether the patches are located in a preset range of a preset patch area or not; if the position is located, determining that the patch position is correct; if not, determining the offset direction and the angle of the patch;
Judging whether soldering tin is positioned in a preset welding area or not; if the soldering tin is positioned in the preset soldering area, the soldering tin is determined to be normal; if the soldering tin is not in the preset soldering area, determining that soldering tin is abnormal;
judging whether the soldering tin is connected with soldering tin in other preset patch areas when the soldering tin is abnormal; if yes, determining a short circuit;
The determining the offset direction and angle of the patch includes:
determining at least one exceeding area of the patch exceeding a preset range of the preset welding area;
Determining the area of each exceeding area;
determining the position corresponding to the exceeding area with the largest area as the offset direction of the patch;
Determining one of the first edges of the patch in a coordinate system;
determining one of the second edges of the preset welding area in a coordinate system; the first side and the second side are the same long side or wide side of a rectangle;
determining an acute included angle between the first edge and the second edge as an offset angle;
judging whether the soldering tin is connected with soldering tin in other preset patch areas or not comprises the following steps:
Acquiring the shape of soldering tin;
comparing the shape of the soldering tin with the preset shape in the corresponding preset welding area, and determining the similarity;
if the similarity is within a preset range, determining that the soldering tin is not connected with other soldering tin;
If the similarity is not in the preset range, judging whether the soldering tin is positioned in the adjacent preset patch area, and if so, determining connection;
The patch welding quality comprises a patch height, and whether the patch welding of each detection area is abnormal or not is judged according to the positions of the patches and/or soldering tin, and the method comprises the following steps:
establishing a database; the database comprises preset side lengths corresponding to the area images when the patches with the unit side lengths are at a plurality of heights;
Acquiring the actual side length and the normal height of the patch, and acquiring the corresponding first side length in the area image when the patch with the unit side length is at the normal height based on the database;
Calculating the product of the quotient and the first side length based on the quotient of the actual side length and the unit side length of the patch to obtain a second side length in the area image when the patch is at a normal height;
acquiring the image side length of the patch in the area image;
Calculating the ratio of the side length of the image to the second side length;
determining an actual height according to the ratio;
Judging whether the actual height is within a height allowable range or not; if yes, determining that the patch height is normal; otherwise, determining that the patch height is abnormal.
2. The method of claim 1, wherein prior to dividing the image to be detected according to a preset rule, the method further comprises:
carrying out grey value treatment on the image to be detected, and identifying the edge of the PCB according to the image to be detected after the grey value treatment;
placing the image to be detected after the gray value treatment into a coordinate system;
judging whether one side of the PCB is parallel to any coordinate axis or not; if yes, no correction is needed;
Otherwise, determining an included angle between one side of the PCB and any coordinate axis;
And rotating the image to be detected according to the opposite direction of the included angle to make the included angle zero, and obtaining the corrected image to be detected.
3. A patch welding quality detection device, comprising:
The acquisition module is used for acquiring an image to be detected, which comprises a PCB welded with a patch;
The dividing module is used for dividing the image to be detected according to a preset rule to obtain area images corresponding to a plurality of detection areas;
The identification module is used for inputting each area image into a neural network model based on deep learning for identification and determining patches and/or soldering tin;
The judging module is used for judging whether the welding of the patches of each detection area is abnormal or not according to the positions of the patches and/or the soldering tin;
the marking module is used for generating marking information in the detection area with the abnormality when the judging module judges that the abnormality exists;
the dividing module is specifically configured to:
obtaining the model of the PCB;
Calling a preset cutting frame according to the model of the PCB; the cutting frame comprises an outer frame with the same shape as the edge of the PCB and a plurality of cutting lines arranged in the outer frame;
scaling the image to be detected to enable the outer frame to coincide with the edge of the image to be detected;
Dividing the image to be detected along the cutting line to obtain area images corresponding to a plurality of detection areas;
The judging module is specifically configured to, when judging whether or not there is an abnormality in patch welding of each detection area:
judging whether a preset number of patches exist or not; if the preset number of patches does not exist, determining that the patches are lost;
If the patches with the preset number exist, judging whether the patches are located in a preset range of a preset patch area or not; if the position is located, determining that the patch position is correct; if not, determining the offset direction and the angle of the patch;
Judging whether soldering tin is positioned in a preset welding area or not; if the soldering tin is positioned in the preset soldering area, the soldering tin is determined to be normal; if the soldering tin is not in the preset soldering area, determining that soldering tin is abnormal;
Judging whether the soldering tin is connected with soldering tin in other preset patch areas when the soldering tin is abnormal; if yes, determining a short circuit;
when the judging module determines the offset direction and the angle of the patch, the judging module is specifically used for:
determining at least one exceeding area of the patch exceeding a preset range of the preset welding area;
Determining the area of each exceeding area;
determining the position corresponding to the exceeding area with the largest area as the offset direction of the patch;
determining one of the first edges of the patch in a coordinate system;
Determining one of the second edges of the preset welding area in a coordinate system; the first side and the second side are the same long side or wide side of the rectangle;
determining an acute included angle between the first side and the second side as an offset angle;
the judging module is specifically used for judging whether soldering tin is connected with soldering tin in other preset patch areas or not when the judging module judges that the soldering tin is connected with the soldering tin in other preset patch areas or not:
Acquiring the shape of soldering tin;
comparing the shape of the soldering tin with the corresponding preset shape in the preset welding area, and determining the similarity;
If the similarity is within the preset range, determining that the soldering tin is not connected with other soldering tin;
If the similarity is not in the preset range, judging whether the soldering tin is positioned in the adjacent preset patch area, and if so, determining connection;
the judging module is specifically configured to, when judging whether the patch welding of each detection area is abnormal:
Establishing a database; the database comprises preset side lengths corresponding to the area images when the patches with the unit side lengths are at a plurality of heights;
Acquiring the actual side length and the normal height of the patch, and acquiring the corresponding first side length in the area image when the patch with the unit side length is at the normal height based on the database;
Calculating the product of the quotient and the first side length based on the quotient of the actual side length and the unit side length of the patch to obtain the second side length in the area image when the patch is at the normal height;
acquiring the image side length of the patch in the area image;
calculating the ratio of the side length of the image to the second side length;
Determining an actual height according to the ratio;
Judging whether the actual height is within a height allowable range or not; if yes, determining that the patch height is normal; otherwise, determining that the patch height is abnormal.
4. An electronic device, characterized in that,
At least one processor;
A memory;
At least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program configured to: a method according to any one of claims 1 to 2.
5. A computer readable storage medium, characterized in that a computer program is stored which can be loaded by a processor and which performs the method according to any of claims 1 to 2.
CN202311007734.8A 2023-08-11 Patch welding quality detection method and device, electronic equipment and storage medium Active CN116912230B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311007734.8A CN116912230B (en) 2023-08-11 Patch welding quality detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311007734.8A CN116912230B (en) 2023-08-11 Patch welding quality detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116912230A CN116912230A (en) 2023-10-20
CN116912230B true CN116912230B (en) 2024-06-28

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240642A (en) * 2021-05-13 2021-08-10 创新奇智(北京)科技有限公司 Image defect detection method and device, electronic equipment and storage medium
CN116051485A (en) * 2022-12-29 2023-05-02 深圳市识渊科技有限公司 Patch welding quality inspection method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240642A (en) * 2021-05-13 2021-08-10 创新奇智(北京)科技有限公司 Image defect detection method and device, electronic equipment and storage medium
CN116051485A (en) * 2022-12-29 2023-05-02 深圳市识渊科技有限公司 Patch welding quality inspection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10674651B2 (en) Printed circuit board inspecting apparatus, method for determining fault type of screen printer and computer readable recording medium
CN113344931B (en) Plug-in visual detection and identification method, readable storage medium and device
KR101337881B1 (en) Method for inspecting and generating job data of pcb inspection system
US10684321B2 (en) Printed circuit board inspecting apparatus, method for detecting anomaly in solder paste and computer readable recording medium
CN107705304B (en) Positioning method and device
US11521015B2 (en) Image-recognition apparatus, image-recognition method, and non-transitory computer-readable storage medium thereof
JP2012112961A (en) Inspection method
KR20120054689A (en) Inspection method
CN116519707A (en) Lithium battery defect detection method and device based on machine vision and electronic equipment
CN116912230B (en) Patch welding quality detection method and device, electronic equipment and storage medium
US10827661B2 (en) Inspection apparatus and method, and system and method for mounting components including the same
JP4454428B2 (en) Component edge detection method, component edge detection program, and inspection apparatus
CN113469944A (en) Product quality inspection method and device and electronic equipment
CN113379678A (en) Circuit board detection method and device, electronic equipment and storage medium
CN116912230A (en) Patch welding quality detection method and device, electronic equipment and storage medium
KR20160105082A (en) Apparatus for testing board and testing method thereof
CN117007600A (en) Defect detection method, device, equipment and computer readable storage medium
US20060034506A1 (en) Machine vision analysis system and method
CN116298785A (en) Electronic signal testing method and device, electronic equipment and storage medium
JP2015219141A (en) Printed substrate inspection device and inspection method of the same
Pramudita et al. Development of techniques to determine object shifts for PCB board assembly automatic optical inspection (AOI)
KR20150104766A (en) Tracking method for badness history in inspection process
JP2007327824A (en) Terminal lead inspection method
CN116205835A (en) Circuit board flaw detection method and device and electronic equipment
JP2007309703A (en) Inspection method of pixel

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant