WO2024027058A1 - 工件通孔位置校准方法及检测装置 - Google Patents

工件通孔位置校准方法及检测装置 Download PDF

Info

Publication number
WO2024027058A1
WO2024027058A1 PCT/CN2022/135933 CN2022135933W WO2024027058A1 WO 2024027058 A1 WO2024027058 A1 WO 2024027058A1 CN 2022135933 W CN2022135933 W CN 2022135933W WO 2024027058 A1 WO2024027058 A1 WO 2024027058A1
Authority
WO
WIPO (PCT)
Prior art keywords
workpiece
image
point
dot matrix
straight line
Prior art date
Application number
PCT/CN2022/135933
Other languages
English (en)
French (fr)
Inventor
任将
熊星
丁晓帅
Original Assignee
苏州华兴源创科技股份有限公司
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 苏州华兴源创科技股份有限公司 filed Critical 苏州华兴源创科技股份有限公司
Publication of WO2024027058A1 publication Critical patent/WO2024027058A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Definitions

  • the present invention relates to the field of visual inspection technology, and specifically to a method for calibrating the position of a workpiece through hole and a detection device.
  • the object of the present invention is to provide a workpiece through hole position calibration method and a detection device.
  • the invention provides a method for calibrating the position of a workpiece through hole, which includes the steps:
  • the workpiece image includes a through hole array on the workpiece surface.
  • the workpiece image is processed to convert the through hole array into a point array, and the calculation is obtained.
  • the coordinate information of each point is used to obtain the lattice image of the workpiece;
  • a horizontal line point set in the workpiece dot matrix image is fitted to obtain a transverse straight line
  • a vertical line point set in the workpiece dot matrix image is fitted to obtain a longitudinal straight line
  • the relationship between the transverse straight line and the longitudinal straight line is obtained. intersection;
  • the standard dot matrix image includes preset coordinate position information of corresponding points of each through hole, and calculate and obtain the coordinate offset between the intersection point and the corresponding position point in the standard dot matrix image;
  • the coordinates of each point in the workpiece dot matrix image are corrected based on the coordinate offset, and compared with the standard dot matrix image points to check for defective points.
  • a transverse straight line is obtained by fitting a horizontal row point set in the workpiece dot matrix image
  • a longitudinal straight line is obtained by fitting a vertical column point set in the workpiece dot matrix image
  • the transverse straight line is obtained by fitting the horizontal line point set located in the first row above in the detection area, and the longitudinal straight line is obtained by fitting the vertical line point set located in the first column on the left in the detection area;
  • the transverse straight line is obtained by fitting the horizontal line point set located in the first row above in the detection area, and the column point set located in the first column on the left in the detection area Perform fitting to obtain the longitudinal straight line, which specifically includes:
  • Mask processing is performed on the points in the detection area of the workpiece dot matrix image through the horizontal mask image and the longitudinal mask image respectively, and the point sets located in the horizontal mask image and the point sets located in the longitudinal mask are respectively selected.
  • the point set within the membrane image is used to obtain the transverse point map and the longitudinal point map;
  • the transverse straight line and the longitudinal straight line are obtained by fitting point sets in the transverse point diagram and the longitudinal point diagram respectively.
  • the transverse mask image covering the first row of horizontal row point sets in the workpiece dot matrix image detection area is generated, and the transverse mask image covering the left first column in the workpiece dot matrix image detection area is generated.
  • the vertical mask image of the column point set specifically including:
  • Points in the detection area of the workpiece dot matrix image are expanded by a first number of pixel points in each transverse direction and a second number of pixel points in each longitudinal direction to obtain a transversely expanded image, which includes a plurality of rectangles with long edges extending laterally, wherein the first The number of pixels is greater than half of the pixel distance between two horizontally adjacent points, and the second number of pixels is less than half of the pixel distance between two vertically adjacent points;
  • Points in the detection area are expanded longitudinally by a third number of pixels and transversely by a fourth number of pixels to obtain a longitudinally expanded image, which includes a plurality of rectangles with long edges extending longitudinally, wherein the third number of pixels is greater than the length of the adjacent longitudinally extending image.
  • Half of the pixel distance between two points, the fourth pixel number is less than half of the pixel distance between two laterally adjacent points;
  • the transverse straight line is obtained by fitting the horizontal line point set located in the first row above in the detection area, and the column point set located in the first column on the left in the detection area Performing fitting to obtain the longitudinal straight line also includes:
  • the point set is fitted by the least squares method to obtain the longitudinal straight line.
  • the calculation obtains the coordinate offset between the intersection point and the corresponding position point in the standard dot matrix image, specifically including:
  • the coordinate offset between the standard point coordinates and the intersection point coordinates is calculated.
  • the calculation obtains the coordinate information of each point, specifically including:
  • calibrating the point coordinates of the workpiece dot matrix image based on the deflection angle to obtain the workpiece dot matrix image specifically includes:
  • the coordinate information of each point is obtained by calculation, and the point coordinates of the workpiece dot matrix image are calibrated based on the deflection angle to obtain the workpiece dot matrix image.
  • the calibration is calculated through the calibration formula
  • the calibration formula is:
  • ⁇ b is the angle between the line connecting the point (x 0 , y 0 ) and the point (x 1 , y 1 ) and the X-axis.
  • the detection acquires the deflection angle between the camera and the stage, specifically including:
  • the second calibration image respectively includes a plurality of mark symbols located at both ends of the calibration plate
  • the deflection angle between the camera and the stage is obtained by calculating the difference between the first deflection angle and the second deflection angle, and the deflection angle between the camera and the stage is obtained.
  • the invention also provides a detection device, including:
  • the motion control module is configured to control the relative translational movement of the camera and the stage;
  • the camera is configured to photograph the workpiece placed on the stage to obtain a workpiece image.
  • the workpiece image includes a through hole array on the workpiece surface.
  • the workpiece image is processed to convert the through hole array into a point array, and each point is calculated and obtained. coordinate information to obtain the workpiece lattice image;
  • the image processing module is configured to fit a horizontal line point set in the workpiece dot matrix image to obtain a transverse straight line, fit a vertical column point set in the workpiece dot matrix image to obtain a longitudinal straight line, and obtain The intersection point of the horizontal straight line and the vertical straight line; and obtain a preset standard dot matrix image, the standard dot matrix image includes the preset coordinate position information of the corresponding point of each through hole, calculate and obtain the intersection point and the standard dot matrix The coordinate offset of the corresponding position point in the image is used to correct the coordinates of each point in the workpiece dot matrix image lattice based on the coordinate offset;
  • the defective point inspection module is configured to compare the dot matrix image of the workpiece with the standard dot matrix image points to inspect defective points.
  • the present invention obtains transverse straight lines and longitudinal straight lines by fitting a horizontal row point set and a vertical column point set in the workpiece dot matrix image, and uses their intersection points as a judgment for comparison with subsequent standard dot matrix images. point, eliminating possible process errors at a single point, and improving the accuracy and precision of point position error judgment.
  • the deflection angle between the camera lens and the stage is also calculated first, and the dot matrix image of the workpiece is corrected based on the deflection angle, which can further improve the accuracy of the judgment.
  • Figure 1 is a schematic diagram of a detection device in an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for calibrating the position of a workpiece through hole in an embodiment of the present invention.
  • FIG. 3 is an image of a workpiece captured in an embodiment of the present invention.
  • Figure 4 is an enlarged image of the upper left corner area of Figure 3.
  • Figure 5 is a dot matrix image of the workpiece in one embodiment of the present invention.
  • FIG. 6 is a schematic flowchart showing specific steps Sa of the workpiece through hole position calibration method in one embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of step Sa1 of the workpiece through hole position calibration method in one embodiment of the present invention.
  • FIG. 8 is a schematic flowchart showing the specific flow of step S2 of the workpiece through hole position calibration method in an embodiment of the present invention.
  • FIG. 9 is a schematic flowchart showing the specific flow of step S22 of the workpiece through hole position calibration method in an embodiment of the present invention.
  • FIG. 10 is a schematic flowchart of step S221 of the workpiece through hole position calibration method in an embodiment of the present invention.
  • Figure 11 is a lateral expansion image in one embodiment of the present invention.
  • Fig. 12 is a longitudinally expanded image in one embodiment of the present invention.
  • Figure 13 is a lateral mask image in one embodiment of the present invention.
  • FIG. 14 is a vertical mask image in one embodiment of the present invention.
  • Fig. 15 is a lateral point diagram in one embodiment of the present invention.
  • Fig. 16 is a longitudinal point diagram in one embodiment of the present invention.
  • Figure 17 is a horizontal straight line and a longitudinal straight line obtained by fitting in an embodiment of the present invention.
  • this article uses terms indicating relative positions in space, such as “upper”, “lower”, “back”, “front”, etc., to describe one unit or feature shown in the drawings relative to another.
  • Spatially relative terms may refer to different orientations of the device in use or operation in addition to the orientation illustrated in the figures. For example, if the device in the diagram is turned over, elements described as “below” or “above” other elements or features would then be oriented “below” or “above” the other elements or features.
  • the exemplary term “below” may encompass both spatial orientations, below and above.
  • This embodiment provides a method for calibrating the position of through holes in a workpiece, such as a circuit board, with micron-sized through holes.
  • the method compares the position coordinates of small-diameter through holes in the workpiece with the standard position coordinates, thereby completing detection and calibration.
  • the method is explained in conjunction with a specific detection device 1 and a circuit board as the workpiece to be detected.
  • the detection device 1 includes a camera 11 and a stage 12.
  • the camera 11 includes an area array camera 111 and a line scan camera 112.
  • the two cameras share a camera lens 113 with a field of view of 1.68mm ⁇ 1.41mm.
  • the stage 12 The size is larger than 400mm ⁇ 400mm, and the stage 12 can move along the X and Y axis directions of the plane, so that the workpiece placed on it can be photographed under the camera lens 113 .
  • the outer contour of the circuit board being tested is a rectangle with a length of 800mm and a width of 600mm.
  • the effective detection area on the surface is a rectangle with a length of 680mm and a width of 420mm. There are a total of 24 rectangular punching areas in the effective detection area, each of which is rectangular. There are 16,129 vias in the punched area, for a total of 387,096 vias.
  • the workpiece through hole position calibration method includes the following steps:
  • the workpiece image includes a through-hole array on the surface of the workpiece, process the workpiece image, convert the through-hole array into a point array, and calculate Obtain the coordinate information of each point and obtain the workpiece lattice image.
  • the standard lattice image includes the preset coordinate position information of the corresponding point of each through hole, and obtain the coordinate offset between the intersection point and the corresponding position point in the standard lattice image.
  • step S1 the workpiece image is processed to convert the through hole array into a point array, specifically including:
  • FIG 3 it is a workpiece image captured by the line scan camera 112.
  • the upper left corner area of the workpiece image is selected as the detection area and is enlarged.
  • the The detection area of the workpiece image is subjected to grayscale processing and thresholding processing to obtain a dot matrix image of the workpiece.
  • the calibration image is preprocessed to facilitate subsequent dot matrix image recognition and detection.
  • the specific preprocessing algorithm involved can refer to the existing algorithm and will not be described again here.
  • step S1 the coordinate information of each point in the workpiece lattice image is calculated and obtained, specifically including:
  • step S1 the coordinate positioning of each point in the dot matrix image of the workpiece can be completed, that is, the coordinate positioning of each through hole in the workpiece image can be completed.
  • step Sa is also included, which specifically includes:
  • Sa2 Perform grayscale processing and thresholding processing on the workpiece image detection area to convert the through-hole array into a point array, calculate and obtain the coordinate information of each point, and calibrate the point coordinates of the workpiece dot matrix image based on the deflection angle to obtain Dot matrix image of the workpiece.
  • step Sa is used to calibrate the coordinates of each point of the workpiece image based on the angle between the camera lens 113 and the stage 12 .
  • Step Sa1 specifically includes:
  • Sa11 Control the relative translational movement of the camera 11 and the stage 12 along the X-axis, respectively acquire images of the opposite ends of the calibration plate placed on the stage 12, and obtain the first calibration image and the second calibration image.
  • the first calibration image is obtained.
  • the calibration image and the second calibration image respectively include a plurality of mark symbols located at both ends of the calibration plate.
  • Sa12 Based on the key points of the mark symbols in the first calibration image and the second calibration image, detect and calculate the deflection angles of the first calibration image and the second calibration image relative to the X-axis direction, The first deflection angle ⁇ 1 and the second deflection angle ⁇ 2 are obtained.
  • Sa13 Calculate the deflection angle between the camera 11 and the stage 12 by taking the difference between the first deflection angle ⁇ 1 and the second deflection angle ⁇ 2 to obtain the deflection angle ⁇ a .
  • Step Sa2 specifically includes:
  • the coordinate information of each point is obtained through calculation, and the point coordinates of the workpiece dot matrix image are calibrated based on the deflection angle to obtain the workpiece dot matrix image.
  • the calibration formula is:
  • ⁇ b is the angle between the line connecting the point (x 0 , y 0 ) and the point (x 1 , y 1 ) and the X-axis.
  • the coordinates of each point are calibrated based on the deflection angle ⁇ a between the camera 11 and the stage 12 to eliminate the influence of the deflection angle caused by the installation deviation between the camera 11 and the stage 12 , thereby improving the accuracy of subsequent detection. .
  • step S2 it specifically includes:
  • step S21 you can continue to refer to Figure 5 to select the upper left corner area in the workpiece dot matrix image as the detection area.
  • a point located in the upper left corner is used as the judgment point for judging the offset, so the workpiece point is selected
  • the upper left corner area of the array image is selected as the detection area.
  • other points can also be selected as the judgment points for judging the offset amount. In this case, the position of the detection area in the workpiece dot matrix image can be adjusted accordingly.
  • step S22 it specifically includes:
  • S221 Generate a horizontal mask image covering the first horizontal row point set in the workpiece dot matrix image detection area, and generate a longitudinal mask image covering the first left column point set in the workpiece dot matrix image detection area.
  • S222 Mask the points in the detection area of the workpiece dot matrix image through the horizontal mask image and the vertical mask image respectively, select the point set located in the horizontal mask image and the point set located in the longitudinal mask image, and obtain Horizontal dot plot and vertical dot plot.
  • step S221 it specifically includes:
  • S2211 Expand the points in the detection area of the workpiece dot matrix image by a first number of pixels in each transverse direction and a second number of pixels in each longitudinal direction to obtain a transversely expanded image, which includes a plurality of rectangles with long sides extending laterally, wherein the first number of pixels It is greater than half of the pixel distance between two horizontally adjacent points, and the second number of pixel points is less than half of the pixel distance between two vertically adjacent points.
  • the minimum number of pixels for lateral expansion is limited to ensure that connected areas are formed between pixels laterally.
  • Vertically expanding the pixels can increase the width of the generated mask to ensure that the mask can cover all points in the first horizontal row of points, and limit the maximum number of pixels for vertical expansion to avoid dots in different rows. There is a connection between them, which leads to inaccurate subsequent recognition of rectangular areas.
  • the dots are expanded by 15 pixels on each side in the horizontal direction and 2 pixels on each side of the vertical direction to obtain a horizontally expanded image.
  • S2212 Expand the points in the detection area longitudinally by a third number of pixels and transversely by a fourth number of pixels to obtain a longitudinally expanded image, which includes multiple rectangles with long edges extending longitudinally, where the third number of pixels is greater than the two vertically adjacent ones. Half the pixel distance between points, the fourth pixel number is less than half the pixel distance between two laterally adjacent points.
  • the dots are expanded vertically by 15 pixels up and down, and by 2 pixels horizontally left and right, to obtain a vertically expanded image.
  • FIG. 13 it is a horizontal mask image.
  • FIG. 14 it is a vertical mask image.
  • the horizontal mask image and the vertical mask image are generated through steps S2111 to S2214, and the mask image is generated by expanding the points, which can be adapted to different dot matrix images, has high accuracy, and the method steps Simple and easy to implement.
  • the above steps are method steps based on using the upper left corner point as the judgment point.
  • rectangles at different positions can be selected as the mask image based on the location of the judgment point.
  • the mask image can also be obtained through other methods.
  • a fixed area in the image can always be designated as a mask area based on the shooting object, or it can also be manually selected. Delineate the mask area, and then automatically select the same area as the mask area.
  • the steps of the above method are relatively simple, it is difficult to automatically adapt to different dot matrix images and may have more errors.
  • step S222 the separated point set is obtained through the mask image.
  • the least squares method is used to fit the point set to obtain the corresponding straight line.
  • a common straight line fitting algorithm such as the gradient descent method can also be used to fit the point set.
  • step S2 a horizontal row point set and a column point set are fitted to obtain a horizontal straight line and a vertical straight line, and their intersection points are used as judgment points with subsequent standard dot matrix images, which improves the accuracy of judgment. and accuracy. Specifically, since in the dotting process, there will be a certain error in the location of each point, therefore compared to directly selecting a point as the judgment point, using the intersection of the fitted straight lines as the judgment point can eliminate possible errors in a single point. Avoid the situation where just one point with a large error is selected as the judgment point and the calibration of all points becomes invalid.
  • step S3 it specifically includes:
  • the standard dot matrix image is provided with a point array corresponding to the through holes of the workpiece, and the location of each point is the standard position of each through hole in the workpiece according to the design.
  • the upper left corner point of the workpiece dot matrix image is used as the judgment point, so the upper left corner point in the standard dot matrix image is selected as the standard point.
  • points at different positions in the standard bitmap image may be selected as standard points.
  • step S4 the offset between the standard point and the judgment point is used as the offset of all points, the coordinates of all points are corrected, and the corrected points are compared with the coordinates of each point in the standard workpiece image, thereby Check for defective points with deviated positions.
  • the offset obtained based on the intersection point detection of the fitted straight line is highly accurate and can be directly applied to all points, which can greatly improve the speed of the algorithm steps without the need to correct each point, making it more efficient.
  • the deviation value for defective point determination is 20 ⁇ m, that is, when the deviation distance between a point in the workpiece dot matrix image and the coordinate position of the corresponding point in the standard dot matrix image exceeds 20 ⁇ m, it is determined to be a defective point.
  • the deviation criterion may be specifically adjusted based on the actual size of the through hole in the workpiece.
  • defective points can be re-inspected manually to improve detection accuracy.
  • the present invention obtains transverse straight lines and longitudinal straight lines by fitting a horizontal row point set and a vertical column point set in the workpiece dot matrix image, and uses their intersection points as judgment points for comparison with subsequent standard dot matrix images. This eliminates possible process errors at a single point and improves the accuracy and accuracy of point position error judgment. Moreover, in some embodiments of the present invention, the deflection angle between the camera lens 113 and the stage 12 is calculated first, and the workpiece lattice image is corrected based on the deflection angle, which can further improve the accuracy of the judgment.
  • the present invention also provides a detection device 1, which includes:
  • Stage 12 camera 11, motion control module, image processing module and defective point inspection module;
  • the motion control module is configured to control the relative translational movement of the camera 11 and the stage 12;
  • the camera 11 is configured to photograph the workpiece placed on the stage 12 to obtain a workpiece image.
  • the workpiece image includes a through hole array on the surface of the workpiece.
  • the workpiece image is processed to convert the through hole array into a point array, and the coordinate information of each point is calculated and obtained.
  • the image processing module is configured to fit a horizontal row point set in the workpiece dot matrix image to obtain a transverse straight line, fit a vertical column point set in the workpiece dot matrix image to obtain a longitudinal straight line, and obtain the transverse straight line and the longitudinal straight line.
  • the defective point inspection module is configured to compare the dot matrix image of the workpiece with the standard dot matrix image points to check for defective points.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

