CN110954555A - WDT 3D vision detection system - Google Patents

WDT 3D vision detection system Download PDF

Info

Publication number
CN110954555A
CN110954555A CN201911366371.0A CN201911366371A CN110954555A CN 110954555 A CN110954555 A CN 110954555A CN 201911366371 A CN201911366371 A CN 201911366371A CN 110954555 A CN110954555 A CN 110954555A
Authority
CN
China
Prior art keywords
image
circuit board
detection
circle
detected
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.)
Withdrawn
Application number
CN201911366371.0A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201911366371.0A priority Critical patent/CN110954555A/en
Publication of CN110954555A publication Critical patent/CN110954555A/en
Withdrawn 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/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
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a WDT 3D visual detection system, and belongs to the technical field of detection systems. The WDT 3D visual detection system provided by the invention comprises a circuit board image shooting system and a computer image processing system, wherein the system is optimized and innovated in a hardware level and a software level, so that on one hand, the circuit board image shooting system can acquire more accurate cleaned pictures, and on the other hand, the computer image processing system can process the acquired images more perfectly and then display the processed images; by utilizing the design, the problems that the image acquisition and image processing effects of the existing system are poor and the visual detection result is influenced are effectively solved.

Description

WDT 3D vision detection system
Technical Field
The invention relates to the technical field of detection systems, in particular to a WDT 3D visual detection system.
Background
Wdt (watch Dog timer), also called watchdog timer, is a component of a single chip microcomputer, and is actually a counter, which generally gives a number to a watchdog, and the watchdog starts counting after a program starts running. If the program runs normally, the CPU sends an instruction to enable the watchdog to be set to zero after a period of time, and counting is restarted; if the watchdog is increased to the set value, the program is considered to be not working normally, and the whole system is forced to reset.
Vision, being one of the most developed sensory functions of humans, is a unique position in the process of human recognition and perception of the outside world. Therefore, the technology of simulating biological microscopic or macroscopic visual function by computer becomes-a field continuously concerned by research institutions of all levels and researchers in industry 4.0 background aiming at realizing intelligent manufacturing and realizing integration of internet and industry, and particularly becomes a research branch rich in new machines and challenges in the fields of automatic detection science and technology. The machine vision detection technology is a new technology for replacing manual work to detect targets through a computer system, can provide accurate and reliable detection results for an intelligent system, provides decision basis for realizing full-automatic intelligent control, provides auxiliary reference information in a mode of feeding the results back to production management personnel, realizes the whole-process management and control required by intelligent manufacturing, and finally improves the production efficiency of modern enterprises.
The machine vision detection technology is an inseparable non-contact detection method for various intelligent systems in the fields such as manufacturing industry, medical diagnosis, military and the like, by taking a machine vision method as a theoretical basis and comprehensively applying related technologies such as electronics, sensor technology, precision measurement, image processing and the like. The basic principle of the detection technology is to analyze a detected target image obtained by a vision system, compare the obtained analysis result with the prior knowledge in many aspects, and finally judge whether the detected target meets the standard concave. With the gradual increase of the intelligent demand of industrial development, the technology is gradually introduced into industrial detection to realize the measurement of information such as object (product or part) characteristics or positions, has the outstanding advantages of non-contact, high speed, good flexibility and the like, has wide application prospect in the intelligent manufacturing industry, and gradually becomes one of the basic technologies of the intelligent manufacturing industry.
Machine vision technology is widely applied to various fields such as scientific research, medical health, national economy and the like, and has become an integral part of various intelligent systems in specific applications such as industrial manufacturing, medical diagnosis, aerospace and the like. In the aspect of industrial manufacturing, the machine vision technology can realize automatic detection of defects of the printed circuit board, measurement of part sizes and monitoring of a mineral flotation process; in the aspect of medical diagnosis, machine vision technologies are embodied in medical equipment such as CT images, X-ray perspectives and nuclear magnetic resonance, the vision technologies can conveniently detect the internal conditions of a human body, and doctors are assisted to analyze medical images by comprehensively using digital image processing and information fusion technologies, so that the accuracy and efficiency of disease diagnosis are improved; in the aspect of space navigation, the machine vision technology can realize automatic rendezvous and docking of a space ship and a space station and realize safe landing of a space detector on the surface of a moon, a Mars and other stars. In conclusion, the machine vision technology can be applied to almost all occasions requiring human vision, and many things which cannot be completed by the human vision, such as invisible object perception, dangerous scene perception, accurate quantification and the like, the machine vision shows irreplaceable superiority; for the above reasons, it is very necessary to design a WDT 3D vision inspection system
Disclosure of Invention
The invention aims to solve the problems that the image acquisition and image processing effects of the existing system are poor and the visual detection result is influenced, and provides a WDT 3D visual detection system.
In order to achieve the purpose, the invention adopts the following technical scheme:
WDT 3D visual inspection system, including circuit board image capture system and computer image processing system, its characterized in that: the circuit board image shooting system comprises an illumination unit, wherein the illumination unit is linked with a circuit board to be detected, an image acquisition unit and a motion control unit are linked on the circuit board to be detected, and the image acquisition unit and the motion control unit are simultaneously linked with a computer image processing system; the computer image processing system comprises an image acquisition and motion control module and an image processing unit, wherein the image acquisition and motion control module is linked with the image processing unit, the image acquisition and motion control module is linked with the image acquisition unit in a bidirectional mode, and the image acquisition and motion control module is further linked to the motion control unit.
Preferably, the image acquisition unit comprises a CCD industrial camera and a WDT image acquisition card, the model of the CCD industrial camera is FL2G-50S5M, the CCD camera is matched with a 0.3-time high-definition telecentric lens with the model of OPT-5M03-110 during working, the illumination unit comprises an annular light source with the model of OPT-RIA211-RGB and a matched light source controller with the model of OPT-1024E-4, and the motion control unit comprises a two-dimensional servo platform, a motion control card and a mounting bracket matched with the two-dimensional servo platform.
Preferably, when the image acquisition unit works, the CCD industrial camera is arranged on the camera frame and is positioned right above the circuit board to be detected, and the center of the camera view field and the axis of the annular light source are positioned on the same straight line; the light source is fixed on the support frame of the light source frame and is positioned right below the camera lens, and the matched light source controller is responsible for supplying power to the light source; the support is fixed on the two-dimensional servo platform, so that the industrial camera, the lens and the light source can move, and the acquired image is transmitted to the WDT image acquisition card for processing, thereby completing the acquisition of the panoramic image of the circuit board to be detected.
Preferably, the image processing unit is matched with a circuit board image capturing system, and the image processing unit comprises an image processing method, which comprises the following steps:
s1, collecting the image information collected by the image collecting unit through a WDT image collecting card, and transmitting the image information to a computer image processing system;
s2, image processing software in the computer image processing system carries out image preprocessing on the collected image of the circuit board to be detected;
s3, after the image preprocessing is finished, correcting the image, and after the correction is finished, utilizing a defect detection module of a computer image processing system to detect the defect of the image;
s4, if the defect detection of the current batch is finished on the detection site, the computer outputs an instruction to the circuit board image shooting system and closes the detection process;
and S5, if the detection task is not finished, the detection flow is carried out again until the detection is finished.
Preferably, the defect detection module of the circuit board to be detected is an important component of a visual detection system, the positioning of the image of the circuit board to be detected is one of the key steps of the defect detection of the circuit board to be detected, the positioning of the image relates to an edge detection algorithm of the image, and the invention mainly adopts a Roberts operator edge detection algorithm:
the Roberts operator finds the edge of the image according to a local difference operator, the size of the neighborhood is 2 x 2, and the gradient is expressed in the following forms:
Figure BDA0002338526210000041
R1=|a5-a9|+|a6-a8| (2)
R2=,Max(|a5-a9|,|a6-a8|) (3)
its convolution operator is expressed as:
Figure BDA0002338526210000051
(a) representing the Roberts operator X direction, (b) representing the Roberts operator Y direction; firstly, the convolution operator is used for operation, then the formula (1) can obtain a gradient amplitude value R, then a proper threshold value T is selected, if the gradient amplitude value R is larger than the T pixel point and is set to be 1, otherwise, the gradient amplitude value R is set to be 0, and the { R (x, y) } is a binary image, namely an edge image containing image edge information.
Preferably, after the edge detection algorithm of the Roberts operator is used for determining the edge information of the positioning circle of the circuit board to be detected, the positioning circle detection is further required, so that the positioning circle detection algorithm is required to be involved, the traditional Hough transformation algorithm is improved, and the specific content is as follows:
the application of the improved algorithm is premised on the radius range (r) of the circle to be detected in the imagemin,rmax) It is known that the basic idea of the improvement is to replace multiple cycles with a multidimensional array while reducing the dimension of the accumulator, starting from the parametric expression of a circle in the image space, the parametric expression of the circle is as follows:
Figure BDA0002338526210000052
wherein, (a, b) is the centre of a circle, r is the radius of the circle, the symbol theta is the included angle between the connecting line of the point (x, y) and the origin and the x axis, and the formula for mapping the point of the image space to the parameter space is as follows:
Figure BDA0002338526210000061
in order to further improve the detection speed, the image to be detected is preprocessed before Hough transformation. The specific pretreatment process is as follows:
a1, graying an RGB image, wherein the circuit board image to be detected acquired by the image acquisition system is an RGB color image, so before Hough transformation is carried out, the circuit board image to be detected is grayed;
a2, median filtering, smoothing the noise in the image, suppressing salt and pepper noise, reducing the calculation amount of subsequent Hough transformation, and protecting the edge information of the positioning circle;
a3, selecting a positioning circle area, wherein the positioning hole information of the circuit board to be detected is determined at the beginning of the design of the printed circuit board and comprises the radius of the positioning circle and the relative position information on the circuit board to be detected, so that the selection of the positioning circle area is necessary in order to greatly reduce the unnecessary calculation amount, reduce the occupation amount of system resources and improve the detection efficiency;
a4, locating circle edge extraction, which is a key link in the preprocessing process, extracting the edge information of a circle in an image through locating circle edge extraction, and converting the image into a binary image with the edge information after edge extraction.
Preferably, after the image is preprocessed, edge information with prominent features is extracted from the original image, and the preprocessed image is subjected to Hough transformation. The specific implementation process is as follows:
b1, searching and counting pixel points with the pixel value of 1, namely extracting pixel points containing edge information, discarding useless pixel points, reducing the calculation times and improving the calculation rate;
b2, setting initial values for the variables and the Hough array, distributing storage space for the variables and the Hough array, and determining the value range (r) of the radius r according to the actual condition of the positioning circle of the circuit board to be detectedmin,rmax) Under the condition of not influencing the detection effect, the range is as small as possible, and the detection method can be used to a certain extentThe detection efficiency is improved; selecting a proper step length according to theta, and taking a larger step length as much as possible under the condition of not influencing the detection effect;
b3, calculating the values of (a, B) according to the circular parameter formula, and recording a statistical effective value for determining the index value of the Hough array, wherein the effective values of a and B are non-negative integers;
b4, constructing a Hough array according to the Hough index value, and particularly realizing the Hough array through statistics by an accumulator, wherein the number of the array layers is rmax-rmin
B5, obtaining the radius of the positioning circle, and finding out a layer with the largest accumulated value from the Hough array, namely the circle with the largest pixel points in the image space corresponding to the parameter space, wherein the radius corresponding to the array of the layer obtains the radius r of the circle;
b6, calculating the center of the positioning circle, wherein the average value of all (a, B) in the layer with the maximum value is the center of the calculated circle.
Compared with the prior art, the invention provides a WDT 3D visual detection system, which has the following beneficial effects:
(1) in the hardware level, an annular light source with the model of OPT-RIA211-RGB is used as an illumination unit, whether the imaging of a detection system is clear or not is greatly related to the illumination unit, the OPT-RIA211-RGB three-color annular light source adopted by the invention well meets the illumination requirement of the work of a CCD industrial camera, the OPT-RIA211-RGB annular light source belongs to an LED array light source, light emitting diodes are densely arranged on the inner wall of the annular light source and are divided into a red area, a green area and a blue area, and the on and off of LEDs in any area can be controlled by a light source controller; the distance from the lens to the workpiece can be adjusted by moving the CCD lens up and down, and the working distance of the high-definition telecentric lens in the system is fixed, namely, the image shooting is clear and visible only within a certain distance range; meanwhile, the CCD industrial camera is matched with a high-definition telecentric lens with the model number of 0PT-5M03-110 for use; the high-definition telecentric lens is a key component in a high-precision and precise detection system, has the characteristics of ultra-large depth of field, high resolution, extremely low distortion and the like, can be well matched with a CCD industrial camera used in the invention by the high-definition telecentric lens with the model number of 0PT-5M03-110, and can better ensure the definition of a detection result of the visual detection system on a hardware level by utilizing the design.
(2) The invention relates to an image positioning in a computer graphic processing system, which relates to an image edge detection algorithm, mainly adopts a Roberts operator edge detection algorithm, the edge detection algorithms are various, the Roberts edge detection has the best effect on detecting the edge of a positioning circle of a circuit board to be detected, although the detection method is sensitive to noise and can not detect the edges of other parts around the positioning circle like an LOG operator and a Cany operator, the detection result is better than other operators due to the characteristic that the information required to be obtained is the edge of the circle instead of the part outside the circle, in addition, the original image of the PCB positioning circle acquired by an image acquisition system is more complete, the edge characteristic is obviously prominent, and the simplest detection algorithm is usually the best choice.
(3) When the positioning circle is detected, the traditional Hough transformation algorithm is improved, and compared with the classical Hough transformation, the improved algorithm firstly carries out image preprocessing through image graying and median filtering; then, selecting a positioning circle area, and further reducing the range of the image to be detected; then, edge extraction processing is carried out, so that the number of useless pixel points in the image is reduced, the detection time is shortened, and the detection efficiency is improved; after image preprocessing, useful pixel points are mapped to a parameter space, and the number of layers is rmax-rminThe two-dimensional Hough array is used for counting the number of points with the same circle center and radius, and the classical Hough transformation adopts a three-dimensional structure, so that the complexity of operation is increased; and the improved algorithm adopts a Hough array to replace multiple cycles, so that the cyclic operation in the extreme value counting process is reduced, and the detection efficiency of the algorithm is improved.
Drawings
FIG. 1 is a system flow diagram of a WDT 3D vision inspection system in accordance with the present invention;
FIG. 2 is a block diagram of a system architecture of a WDT 3D vision inspection system in accordance with the present invention;
fig. 3 is a flow chart of improved Hough transform circle detection of the WDT 3D vision detection system according to 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 only a part of the embodiments of the present invention, and not all of the embodiments.
In the description of the present invention, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention.
Example 1:
referring to fig. 1-2, the WDT 3D vision inspection system includes a circuit board image capturing system and a computer image processing system, wherein the circuit board image capturing system includes an illumination unit, the illumination unit is linked to a circuit board to be inspected, an image acquisition unit and a motion control unit are linked to the circuit board to be inspected, and the image acquisition unit and the motion control unit are linked to the computer image processing system at the same time; the computer image processing system comprises an image acquisition and motion control module and an image processing unit, wherein the image acquisition and motion control module is linked with the image processing unit, the image acquisition and motion control module is linked with the image acquisition unit in a bidirectional mode, and the image acquisition and motion control module is further linked to the motion control unit.
The image acquisition unit comprises a CCD industrial camera and a WDT image acquisition card, the model of the CCD industrial camera is FL2G-50S5M, the CCD camera is matched with a 0.3-time high-definition telecentric lens with the model of OPT-5M03-110 during working for use, the illumination unit is an annular light source with the model of OPT-RIA211-RGB and a matched light source controller with the model of OPT-1024E-4, and the motion control unit is a two-dimensional servo platform, a motion control card and a matched mounting bracket.
When the image acquisition unit works, the CCD industrial camera is arranged on the camera frame and is positioned right above the circuit board to be detected, and the center of the camera view field and the axis of the annular light source are positioned on the same straight line; the light source is fixed on the support frame of the light source frame and is positioned right below the camera lens, and the matched light source controller is responsible for supplying power to the light source; the support is fixed on the two-dimensional servo platform, so that the industrial camera, the lens and the light source can move, and the acquired image is transmitted to the WDT image acquisition card for processing, thereby completing the acquisition of the panoramic image of the circuit board to be detected.
In the hardware level, an annular light source with the model of OPT-RIA211-RGB is used as an illumination unit, whether the imaging of a detection system is clear or not is greatly related to the illumination unit, the OPT-RIA211-RGB three-color annular light source adopted by the invention well meets the illumination requirement of the work of a CCD industrial camera, the OPT-RIA211-RGB annular light source belongs to an LED array light source, light emitting diodes are densely arranged on the inner wall of the annular light source and are divided into a red area, a green area and a blue area, and the on and off of LEDs in any area can be controlled by a light source controller; the distance from the lens to the workpiece can be adjusted by moving the CCD lens up and down, and the working distance of the high-definition telecentric lens in the system is fixed, namely, the image shooting is clear and visible only within a certain distance range; meanwhile, the CCD industrial camera is matched with a high-definition telecentric lens with the model number of 0PT-5M03-110 for use; the high-definition telecentric lens is a key component in a high-precision and precise detection system, has the characteristics of ultra-large depth of field, high resolution, extremely low distortion and the like, can be well matched with a CCD industrial camera used in the invention by the high-definition telecentric lens with the model number of 0PT-5M03-110, and can better ensure the definition of a detection result of the visual detection system on a hardware level by utilizing the design.
Example 2:
referring to fig. 2, the embodiment 1 is different from the above embodiments;
the image processing unit is matched with the circuit board image shooting system, the image processing unit comprises an image processing method, and the image processing method comprises the following steps:
s1, collecting the image information collected by the image collecting unit through a WDT image collecting card, and transmitting the image information to a computer image processing system;
s2, image processing software in the computer image processing system carries out image preprocessing on the collected image of the circuit board to be detected;
s3, after the image preprocessing is finished, correcting the image, and after the correction is finished, utilizing a defect detection module of a computer image processing system to detect the defect of the image;
s4, if the defect detection of the current batch is finished on the detection site, the computer outputs an instruction to the circuit board image shooting system and closes the detection process;
and S5, if the detection task is not finished, the detection flow is carried out again until the detection is finished.
The defect detection module of the circuit board to be detected is an important component of a visual detection system, the positioning of the image of the circuit board to be detected is one of the key steps of the defect detection of the circuit board to be detected, the positioning of the image relates to an edge detection algorithm of the image, and the invention mainly adopts a Roberts operator edge detection algorithm:
the Roberts operator finds the edge of the image according to a local difference operator, the size of the neighborhood is 2 x 2, and the gradient is expressed in the following forms:
Figure BDA0002338526210000121
R1=|a5-a9|+|a6-a8| (2)
R2=,Max(|a5-a9|,|a6-a8|) (3)
its convolution operator is expressed as:
Figure BDA0002338526210000122
(a) representing the Roberts operator X direction, (b) representing the Roberts operator Y direction; firstly, the convolution operator is used for operation, then the formula (1) can obtain a gradient amplitude value R, then a proper threshold value T is selected, if the gradient amplitude value R is larger than the T pixel point and is set to be 1, otherwise, the gradient amplitude value R is set to be 0, and the { R (x, y) } is a binary image, namely an edge image containing image edge information. The invention relates to an image positioning in a computer graphic processing system, which relates to an image edge detection algorithm, mainly adopts a Roberts operator edge detection algorithm, the edge detection algorithms are various, the Roberts edge detection has the best effect on detecting the edge of a positioning circle of a circuit board to be detected, although the detection method is sensitive to noise and can not detect the edges of other parts around the positioning circle like an LOG operator and a Cany operator, the detection result is better than other operators due to the characteristic that the information required to be obtained is the edge of the circle instead of the part outside the circle, in addition, the original image of the PCB positioning circle acquired by an image acquisition system is more complete, the edge characteristic is obviously prominent, and the simplest detection algorithm is usually the best choice.
Example 3:
referring to fig. 3, the embodiment 1 or 2 is different from the above embodiments;
after the edge detection algorithm of the Roberts operator is used for determining the edge information of the positioning circle of the circuit board to be detected, the positioning circle detection is further required, so that the positioning circle detection algorithm is required to be involved, the traditional Hough transformation algorithm is improved, and the specific content is as follows:
the application of the improved algorithm is premised on the radius range (r) of the circle to be detected in the imagemin,rmax) It is known that the basic idea of the improvement is to replace multiple cycles with a multidimensional array while reducing the dimension of the accumulator, starting from the parametric expression of a circle in the image space, the parametric expression of the circle is as follows:
Figure BDA0002338526210000131
wherein, (a, b) is the centre of a circle, r is the radius of the circle, the symbol theta is the included angle between the connecting line of the point (x, y) and the origin and the x axis, and the formula for mapping the point of the image space to the parameter space is as follows:
Figure BDA0002338526210000132
in order to further improve the detection speed, the image to be detected is preprocessed before Hough transformation. The specific pretreatment process is as follows:
a1, graying an RGB image, wherein the circuit board image to be detected acquired by the image acquisition system is an RGB color image, so before Hough transformation is carried out, the circuit board image to be detected is grayed;
a2, median filtering, smoothing the noise in the image, suppressing salt and pepper noise, reducing the calculation amount of subsequent Hough transformation, and protecting the edge information of the positioning circle;
a3, selecting a positioning circle area, wherein the positioning hole information of the circuit board to be detected is determined at the beginning of the design of the printed circuit board and comprises the radius of the positioning circle and the relative position information on the circuit board to be detected, so that the selection of the positioning circle area is necessary in order to greatly reduce the unnecessary calculation amount, reduce the occupation amount of system resources and improve the detection efficiency;
a4, locating circle edge extraction, which is a key link in the preprocessing process, extracting the edge information of a circle in an image through locating circle edge extraction, and converting the image into a binary image with the edge information after edge extraction.
After image preprocessing, edge information with prominent features is extracted from an original image, and Hough transformation is carried out on the preprocessed image. The specific implementation process is as follows:
b1, searching and counting pixel points with the pixel value of 1, namely extracting pixel points containing edge information, discarding useless pixel points, reducing the calculation times and improving the calculation rate;
b2 setting initial values for variable and Hough array, and allocating storage space for variable and Hough array according toDetermining the value range of the radius r (r) according to the actual condition of the positioning circle of the circuit board to be detectedmin,rmax) Under the condition of not influencing the detection effect, a smaller range is selected as much as possible, so that the detection efficiency can be improved to a certain extent; selecting a proper step length according to theta, and taking a larger step length as much as possible under the condition of not influencing the detection effect;
b3, calculating the values of (a, B) according to the circular parameter formula, and recording a statistical effective value for determining the index value of the Hough array, wherein the effective values of a and B are non-negative integers;
b4, constructing a Hough array according to the Hough index value, and particularly realizing the Hough array through statistics by an accumulator, wherein the number of the array layers is rmax-rmin
B5, obtaining the radius of the positioning circle, and finding out a layer with the largest accumulated value from the Hough array, namely the circle with the largest pixel points in the image space corresponding to the parameter space, wherein the radius corresponding to the array of the layer obtains the radius r of the circle;
b6, calculating the center of the positioning circle, wherein the average value of all (a, B) in the layer with the maximum value is the center of the calculated circle.
When the positioning circle is detected, the traditional Hough transformation algorithm is improved, and compared with the classical Hough transformation, the improved algorithm firstly carries out image preprocessing through image graying and median filtering; then, selecting a positioning circle area, and further reducing the range of the image to be detected; then, edge extraction processing is carried out, so that the number of useless pixel points in the image is reduced, the detection time is shortened, and the detection efficiency is improved; after image preprocessing, useful pixel points are mapped to a parameter space, and the number of layers is rmax-rminThe two-dimensional Hough array is used for counting the number of points with the same circle center and radius, and the classical Hough transformation adopts a three-dimensional structure, so that the complexity of operation is increased; and the improved algorithm adopts a Hough array to replace multiple cycles, so that the cyclic operation in the extreme value counting process is reduced, and the detection efficiency of the algorithm is improved.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

