CN115479891A - Automatic detection system and method for circuit board mounted components based on image recognition - Google Patents

Automatic detection system and method for circuit board mounted components based on image recognition Download PDF

Info

Publication number
CN115479891A
CN115479891A CN202210970083.1A CN202210970083A CN115479891A CN 115479891 A CN115479891 A CN 115479891A CN 202210970083 A CN202210970083 A CN 202210970083A CN 115479891 A CN115479891 A CN 115479891A
Authority
CN
China
Prior art keywords
image
circuit board
plug
detection
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210970083.1A
Other languages
Chinese (zh)
Inventor
牛佛林
吴亚涛
何玲
何亮
陈春荣
江书华
李文峰
张传玺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics 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 Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN202210970083.1A priority Critical patent/CN115479891A/en
Publication of CN115479891A publication Critical patent/CN115479891A/en
Pending legal-status Critical Current

Links

Images

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/01Arrangements or apparatus for facilitating the optical investigation
    • 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/8806Specially adapted optical and illumination features
    • 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
    • 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
    • G01N21/95607Inspecting patterns on the surface of objects using a comparative method
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V8/00Prospecting or detecting by optical means
    • G01V8/10Detecting, e.g. by using light barriers
    • 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
    • G06T7/001Industrial image inspection using an image reference approach
    • 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/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • 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
    • G01N2201/00Features of devices classified in G01N21/00
    • G01N2201/06Illumination; Optics
    • G01N2201/062LED's

Landscapes

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

Abstract

The invention discloses the technical field of industrial automation, and discloses an automatic detection system and method of a circuit board mounted component based on image recognition, which are used for improving the detection efficiency and reducing the false detection rate. The system part comprises a detection triggering module, an image processing module, an image acquisition module and a detection output module: the detection trigger module is used for detecting whether a circuit board flows through the assembly line; the image processing module is used for controlling the image acquisition module to acquire an acquired image corresponding to the circuit board when the circuit board is detected to flow through the assembly line, and carrying out image analysis processing on the acquired image to obtain an image analysis result; and the detection output module is used for outputting the detection result of the components of the circuit board based on the image analysis result.

Description