本发明提供一种工件通孔位置校准方法及检测装置,校准方法包括:控制载台运动,通过相机拍摄置于载台上的工件,得到工件图像,工件图像包括工件表面的通孔阵列,将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;对工件点阵图像中一横行点集进行拟合得到一横向直线,对工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取横向直线和纵向直线的交点;获取预设的标准点阵图像,计算获取交点与标准点阵图像中对应位置点的坐标偏移量;基于坐标偏移量对工件点阵图像点阵各点坐标进行修正,并与标准点阵图像点进行比较,检查不良点,排除了单个点可能存在的工艺误差,提高了点位置误差判断的准确率和精度。

Description

工件通孔位置校准方法及检测装置 技术领域
本发明涉及视觉检测技术领域,具体地涉及一种工件通孔位置校准方法及检测装置。
背景技术
随着电子信息产业的发展,PCB产业的精细化要求越来越高。目前,PCB板的精度已经发展到最小孔径0.1mm、最小孔间距0.5mm甚至更高的水平。钻孔是PCB板制造中的一个重要环节,现有的通孔方法较为复杂且准确率较低,难以排除单个点所带来的误差,因此如何对PCB打孔位置精确的检测已经成为保证产品质量的重要环节。
发明内容
本发明的目的在于提供一种工件通孔位置校准方法及检测装置。
本发明提供一种工件通孔位置校准方法,包括步骤:
控制载台运动,通过线扫相机拍摄置于所述载台上的工件,得到工件图像,所述工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;
对所述工件点阵图像中一横行点集进行拟合得到一横向直线,对所述工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取所述横向直线和纵向直线的交点;
获取预设的标准点阵图像,所述标准点阵图像包括各通孔对应点的预设坐标位置信息,计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量;
基于所述坐标偏移量对所述工件点阵图像点阵各点坐标进行修正,并与所述标准点阵图像点进行比较,检查不良点。
作为本发明的进一步改进,所述对所述工件点阵图像中一横行点集进行拟合得到一横向直线,对所述工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取所述横向直线和纵向直线的交点,具体包括:
选取所述工件点阵图像中左上角区域为检测区域;
对所述检测区域中位于上方第一行的横行点集进行拟合得到所述横向直线,对所述检测区域中位于左侧第一列的纵列点集进行拟合得到所述纵向直线;
获取所述横向直线和所述纵向直线的交点。
作为本发明的进一步改进,所述对所述检测区域中位于上方第一行的横行点集进行拟合得到所述横向直线,对所述检测区域中位于左侧第一列的纵列点集进行拟合得到所述纵向直线,具体包括:
生成覆盖所述工件点阵图像检测区域内第一横行点集的横向掩膜图像,生成覆盖所述工件点阵图像检测区域内左侧第一纵列点集的纵向掩膜图像;
分别通过所述横向掩膜图像和所述纵向掩膜图像对所述工件点阵图像检测区域内点进行掩膜处理,分别选取位于所述横向掩膜图像内的点集和位于所述纵向掩膜图像内的点集,得到横向点图和纵向点图;
在所述横向点图和所述纵向点图中分别对点集进行拟合得到所述横向直线和所述纵向直线。
作为本发明的进一步改进,所述生成覆盖所述工件点阵图像检测区域内第一行的横行点集的横向掩膜图像,生成覆盖所述工件点阵图像检测区域内左侧第一列的纵列点集的纵向掩膜图像,具体包括:
对所述工件点阵图像检测区域内点横向各膨胀第一像素点数、纵向各膨胀第二像素点数,得到横向膨胀图像,其内包括多个长边沿横向延伸的矩形,其中,所述第一像素点数大于横向相邻两个点之间的像素距离的一半,所述第二像素点数小于于纵向相邻两个点之间的像素距离的一半;
对所述检测区域内点纵向膨胀第三像素点数、横向膨胀第四像素点数,得到纵向膨胀图像,其内包括多个长边沿纵向延伸的矩形,其中,所述第三像素点数大于纵向相邻两个点之间的像素距离的一半,所述第四像素点数小于横向相邻两个点之间的像素距离的一半;
在所述横向膨胀图像中选取位于最上端的横向矩形,得到横向掩膜图像;
在所述纵向膨胀图像中选取位于最左端的纵向矩形,得到纵向掩膜图像。
作为本发明的进一步改进,所述对所述检测区域中位于上方第一行的横行点集 进行拟合得到所述横向直线,对所述检测区域中位于左侧第一列的纵列点集进行拟合得到所述纵向直线,还包括:
在所述横向点图中通过最小二乘的方法对点集进行拟合,得到所述横向直线;
在所述纵向点图中通过最小二乘的方法对点集进行拟合,得到所述纵向直线。
作为本发明的进一步改进,所述计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量,具体包括:
选取所述标准点阵图像左上角点为标准点,
在所述坐标系中,计算所述标准点坐标与所述交点坐标之间的坐标偏移量。
作为本发明的进一步改进,还包括步骤:
检测获取相机和载台之间的偏转角;
对所述工件图像检测区域进行灰度化处理和阈值化处理将通孔阵列转换为点阵列,计算获得各点坐标信息,基于所述偏转角对所述工件点阵图像点坐标进行校准,得到工件点阵图像。
作为本发明的进一步改进,所述计算获得各点坐标信息,具体包括:
以所述载台运动起始位置为坐标原点(x 0,y 0)、以所述载台运动方向为X轴方向、以在载台平面与所述载台运动方向垂直的方向为Y轴方向,建立坐标系,在所述坐标系中计算得到所述工件点阵图像内各点坐标信息,对于其中任意一点,其坐标表示为(x 1,y 1)。
作为本发明的进一步改进,所述基于所述偏转角对所述工件点阵图像点坐标进行校准得到工件点阵图像,具体包括:
计算获得各点坐标信息,基于所述偏转角对所述工件点阵图像点坐标进行校准,得到工件点阵图像,其中,对于任意一点(x 1,y 1),通过校准公式计算求出校准后点(x 2,y 2),校准公式为:
Figure PCTCN2022135933-appb-000001
△dx=d(cosθ b-cos(θ ab))
△dy=d(sinθ b-sin(θ ab))
x 2=x 0+△dx
y 2=y 0+△dy
其中,θ b为点(x 0,y 0)和点(x 1,y 1)之间连线与X轴之间的夹角。
作为本发明的进一步改进,所述检测获取相机和载台之间的偏转角,具体包括:
控制相机和载台沿X轴向相对平移运动,分别获取置于所述载台上的标定板相对两端的图像,得到第一标定图像和第二标定图像,所述第一标定图像和所述第二标定图像分别包含位于所述标定板两端处的多个标记符号;
分别基于所述第一标定图像和所述第二标定图像内标记符号,检测计算所述第一标定图像和所述第二标定图像相对于所述X轴向的偏转角度,得到第一偏转角和第二偏转角;
通过对所述第一偏转角和第二偏转角求差求出所述相机和所述载台之间的偏转角度,得到取相机和载台之间的偏转角。
本发明还提供一种检测装置,包括:
载台、相机、运动控制模块、图像处理模块和不良点检查模块;
所述运动控制模块被配置用于控制相机和载台沿相对平移运动;
所述相机被配置用于拍摄置于所述载台上的工件,得到工件图像,所述工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;
图像处理模块被配置用于对所述工件点阵图像中一横行点集进行拟合得到一横向直线,对所述工件点阵图像中一纵列点集进行拟合得到一纵向直线,并获取所述横向直线和纵向直线的交点;并获取预设的标准点阵图像,所述标准点阵图像包括各通孔对应点的预设坐标位置信息,计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量,基于所述坐标偏移量对所述工件点阵图像点阵各点坐标进行修正;
不良点检查模块被配置用于将工件点阵图像和所述标准点阵图像点进行比较,检查不良点。
本发明的有益效果是:本发明通过将工件点阵图像中的一横行点集和一纵列点集拟合得到横向直线和纵向直线,并将其交点作为与后续标准点阵图像比较的判断点,排除了单个点可能存在的工艺误差,提高了点位置误差判断的准确率和精度。 并且,在本发明一些实施方式中,还包括先对相机镜头和载台之间偏转角度进行计算,基于偏转角度对工件点阵图像进行修正,可以进一步提高判断的精度。
附图说明
图1是本发明一实施方式中的检测装置示意图。
图2是本发明一实施方式中的工件通孔位置校准方法流程示意图。
图3是本发明一实施方式中拍摄得到的工件图像。
图4是图3左上角区域放大图像。
图5是本发明一实施方式中的工件点阵图像。
图6是本发明一实施方式中的工件通孔位置校准方法步骤Sa具体流程示意图。
图7是本发明一实施方式中的工件通孔位置校准方法步骤Sa1具体流程示意图。
图8是本发明一实施方式中的工件通孔位置校准方法步骤S2具体流程示意图。
图9是本发明一实施方式中的工件通孔位置校准方法步骤S22具体流程示意图。
图10是本发明一实施方式中的工件通孔位置校准方法步骤S221具体流程示意图。
图11是本发明一实施方式中的横向膨胀图像。
图12是本发明一实施方式中的纵向膨胀图像。
图13是本发明一实施方式中的横向掩膜图像。
图14是本发明一实施方式中的纵向掩膜图像。
图15是本发明一实施方式中的横向点图。
图16是本发明一实施方式中的纵向点图。
图17是本发明一实施方式中拟合得到的横向直线和纵向直线。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明具体实施方式及相应的附图对本发明技术方案进行清楚、完整地描述。显然,所描述的实施方式仅是本发明一部分实施方式,而不是全部的实施方式。基于本发明中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本发明保护的范围。
下面详细描述本发明的实施方式,实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通 过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。
为方便说明,本文使用表示空间相对位置的术语来进行描述,例如“上”、“下”、“后”、“前”等,用来描述附图中所示的一个单元或者特征相对于另一个单元或特征的关系。空间相对位置的术语可以包括设备在使用或工作中除了图中所示方位以外的不同方位。例如,如果将图中的装置翻转,则被描述为位于其他单元或特征“下方”或“上方”的单元将位于其他单元或特征“下方”或“上方”。因此,示例性术语“下方”可以囊括下方和上方这两种空间方位。
本实施方式提供一种工件通孔位置校准方法,工件为诸如电路板等具有微米级尺寸通孔的工件,方法将工件中小孔径通孔的位置坐标与标准位置坐标进行对比,从而完成检测校准。为便于理解,在本实施方式中,结合一具体检测装置1,并以一电路板为待检测工件,对本方法进行说明。如图1所示,检测装置1包括相机11和载台12,相机11包括面阵相机111和线扫相机112,两相机共用一个视野为1.68mm×1.41mm的相机镜头113,载台12的尺寸大于400mm×400mm,载台12能够沿平面X、Y轴方向进行运动,以将置于其上的工件在相机镜头113下进行拍摄。所检测的电路板其外轮廓为长800mm、宽600mm的长方形,其表面的有效检测区域为长680mm、宽420mm的长方形,在有效检测区域内共设置有24个矩形的打孔区域,每个打孔区域内有16129个通孔,总计387096个通孔。
如图2所示,工件通孔位置校准方法包括步骤:
S1:控制载台12运动,通过线扫相机112拍摄置于载台12上的工件,得到工件图像,工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像。
S2:对工件点阵图像中一横行点集进行拟合得到一横向直线,对工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取横向直线和纵向直线的交点。
S3:获取预设的标准点阵图像,标准点阵图像包括各通孔对应点的预设坐标位置信息,获取交点与标准点阵图像中对应位置点的坐标偏移量。
S4:基于坐标偏移量对工件点阵图像点阵各点坐标进行修正,并与标准点阵图 像点进行比较,检查不良点。
在步骤S1中,处理工件图像将通孔阵列转换为点阵列,具体包括:
对工件图像检测区域进行灰度化处理和阈值化处理将通孔阵列转换为点阵列。
在本实施方式中,如图3所示,为通过线扫相机112拍摄得到的工件图像,如图4所示,选择工件图像左上角区域作为检测区域,进行放大,如图5所示,对工件图像检测区域进行灰度化处理和阈值化处理,得到工件点阵图像。通过对标定图像进行预处理,以便于进行后续点阵图像识别检测,所涉及的具体预处理算法可参考现有算法,在此不再赘述。
在步骤S1中,计算获得工件点阵图像内各点坐标信息,具体包括:
以载台12运动起始位置为坐标原点(x 0,y 0)、以载台12运动方向为X轴方向、以在载台12平面与载台12运动方向垂直的方向为Y轴方向,建立坐标系,在坐标系中计算得到工件点阵图像内各点坐标信息,对于其中任意一点,其坐标表示为(x 1,y 1)。
通过步骤S1可以完成对工件点阵图像中的各点坐标定位,即完成对工件图像中各通孔的坐标定位。
进一步的,如图6所示,在本发明一些实施方式中,还包括步骤Sa,其具体包括:
Sa1:检测获取相机11和载台12之间的偏转角θ a
Sa2:对工件图像检测区域进行灰度化处理和阈值化处理将通孔阵列转换为点阵列,计算获得各点坐标信息,基于所述偏转角对所述工件点阵图像点坐标进行校准,得到工件点阵图像。
由于相机镜头113与载台12之间难以实现绝对平行,始终存在一定角度差,因此,通过步骤Sa来基于相机镜头113和载台12之间角度对工件图像各点坐标进行校准。
如图7所示,在本实施方式中,借助一标定板来检测获取偏转角,步骤Sa1具体包括:
Sa11:控制相机11和载台12沿X轴向相对平移运动,分别获取置于所述载台 12上的标定板相对两端的图像,得到第一标定图像和第二标定图像,所述第一标定图像和所述第二标定图像分别包含位于所述标定板两端处的多个标记符号。
Sa12:分别基于所述第一标定图像和所述第二标定图像内标记符号的关键点,检测计算所述第一标定图像和所述第二标定图像相对于所述X轴向的偏转角度,得到第一偏转角θ 1和第二偏转角θ 2
Sa13:对所述第一偏转角θ 1和第二偏转角θ 2求差算出所述相机11和所述载台12之间的偏转角度,得到偏转角θ a
步骤Sa2具体包括:
计算获得各点坐标信息,基于偏转角对工件点阵图像点坐标进行校准,得到工件点阵图像,其中,对于任意一点(x 1,y 1),通过校准公式计算求出校准后点(x 2,y 2),校准公式为:
Figure PCTCN2022135933-appb-000002
△dx=d(cosθ b-cos(θ ab))
△dy=d(sinθ b-sin(θ ab))
x 2=x 0+△dx
y 2=y 0+△dy
其中,θ b为点(x 0,y 0)和点(x 1,y 1)之间连线与X轴之间的夹角。
基于相机11和载台12之间的偏转角θ a对各点的坐标进行校准,以消除相机11和载台12之间因安装偏差所带来的偏转角影响,从而提高后续检测的准确率。
在本发明的其他实施方式中,本领域技术人员也可通过其他现有技术得到相机镜头113与载台12之间的偏转角,在此仅以一种较为简单且精度高的方法进行示例。
如图8所示,在步骤S2中,其具体包括:
S21:选取工件点阵图像中左上角区域为检测区域。
S22:对检测区域中位于上方第一横行点集进行拟合得到横向直线,对检测区域中位于左侧第一纵列点集进行拟合得到纵向直线。
S23:获取横向直线和纵向直线的交点。
在步骤S21中,可继续参考图5,将工件点阵图像中左上角区域选择为检测区域,在本实施方式中,以位于左上角的一点作为判断偏移量的判断点,因此选择工 件点阵图像左上角区域选择为检测区域。在其他实施方式中,也可选择其他点作为判断偏移量的判断点,此时则可对应调整在工件点阵图像中检测区域的位置。
如图9所示,在步骤S22中,其具体包括:
S221:生成覆盖工件点阵图像检测区域内第一横行点集的横向掩膜图像,生成覆盖工件点阵图像检测区域内左侧第一纵列点集的纵向掩膜图像。
S222:分别通过横向掩膜图像和纵向掩膜图像对工件点阵图像检测区域内点进行掩膜处理,分别选取位于横向掩膜图像内的点集和位于纵向掩膜图像内的点集,得到横向点图和纵向点图。
S223:在横向点图中通过最小二乘的方法对点集进行拟合,得到横向直线,在纵向点图中通过最小二乘的方法对点集进行拟合,得到纵向直线。
进一步的,如图10所示,在步骤S221中,其具体包括:
S2211:对工件点阵图像检测区域内点横向各膨胀第一像素点数、纵向各膨胀第二像素点数,得到横向膨胀图像,其内包括多个长边沿横向延伸的矩形,其中,第一像素点数大于横向相邻两个点之间的像素距离的一半,第二像素点数小于纵向相邻两个点之间的像素距离的一半。
这里,通过对横向膨胀的最小像素点数进行限制,以确保像素横向之间形成连通区域。将像素点进行纵向膨胀,可以提高所生成的掩膜的宽度,以确保掩膜能够覆盖第一横行点集内所有点,并对纵向膨胀最大像素点数量进行限制,以避免不同行的点之间形成连通,从而导致后续对矩形区域识别不准确。
在本实施方式中,如图11所示,将点横向左右各膨胀15个像素,纵向上下各膨胀2个像素,得到横向膨胀图像。
S2212:对检测区域内点纵向膨胀第三像素点数、横向膨胀第四像素点数,得到纵向膨胀图像,其内包括多个长边沿纵向延伸的矩形,其中,第三像素点数大于纵向相邻两个点之间的像素距离的一半,第四像素点数小于横向相邻两个点之间的像素距离的一半。
在本实施方式中,如图12所示,将点纵向上下各膨胀15个像素,横向左右各膨胀2个像素,得到纵向膨胀图像。
S2213:在横向膨胀图像中选取位于最上端的横向矩形,得到横向掩膜图像。
在本实施方式中,如图13所示,为横向掩膜图像。
S2214:在纵向膨胀图像中选取位于最左端的纵向矩形,得到纵向掩膜图像。
在本实施方式中,如图14所示,为纵向掩膜图像。
综上,通过步骤S2111~S2214生成了横向掩膜图像和纵向掩膜图像,利用对点进行膨胀处理的方法生成掩膜图像,能够自适应于不同的点阵图像,准确率高,且方法步骤简单易实施。
可以理解的是,上述步骤为基于将左上角的点作为判断点所进行的方法步骤,当选择其他点作为判断点时,可基于判断点所在的位置,选择不同位置的矩形作为掩膜图像。
除上述所提供的方法外,在步骤S221中,还可通过其他方式获得掩膜图像,如可基于拍摄对象,始终将图中一固定区域划为掩膜区域,或者也可通过人工选择的方式划定掩膜区域,并在之后自动选择同区域作为掩膜区。另外,也可参考前述方式,通过直接划定工件点阵图像中一固定尺寸区域内的点为用于拟合直线的点集,从而省略选择掩膜区域的步骤。上述方法相比于本实施方式中所提供的方法,虽然步骤较为简单,但难以对自动化适应于不同的点阵图像,且可能存在较多误差。
如图15和图16所示,在步骤S222中,通过掩膜图像获得了被分离的点集,如图17,利用最小二乘法对点集进行拟合,得到对应的直线。在本发明其他实施方式中,也可使用诸如梯度下降法等常用直线拟合算法来对点集进行拟合。
综上,在步骤S2中,对一横行点集和一纵列点集进行拟合得到横向直线和纵向直线,并将其交点作为与后续标准点阵图像的判断点,提高了判断的准确率和精度。具体而言,由于在打点工序中,各点所在位置本身会存在一定误差,因此相比于直接选择一点作为判断点,将拟合直线的交点作为判断点,可以排除单个点可能存在的误差,避免出现正好选择一存在较大误差的点作为判断点而使所有点的校准失效的情况。
在步骤S3中,其具体包括:
获取预设的标准点阵图像,选取标准点阵图像左上角点为标准点;在坐标系中, 计算标准点坐标与交点坐标之间的坐标偏移量。
标准点阵图像内设置有与工件通孔对应的点阵列,各点所在位置为工件中各通孔依据设计所在的标准位置。
在本实施方式中,将工件点阵图像左上角的点作为判断点,因此在标准点阵图像中选择左上角点为标准点。在其他实施方式中,选择不同点进行判断时,可对应选择标准点阵图像中的不同位置的点作为标准点。
在步骤S4中,将标准点与判断点之间的偏移量作为所有点的偏移量,对所有点的坐标进行修正,将修正后的点与标准工件图像中各点坐标进行比较,从而检查位置存在偏差的不良点。
基于拟合直线交点检测得到的偏移量准确性高,直接将其应用于所有点,可以大幅提升算法步骤运算速度,而无需对每个点进行修正,效率更高。
在本实施方式中,不良点判断的偏差值为20μm,即当工件点阵图像中一点与标准点阵图像中对应点坐标位置偏差距离超过20μm时,则判断为不良点。在其他实施方式中,可根据工件中通孔的实际尺寸而对偏差判断标准而进行具体调整。
进一步的,对于不良点,可通过人工进行复检,以提高检测的准确率。
综上所述,本发明通过将工件点阵图像中的一横行点集和一纵列点集拟合得到横向直线和纵向直线,并将其交点作为与后续标准点阵图像比较的判断点,排除了单个点可能存在的工艺误差,提高了点位置误差判断的准确率和精度。并且,在本发明一些实施方式中,还包括先对相机镜头113和载台12之间偏转角度进行计算,基于偏转角度对工件点阵图像进行修正,可以进一步提高判断的精度。
如图1所示,本发明还提供一种检测装置1,包括:
载台12、相机11、运动控制模块、图像处理模块和不良点检查模块;
运动控制模块被配置用于控制相机11和载台12沿相对平移运动;
相机11被配置用于拍摄置于载台12上的工件,得到工件图像,工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;
图像处理模块被配置用于对工件点阵图像中一横行点集进行拟合得到一横向直 线,对工件点阵图像中一纵列点集进行拟合得到一纵向直线,并获取横向直线和纵向直线的交点;并获取预设的标准点阵图像,标准点阵图像包括各通孔对应点的预设坐标位置信息,计算获取交点与标准点阵图像中对应位置点的坐标偏移量,基于坐标偏移量对工件点阵图像点阵各点坐标进行修正;
不良点检查模块被配置用于将工件点阵图像和标准点阵图像点进行比较,检查不良点。
应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。