Claims (7)

  1. The WDT 3D visual detection system comprises a circuit board image shooting system and a computer image processing system, and is characterized in that: the circuit board image shooting system comprises an illumination unit, wherein the illumination unit is linked with a circuit board to be detected, an image acquisition unit and a motion control unit are linked on the circuit board to be detected, and the image acquisition unit and the motion control unit are simultaneously linked with a computer image processing system; the computer image processing system comprises an image acquisition and motion control module and an image processing unit, wherein the image acquisition and motion control module is linked with the image processing unit, the image acquisition and motion control module is linked with the image acquisition unit in a bidirectional mode, and the image acquisition and motion control module is further linked to the motion control unit.
  2. 2. The WDT 3D visual inspection system of claim 1, wherein: the image acquisition unit comprises a CCD industrial camera and a WDT image acquisition card, the model of the CCD industrial camera is FL2G-50S5M, the CCD camera is matched with a 0.3-time high-definition telecentric lens with the model of OPT-5M03-110 during working for use, the illumination unit is an annular light source with the model of OPT-RIA211-RGB and a matched light source controller with the model of OPT-1024E-4, and the motion control unit is a two-dimensional servo platform, a motion control card and a matched mounting bracket.
  3. 3. The WDT 3D visual inspection system of claim 2, wherein: when the image acquisition unit works, the CCD industrial camera is arranged on the camera frame and is positioned right above the circuit board to be detected, and the center of the camera view field and the axis of the annular light source are positioned on the same straight line; the light source is fixed on the support frame of the light source frame and is positioned right below the camera lens, and the matched light source controller is responsible for supplying power to the light source; the support is fixed on the two-dimensional servo platform, so that the industrial camera, the lens and the light source can move, and the acquired image is transmitted to the WDT image acquisition card for processing, thereby completing the acquisition of the panoramic image of the circuit board to be detected.
  4. 4. The WDT 3D visual inspection system of claim 1, wherein: the image processing unit is matched with the circuit board image shooting system, the image processing unit comprises an image processing method, and the image processing method comprises the following steps:
    s1, collecting the image information collected by the image collecting unit through a WDT image collecting card, and transmitting the image information to a computer image processing system;
    s2, image processing software in the computer image processing system carries out image preprocessing on the collected image of the circuit board to be detected;
    s3, after the image preprocessing is finished, correcting the image, and after the correction is finished, utilizing a defect detection module of a computer image processing system to detect the defect of the image;
    s4, if the defect detection of the current batch is finished on the detection site, the computer outputs an instruction to the circuit board image shooting system and closes the detection process;
    and S5, if the detection task is not finished, the detection flow is carried out again until the detection is finished.
  5. 5. The WDT 3D visual inspection system of claim 4, wherein: the defect detection module of the circuit board to be detected is an important component of a visual detection system, the positioning of the image of the circuit board to be detected is one of the key steps of the defect detection of the circuit board to be detected, the positioning of the image relates to an edge detection algorithm of the image, and the invention mainly adopts a Roberts operator edge detection algorithm:
    the Roberts operator finds the edge of the image according to a local difference operator, the size of the neighborhood is 2 x 2, and the gradient is expressed in the following forms:
    Figure FDA0002338526200000021
    R1=|a5-a9|+|a6-a8| (2)
    R2=,Max(|a5-a9|,|a6-a8|) (3)
    its convolution operator is expressed as:
    Figure FDA0002338526200000031
    (a) representing the Roberts operator X direction, (b) representing the Roberts operator Y direction; firstly, the convolution operator is used for operation, then the formula (1) can obtain a gradient amplitude value R, then a proper threshold value T is selected, if the gradient amplitude value R is larger than the T pixel point and is set to be 1, otherwise, the gradient amplitude value R is set to be 0, and the { R (x, y) } is a binary image, namely an edge image containing image edge information.
  6. 6. The WDT 3D visual inspection system of claim 5, wherein: after the edge detection algorithm of the Roberts operator is used for determining the edge information of the positioning circle of the circuit board to be detected, the positioning circle detection is further required, so that the positioning circle detection algorithm is required to be involved, the traditional Hough transformation algorithm is improved, and the specific content is as follows:
    the application of the improved algorithm is premised on the radius range (r) of the circle to be detected in the imagemin,rmax) It is known that the basic idea of the improvement is to replace multiple cycles with a multidimensional array while reducing the dimension of the accumulator, starting from the parametric expression of a circle in the image space, the parametric expression of the circle is as follows:
    Figure FDA0002338526200000032
    wherein, (a, b) is the centre of a circle, r is the radius of the circle, the symbol theta is the included angle between the connecting line of the point (x, y) and the origin and the x axis, and the formula for mapping the point of the image space to the parameter space is as follows:
    Figure FDA0002338526200000041
    in order to further improve the detection speed, the image to be detected is preprocessed before Hough transformation. The specific pretreatment process is as follows:
    a1, graying an RGB image, wherein the circuit board image to be detected acquired by the image acquisition system is an RGB color image, so before Hough transformation is carried out, the circuit board image to be detected is grayed;
    a2, median filtering, smoothing the noise in the image, suppressing salt and pepper noise, reducing the calculation amount of subsequent Hough transformation, and protecting the edge information of the positioning circle;
    a3, selecting a positioning circle area, wherein the positioning hole information of the circuit board to be detected is determined at the beginning of the design of the printed circuit board and comprises the radius of the positioning circle and the relative position information on the circuit board to be detected, so that the selection of the positioning circle area is necessary in order to greatly reduce the unnecessary calculation amount, reduce the occupation amount of system resources and improve the detection efficiency;
    a4, locating circle edge extraction, which is a key link in the preprocessing process, extracting the edge information of a circle in an image through locating circle edge extraction, and converting the image into a binary image with the edge information after edge extraction.
  7. 7. The WDT 3D visual inspection system of claim 6, wherein: after image preprocessing, edge information with prominent features is extracted from an original image, and Hough transformation is carried out on the preprocessed image. The specific implementation process is as follows:
    b1, searching and counting pixel points with the pixel value of 1, namely extracting pixel points containing edge information, discarding useless pixel points, reducing the calculation times and improving the calculation rate;
    b2, setting initial values for the variables and the Hough array, distributing storage space for the variables and the Hough array, and determining the value range (r) of the radius r according to the actual condition of the positioning circle of the circuit board to be detectedmin,rmax) Under the condition of not influencing the detection effect, a smaller range is selected as much as possible, so that the detection efficiency can be improved to a certain extent; selecting a proper step length according to theta, and taking a larger step length as much as possible under the condition of not influencing the detection effect;
    b3, calculating the values of (a, B) according to the circular parameter formula, and recording a statistical effective value for determining the index value of the Hough array, wherein the effective values of a and B are non-negative integers;
    b4, constructing a Hough array according to the Hough index value, and particularly realizing the Hough array through statistics by an accumulator, wherein the number of the array layers is rmax-rmin
    B5, obtaining the radius of the positioning circle, and finding out a layer with the largest accumulated value from the Hough array, namely the circle with the largest pixel points in the image space corresponding to the parameter space, wherein the radius corresponding to the array of the layer obtains the radius r of the circle;
    b6, calculating the center of the positioning circle, wherein the average value of all (a, B) in the layer with the maximum value is the center of the calculated circle.