Automatic detection system and method for circuit board mounted components based on image recognition
Technical Field
The invention relates to the technical field of industrial automation, in particular to an automatic detection system and method for a circuit board-mounted component based on image recognition.
Background
With the development of industrial automation, people have higher and higher requirements on efficiency. In industrial production, the detection of circuit boards, in the current industrial production line, most industrial production lines still adopt a manual visual inspection mode for the product appearance detection of circuit board products, and the manual visual inspection mode obviously does not meet the development requirements of modern industry. Compared with manual visual inspection, the efficiency is low, and the false inspection rate is high.
Disclosure of Invention
The embodiment of the invention provides an automatic detection system and method for on-board components of a circuit based on image recognition, aiming at solving the problems of low efficiency and high false detection rate of circuit board products in the traditional scheme
The first aspect provides an automatic detection system for circuit board mounted components based on image recognition, which comprises a detection trigger module, an image processing module, an image acquisition module and a detection output module:
the detection trigger module is used for detecting whether a circuit board flows through the assembly line;
the image processing module is used for controlling the image acquisition module to acquire an acquired image corresponding to the circuit board when the circuit board is detected to flow through the assembly line, and carrying out image analysis processing on the acquired image to obtain an image analysis result;
and the detection output module is used for outputting the detection result of the components of the circuit board based on the image analysis result.
Further, the detection triggering module comprises a photoelectric sensor and a control board card, the photoelectric sensor is connected with the control board card, and the photoelectric sensor is fixed above the assembly line;
the photoelectric sensor is used for detecting whether the circuit board flows through the assembly line; when a circuit board flows through the assembly line, the photoelectric sensor outputs a variable current signal to the control board; the control board card is used for converting the variable current signal into a target digital signal and outputting the target digital signal to the image processing module; the image processing module is used for responding to the target digital signal and controlling the image acquisition module to acquire the acquired image corresponding to the circuit board.
Further, the image acquisition module comprises an illumination light source and an industrial camera; the illumination light source and the industrial camera are respectively connected to the image processing module, and the illumination light source is fixed above the assembly line.
Furthermore, the illumination light source adopts a box type LED white light source.
Further, the image processing module is specifically configured to:
acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located;
respectively preprocessing the plug-in image and the PCB silk-screen image to obtain a target plug-in image and a target PCB silk-screen image;
respectively creating a first template domain and a second template domain which correspond to the target plug-in image and the target PCB silk-screen image when the plug-in is not available;
and respectively calculating the matching degree of the first template drawing and the second template drawing and the sampled image of the circuit board for identification so as to determine an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
Further, when the image analysis result shows that the circuit board has a plug-in, the image processing module is further configured to:
and selecting a corresponding detection mode to detect whether the plug-in is reversely plugged or not according to the device type of the plug-in.
Further, the image processing module is further configured to:
if the plug-in is a polar capacitor arranged on the side, judging the polar direction of the polar capacitor by acquiring the direction of the silk-screen characters on the side surface of the polar capacitor;
if the plug-in is a polar capacitor which is placed positively, the polarity direction of the polar capacitor is judged by acquiring the polarity mark of the polarity;
if the plug-in is a first transformer comprising silk screen, determining the polarity direction of the first transformer according to the silk screen character direction of the first transformer;
if the plug-in is a second transformer without silk screen, passing through an area range image of the surface of the second transformer; processing the image of the area range by Fourier change to convert the image of the area range into a frequency domain, and then filtering the frequency domain to obtain a character outline of the area range of the surface of the second transformer; and determining the polarity direction of the second transformer through the outline.
In a second aspect, a method for automatically detecting a circuit board-mounted component based on image recognition is provided, and the method includes:
the detection triggering module detects whether a circuit board flows through the assembly line;
when detecting that a circuit board flows through the assembly line, the image processing module controls the image acquisition module to acquire an acquired image corresponding to the circuit board, and performs image analysis processing on the acquired image to obtain an image analysis result;
and the detection output module outputs a component detection result of the circuit board based on the image analysis result.
Further, the image analysis processing is performed on the acquired image to obtain an image analysis result, and the image analysis result includes:
acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located;
respectively preprocessing the plug-in image and the PCB silk-screen image to obtain a target plug-in image and a target PCB silk-screen image;
respectively creating a first template domain and a second template domain which correspond to the target plug-in image and the target PCB silk-screen image when the plug-in is not available;
and respectively calculating the matching degree of the first template drawing and the second template drawing which are identified with the sampling image of the circuit board to obtain an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
Further, when the image analysis result shows that the plug-in exists on the circuit board, the method further comprises the following steps:
and selecting a corresponding detection mode to detect whether the plug-in is inserted reversely or not according to the device type of the plug-in.
According to the image recognition-based automatic detection method or system for the onboard components of the circuit, automatic optical detection is adopted, the stability, repeatability and accuracy are higher, the manual error can be minimized due to the standard and the controllable detection standard, the false detection rate is reduced, meanwhile, the automatic detection of circuit board images is conducted in a factory, the manual operation frequency can be reduced, the efficiency is improved, and the labor cost can be reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a schematic diagram of a system architecture of an automatic circuit board component detection system based on image recognition according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for automatic detection of an on-board component of a circuit based on image recognition according to an embodiment of the present invention;
fig. 3 is a block diagram of an image processing module in a method for automatically detecting an on-board device based on image recognition according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present application, an automatic circuit board component detection system based on image recognition is provided, including a detection trigger module 100, an image processing module 300, an image acquisition module 200, and a detection output module 400:
the detection triggering module 100 is used for detecting whether a circuit board flows through the assembly line;
the image processing module 300 is configured to, when it is detected that a circuit board (PCB) flows through the assembly line, control the image acquisition module 200 to acquire an acquired image corresponding to the circuit board, and perform image analysis processing on the acquired image to obtain an image analysis result;
and a detection output module 400, configured to output a component detection result of the circuit board based on the image analysis result. Specifically, a Pass/Fail result state output, a detection data analysis control output and an abnormality prompter are output. The abnormality prompter may be a buzzer.
In one embodiment, the detection triggering module comprises a photoelectric sensor and a control board card, the photoelectric sensor is connected with the control board card, and the photoelectric sensor is fixed above the assembly line; the photoelectric sensor is used for detecting whether the circuit board flows through the assembly line; when a circuit board flows through the assembly line, the photoelectric sensor outputs a variable current signal to the control board; the control board card is used for converting the variable current signal into a target digital signal and outputting the target digital signal to the image processing module; the image processing module is used for responding to the target digital signal and controlling the image acquisition module to acquire the acquired image corresponding to the circuit board.
As an example, the detection trigger module 100 may specifically include a reflective digital laser sensor and an IO control board, where the reflective digital laser sensor uses a visible focused laser beam to provide a long-distance presence/absence detection function, and can effectively detect a circuit board on a production line. This IO control integrated circuit board can be 4 way PNP compatible type photoelectric input of a section, the industrial grade IO drive plate of 4 way relay output, and photoelectric sensor can also adopt other types of laser sensor, and IO control integrated circuit board can use the drive card of other way output and inputs, all do not restrict here specifically.
In one embodiment, the image acquisition module 200 includes an illumination source and an industrial camera; the illumination light source and the industrial camera are respectively connected to the image processing module 300, the illumination light source is fixed above the production line, the illumination light source is used for providing illumination conditions for image acquisition, and the industrial camera is used for acquiring images of a circuit board on the production line to obtain acquired images.
As an example, the illumination light source adopts a box-type LED white light source, and the industrial camera can adopt an industrial camera comprising a lens group and a linear array CCD color image sensor; its collection field of view was 300 x 200mm.
It should be noted that, in practical application, the interface, the size of the target surface and the resolution of the industrial camera can be determined according to the required view range, working distance and precision requirement; meanwhile, the type and the lighting mode of the lighting source are determined according to the characteristics of the circuit board product, and finally, the optical lens is determined according to the size of the chip of the industrial camera.
It can be understood that the image obtained by the industrial camera is generated by receiving the light reflected by the object and performing photoelectric conversion. Therefore, the images acquired by the industrial camera are different under different light sources and different lighting angles. Because the scene of the circuit board behind the plug-in components is complicated, the shape, the height, the colour of the plug-in components of different grade type are all different, in order to all plug-in components of compatible detection and ensure that can obtain best image effect, adopt box formula light source to polish in the embodiment of this application, can make the illumination effect of circuit board under the whole illumination scope most even, within this light source scope, the luminance at edge and center is the same, also can not appear luminance gradual change promptly the bright both sides dark condition in the middle, be fit for the complicated scene that contains the detection object of multiple different grade type in the same image, be favorable to improving the accuracy of detection.
After the light source type is determined, the proper camera and lens are selected. It can be understood that the higher the pixels of the industrial camera are, the more the number of the pixel points contained in the same field of view is, and the more the image details can be presented. In order to capture a complete image of the circuit board and to present details of the board connector as much as possible, a camera having pixels such as 2000 ten thousand pixels may be used as an alternative to the industrial camera. Thus, compared with the accurate shooting of the plug-in unit by the low-pixel camera, the high-pixel overall shooting has the advantages that under the condition that the definition of the plug-in unit is the same, the time consumed for collecting images is shorter, and the requirements of equipment mechanisms are simpler. And the corresponding lens is selected, in the embodiment of the application, the principle that the detected object should occupy 2/3-3/4 of the whole image in the acquired image is adopted. The focal length of the optical lens is small for the same working distance, and the proportion of the object in the visual field is smaller. That is to say, in order to ensure the quality of the whole image, the maximum adaptive chip size of the optical lens must be larger than the chip size of the industrial camera matched with the optical lens, otherwise serious distortion and phase difference can be caused, and the subsequent detection accuracy rate is affected.
Illustratively, machine vision optical lens interfaces and camera interfaces are generally classified into C, CS, F and other larger size interface types. The camera and lens are complementary, i.e. a camera with C-interface can only use the lens with C-interface. In the embodiment of the application, the camera lens with the diameter of 12mm is adopted, the working distance is small, the edge of the visual field cannot generate large distortion, and the detection accuracy can be further improved.
It should be noted that the illumination light source of the image acquisition module 200 is intended to present a high quality and high contrast image, and can have the most obvious feature detection points and the least obvious background and interference, which directly affect the processing accuracy and speed; adjusting the position of an industrial camera, an optical lens and an illumination light source of the image acquisition module to focus a graphic display real-time picture of the image processing module clearly; after the position is fixed, the exposure time and the gain of the camera need to be adjusted, the picture quality is improved, and the subsequent image acquisition processing is facilitated.
In one embodiment, the image processing module 300 may be a desktop computer, and includes a color image display, a keyboard and mouse input device, and a computer host equipped with a plurality of USB interfaces and a plurality of ethernet interfaces, and the camera and the IO control card are connected to the computer motherboard of the desktop computer through a PCI slot. The operating platform may be a WINDOWS platform, and is not particularly limited. The connection mode between the image processing module 300 and the image capturing module 200 and the detection triggering module 100 is wired connection, and a TCP communication protocol is not limited specifically.
And installing and fixing all image acquisition module hardware equipment, installing related driving software on the main control desktop computer, and testing whether all communication links are normal or not. The user starts the image processing module software system on the main control computer, checks the state of each component, and if any component is abnormal, the image processing module software outputs a popup window or red font log prompt.
It should be noted that the image processing module is used for performing processes such as image analysis, graphic display, graphic interaction, image preprocessing, barcode scanning, graphic feature point detection, and the like, and includes the following steps:
in an embodiment, the image processing module is specifically configured to: acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located; respectively preprocessing the plug-in image and the PCB silk-screen image to obtain a target plug-in image and a target PCB silk-screen image; respectively creating a first template layout and a second template layout corresponding to the condition of the plug-in and the condition of no plug-in based on the target plug-in image and the target PCB silk-screen image; and respectively calculating the matching degree of the first template drawing and the second template drawing which are identified with the sampling image of the circuit board so as to determine an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
It should be noted that, in an embodiment, before acquiring a to-be-detected area in a sample image of the circuit board, acquiring a plug-in image of the detection area with a plug-in and a PCB screen-printed image of a position where the plug-in is not present, a corresponding reference point (Mark point) is set for the sample image, and information of the reference point is stored, where the reference point is set based on a detection requirement, so that Mark matching is performed on a collected image acquired by an image acquisition module in a subsequent detection process of the circuit board to obtain Mark data, and then operations such as rotation, translation, scaling and the like are performed on a reference coordinate of the collected image based on the Mark data, so that the acquired image coordinate is converted into a corresponding coordinate of the sample image.
In one embodiment, the plug-in image and the PCB silk-screen image are respectively subjected to preprocessing operations, including the operations of contrast of the two images, edge sharpness improvement, background noise reduction and the like. And the characteristic value of the plug-in and the corresponding characteristic value of the PCB screen printing are improved through preprocessing operation, so that subsequent detection is facilitated.
And respectively creating a first template domain and a second template domain which correspond to the plug-in and the plug-in-free state based on the target plug-in image and the target PCB silk-screen image, namely creating an image template with the plug-in and the plug-in-free state. In an embodiment, limited parameters including a matchable angle range, a matchable template size ratio and the like can be set for the two templates, so that matching accuracy is further improved. In an embodiment, the two obtained template images may be subjected to a matching test first, and the matching speed, compatibility and accuracy are improved by setting matching parameters, searching an angle range, searching a score value range, searching the number, stacking coefficients, sub-pixel levels, pyramid levels and the like. And finally, respectively calculating the first template drawing and the second template drawing based on the set matching parameters, and determining the matching degree of the first template drawing and the second template drawing with the sampled image of the circuit board to determine an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
It should be noted that, while the template is being made, the corresponding cause of the defect and the device position, and the device model can be checked to record voice, and the voice is used to play the corresponding voice packet when the defect is detected in the test.
In an embodiment, when the image analysis result shows that the circuit board has a plug-in, the image processing module is further configured to:
and selecting a corresponding detection mode to detect whether the plug-in is inserted reversely or not according to the device type of the plug-in.
In an embodiment, the image processing module is further configured to:
if the plug-in is a polar capacitor arranged on the side, judging the polar direction of the polar capacitor by acquiring the direction of the silk-screen characters on the side surface of the polar capacitor;
if the plug-in is a polar capacitor which is placed positively, the polarity direction of the polar capacitor is judged by acquiring the polarity mark of the polarity;
if the plug-in is a first transformer comprising silk screen, determining the polarity direction of the first transformer according to the silk screen character direction of the first transformer;
if the plug-in is a second transformer without silk screen, passing through an area range image of the surface of the second transformer; processing the image of the area range by Fourier change to convert the image of the area range into a frequency domain, and then filtering the frequency domain to obtain a character outline of the area range of the surface of the second transformer; and determining the polarity direction of the second transformer through the outline.
It can be understood that, for a plug-in with polarity, in the case where the plug-in exists obtained by the above-described embodiment, the direction of the plug-in obtained by the feature value of the plug-in is also required. Different algorithms may be used to obtain the polarity for different plug-in classes, specifically:
d1: for the side capacitor, namely the polar capacitor arranged on the side, the direction of the capacitor can be judged by acquiring the direction of silk-screen characters on the side surface of the capacitor. Specifically, firstly, the silk-screen printing on the side surface of the capacitor needs to be processed for improving the contrast, a silk-screen character area is obtained, then noise is removed through noise removing processing, the definition of silk-screen characters is improved, and finally whether the side capacitor is reversed or not is judged through the result of character contour matching or OCR character recognition;
d2: for the positive capacitor, that is, the positive polar capacitor, the positive capacitor can acquire the polar identifier, and the brightness of the polar identifier of the positive capacitor of the acquired image is significantly greater than the brightness of the body of the element, so that a Histogarm-type detection algorithm can be specifically adopted to determine whether the positive capacitor has a polarity reversal condition.
D3: for the first transformer containing silk screen, the definition of silk screen characters on the surface of the first transformer plug-in unit can be improved by adjusting the brightness of the light source and the Gama value and the exposure value of the camera, and the direction of the transformer is determined by the direction of the silk screen characters.
D4: for some second transformers with shallower silk-screen printing or non-silk-screen printing, the gray value of the whole area is analyzed, and the analyzed result is used for carrying out area segmentation, so that the accurate area range of the transformer surface can be obtained. And converting the pictures in the area range into a frequency domain by Fourier transform processing, and then filtering the frequency domain to obtain the character outline of the area surface. And comparing according to the outline to determine the direction of the transformer.
The image processing module is mainly used for realizing the processes of image processing and analysis and also comprises the processes of realizing image display and the like, wherein the image display comprises the step of using a related display interface function to display the sampled image data through a HWindow control or PictureBox control; the graph interaction is to draw an interested region through a mouse to obtain the interested region; the image preprocessing uses the gray level transformation of the image, the geometric transformation of the image and the image segmentation, the most common image segmentation is the threshold segmentation, and the threshold segmentation is a method for segmenting according to the gray level amplitude of the image pixel.
In industrial production, identification of each circuit board product is generally performed by using a representation such as a two-dimensional code. The image processing module also comprises a two-dimensional code acquisition and decoding process of the circuit board. Before each plate is detected, firstly, two-dimensional code decoding processing is carried out, equipment ID is obtained, and the final component detection result is associated and bound with the equipment ID.
It should be noted that, in the above-mentioned detection process, it is based on the template matching algorithm, this matching mode is applicable to the occasions where the search object has slight deformation, there are a lot of textures and objects in the blurred image, etc., its speed is faster than the traditional gray matching, and is superior to the shape matching algorithm in the compatibility and operation, which is favorable to improve the whole processing efficiency; in an actual application scene, the acquired images have small position deviation and are basically equal to the acquired images acquired at the same position. Therefore, the plug-in unit change difference of the same position in each collected image is small, and the detection efficiency is improved. Moreover, the automatic detection system for the onboard components of the circuit can perform matching identification operation only by acquiring the picture of the plug-in and setting the matching parameters, and the gray matching algorithm is more complex. Moreover, in the recognition effect, if the outline of the plug-in is not clear enough, the outline of the plug-in is integrated with the surrounding environment or the outline of the plug-in is recognized with the silk screen on the circuit board at the bottom of the plug-in, higher misjudgment can be caused, the situation can not occur by using the embodiment of the application, and the whole recognition accuracy is higher.
In addition, the image processing module may further include functions of user login and user management, addition and deletion of product Recipe, log printing, picture saving, counting of PCB boards, and the like.
The automatic detection process can be opened after the image template is established and completed, each frame of collected image can obtain the automatic detection result after passing through the image processing module, the detection output module is used for outputting the component detection result of the circuit board based on the image analysis result, the detection output module can comprise a buzzer, abnormal prompt sound can be sent out by the buzzer when abnormality occurs, and an operator can timely obtain the detection result information through the prompt message or voice prompt of the display. And transmitting the bad information to a display screen of the next station, and reminding the specific wrong device position and device model by voice. The operator can accurately process the defective products at the next station.
In an embodiment, in combination with the automatic detection system, there is provided an automatic detection method for a circuit board mounted component based on image recognition, the method including the steps of:
s101: the detection triggering module detects whether a circuit board flows through the assembly line;
s102: when detecting that a circuit board flows through the assembly line, the image processing module controls the image acquisition module to acquire an acquired image corresponding to the circuit board, and performs image analysis processing on the acquired image to obtain an image analysis result;
s103: and the detection output module outputs a component detection result of the circuit board based on the image analysis result.
In an embodiment, the image analysis processing is performed on the acquired image to obtain an image analysis result, and the method includes the following steps:
acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located;
respectively preprocessing the plug-in image and the PCB silk-screen image to obtain a target plug-in image and a target PCB silk-screen image;
respectively creating a first template domain and a second template domain which correspond to the target plug-in image and the target PCB silk-screen image when the plug-in is not available;
and respectively calculating the matching degree of the first template drawing and the second template drawing and the sampled image of the circuit board for identification so as to obtain an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
In one embodiment, when the image analysis result shows that the plug-in exists in the circuit board, the method further comprises the following steps:
and selecting a corresponding detection mode to detect whether the plug-in is inserted reversely or not according to the device type of the plug-in.
In one embodiment, the image processing module is further configured to:
if the plug-in is a polar capacitor arranged on the side, judging the polar direction of the polar capacitor by acquiring the direction of the silk-screen characters on the side surface of the polar capacitor;
if the plug-in is a polar capacitor which is placed positively, the polarity direction of the polar capacitor is judged by acquiring the polarity mark of the polarity;
if the plug-in is a first transformer containing silk screen, determining the polarity direction of the first transformer according to the character direction of the silk screen of the first transformer;
if the plug-in is a second transformer without silk screen, passing through an area range image of the surface of the second transformer; processing the area range image by using Fourier transform to convert the area range image into a frequency domain, and then filtering the frequency domain to obtain a character outline of the area range of the surface of the second transformer; and determining the polarity direction of the second transformer through the outline.
The application provides an among the circuit board carries components and parts automatic check out system based on image recognition, adopt automatic optical detection to have higher stability, repeatability and higher precision, its standard and controllable detection standard can minimize artificial error, reduce the false positive rate, and the automated inspection of leading-in circuit board image in the mill simultaneously can reduce manual operation frequency, raises the efficiency, also can reduce the human cost.
In one embodiment, a computer device is provided, which may be a desktop computer, the internal structure of which may be as shown in fig. 3. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer equipment is used for being connected and communicated with an external image acquisition module, a detection trigger module and a detection output module through a network. The computer program is executed by a processor to implement the functions or steps of an image processing module in a method for automatic detection of a circuit board-mounted component.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the functions or steps of an image processing module in a method for automatic detection of a circuit board mounted component.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. The utility model provides a circuit board carries components and parts automatic check out system based on image recognition which characterized in that, including detecting trigger module, image processing module, image acquisition module and detection output module:
the detection trigger module is used for detecting whether a circuit board flows through the assembly line;
the image processing module is used for controlling the image acquisition module to acquire an acquired image corresponding to the circuit board when the circuit board is detected to flow through the assembly line, and carrying out image analysis processing on the acquired image to obtain an image analysis result;
and the detection output module is used for outputting the detection result of the components of the circuit board based on the image analysis result.
2. The system for automatically detecting the on-board components of the circuit of claim 1, wherein the detection trigger module comprises a photosensor and a control board card, the photosensor is connected with the control board card, wherein the photosensor is fixed above the production line;
the photoelectric sensor is used for detecting whether the circuit board flows through the assembly line; when a circuit board flows through the assembly line, the photoelectric sensor outputs a variable current signal to the control board; the control board card is used for converting the variable current signal into a target digital signal and outputting the target digital signal to the image processing module; the image processing module is used for responding to the target digital signal and controlling the image acquisition module to acquire the acquired image corresponding to the circuit board.
3. The system for automatic circuit board mounted component detection of claim 1 wherein said image acquisition module comprises an illumination source and an industrial camera; the illumination light source and the industrial camera are respectively connected to the image processing module, and the illumination light source is fixed above the production line.
4. The automatic circuit board mounted component detection system of claim 3, wherein the illumination source is a box LED white light source.
5. The system for automatic circuit board component inspection according to claim 1, wherein the image processing module is specifically configured to:
acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located;
respectively preprocessing the plug-in image and the PCB silk-screen image to obtain a target plug-in image and a target PCB silk-screen image;
respectively creating a first template domain and a second template domain which correspond to the target plug-in image and the target PCB silk-screen image when the plug-in is not available;
and respectively calculating the matching degree of the first template drawing and the second template drawing which are identified with the sampling image of the circuit board so as to determine an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
6. The system of claim 1, wherein when the image analysis indicates that a card is present on the circuit board, the image processing module is further configured to:
and selecting a corresponding detection mode to detect whether the plug-in is inserted reversely or not according to the device type of the plug-in.
7. The system for automatic circuit board component inspection according to claim 6, wherein the image processing module is further configured to:
if the plug-in is a polar capacitor arranged on the side, judging the polar direction of the polar capacitor by acquiring the direction of the silk-screen characters on the side surface of the polar capacitor;
if the plug-in is a polar capacitor which is placed positively, the polarity direction of the polar capacitor is judged by acquiring the polarity mark of the polarity;
if the plug-in is a first transformer comprising silk screen, determining the polarity direction of the first transformer according to the silk screen character direction of the first transformer;
if the plug-in is a second transformer without silk screen, passing through an area range image on the surface of the second transformer; processing the image of the area range by Fourier change to convert the image of the area range into a frequency domain, and then filtering the frequency domain to obtain a character outline of the area range of the surface of the second transformer; and determining the polarity direction of the second transformer through the outline.
8. An automatic detection method for a circuit board mounted component based on image recognition is characterized by comprising the following steps:
the detection triggering module detects whether a circuit board flows through the assembly line;
when detecting that a circuit board flows through the assembly line, the image processing module controls the image acquisition module to acquire an acquired image corresponding to the circuit board, and performs image analysis processing on the acquired image to obtain an image analysis result;
and the detection output module outputs a component detection result of the circuit board based on the image analysis result.
9. The method of claim 8, wherein the step of performing image analysis on the collected image to obtain an image analysis result comprises:
acquiring a region needing to be detected in a sample image of the circuit board, and acquiring a plug-in image of the detection region with a plug-in and a PCB silk-screen image of the position where the plug-in is not located;
respectively preprocessing the plugin image and the PCB silk-screen image to obtain a target plugin image and a target PCB silk-screen image;
respectively creating a first template domain and a second template domain which correspond to the target plug-in image and the target PCB silk-screen image when the plug-in is not available;
and respectively calculating the matching degree of the first template drawing and the second template drawing and the sampled image of the circuit board for identification so as to obtain an image analysis result, wherein the image analysis result is used for indicating whether the circuit board has a plug-in.
10. The method of automatically detecting a circuit board component of claim 8, wherein when the image analysis result indicates that a card is present on the circuit board, the method further comprises:
and selecting a corresponding detection mode to detect whether the plug-in is inserted reversely or not according to the device type of the plug-in.
CN202210970083.1A 2022-08-12 2022-08-12 Automatic detection system and method for circuit board mounted components based on image recognition Pending CN115479891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210970083.1A CN115479891A (en) 2022-08-12 2022-08-12 Automatic detection system and method for circuit board mounted components based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210970083.1A CN115479891A (en) 2022-08-12 2022-08-12 Automatic detection system and method for circuit board mounted components based on image recognition