Claims (11)

  1. 一种工件通孔位置校准方法,其特征在于,包括步骤:
    控制载台运动,通过线扫相机拍摄置于所述载台上的工件,得到工件图像,所述工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;
    对所述工件点阵图像中一横行点集进行拟合得到一横向直线,对所述工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取所述横向直线和纵向直线的交点;其具体包括:对所述工件点阵图像检测区域内点分别横向膨胀和纵向膨胀,形成多个长边沿横向延伸的的矩形,选取一横向矩形,得到横向掩膜图像,对所述横向掩膜图像内点集进行拟合得到一横向直线;对所述工件点阵图像检测区域内点分别横向膨胀和纵向膨胀,形成多个长边沿纵向延伸的的矩形,选取一纵向矩形,得到纵向掩膜图像,对所述纵向掩膜图像内点集进行拟合得到一纵向直线;
    获取预设的标准点阵图像,所述标准点阵图像包括各通孔对应点的预设坐标位置信息,计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量;
    基于所述坐标偏移量对所述工件点阵图像点阵各点坐标进行修正,并与所述标准点阵图像点进行比较,检查不良点。
  2. 根据权利要求1所述的工件通孔位置校准方法,其特征在于,所述对所述工件点阵图像中一横行点集进行拟合得到一横向直线,对所述工件点阵图像中一纵列点集进行拟合得到一纵向直线,获取所述横向直线和纵向直线的交点,具体包括:
    选取所述工件点阵图像中左上角区域为检测区域;
    对所述检测区域中位于上方第一行的横行点集进行拟合得到所述横向直线,对所述检测区域中位于左侧第一列的纵列点集进行拟合得到所述纵向直线;
    获取所述横向直线和所述纵向直线的交点。
  3. 根据权利要求2所述的工件通孔位置校准方法,其特征在于,所述对所述检测区域中位于上方第一行的横行点集进行拟合得到所述横向直线,对所述检测区域中位于左侧第一列的纵列点集进行拟合得到所述纵向直线,具体包括:
    生成覆盖所述工件点阵图像检测区域内第一横行点集的横向掩膜图像,生成覆盖所述工件点阵图像检测区域内左侧第一纵列点集的纵向掩膜图像;
    分别通过所述横向掩膜图像和所述纵向掩膜图像对所述工件点阵图像检测区域内点进行掩膜处理,分别选取位于所述横向掩膜图像内的点集和位于所述纵向掩膜图像内的点集,得到横向点图和纵向点图;
    在所述横向点图和所述纵向点图中分别对点集进行拟合得到所述横向直线和所述纵向直线。
  4. 根据权利要求3所述的工件通孔位置校准方法,其特征在于,所述生成覆盖所述工件点阵图像检测区域内第一行的横行点集的横向掩膜图像,生成覆盖所述工件点阵图像检测区域内左侧第一列的纵列点集的纵向掩膜图像,具体包括:
    对所述工件点阵图像检测区域内点横向各膨胀第一像素点数、纵向各膨胀第二像素点数,得到横向膨胀图像,其内包括多个长边沿横向延伸的矩形,其中,所述第一像素点数大于横向相邻两个点之间的像素距离的一半,所述第二像素点数小于纵向相邻两个点之间的像素距离的一半;
    对所述检测区域内点纵向膨胀第三像素点数、横向膨胀第四像素点数,得到纵向膨胀图像,其内包括多个长边沿纵向延伸的矩形,其中,所述第三像素点数大于纵向相邻两个点之间的像素距离的一半,所述第四像素点数小于横向相邻两个点之间的像素距离的一半;
    在所述横向膨胀图像中选取位于最上端的横向矩形,得到横向掩膜图像;
    在所述纵向膨胀图像中选取位于最左端的纵向矩形,得到纵向掩膜图像。
  5. 根据权利要求3所述的工件通孔位置校准方法,其特征在于,所述在所述横向点图和所述纵向点图中分别对点集进行拟合得到所述横向直线和所述纵向直线,具体包括:
    在所述横向点图中通过最小二乘的方法对点集进行拟合,得到所述横向直线;
    在所述纵向点图中通过最小二乘的方法对点集进行拟合,得到所述纵向直线。
  6. 根据权利要求1所述的工件通孔位置校准方法,其特征在于,还包括步骤:
    检测获取相机和载台之间的偏转角;
    对所述工件图像检测区域进行灰度化处理和阈值化处理,将通孔阵列转换为点阵列,计算获得各点坐标信息,基于所述偏转角对所述工件点阵图像点坐标进行校准,得到工件点阵图像。
  7. 根据权利要求6所述的工件通孔位置校准方法,其特征在于,所述计算获得各点坐标信息,具体包括:
    以所述载台运动起始位置为坐标原点(x 0,y 0)、以所述载台运动方向为X轴方向、以在载台平面与所述载台运动方向垂直的方向为Y轴方向,建立坐标系,在所述坐标系中计算得到所述工件点阵图像内各点坐标信息,对于其中任意一点,其坐标表示为(x 1,y 1)。
  8. 根据权利要求7所述的工件通孔位置校准方法,其特征在于,所述基于所述偏转角对所述工件点阵图像点坐标进行校准得到工件点阵图像,具体包括:
    计算获得各点坐标信息,基于所述偏转角对所述工件点阵图像点坐标进行校准,得到工件点阵图像,其中,对于任意一点(x 1,y 1),通过校准公式计算求出校准后点(x 2,y 2),校准公式为:
    Figure PCTCN2022135933-appb-100001
    △dx=d(cosθ b-cos(θ ab))
    △dy=d(sinθ b-sin(θ ab))
    x 2=x 0+△dx
    y 2=y 0+△dy
    其中,θ a为相机和载台之间的偏转角,θ b为点(x 0,y 0)和点(x 1,y 1)之间连线与X轴之间的夹角。
  9. 根据权利要求7所述的工件通孔位置校准方法,其特征在于,所述计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量,具体包括:
    选取所述标准点阵图像左上角点为标准点,
    在所述坐标系中,计算所述标准点坐标与所述交点坐标之间的坐标偏移量。
  10. 根据权利要求7所述的工件通孔位置校准方法,其特征在于,所述检测获取相机和载台之间的偏转角,具体包括:
    控制相机和载台沿X轴向相对平移运动,分别获取置于所述载台上的标定板相 对两端的图像,得到第一标定图像和第二标定图像,所述第一标定图像和所述第二标定图像分别包含位于所述标定板两端处的多个标记符号;
    分别基于所述第一标定图像和所述第二标定图像内标记符号,检测计算所述第一标定图像和所述第二标定图像相对于所述X轴向的偏转角度,得到第一偏转角和第二偏转角;
    通过对所述第一偏转角和第二偏转角求差求出所述相机和所述载台之间的偏转角度,得到取相机和载台之间的偏转角。
  11. 一种检测装置,其特征在于,包括:
    载台、相机、运动控制模块、图像处理模块和不良点检查模块;
    所述运动控制模块被配置用于控制相机和载台沿相对平移运动;
    所述相机被配置用于拍摄置于所述载台上的工件,得到工件图像,所述工件图像包括工件表面的通孔阵列,处理工件图像将通孔阵列转换为点阵列,计算获得各点坐标信息,得到工件点阵图像;
    图像处理模块被配置用于对所述工件点阵图像检测区域内点分别横向膨胀和纵向膨胀,形成多个长边沿横向延伸的的矩形,选取一横向矩形,得到横向掩膜图像,对所述横向掩膜图像内点集进行拟合得到一横向直线;对所述工件点阵图像检测区域内点分别横向膨胀和纵向膨胀,形成多个长边沿纵向延伸的的矩形,选取一纵向矩形,得到纵向掩膜图像,对所述纵向掩膜图像内点集进行拟合得到一纵向直线,获取所述横向直线和纵向直线的交点;并获取预设的标准点阵图像,所述标准点阵图像包括各通孔对应点的预设坐标位置信息,计算获取所述交点与所述标准点阵图像中对应位置点的坐标偏移量,基于所述坐标偏移量对所述工件点阵图像点阵各点坐标进行修正;
    不良点检查模块被配置用于将工件点阵图像和所述标准点阵图像点进行比较,检查不良点。
