An AOI track calibration method, device, equipment and storage medium
Patent Information
- Application Number
- CN202210593783.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-05-27
AI Technical Summary
现有的标定方式大多为人为标定,标定效率和标定精度都较低
[0020]本发明提供的AOI轨道标定方法,采用具有确定尺寸的标定板用于轨道标定,轨道包括相对设置的第一轨和第二轨,第一轨和第二轨之间设置有承板区域,当标定板被轨道牵引至承板区域的预设位置时,获取包括标定板上远离预设位置且靠近第一轨的角的目标图像,对目标图像进行图像处理,得到表征角的角点,确定角点在以第二轨为轴的世界坐标系下的世界坐标,基于角点的世界坐标和标定板的尺寸确定承板区域的尺寸误差。本发明提供的AOI轨道标定方法,标定过程中无需人为操作,节省了人力成本。
Smart Images

Figure CN117168299B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to track calibration technology, and more particularly to an AOI track calibration method, apparatus, device and storage medium. Background Technology
[0002] Automated Optical Inspection (AOI) is a technology that uses optical principles to detect common defects encountered in the soldering process of printed circuit boards (PCBs). AOI equipment typically includes a track for transporting the PCBs to be inspected and a camera for capturing images. The track has a support area to hold the PCBs. During automated inspection, the track transports the PCBs to the camera, which automatically scans the board, captures images, compares the tested solder joints with acceptable parameters in a database, processes the images, and identifies defects. These defects are then displayed or marked on a monitor or automatically identified markers for repair by maintenance personnel.
[0003] Before automated optical inspection equipment leaves the factory, the dimensions of the guide rail's support plate area typically need to be calibrated to determine the range of circuit board sizes it can support. Existing calibration methods are mostly manual, resulting in low efficiency and accuracy. Summary of the Invention
[0004] This invention provides an AOI track calibration method, apparatus, device, and storage medium to improve the efficiency and accuracy of AOI track calibration.
[0005] In a first aspect, the present invention provides an AOI track calibration method, which uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail disposed opposite to each other, and a support plate area is provided between the first rail and the second rail. The method includes:
[0006] When the calibration plate is pulled to a preset position in the bearing plate area by the track, a target image including the angle on the calibration plate that is far away from the preset position and close to the first track is obtained;
[0007] The target image is processed to obtain the corner points that represent the corners;
[0008] Determine the world coordinates of the corner point in a world coordinate system with the second track as the axis;
[0009] The dimensional error of the bearing plate area is determined based on the world coordinates of the corner point and the dimensions of the calibration plate.
[0010] Secondly, the present invention also provides an AOI track calibration device, which uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail disposed opposite to each other, and a support plate area is provided between the first rail and the second rail. The device includes:
[0011] The image acquisition module is used to acquire a target image including the angle on the calibration plate that is far from the preset position and close to the first rail when the calibration plate is pulled to a preset position in the support plate area by the track;
[0012] The image processing module is used to perform image processing on the target image to obtain corner points that represent the corners;
[0013] A world coordinate determination module is used to determine the world coordinates of the corner point in a world coordinate system with the second track as the axis.
[0014] An error determination module is used to determine the dimensional error of the bearing plate area based on the world coordinates of the corner point and the dimensions of the calibration plate.
[0015] Thirdly, the present invention also provides a computer device, comprising:
[0016] One or more processors;
[0017] Storage device for storing one or more programs;
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the AOI orbit calibration method as provided in the first aspect of the present invention.
[0019] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the AOI orbit calibration method as provided in the first aspect of the present invention.
[0020] The AOI track calibration method provided by this invention uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail arranged opposite each other, with a support plate area between the first rail and the second rail. When the calibration plate is pulled by the rail to a preset position in the support plate area, a target image including an angle on the calibration plate that is far from the preset position and close to the first rail is acquired. Image processing is performed on the target image to obtain the corner point representing the angle. The world coordinates of the corner point in a world coordinate system with the second rail as the axis are determined. Based on the world coordinates of the corner point and the size of the calibration plate, the dimensional error of the support plate area is determined. The AOI track calibration method provided by this invention requires no manual operation during the calibration process, saving labor costs. Attached Figure Description
[0021] Figure 1AThis is a flowchart of an AOI orbit calibration method provided in Embodiment 1 of the present invention;
[0022] Figure 1B This is a schematic diagram of the structure of an automated optical inspection device provided in an embodiment of the present invention;
[0023] Figure 1C A schematic diagram of track calibration provided in an embodiment of the present invention;
[0024] Figure 2 This is a flowchart of an AOI orbit calibration method provided in Embodiment 2 of the present invention;
[0025] Figure 3 A schematic diagram of the structure of an AOI track calibration device provided in Embodiment 3 of the present invention;
[0026] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0028] Example 1
[0029] Figure 1A This is a flowchart of an AOI track calibration method provided in Embodiment 1 of the present invention. This embodiment is applicable to the dimensional calibration of the bearing plate area of an AOI track. The method can be executed by the AOI track calibration device provided in this embodiment of the invention. This device can be implemented in software and / or hardware, and is typically configured in a mobile terminal, such as... Figure 1A As shown, the method specifically includes the following steps:
[0030] S101. When the calibration plate is pulled by the track to a preset position in the bearing plate area, acquire a target image including the angle on the calibration plate that is far from the preset position and close to the first track.
[0031] Figure 1B This is a schematic diagram of the structure of an automated optical inspection device provided in an embodiment of the present invention, as shown below. Figure 1BAs shown, the automated optical inspection device includes a camera 1, a camera motion system 2, and a track. The camera 1 is mounted on the camera motion system and positioned above the track. The track includes a first rail 31 and a second rail 32 arranged parallel to each other. The camera motion system 2 can drive the camera 1 to move horizontally and vertically. The track has a support plate area 4, which can be defined by limiting structures (e.g., limiting blocks) at both ends of the track. The support plate area 4 is used to support the circuit board to be inspected. The track is used to transport the circuit board to be inspected to the support plate area 4 so that the camera motion system 2 can drive the camera 1 to scan the circuit board.
[0032] Figure 1C A schematic diagram of track calibration provided for an embodiment of the present invention, such as... Figure 1B and 1C As shown, in this embodiment of the invention, a calibration plate 5 with a defined size is used for track calibration. For example, the size of the calibration plate 5 can be 100mm × 100mm. Track calibration involves verifying the dimensions of the support plate area 4 in the track. The support plate area 4 is the area between the two limiting blocks 6 on the track. In this embodiment of the invention, the dimension perpendicular to the track direction is used as the width of the support plate area 4, and the dimension along the track direction is used as the length of the support plate area 4. The preset position of the support plate area 4 can be either the extreme positions at both ends of the track or non-extreme positions; this embodiment of the invention does not limit this. The extreme positions are the two ends of the support plate area 4 along the track direction.
[0033] In this embodiment of the invention, when the calibration plate 5 is pulled by the track to the preset position of the support plate area 4, the camera motion system 2 is controlled to move, causing the camera 1 to move to the corner above the calibration plate 5 away from the preset position and close to the first track 31, and to acquire the target image captured by the camera 1 including the corner of the calibration plate 5 away from the preset position and close to the first track 31.
[0034] For example, when the calibration plate 5 is pulled by the track to the first preset position (the preset position on the right) of the support plate area 4, the camera motion system 2 is controlled to move, causing the camera 1 to move to an angle P1 above the calibration plate 5 away from the first preset position and close to the first rail 31, and the camera 1 acquires a first target image including the angle P1 on the calibration plate 5 away from the first preset position and close to the first rail 31. When the calibration plate 5 is pulled by the track to the second preset position (the preset position on the left) of the support plate area 4, the camera motion system 2 is controlled to move, causing the camera 1 to move to an angle P2 above the calibration plate 5 away from the second preset position and close to the first rail 31, and the camera 1 acquires a second target image including the angle P2 on the calibration plate 5 away from the second preset position and close to the first rail 31.
[0035] S102. Perform image processing on the target image to obtain the corner points representing the angles.
[0036] In this embodiment of the invention, image processing is performed on the target image to obtain corner points representing angles. For example, the target image can be preprocessed, such as through grayscale processing or noise reduction, and then a corner detection algorithm is used to extract the corner points representing angles from the target image. In this embodiment of the invention, the Moravec corner detection algorithm, Harris corner detection algorithm, Shi-Tomasi algorithm, FAST corner detection algorithm, etc., can be used; however, this embodiment of the invention is not limited to these methods.
[0037] S103. Determine the world coordinates of the corner point in the world coordinate system with the second track as the axis.
[0038] In this embodiment of the invention, a world coordinate system with the second track as the axis is established in advance. After the corner point is detected, the world coordinates of the corner point in the world coordinate system with the second track as the axis are determined.
[0039] For example, in this embodiment of the invention, the pixel coordinates of corner points are determined in the target image. The pixel coordinates of a corner point represent the position of the pixel within the target image. Typically, a direct coordinate system uv is established with the top-left corner of the image as the origin, using pixels as the unit. The x-coordinate u and y-coordinate v of a pixel are the column number and row number in its image array, respectively.
[0040] After determining the pixel coordinates of the corner points, the pixel coordinates are converted into world coordinates in a world coordinate system with the second track 32 as the X-axis. Specifically, the conversion of pixel coordinates into world coordinates can be achieved based on the intrinsic and extrinsic parameters of camera 1, which will not be elaborated here in this embodiment of the invention. The intrinsic and extrinsic parameters of camera 1 constitute the coordinate system of camera motion system 2. Camera motion system 2 is a high-precision coordinate system. That is, in this embodiment of the invention, the world coordinates of the corner points are obtained based on the high-precision camera motion system, thereby improving the calibration accuracy.
[0041] After converting the pixel coordinates of the corner points to world coordinates in the world coordinate system with the second track 32 as the axis, we obtain the world coordinates of points P1 and P2 on the calibration board: P1(x1,y1) and P2(x2,y2).
[0042] S104. Determine the dimensional error of the bearing plate area based on the world coordinates of the corner points and the dimensions of the calibration plate.
[0043] In some embodiments of the present invention, the width error of the bearing plate region 4 can be determined based on the world coordinates of one of the corner points and the dimensions of the calibration plate 5. Specifically, since the world coordinate system uses the second track 32 as the X-axis, the measured width of the bearing plate region 4 is the Y-axis coordinate value of the corner point's world coordinates. The measured width of the bearing plate region 4 is compared with the preset standard width (i.e., the width of the calibration plate 5) to obtain the width error of the bearing plate region 4.
[0044] In some embodiments of the present invention, the width and length errors of the bearing plate region 4 can be determined based on the world coordinates of two corner points and the dimensions of the calibration plate 5. Specifically, since the world coordinate system uses the second track 32 as the X-axis, the measured width of the bearing plate region 4 is the Y-axis coordinate value of the corner points. The measured width of the bearing plate region 4 is compared with the preset standard width (i.e., the width of the calibration plate 5) to obtain the width error of the bearing plate region 4. The measured length of the bearing plate region 4 is (2x0 + x2 - x1), where x0 is the length of the calibration plate 5. The measured length of the bearing plate region 4 is compared with the preset standard length to obtain the length error of the bearing plate region 4.
[0045] The AOI track calibration method provided in this invention uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail arranged opposite each other, with a support plate area between the first rail and the second rail. When the calibration plate is pulled by the rail to a preset position in the support plate area, a target image including an angle on the calibration plate that is far from the preset position and close to the first rail is acquired. Image processing is performed on the target image to obtain the corner point representing the angle. The world coordinates of the corner point in a world coordinate system with the second rail as the axis are determined. Based on the world coordinates of the corner point and the size of the calibration plate, the size error of the support plate area is determined. The AOI track calibration method provided by this invention requires no manual operation during the calibration process, saving labor costs. In addition, the process of converting the pixel coordinates of the corner point to world coordinates is based on a high-precision camera motion system, improving calibration accuracy.
[0046] Example 2
[0047] Figure 2 This is a flowchart of an AOI orbit calibration method provided in Embodiment 2 of the present invention. This embodiment refines the above-described Embodiment 1, and describes in detail the specific implementation process of each step in the AOI orbit calibration method, such as... Figure 2 As shown, the method includes:
[0048] S201. When the calibration plate is pulled forward by the track to the first preset position, a first target image including the first corner of the calibration plate that is far from the first preset position and close to the first track is acquired.
[0049] In this embodiment of the invention, the calibration plate 5 first enters from the left side of the track. When the calibration plate 5 is pulled forward by the track to the first preset position on the right, the calibration plate 5 is blocked by the right-side limiting block 6 and cannot move further. At this time, the camera motion system 2 is controlled to move, driving the camera 1 to the first corner P1 above the calibration plate 5, away from the first preset position and close to the first track 31, and acquiring the first target image captured by the camera 1, including the corner P1 on the calibration plate 5 away from the first preset position and close to the first track 31.
[0050] S202. Perform image processing on the first target image to obtain the first corner point representing the first corner.
[0051] For example, in an embodiment of the present invention, image processing of the first target image to obtain a first corner point representing a first corner may include the following sub-steps:
[0052] 1. Perform image segmentation processing on the first target image to separate the foreground and background regions.
[0053] Typically, the foreground region includes the calibration plate 5, and the background region is the region outside the calibration plate 5. In this embodiment of the invention, the first target image is processed using an image segmentation algorithm to separate the foreground and background regions. In this embodiment of the invention, the image segmentation algorithm is not limited.
[0054] For example, in one embodiment of the present invention, the first target image is first converted from the RGB color space to the HSV color space to facilitate image segmentation. Then, the target image in the HSV color space is subjected to threshold segmentation to obtain foreground and background regions. Specifically, a threshold can be set based on the chroma or saturation of the calibration plate 5, and threshold segmentation can be performed on the target image in the HSV color space based on this threshold to obtain foreground and background regions.
[0055] 2. Perform a connected component search on the foreground region and determine the connected component with the largest area as the target region.
[0056] In this embodiment of the invention, after image segmentation to obtain the foreground and background regions, morphological processing can be performed on the image beforehand to remove noise and eliminate interference. Then, a connected component search is performed on the foreground region to determine the connected component with the largest area as the target region. For example, a connected component labeling algorithm can be used to perform a connected component search on the foreground region to find all connected components. The process of the connected component labeling algorithm is as follows:
[0057] The foreground region is binarized. During the first row-by-row scan of the image, each pixel value in the image is scanned from top to bottom and from left to right. Each valid pixel value is assigned a label according to the following rules: (1) If the left and top pixel values in the four-neighborhood of a pixel are both 0 and have no label, then a new label is assigned to the pixel; (2) If either the left or top pixel value in the four-neighborhood of a pixel is 1, then the label of the pixel is the label with a pixel value of 1; (3) If both the left and top pixel values in the four-neighborhood of a pixel are 1 and have the same label, then the label of the pixel is this label; (4) If both the left and top pixel values in the four-neighborhood of a pixel are 1 and have the same label, then the label of the pixel is this label. During the second row-by-row scan of the image, the smallest label among the labels with equal relationships is selected as their label, that is, the already labeled labels are accessed and the labels with equal relationships are merged.
[0058] It should be noted that the above connected component labeling algorithm is an exemplary illustration of connected component search in the embodiments of the present invention. Other connected component algorithms may also be used in other embodiments of the present invention, and the embodiments of the present invention are not limited here.
[0059] After finding all connected components, determine the pixel area of each connected component, and take the connected component with the largest area as the target region.
[0060] 3. Extract the edge contour of the target area.
[0061] For example, in this embodiment of the invention, a contour extraction method is used to extract the edge contour of the target region, that is, the middle area of the target region is set to white, and only the boundary is displayed. Specifically, the target region is first binarized, and then each pixel in the target region is traversed. If the target pixel in the image is black, and its 8 adjacent pixels are also black, then the target pixel is deleted (set to white). In this way, a new image including the edge contour of the target region is obtained. It should be noted that the above contour extraction method is an exemplary description of extracting the edge contour of the target region. In other embodiments of the invention, other methods can also be used, such as the boundary tracking method to extract the edge contour of the target region. This embodiment of the invention does not limit the scope of the invention.
[0062] 4. Fit the edge contour to obtain the line segment representing the edge contour.
[0063] Since edge contours are typically composed of discrete pixels, it is difficult to accurately locate the corner points. In this embodiment of the invention, the extracted edge contours are fitted to obtain the line segments representing the edge contours.
[0064] 5. Determine the intersection point of the line segments representing the edge contour, and use the intersection point as the first angle point representing the first angle.
[0065] In this embodiment of the invention, the intersection of two line segments representing the edge contour is the first corner point characterizing the first corner.
[0066] In some embodiments of the present invention, if no corner point is detected, the process returns to step S201, the position of the camera is adjusted, a first target image including the first corner on the calibration board that is far from the first preset position and close to the first track is re-acquired, and corner point detection is performed again.
[0067] S203. Determine the pixel coordinates of the first corner point and convert the pixel coordinates into world coordinates in the world coordinate system with the second track as the axis.
[0068] The pixel coordinates of the first corner point represent the position of the pixel at the first corner point in the target image. After determining the pixel coordinates of the first corner point, the pixel coordinates are converted into world coordinates P1(x1,y1) in a world coordinate system with the second track 32 as the X-axis. Specifically, the conversion of pixel coordinates to world coordinates can be achieved based on the intrinsic and extrinsic parameters of camera 1, which will not be elaborated here in this embodiment of the invention. The intrinsic and extrinsic parameters of camera 1 constitute the coordinate system of camera motion system 2. Camera motion system 2 is a high-precision coordinate system. That is, in this embodiment of the invention, the world coordinates of the first corner point are obtained based on the high-precision camera motion system, thereby improving the calibration accuracy.
[0069] S204. Calculate the difference between the first coordinate value of the first corner point in the world coordinate system perpendicular to the track direction and the length of the calibration plate perpendicular to the track direction in the first target image, and use the difference as the width error of the bearing plate area.
[0070] For example, since the world coordinate system uses the second track 32 as the X-axis, the measured width of the bearing plate region 4 is the Y-axis coordinate value of the first corner point. The measured width of the bearing plate region 4 is compared with the preset standard width (that is, the width of the calibration plate 5), and the difference between the two is calculated to obtain the width error of the bearing plate region 4.
[0071] S205. When the calibration plate is pulled in the opposite direction by the track to the second preset position, a second target image including the second corner of the calibration plate that is far away from the second preset position and close to the first track is obtained.
[0072] In this embodiment of the invention, the calibration plate 5 enters from the right side of the track. When the calibration plate 5 is pulled in the opposite direction by the track to the second preset position on the left, the calibration plate 5 is blocked by the left limiting block 6 and cannot move further. At this time, the camera motion system 2 is controlled to move, driving the camera 1 to the second corner P2 above the calibration plate 5, away from the second preset position and close to the first track 31, and to acquire the second target image captured by the camera 1, including the corner P2 on the calibration plate 5 that is away from the second preset position and close to the first track 31.
[0073] S206. Perform image processing on the second target image to obtain the second corner point representing the second corner.
[0074] The corner detection process for the second corner point is similar to that for the first corner point. Image segmentation is performed on the second target image to separate the foreground and background regions. A connected component search is performed on the foreground region to determine the connected component with the largest area as the target region. The edge contours of the target region are extracted. The edge contours are fitted to obtain line segments representing the edge contours. The intersection points of these line segments are determined and used as the second corner point representing the second corner. The specific implementation process of the above steps has been described in detail in the foregoing embodiments, and will not be repeated here.
[0075] S207. Determine the length error of the bearing plate area based on the world coordinates of the first corner point in the first target image, the world coordinates of the second corner point representing the second corner in the second target image, and the size of the calibration plate.
[0076] For example, the distance (x2-x1) between the first and second corner points along the guide rail direction is calculated based on the world coordinates P1(x1,y1) of the first corner point and the world coordinates P1(x1,y1) of the second corner point. The sum of twice the length of the calibration plate along the track direction and the distance is calculated as the measured length of the support plate area 4, i.e., the measured length of the support plate area 4 is (2x0+x2-x1), where x0 is the length of the calibration plate 5. The difference between the measured length of the support plate area 4 and the preset standard length is calculated as the length error of the support plate area 4.
[0077] The AOI track calibration method provided in this invention uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail arranged opposite each other, with a support plate area between the first rail and the second rail. When the calibration plate is pulled by the rail to a preset position in the support plate area, a target image including an angle on the calibration plate that is far from the preset position and close to the first rail is acquired. Image processing is performed on the target image to obtain the corner point representing the angle, the pixel coordinates of the corner point are determined, and the pixel coordinates are converted into world coordinates in a world coordinate system with the second rail as the axis. The dimensional error of the support plate area is determined based on the world coordinates of the corner point and the size of the calibration plate. The AOI track calibration method provided by this invention requires no manual operation during the calibration process, saving labor costs. In addition, the process of converting the pixel coordinates of the corner point into world coordinates is based on a high-precision camera motion system, which improves the calibration accuracy.
[0078] Example 3
[0079] Embodiment 3 of the present invention also provides an AOI track calibration device, which uses a calibration plate of a defined size for track calibration. The track includes a first rail and a second rail arranged opposite to each other, and a support plate area is provided between the first rail and the second rail. Figure 3 A schematic diagram of the structure of an AOI track calibration device provided in Embodiment 3 of the present invention is shown below. Figure 3 As shown, the device includes:
[0080] Image acquisition module 301 is used to acquire a target image including the angle on the calibration plate that is far from the preset position and close to the first rail when the calibration plate is pulled to a preset position in the support plate area by the track;
[0081] Image processing module 302 is used to perform image processing on the target image to obtain corner points that represent the corners;
[0082] The world coordinate determination module 303 is used to determine the world coordinates of the corner point in a world coordinate system with the second track as the axis.
[0083] Error determination module 304 is used to determine the dimensional error of the bearing plate area based on the world coordinates of the corner point and the size of the calibration plate.
[0084] In some embodiments of the present invention, the image processing module 302 includes:
[0085] The image segmentation submodule is used to perform image segmentation processing on the target image to separate the foreground region and the background region;
[0086] The connected component search submodule is used to perform a connected component search on the foreground region and determine the connected component with the largest area as the target region.
[0087] An edge contour extraction submodule is used to extract the edge contour of the target region;
[0088] A line segment fitting submodule is used to fit the edge contour to obtain a line segment representing the edge contour;
[0089] The corner point determination submodule is used to determine the intersection point of the line segments representing the edge contour, and to use the intersection point as the corner point characterizing the corner.
[0090] In some embodiments of the present invention, the image segmentation submodule includes:
[0091] A color conversion unit is used to convert the target image from the RGB color space to the HSV color space;
[0092] The threshold segmentation unit is used to perform threshold segmentation on the target image in the HSV color space to obtain the foreground and background regions.
[0093] In some embodiments of the present invention, the image acquisition module 301 includes:
[0094] The first target image acquisition submodule is used to acquire a first target image including a first corner of the calibration board that is far from the first preset position and close to the first track when the calibration board is pulled forward by the track to a first preset position.
[0095] In some embodiments of the present invention, the error determination module 304 includes:
[0096] The width error determination submodule is used to calculate the difference between the first coordinate value of the first corner point representing the first corner in the first target image, which is perpendicular to the track direction in world coordinates, and the length of the calibration plate perpendicular to the track direction, and to use the difference as the width error of the bearing plate area.
[0097] In some embodiments of the present invention, the image acquisition module 301 includes:
[0098] The first target image acquisition submodule is used to acquire a first target image including a first corner of the calibration board that is far from the first preset position and close to the first track when the calibration board is pulled forward by the track to a first preset position.
[0099] The second target image acquisition submodule is used to acquire a second target image, including a second corner of the calibration board that is far from the second preset position and close to the first track, when the calibration board is pulled in the opposite direction by the track to a second preset position.
[0100] In some embodiments of the present invention, the error determination module 304 includes:
[0101] The width error determination submodule is used to calculate the difference between the first coordinate value of the first corner point representing the first corner in the first target image, which is perpendicular to the track direction in world coordinates, and the length of the calibration plate perpendicular to the track direction, and to use the difference as the width error of the bearing plate area.
[0102] The length error determination submodule is used to determine the length error of the bearing plate area based on the world coordinates of the first corner point in the first target image, the world coordinates of the second corner point representing the second corner in the second target image, and the size of the calibration plate.
[0103] In some embodiments of the present invention, the length error determination submodule includes:
[0104] The distance calculation unit is used to calculate the distance between the first corner point and the second corner point along the guide rail direction based on the world coordinates of the first corner point and the world coordinates of the second corner point;
[0105] The length measurement calculation unit is used to calculate the sum of twice the length of the calibration plate along the track direction and the distance, as the measured length of the bearing plate area;
[0106] The length error calculation unit is used to calculate the difference between the measured length of the bearing plate area and the preset standard length as the length error of the bearing plate area.
[0107] In some embodiments of the present invention, the world coordinate determination module 303 includes:
[0108] A pixel coordinate determination submodule is used to determine the pixel coordinates of the corner point on the target image;
[0109] The coordinate transformation submodule is used to convert the pixel coordinates into world coordinates in a world coordinate system with the second track as the axis.
[0110] The above-described AOI track calibration device can execute the AOI track calibration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the AOI track calibration method.
[0111] Example 4
[0112] Embodiment 4 of the present invention provides a computer device, Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention, as shown below. Figure 4 As shown, the computer device includes a processor 401, a memory 402, a communication module 403, an input device 404, and an output device 405; the number of processors 401 in the computer device can be one or more. Figure 4 Taking a processor 401 as an example; the processor 401, memory 402, communication module 403, input device 404, and output device 405 in a computer device can be connected via a bus or other means. Figure 4 Taking a bus connection as an example, the aforementioned processor 401, memory 402, communication module 403, input device 404, and output device 405 can be integrated on the control motherboard of the computer device.
[0113] The memory 402, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the module corresponding to the game skill control method in this embodiment. The processor 401 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 402, thereby implementing the AOI track calibration method provided in the above embodiment.
[0114] Memory 402 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, memory 402 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, memory 402 may further include memory remotely located relative to processor 401, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0115] The communication module 403 is used to establish a connection with external devices (such as smart terminals) and to realize data interaction with external devices. The input device 404 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the computer device.
[0116] This embodiment provides a computer device that can execute the AOI orbit calibration method provided in any of the above embodiments of the present invention, with specific corresponding functions and beneficial effects.
[0117] Example 5
[0118] Embodiment 5 of the present invention provides a storage medium containing computer-executable instructions, on which a computer program is stored. When executed by a processor, the program implements the AOI orbit calibration method provided in any of the above embodiments of the present invention. The method includes:
[0119] When the calibration plate is pulled to a preset position in the bearing plate area by the track, a target image including the angle on the calibration plate that is far away from the preset position and close to the first track is obtained;
[0120] The target image is processed to obtain the corner points that represent the corners;
[0121] Determine the world coordinates of the corner point in a world coordinate system with the second track as the axis;
[0122] The dimensional error of the bearing plate area is determined based on the world coordinates of the corner point and the dimensions of the calibration plate.
[0123] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the AOI orbit calibration method provided in the embodiments of the present invention.
[0124] It should be noted that the embodiments of the apparatus, computer equipment, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple. For relevant details, please refer to the descriptions of the method embodiments.
[0125] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which can be a computer, tablet computer, smartphone, etc., or an indoor computer device such as a game console or VR device, etc.) to execute the AOI track calibration method described in any embodiment of the present invention.
[0126] It is worth noting that the various modules, sub-modules, and units included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as they can achieve the corresponding functions; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0127] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0128] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0129] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. An AOI orbit calibration method, characterized in that, A calibration plate of defined dimensions is used for track calibration. The track includes a first rail and a second rail arranged opposite to each other, with a support plate area provided between the first rail and the second rail. The method includes: When the calibration plate is pulled by the track to a preset position in the bearing plate area, a target image is acquired including the angle on the calibration plate that is far from the preset position and close to the first track; wherein, the bearing plate area is defined by the limiting structures at both ends of the track; the track calibration refers to verifying the size of the bearing plate area in the track; the preset position of the bearing plate area is the extreme position at both ends of the track, and the extreme position refers to the two ends of the bearing plate area along the track direction; The target image is processed to obtain the corner points that represent the corners; Determine the world coordinates of the corner point in a world coordinate system with the second track as the axis; The dimensional error of the bearing plate area is determined based on the world coordinates of the corner point and the dimensions of the calibration plate. When the calibration plate is pulled forward by the track to a preset position in the bearing plate area, a target image is acquired including the angle on the calibration plate that is far from the preset position and close to the first track, including: When the calibration plate is pulled forward by the track to the first preset position, a first target image is acquired, including a first corner of the calibration plate that is far from the first preset position and close to the first track. When the calibration plate is pulled in the opposite direction by the track to the second preset position, a second target image is acquired, including the second corner of the calibration plate that is far from the second preset position and close to the first track.
2. The AOI orbit calibration method according to claim 1, characterized in that, Image processing is performed on the target image to obtain corner points representing the corners, including: The target image is segmented to separate the foreground and background regions; Perform a connected component search on the foreground region and determine the connected component with the largest area as the target region; Extract the edge contour of the target region; Fit the edge contour to obtain a line segment representing the edge contour; Determine the intersection point of the line segments representing the edge contour, and use the intersection point as the corner point characterizing the angle.
3. The AOI orbit calibration method according to claim 2, characterized in that, The target image is subjected to image segmentation processing to separate the foreground and background regions, including: Convert the target image from RGB color space to HSV color space; Thresholding is performed on the target image in the HSV color space to obtain the foreground and background regions.
4. The AOI orbit calibration method according to any one of claims 1-3, characterized in that, When the calibration plate is pulled forward by the track to a preset position in the bearing area, a target image is acquired including the angle on the calibration plate that is far from the preset position and close to the first track, including: When the calibration plate is pulled forward by the track to the first preset position, a first target image is acquired, including the first corner of the calibration plate that is far from the first preset position and close to the first track.
5. The AOI orbit calibration method according to claim 4, characterized in that, Determining the dimensional error of the bearing plate region based on the world coordinates of the corner point and the dimensions of the calibration plate includes: Calculate the difference between the first coordinate value of the first corner point representing the first angle in the first target image, which is perpendicular to the track direction in world coordinates, and the length of the calibration plate perpendicular to the track direction, and use the difference as the width error of the bearing plate area.
6. The AOI orbit calibration method according to claim 1, characterized in that, Determining the dimensional error of the bearing plate region based on the world coordinates of the corner point and the dimensions of the calibration plate includes: Calculate the difference between the first coordinate value of the first corner point representing the first corner in the first target image, which is perpendicular to the track direction in world coordinates, and the length of the calibration plate perpendicular to the track direction, and use the difference as the width error of the bearing plate area; The length error of the bearing plate region is determined based on the world coordinates of the first corner point in the first target image, the world coordinates of the second corner point representing the second corner in the second target image, and the size of the calibration plate.
7. The AOI orbit calibration method according to claim 6, characterized in that, Determining the length error of the bearing plate region based on the world coordinates of the first corner point in the first target image, the world coordinates of the second corner point representing the second corner in the second target image, and the dimensions of the calibration plate includes: Calculate the distance between the first corner point and the second corner point along the guide rail direction based on the world coordinates of the first corner point and the second corner point; Calculate the sum of twice the length of the calibration plate along the track direction and the distance, and use this sum as the measured length of the bearing plate area; The difference between the measured length of the bearing plate area and the preset standard length is calculated as the length error of the bearing plate area.
8. The AOI orbit calibration method according to any one of claims 1-3, characterized in that, Determining the world coordinates of the corner point in a world coordinate system with the second track as the axis includes: Determine the pixel coordinates of the corner point on the target image; The pixel coordinates are converted into world coordinates in a world coordinate system with the second track as the axis.
9. An AOI track calibration device, characterized in that, A calibration plate of defined dimensions is used for track calibration. The track includes a first rail and a second rail arranged opposite to each other, with a support plate area provided between the first rail and the second rail. The device includes: The image acquisition module is used to acquire a target image including the angle on the calibration plate that is far from the preset position and close to the first rail when the calibration plate is pulled by the rail to the preset position of the support plate area; wherein, the support plate area is defined by the limiting structures at both ends of the rail; the rail calibration refers to the verification of the size of the support plate area in the rail; the preset position of the support plate area is the extreme position at both ends of the rail, and the extreme position refers to the two ends of the support plate area along the rail direction; The image processing module is used to perform image processing on the target image to obtain corner points that represent the corners; A world coordinate determination module is used to determine the world coordinates of the corner point in a world coordinate system with the second track as the axis. An error determination module is used to determine the dimensional error of the bearing plate area based on the world coordinates of the corner point and the dimensions of the calibration plate. The image acquisition module includes: The first target image acquisition submodule is used to acquire a first target image including a first corner of the calibration board that is far from the first preset position and close to the first track when the calibration board is pulled forward by the track to a first preset position. The second target image acquisition submodule is used to acquire a second target image, including a second corner of the calibration board that is far from the second preset position and close to the first track, when the calibration board is pulled in the opposite direction by the track to a second preset position.
10. A computer device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the AOI orbit calibration method as described in any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the AOI orbit calibration method as described in any one of claims 1-8.
Citation Information
Patent Citations
Dimension detection method, device, equipment and system
CN108844462A
Positioning method of precision displacement platform
CN114170246A