CN201911366371.0A 2019-12-26 2019-12-26 WDT 3D vision detection system Withdrawn CN110954555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911366371.0A CN110954555A (en) 2019-12-26 2019-12-26 WDT 3D vision detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911366371.0A CN110954555A (en) 2019-12-26 2019-12-26 WDT 3D vision detection system

Publications (1)

Publication Number Publication Date
CN110954555A true CN110954555A (en) 2020-04-03

Family

ID=69984396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911366371.0A Withdrawn CN110954555A (en) 2019-12-26 2019-12-26 WDT 3D vision detection system

Country Status (1)

Country Link
CN (1) CN110954555A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111716017A (en) * 2020-06-16 2020-09-29 罗建华 Visual detection device and laser processing system
CN113610205A (en) * 2021-07-15 2021-11-05 深圳宇晰科技有限公司 Two-dimensional code generation method and device based on machine vision and storage medium
CN113763822A (en) * 2021-10-18 2021-12-07 合肥鑫晟光电科技有限公司 Bonding alignment compensation method and device
CN116698753A (en) * 2023-07-25 2023-09-05 广州纳动半导体设备有限公司 Mini-LED panel defect detection equipment and method based on machine vision

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104808173A (en) * 2015-05-14 2015-07-29 中国人民解放军海军航空工程学院 Hough transformation-based false point elimination method for direction-finding cross location system
CN208206822U (en) * 2018-04-10 2018-12-07 深圳市嘉立创科技发展有限公司 Pcb board defect automatic checkout system based on machine vision
CN109584215A (en) * 2018-11-10 2019-04-05 东莞理工学院 A kind of online vision detection system of circuit board

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104808173A (en) * 2015-05-14 2015-07-29 中国人民解放军海军航空工程学院 Hough transformation-based false point elimination method for direction-finding cross location system
CN208206822U (en) * 2018-04-10 2018-12-07 深圳市嘉立创科技发展有限公司 Pcb board defect automatic checkout system based on machine vision
CN109584215A (en) * 2018-11-10 2019-04-05 东莞理工学院 A kind of online vision detection system of circuit board

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111716017A (en) * 2020-06-16 2020-09-29 罗建华 Visual detection device and laser processing system
CN113610205A (en) * 2021-07-15 2021-11-05 深圳宇晰科技有限公司 Two-dimensional code generation method and device based on machine vision and storage medium
CN113763822A (en) * 2021-10-18 2021-12-07 合肥鑫晟光电科技有限公司 Bonding alignment compensation method and device
CN116698753A (en) * 2023-07-25 2023-09-05 广州纳动半导体设备有限公司 Mini-LED panel defect detection equipment and method based on machine vision
CN116698753B (en) * 2023-07-25 2024-03-26 广州纳动半导体设备有限公司 Mini-LED panel defect detection equipment and method based on machine vision