PCT/CN2022/135933 2022-08-02 2022-12-01 工件通孔位置校准方法及检测装置 WO2024027058A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210919808.4A CN114998334B (zh) 2022-08-02 2022-08-02 工件通孔位置校准方法及检测装置
CN202210919808.4 2022-08-02

Publications (1)

Publication Number Publication Date
WO2024027058A1 true WO2024027058A1 (zh) 2024-02-08

Family

ID=83020920

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135933 WO2024027058A1 (zh) 2022-08-02 2022-12-01 工件通孔位置校准方法及检测装置

Country Status (2)

Country Link
CN (1) CN114998334B (zh)
WO (1) WO2024027058A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998334B (zh) * 2022-08-02 2023-05-26 苏州华兴源创科技股份有限公司 工件通孔位置校准方法及检测装置
CN115690383B (zh) * 2022-11-02 2023-12-05 广州市市政工程试验检测有限公司 图像采集装置的标定参数获取方法及钻孔成像方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109556515A (zh) * 2018-11-26 2019-04-02 深圳市万相源科技有限公司 一种基于机器视觉的系统误差校准方法、系统及设备
CN111452038A (zh) * 2020-03-03 2020-07-28 重庆大学 一种高精度工件组件及高精度工件组件的装配方法
CN112720458A (zh) * 2020-12-04 2021-04-30 上海航天设备制造总厂有限公司 一种在线实时校正机器人工具坐标系的系统及方法
JP2021099221A (ja) * 2019-12-20 2021-07-01 大同特殊鋼株式会社 三次元形状測定用校正装置
CN114998334A (zh) * 2022-08-02 2022-09-02 苏州华兴源创科技股份有限公司 工件通孔位置校准方法及检测装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4469382B2 (ja) * 2007-03-28 2010-05-26 アキュートロジック株式会社 撮像装置における色収差量検出方法及び色収差量検出装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109556515A (zh) * 2018-11-26 2019-04-02 深圳市万相源科技有限公司 一种基于机器视觉的系统误差校准方法、系统及设备
JP2021099221A (ja) * 2019-12-20 2021-07-01 大同特殊鋼株式会社 三次元形状測定用校正装置
CN111452038A (zh) * 2020-03-03 2020-07-28 重庆大学 一种高精度工件组件及高精度工件组件的装配方法
CN112720458A (zh) * 2020-12-04 2021-04-30 上海航天设备制造总厂有限公司 一种在线实时校正机器人工具坐标系的系统及方法
CN114998334A (zh) * 2022-08-02 2022-09-02 苏州华兴源创科技股份有限公司 工件通孔位置校准方法及检测装置