Publications (1)

Publication Number Publication Date
CN115479891A true CN115479891A (en) 2022-12-16

Family

ID=84422698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210970083.1A Pending CN115479891A (en) 2022-08-12 2022-08-12 Automatic detection system and method for circuit board mounted components based on image recognition

Country Status (1)

Country Link
CN (1) CN115479891A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309518A (en) * 2023-03-31 2023-06-23 佛山市顺德区浩硕捷电子科技有限公司 PCB (printed circuit board) detection method and system based on computer vision

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309518A (en) * 2023-03-31 2023-06-23 佛山市顺德区浩硕捷电子科技有限公司 PCB (printed circuit board) detection method and system based on computer vision

Similar Documents

Publication Publication Date Title
CN111289538B (en) PCB element detection system and detection method based on machine vision
CN114240939B (en) Method, system, equipment and medium for detecting appearance defects of mainboard components
CN105718931B (en) System and method for determining clutter in acquired images
CN115661161B (en) Defect detection method, device, storage medium, apparatus and program product for parts
CN111275700A (en) Terminal defect detection method and system based on deep learning
CN113409234A (en) Minimum supervision Automatic Inspection (AI) of wafers supported by Convolutional Neural Network (CNN) algorithm
CN103530625A (en) Optical character recognition method based on digital image processing
CN115479891A (en) Automatic detection system and method for circuit board mounted components based on image recognition
CN115512381A (en) Text recognition method, text recognition device, text recognition equipment, storage medium and working machine
CN114972246A (en) Die-cutting product surface defect detection method based on deep learning
Duong et al. Vision inspection system for pharmaceuticals
CN110533660B (en) Method for detecting silk-screen defect of electronic product shell
CN115343313A (en) Visual identification method based on artificial intelligence
CN114594102B (en) Machine vision-based data line interface automatic detection method
CN115984197A (en) Defect detection method based on standard PCB image and related device
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN112861861B (en) Method and device for recognizing nixie tube text and electronic equipment
CN115115596A (en) Electronic component detection method and device and automatic quality inspection equipment
CN110274911B (en) Image processing system, image processing apparatus, and storage medium
CN112861817A (en) Instrument noise image processing method
CN112001905A (en) Household product damage detection system and detection method based on image processing
JPH08122267A (en) Mark recognizing device and mark recognizing method
CN112712004B (en) Face detection system, face detection method and device and electronic equipment
CN117892757A (en) Round two-dimensional code generation method and identification application method thereof in industrial production line
CN116718353B (en) Automatic optical detection method and device for display module

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