Similar Documents

Publication Publication Date Title
CN110954555A (en) WDT 3D vision detection system
CN104331876B (en) Method for detecting straight line and processing image and related device
CN102704215B (en) Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision
WO2021248270A1 (en) Heterogeneous image registration method and system
CN106127145B (en) Pupil diameter and tracking
CN110400315A (en) A kind of defect inspection method, apparatus and system
CN110189375B (en) Image target identification method based on monocular vision measurement
CN111721259A (en) Underwater robot recovery positioning method based on binocular vision
CN105913013A (en) Binocular vision face recognition algorithm
CN108830906A (en) A kind of camera parameters automatic calibration method based on virtual Binocular Vision Principle
CN106897995A (en) A kind of parts automatic identifying method towards Automatic manual transmission process
CN113689401A (en) Method and device for detecting diameter of crystal bar of czochralski silicon single crystal furnace
CN110648362A (en) Binocular stereo vision badminton positioning identification and posture calculation method
CN108109154A (en) A kind of new positioning of workpiece and data capture method
CN109387524A (en) Thread defect detection method and device based on linearly polarized photon
CN113822810A (en) Method for positioning workpiece in three-dimensional space based on machine vision
CN111399634B (en) Method and device for recognizing gesture-guided object
CN115760893A (en) Single droplet particle size and speed measuring method based on nuclear correlation filtering algorithm
CN111435429B (en) Gesture recognition method and system based on binocular stereo data dynamic cognition
CN110097540A (en) The visible detection method and device of polygon workpeace
CN109443319A (en) Barrier range-measurement system and its distance measuring method based on monocular vision
CN111145254B (en) Door valve blank positioning method based on binocular vision
CN108180825B (en) A kind of identification of cuboid object dimensional and localization method based on line-structured light
CN117611525A (en) Visual detection method and system for abrasion of pantograph slide plate
CN107767366A (en) A kind of transmission line of electricity approximating method and device

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200403