Also Published As

Publication number Publication date
CN114998334B (zh) 2023-05-26
CN114998334A (zh) 2022-09-02

Similar Documents

Publication Publication Date Title
WO2024027058A1 (zh) 工件通孔位置校准方法及检测装置
CN113240674B (zh) 基于三维点云和二维图像融合的共面度检测方法
US4959898A (en) Surface mount machine with lead coplanarity verifier
JP4907725B2 (ja) キャリブレーション装置、欠陥検出装置、欠陥修復装置、表示パネル、表示装置、キャリブレーション方法
CN111351431B (zh) 一种pcb板上多孔位的检测系统的校正方法
CN105783711B (zh) 三维扫描仪校正系统及其校正方法
JP2008036918A (ja) スクリーン印刷装置および画像認識位置合わせ方法
JP2006148745A (ja) カメラの校正方法及びカメラの校正装置
JP4776197B2 (ja) 配線基板の検査装置
CN111105466B (zh) 一种ct系统中相机的标定方法
JPWO2006118018A1 (ja) フリップチップ実装ずれ検査方法および実装装置
US9218654B2 (en) Apparatus and method of recognizing an object, and apparatus and method of mounting a semiconductor chip
JP2008014700A (ja) ワークの検査方法及びワーク検査装置
JP2012033829A (ja) 部品実装機及び画像処理方法
JP4405009B2 (ja) ラインセンサーカメラを備えた検査機のキャリブレーション方法
CN111309271B (zh) 一种基于机器视觉的双色打印机检测方法
JP2010147401A (ja) 電子部品装着装置及び画像歪補正方法
JP2007033040A (ja) 光切断法による3次元形状計測装置における光学ヘッド部のキャリブレーション方法及び装置
JP5572247B2 (ja) 画像歪補正方法
CN115661256A (zh) 相机和载台之间偏转角的计算方法、标定板及检测装置
CN112207444B (zh) 一种用于led灯珠不良品标记的超高精度激光打标方法
KR20220058740A (ko) 스캔을 이용한 로봇의 캘리브레이션 시스템 및 방법
CN210168147U (zh) 一种用于检测摄像设备图像分辨率的测试卡
CN108154537B (zh) 一种大视野快速检测系统的校正方法
CN111275761A (zh) 一种自适应高度的视觉定位激光标刻方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22953846

Country of ref document: EP

Kind code of ref document: A1