A board card mark point alignment method and device, electronic equipment and storage medium

By acquiring board and machine parameter information, determining the theoretical position of the marker point and fine-tuning the camera position, the problem of time-consuming positioning reference markers in existing technologies is solved, achieving efficient marker point alignment and improving testing efficiency and accuracy.

CN121600057BActive Publication Date: 2026-06-16NANJING TESTING YUAN TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING TESTING YUAN TECHNOLOGY CO LTD
Filing Date
2026-01-29
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, locating reference markers is time-consuming and inefficient, especially when the reference markers are outside the preset possible area, making accurate positioning difficult and reducing testing efficiency.

Method used

By acquiring the parameter information of the board and the machine, the theoretical position of the marker point is determined and the camera is moved to bring the marker point into the field of view. The camera image is acquired and the candidate point is determined as the matching point based on the matching score. The position is then finely adjusted to ensure that the marker point is located in the center of the field of view.

Benefits of technology

It improves the accuracy and efficiency of site identification, reduces positioning time, lowers the false match rate, and enhances the stability and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600057B_ABST
    Figure CN121600057B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of circuit board testing, and discloses a board card mark point alignment method and device, electronic equipment and a storage medium. After the board card is placed on a machine table, the theoretical position information of the mark point is determined according to the board card parameter information and the machine table parameter information, the camera is moved based on the information, the mark point is located in the field of view of the camera, then the current camera image is acquired, the matching score corresponding to the candidate point in the current camera image is determined according to the current camera image and the size information of the mark point, the candidate point is determined as the alignment point in the case that the matching score of the candidate point is greater than a preset success threshold value, the position of the camera is finely adjusted according to the current pixel position of the alignment point, the alignment of the board card mark point is completed, the matching score of the candidate point in the current camera image is determined, and whether the candidate point is the alignment point is judged according to the matching score, so that the accuracy of the alignment point judgment is improved, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of circuit board testing technology, and specifically to a method, apparatus, electronic device, and storage medium for aligning circuit board marking points. Background Technology

[0002] Time Domain Reflectometry (TDR) insertion loss testing is used to inspect the integrity of signals on printed circuit boards (PCBs). During the testing process, a robotic arm equipped with a camera identifies preset markers on the PCB to accurately locate the PCB. Then, based on the coordinate parameters of the reference markers, the positions of all test points on the PCB are determined, allowing the robotic arm to move according to the positions of the test points to complete the TDR insertion loss test. Therefore, how to efficiently and accurately locate the reference markers has become a key research topic.

[0003] In related technologies, manual operation of the camera is usually required to search and locate the reference mark in a preset possible area. However, when the reference mark is outside the preset possible area, the search and location can only be expanded without a target. Furthermore, due to the limited field of view of the camera, it is difficult to locate the reference mark, which consumes a lot of time and reduces the efficiency of the test. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for aligning board marker points, so as to at least solve the problems of time-consuming and inefficient positioning of reference markers in related technologies.

[0005] This application provides a method for aligning board marker points, including:

[0006] After the board is placed on the machine, the board parameter information and the machine parameter information are obtained; the board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine.

[0007] Based on the board parameter information and machine parameter information, determine the theoretical position information of the marker point;

[0008] Based on the theoretical location information of the marker point, move the camera so that the marker point is within the camera's field of view;

[0009] Get the current camera image;

[0010] Based on the size information of the current camera image and the marker points, determine the matching score corresponding to at least one candidate point in the current camera image;

[0011] For any candidate point, if the matching score of the candidate point is greater than the preset success threshold, the candidate point is determined as the matching point; where the matching point is the pixel of the marker point in the current camera image;

[0012] Obtain the current pixel position information of the target point;

[0013] Based on the current pixel position information of the alignment point, the camera position is finely adjusted so that the alignment point is located in the center of the camera's field of view.

[0014] This application also provides a board marker alignment device, including:

[0015] The first acquisition module is used to acquire board parameter information and machine parameter information after the board is placed on the machine. The board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine.

[0016] The first determining module is used to determine the theoretical position information of the marker point based on the board parameter information and the machine parameter information;

[0017] The movement module is used to move the camera according to the theoretical position information of the marker point so that the marker point is within the camera's field of view;

[0018] The second acquisition module is used to acquire the current camera image;

[0019] The second determining module is used to determine the matching score corresponding to at least one candidate point in the current camera image based on the size information of the current camera image and the marker points.

[0020] The third determination module is used to determine a candidate point as a matching point if the matching score of the candidate point is greater than a preset success threshold; wherein, the matching point is the pixel of the marker point in the current camera image;

[0021] The third acquisition module is used to acquire the current pixel position information of the alignment point;

[0022] The adjustment module is used to fine-tune the camera position based on the current pixel position information of the alignment point, so that the alignment point is located in the center of the camera's field of view.

[0023] This application also provides a board marking point alignment system, including: a machine tool, a camera, a robotic arm, and electronic equipment;

[0024] The machine is used to carry circuit boards;

[0025] The camera is used to capture the current camera image from the board;

[0026] The electronic device uses any of the above-mentioned board marking point alignment methods to control the robotic arm, so as to adjust the position of the camera through the robotic arm.

[0027] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described board marker alignment methods when executing the computer program.

[0028] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described board marker alignment methods.

[0029] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described board marker alignment methods.

[0030] This application improves the accuracy of alignment point determination by determining the theoretical position of the marker point based on the board and machine parameters after the board is placed on the test bench. The camera is then moved to position the marker point within the camera's field of view. The current camera image is then acquired, and the matching score of the candidate point in the current image is determined based on the size information of the marker point and the current camera image. If the matching score of the candidate point is greater than a preset success threshold, the candidate point is identified as an alignment point. The camera position is then fine-tuned based on the current pixel position of the alignment point to complete the alignment of the board marker point. By determining the matching score of the candidate point in the current camera image and quantifying whether it is an alignment point based on the matching score, the accuracy of alignment point determination is improved, thereby increasing testing efficiency. Attached Figure Description

[0031] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of the network structure upon which the embodiments of this application are based;

[0033] Figure 2 This is a flowchart illustrating the board marker alignment method provided in an embodiment of this application.

[0034] Figure 3 A schematic diagram of an exemplary board marker alignment method provided in this application embodiment;

[0035] Figure 4 This is a schematic diagram of the board marking point alignment device provided in the embodiments of this application;

[0036] Figure 5 This is a schematic diagram of the board marking point alignment system provided in the embodiments of this application;

[0037] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0039] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0040] In the current field of printed circuit board (PCB) testing, machine vision alignment technology is a crucial step in achieving precise positioning. Traditional alignment systems typically employ fixed search windows and predefined search paths, lacking intelligent adaptation to the actual position of the PCB. When the PCB deviates from its expected position due to loading deviations or mechanical vibrations, manual intervention is required to perform a range search within the possible area, significantly increasing time consumption. This is especially true during the first PCB alignment, where the lack of prior position references further prolongs the alignment time. Furthermore, most existing technologies use a single field of view for template matching. When the reference marker is not in the expected position, the system can only expand the search range by mechanically moving the camera, introducing additional mechanical delays. When the reference marker is located at the edge of the camera's field of view, the similarity score of the template matching algorithm will significantly decrease due to lens distortion and perspective errors.

[0041] Furthermore, the nonlinear mapping between the camera pixel coordinate system and the machine arm coordinate system often introduces systematic errors due to uncalibrated or inaccurate camera magnification. This error is particularly pronounced in the alignment of large PCB boards (>200mm), where it amplifies with increasing working distance, causing alignment accuracy to drop from the expected ±0.05mm to over ±0.1mm. Temperature fluctuations and mechanical stress can cause minute changes in camera magnification, but existing systems lack online calibration mechanisms, requiring frequent production interruptions for manual calibration, reducing overall equipment efficiency. Existing algorithms are insufficiently adaptable to weak texture markings, lighting variations, and partial occlusion, exhibiting poor stability in industrial environments with changing conditions. Traditional algorithms rely excessively on the center pixel; when the center pixel is affected by noise, matching accuracy drops significantly.

[0042] To address the aforementioned technical problems, this application provides a method, apparatus, electronic device, and storage medium for aligning board marker points. The method includes: after placing the board on a machine, acquiring board parameter information and machine parameter information; wherein the board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine; determining the theoretical position information of the marker point based on the board parameter information and the machine parameter information; moving the camera according to the theoretical position information of the marker point so that the marker point is within the camera's field of view; acquiring a current camera image; determining the matching score corresponding to at least one candidate point in the current camera image based on the current camera image and the size information of the marker point; for any candidate point, if the matching score of the candidate point is greater than a preset success threshold, determining the candidate point as an alignment point; wherein the alignment point is a pixel of the marker point in the current camera image; acquiring the current pixel position information of the alignment point; and fine-tuning the camera position according to the current pixel position information of the alignment point so that the alignment point is located at the center of the camera's field of view. The method provided by the above solution determines the theoretical position information of the marker point based on the board and machine parameter information after the board is placed on the machine. The camera is then moved accordingly to place the marker point within the camera's field of view. The current camera image is then acquired. Based on the size information of the current camera image and the marker point, the matching score corresponding to the candidate point in the current camera image is determined. If the matching score of the candidate point is greater than a preset success threshold, the candidate point is determined as the alignment point. The camera position is fine-tuned based on the current pixel position of the alignment point to complete the alignment of the board marker point. By determining the matching score of the candidate point in the current camera image and quantifying whether it is an alignment point based on the matching score, the accuracy of alignment point determination is improved, thereby improving the efficiency of the test.

[0043] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] The specific application environment architecture or specific hardware architecture on which the board marking point alignment method depends is described here.

[0045] First, the network structure on which this application is based will be explained:

[0046] The board marker alignment method, apparatus, electronic device, and storage medium provided in this application are applicable to aligning marker points, such as... Figure 1 The diagram shown illustrates the network structure upon which this application embodiment is based, primarily including alignment markers, a data acquisition device, and a board marker alignment device. The data acquisition device is used to acquire board parameter information and machine parameter information, while the board marker alignment device is used to align the board markers based on the board marker alignment method provided in this application embodiment.

[0047] This application provides a method for aligning board marker points, used to align board marker points. The execution subject of this application is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, or other electronic devices that can be used for board marker point alignment.

[0048] like Figure 2 The diagram shown is a flowchart illustrating the board marker alignment method provided in this application embodiment. The method includes:

[0049] Step 201: After the board is placed on the machine, obtain the board parameter information and the machine parameter information.

[0050] The board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine.

[0051] Specifically, the board can be a printed circuit board, typically containing two marker points. The position information of the marker points is their location on the board. The size information of the marker points, including their size, color, and other characteristics, can be used to determine their location. The board is placed on the machine tool, and its position on the machine tool is determined based on the machine tool parameters. Simultaneously, the length and width dimensions of the machine tool's working area are obtained.

[0052] Accordingly, the board parameter information and machine parameter information provide data support for subsequently determining the location of the marker point and identifying whether the marker point is a calibration point.

[0053] Step 202: Determine the theoretical position information of the marker point based on the board parameter information and machine parameter information.

[0054] Step 203: Based on the theoretical location information of the marker point, move the camera so that the marker point is within the camera's field of view.

[0055] Specifically, based on the position information of the board relative to the machine and the position information of the marker point relative to the board, and considering the expected positioning error of the PCB board on the platform, an affine transformation model is used to determine the position information of the marker point relative to the machine, i.e., the theoretical position information of the marker point. According to the theoretical position information of the marker point, the camera is moved to perform coarse positioning of the marker point, so that the marker point is within the camera's field of view, ensuring that the probability of the actual marker falling into this area exceeds 99%.

[0056] Correspondingly, by coarsely locating the marker points, the approximate range for finding the marker points is determined, reducing the time required for marker point alignment.

[0057] Step 204: Obtain the current camera image.

[0058] Step 205: Based on the size information of the current camera image and the marker points, determine the matching score corresponding to at least one candidate point in the current camera image.

[0059] Specifically, the acquired current camera image undergoes preprocessing, including contrast enhancement. The current camera image contains at least one candidate point, which can be a complete or incomplete point. Based on the size information of the preprocessed camera image and the marker point, a template matching algorithm is used to obtain a matching score for each candidate point. The matching score characterizes the similarity between the candidate point and the marker point, ranging from 0 to 1, with values ​​closer to 1 indicating higher similarity. The distance of the candidate point from the center of the camera's field of view and the completeness of the candidate point image both affect the matching score. For example, if a marker point is in the current camera image but not at the center of the field of view, or is located at the edge of the current camera image, the matching score of the marker point will decrease, potentially causing the matching score to be lower than a preset success threshold.

[0060] Accordingly, the similarity between candidate points and marker points is quantified by the matching score. The matching score can be used to determine whether a point is a marker point, providing data basis for the alignment of subsequent marker points.

[0061] Step 206: For any candidate point, if the matching score of the candidate point is greater than the preset success threshold, the candidate point is determined as the matching point.

[0062] The alignment point is the pixel of the marker point in the current camera image.

[0063] Specifically, the preset success threshold can be set to 0.8. When the matching score of a candidate point is greater than the preset success threshold, it indicates that the candidate point is a correct match.

[0064] Step 207: Obtain the current pixel position information of the alignment point.

[0065] Step 208: Based on the current pixel position information of the alignment point, fine-tune the camera position so that the alignment point is located in the center of the camera's field of view.

[0066] Specifically, the alignment point may not be located at the center of the camera's field of view. Therefore, based on the current pixel position of the alignment point, the camera position is moved so that the alignment point is located at the center of the camera's field of view, thus achieving precise positioning.

[0067] Correspondingly, if the matching score of a candidate point is greater than the preset success threshold, it indicates that a matching point exists in the current camera image. Then, the camera position is precisely located based on the current pixel position information of the matching point. The matching score quantifies the judgment of the matching point, avoiding manual search and location, reducing time and improving matching efficiency.

[0068] Based on the above embodiments, as an implementable approach, in one embodiment, the method further includes:

[0069] Step 301: If the matching scores of all candidate points are less than the preset failure threshold, move the camera in the preset direction.

[0070] Step 302: Reacquire the current camera image;

[0071] Step 303: Based on the size information of the reacquired current camera image and the marker points, determine the matching score corresponding to at least one new candidate point in the current camera image;

[0072] Step 304: For any new candidate point, if the matching score of the new candidate point is greater than the preset success threshold, determine the new candidate point as the matching point.

[0073] Specifically, the preset failure threshold can be set to 0.2, indicating that the candidate point is not a matching point. If the matching score of all candidate points in the current camera image is less than the preset failure threshold, it means that there is no matching point in the current camera's field of view, and the camera needs to move to a new position to find a matching point again. The preset direction is usually directly above the current camera image, and the field of view maintains 50% overlap. Move the camera. Reacquire the current camera image, match one or more candidate points in the image, and determine the corresponding matching score. If the matching score of a candidate point is greater than the preset success threshold, then the new candidate point is determined to be a matching point.

[0074] Accordingly, if no alignment point exists in the current camera image, the search range is expanded to determine whether an alignment point exists in the new camera field of view.

[0075] Based on the above embodiments, as an implementable approach, in one embodiment, the method further includes:

[0076] Step 305: If the matching scores of at least one newly determined candidate point are still less than the preset failure threshold, move the camera clockwise and return to the step of reacquiring the current camera image.

[0077] Specifically, if no matching point is found in the initially determined current camera image, an extended search protocol is initiated. This involves searching within a gradually expanding rectangular annular region centered on the initially determined current camera image, with a preset direction defining the starting field of view for the annular search. If no matching point is found in the current camera image after one adjustment, the camera position is adjusted clockwise, moving half the width of the current camera's field of view each time, ensuring a 50% overlap between the adjusted and unadjusted fields of view. The annular search stops when a candidate point greater than a preset success threshold is found. If all camera fields of view included in the annular search have been searched without finding a matching point, the search stops, an alert is issued, and an anomaly handling process is triggered for manual alignment.

[0078] Accordingly, by moving the camera while preserving overlapping areas of the field of view, gaps were eliminated between adjacent shooting areas, preventing candidate points from being missed and expanding the search area. Simultaneously, the camera's movement direction was determined when no matching point was found.

[0079] Based on the above embodiments, as an implementable approach, in one embodiment, the method further includes:

[0080] Step 401: If the matching score of the candidate point with the highest matching score is greater than or equal to the preset failure threshold and less than or equal to the preset success threshold, the candidate point is determined as a suspected matching point.

[0081] Step 402: Obtain the current pixel location information of the suspected alignment point;

[0082] Step 403: Based on the current pixel position information of the suspected alignment point, move the camera position so that the suspected alignment point is located in the center of the camera's field of view;

[0083] Step 404: Reacquire the current camera image;

[0084] Step 405: Determine a new matching score for the suspected alignment point based on the current camera image and the size information of the marker point;

[0085] Step 406: If the new matching score of the suspected matching site is greater than the preset success threshold, the suspected matching site is determined as the matching site.

[0086] Specifically, if a candidate point in the current camera image has a matching score greater than or equal to a preset failure threshold and less than or equal to a preset success threshold, then the candidate point is a suspected matching point. This may be because the candidate point is not in the center of the camera image or the image is incomplete, causing its matching score to fall below the preset success threshold. In this case, the camera position is moved according to the current pixel position information of the suspected matching point so that the suspected matching point is located in the center of the camera's field of view. The template matching algorithm is then re-executed on the suspected matching point to determine its new matching score. If the new matching score is greater than the preset success threshold, then the suspected matching point is determined to be a matching point.

[0087] If the new matching score is less than the preset success threshold, the matching scores of all candidate points in the new current camera image are re-determined, and the process is repeated.

[0088] Accordingly, when the matching score of a candidate point is greater than or equal to a preset failure threshold and less than or equal to a preset success threshold, a suspected matching point is identified. The matching point is then located by adjusting the camera position and re-evaluating. Since the suspected matching point is located at the edge of the camera's field of view, its matching score may be low due to lens distortion and perspective errors. By adjusting the camera position based on the current pixel position information of the suspected matching point and re-obtaining its matching score, a more accurate matching score is obtained, which is beneficial for identifying marker points and reduces the false matching rate.

[0089] Based on the above embodiments, as one implementable approach, in one embodiment, the camera position is finely adjusted according to the current pixel position information of the alignment point so that the alignment point is located at the center of the camera's field of view, including:

[0090] Step 2081: Based on the mapping relationship between pixel values ​​and physical values, determine the current physical location information of the target point according to the current pixel location information of the target point;

[0091] Step 2082: Based on the current physical location information, fine-tune the camera position so that the alignment point is located at the center of the camera's field of view.

[0092] Based on the above embodiments, as an implementable approach, in one embodiment, the method further includes:

[0093] Step 501: Obtain the current pixel position information of the target calibration point and the current first camera calibration image;

[0094] Step 502: Move the camera according to the preset moving distance value;

[0095] Step 503: Obtain the current second camera calibration image;

[0096] Step 504: Determine the pixel movement value based on the current second camera calibration image, the current first camera calibration image, and the current pixel position information of the target calibration point;

[0097] Step 505: Obtain the correspondence between multiple preset movement distance values ​​and pixel movement values;

[0098] Step 506: Determine the mapping relationship between pixel values ​​and physical values ​​based on the correspondence between multiple preset moving distance values ​​and pixel moving values.

[0099] Specifically, before performing alignment, the mapping relationship between pixel values ​​and physical values ​​is first determined based on the target calibration point.

[0100] First, move the camera so that the target calibration point is located at the center of the current camera's field of view, and acquire the current first camera calibration image. Then, move the camera according to a preset moving distance value, where the preset moving distance value is the actual physical value of the camera movement, and acquire the current second camera calibration image after the camera movement. Determine the new current pixel position information of the target calibration point in the current second camera calibration image. Based on the new current pixel position information of the target calibration point and the pixel distance value between the current pixel position information and the current field of view center, determine the pixel difference. Based on the preset moving distance value, establish a mapping relationship between pixel value and physical value.

[0101] Since the mapping relationship between pixel values ​​and physical values ​​differs at different angles, it is necessary to acquire images at multiple working distances and field of view positions, and calculate the camera's intrinsic parameter matrix and distortion coefficients, including focal length, principal point position, radial distortion, and tangential distortion parameters, through a nonlinear optimization algorithm.

[0102] The camera initially moves horizontally to the right by a preset distance. Subsequent adjustments are made using the initial pixel position of the target calibration point as the center, the preset distance as the radius, and a preset angle of 5°. After each adjustment, a calibration image is captured, and the pixel position of the target calibration point and the pixel position of the current field of view center are obtained. Based on the pixel difference between these two values ​​and the preset distance, the mapping relationship between pixel values ​​and physical values ​​is determined. Multiple mapping relationships between pixel values ​​and physical values ​​are obtained by moving around the center in 5° increments.

[0103] Change the preset travel distance value and repeat the above steps.

[0104] During camera movement, based on the suspected alignment point, the distance and angle values ​​relative to the current camera's field of view center are used to select the mapping relationship between the corresponding pixel values ​​and physical values, and the transformation between pixel values ​​and physical values ​​is performed to obtain the physical value of the camera movement. The camera then adjusts its position accordingly based on the physical value.

[0105] Specifically, in one embodiment, the physical location information of the camera can be determined based on the following formula:

[0106]

[0107]

[0108] in, These are the coordinates of the camera's field of view origin in the machine's coordinate system. It is the pixel equivalent (mm / pixel) in the X and Y directions. This is the distortion correction amount. The pixel equivalent is the value corresponding to the mapping relationship between pixel value and physical value, while the distortion correction amount is a preset value.

[0109] Accordingly, by using the current pixel position information of the target calibration point, and moving the camera position according to preset movement distance and preset angle values, the mapping relationship between pixel values ​​and physical values ​​is determined, thus converting the acquired pixel information into physical information, thereby enabling the camera to move physically. Calibrating the mapping relationship between pixel values ​​and physical values ​​through the target calibration point improves the accuracy of camera movement and alignment.

[0110] For example, such as Figure 3The diagram illustrates the structure of an exemplary board marker alignment method provided in this application embodiment. After alignment begins, coarse positioning of the camera is performed. Based on the obtained PCB board placement position, board parameter information and machine parameter information are acquired, and the theoretical position information of the marker point is calculated. The camera is then moved according to the theoretical position information for coarse positioning, ensuring the marker point is within the camera's field of view. The current camera image is acquired, and a template matching algorithm is executed on at least one candidate point in the current camera image to obtain a matching score corresponding to at least one candidate point. For any candidate point, if its matching score is greater than a preset success threshold, the candidate point is determined as an alignment point, and the current pixel position information of the alignment point is acquired. The camera then performs fine-tuning of its position based on the current pixel position information of the alignment point. If the matching score of a candidate point is less than a preset success threshold, it is further determined whether it is greater than a preset failure threshold. If the matching score of the candidate point with the highest matching score is greater than or equal to the preset failure threshold but less than or equal to the preset success threshold, the candidate point is identified as a suspected matching point. The current pixel position information of the suspected matching point is obtained. Based on the current pixel position information of the suspected matching point, the camera position is moved, the current camera image is re-acquired, and a new matching score for the suspected matching point is determined. This new matching score is then re-determined to see if it is greater than the preset success threshold. If the matching scores of all candidate points are less than the preset failure threshold, the camera is moved to expand the search range, and new candidate points are determined for further evaluation. If the search range is exceeded, the matching is deemed a failure.

[0111] Correspondingly, a three-stage progressive search strategy reduces the average alignment time by more than 40%, with a particularly significant efficiency improvement in the first-piece alignment scenario. The introduction of a comprehensive matching quality evaluation and field-of-view edge relocalization mechanism reduces the mismatch rate from 10%-15% in traditional methods to below 2%, while also exhibiting stronger robustness to weak textures and lighting variations. While maintaining high accuracy, the algorithm reduces its dependence on hardware resources through optimized computational processes and parallel processing, resulting in a faster matching speed than traditional implementations.

[0112] The board marker alignment method provided in this application includes: after the board is placed on a machine, acquiring board parameter information and machine parameter information; wherein, the board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine; determining the theoretical position information of the marker point based on the board parameter information and the machine parameter information; moving the camera according to the theoretical position information of the marker point so that the marker point is within the camera's field of view; acquiring the current camera image; determining the matching score corresponding to at least one candidate point in the current camera image based on the current camera image and the size information of the marker point; for any candidate point, if the matching score of the candidate point is greater than a preset success threshold, determining the candidate point as the alignment point; wherein, the alignment point is the pixel point of the marker point in the current camera image; acquiring the current pixel position information of the alignment point; fine-tuning the camera position according to the current pixel position information of the alignment point so that the alignment point is located at the center of the camera's field of view; controlling the machine arm to precisely move to the alignment point position according to the calculated physical coordinates; acquiring the image a second time at the final position to verify whether the alignment accuracy meets the requirements. If the verification passes, the alignment process is completed; otherwise, error data is recorded and a compensation learning mechanism is initiated to optimize subsequent alignment parameters.

[0113] The method provided by the above solution determines the theoretical position information of the marker point based on the board and machine parameter information after the board is placed on the machine. The camera is then moved accordingly to place the marker point within the camera's field of view. The current camera image is then acquired. Based on the size information of the current camera image and the marker point, the matching score corresponding to the candidate point in the current camera image is determined. If the matching score of the candidate point is greater than a preset success threshold, the candidate point is determined as the alignment point. The camera position is fine-tuned based on the current pixel position of the alignment point to complete the alignment of the board marker point. By determining the matching score of the candidate point in the current camera image and quantifying whether it is an alignment point based on the matching score, the accuracy of alignment point determination is improved, thereby improving the efficiency of the test.

[0114] Furthermore, the board and machine parameter information provides data support for subsequently determining the location of marker points and identifying whether they are alignment points. Coarse localization of marker points defines the approximate range for finding them, reducing alignment time. Matching scores quantify the similarity between candidate points and marker points, allowing for the determination of whether a point is a marker, providing data for subsequent alignment. If the matching score of a candidate point exceeds a preset success threshold, it indicates the existence of an alignment point in the current camera image. The camera position is then precisely located based on the current pixel position information of the alignment point. The matching score quantifies the alignment point determination, avoiding manual searching and localization, reducing time and improving alignment efficiency. If no alignment point exists in the current camera image, the search range is expanded to determine if an alignment point exists in the new camera field of view. Moving the camera while preserving overlapping areas ensures no gaps between adjacent shooting areas, preventing candidate points from being missed and expanding the search area. Simultaneously, the camera's movement direction is determined when no alignment point is found. When the matching score of a candidate point is greater than or equal to a preset failure threshold and less than or equal to a preset success threshold, a suspected alignment point is identified. The alignment point is then located by adjusting the camera position and re-evaluating the situation.

[0115] When a suspected alignment point is located at the edge of the camera's field of view, lens distortion and perspective errors may result in a lower matching score. By adjusting the camera position based on the current pixel position information of the suspected alignment point, the matching score of the suspected alignment point is re-acquired, resulting in a more accurate matching score. This is beneficial for judging marker points and reduces the false matching rate. By using the current pixel position information of the target calibration point, and moving the camera position according to preset movement distance and preset angle values, the mapping relationship between pixel values ​​and physical values ​​is determined, converting the acquired pixel information into physical information, thereby realizing the physical movement of the camera. Calibrating the mapping relationship between pixel values ​​and physical values ​​through the target calibration point improves the accuracy of camera movement and alignment accuracy. Through a three-stage progressive search strategy, the average alignment time is reduced by more than 40%, especially in the first alignment scenario, where the efficiency improvement is more significant. The introduction of a comprehensive matching quality evaluation and field of view edge relocalization mechanism reduces the false matching rate from 10%-15% in traditional methods to below 2%, while also exhibiting stronger robustness to weak textures and lighting changes. While maintaining high accuracy, the algorithm reduces its dependence on hardware resources by optimizing the computation process and parallel processing, and its matching speed is faster than traditional implementations.

[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0117] The embodiments of this application also provide a board marker alignment device for performing the board marker alignment method provided in the above embodiments.

[0118] like Figure 4 The diagram shown is a schematic representation of the board marker alignment device provided in an embodiment of this application. The board marker alignment device 40 includes: a first acquisition module 401, a first determination module 402, a moving module 403, a second acquisition module 404, a second determination module 405, a third determination module 406, a third acquisition module 407, and an adjustment module 408.

[0119] The system comprises the following modules: a first acquisition module, used to acquire board parameter information and machine parameter information after the board is placed on the machine; wherein the board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine; a first determination module, used to determine the theoretical position information of the marker point based on the board parameter information and the machine parameter information; a movement module, used to move the camera based on the theoretical position information of the marker point so that the marker point is within the camera's field of view; a second acquisition module, used to acquire the current camera image; a second determination module, used to determine the matching score corresponding to at least one candidate point in the current camera image based on the current camera image and the size information of the marker point; a third determination module, used to determine the candidate point as the alignment point if the matching score of the candidate point is greater than a preset success threshold for any candidate point; wherein the alignment point is the pixel point of the marker point in the current camera image; a third acquisition module, used to acquire the current pixel position information of the alignment point; and an adjustment module, used to fine-tune the position of the camera based on the current pixel position information of the alignment point so that the alignment point is located at the center of the camera's field of view.

[0120] For a description of the features in the embodiment corresponding to the board marker alignment device, please refer to the relevant description of the embodiment corresponding to the board marker alignment method, which will not be repeated here.

[0121] Embodiments of this application also provide a board marker alignment system for performing the board marker alignment method provided in the above embodiments.

[0122] like Figure 5 The diagram shown is a structural schematic of the board marking point alignment system provided in an embodiment of this application. The board marking point alignment system includes: a machine base, a camera, a robotic arm, and electronic equipment.

[0123] The machine is used to carry the circuit board; the camera is used to capture the current camera image of the circuit board; the electronic device uses any of the above-mentioned circuit board marker alignment methods to control the robotic arm, so as to adjust the position of the camera through the robotic arm.

[0124] Embodiments of this application also provide an electronic device, such as... Figure 6 The diagram shown is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above-described board marker alignment method embodiments.

[0125] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described board marker alignment method embodiments when it runs.

[0126] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0127] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described board marker alignment method embodiments.

[0128] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described board marker alignment method embodiments.

[0129] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0130] The foregoing has provided a detailed description of a board marking point alignment method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for aligning marking points on a circuit board, characterized in that, The method includes: After the board is placed on the machine, board parameter information and machine parameter information are acquired; wherein, the board parameter information includes the position and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine; Based on the board parameter information and machine parameter information, determine the theoretical position information of the marker point; Based on the theoretical location information of the marker point, move the camera so that the marker point is within the camera's field of view; Get the current camera image; Based on the size information of the current camera image and the marker points, determine the matching score corresponding to at least one candidate point in the current camera image; For any candidate point, if the matching score of the candidate point is greater than a preset success threshold, the candidate point is determined as a matching point; wherein, the matching point is the pixel of the marker point in the current camera image; Obtain the current pixel position information of the alignment point; Based on the current pixel position information of the alignment point, the camera position is finely adjusted so that the alignment point is located at the center of the camera's field of view; The step of fine-tuning the camera position based on the current pixel position information of the alignment point, so that the alignment point is located at the center of the camera's field of view, includes: Based on the mapping relationship between pixel values ​​and physical values, the current physical location information of the target point is determined according to the current pixel location information of the target point. Based on the current physical location information, the camera is finely adjusted so that the alignment point is located at the center of the camera's field of view; Obtain the current pixel position information of the target calibration point and the current first camera calibration image; The camera is moved according to a preset moving distance value; Acquire the current second camera calibration image; The pixel movement value is determined based on the current second camera calibration image, the current first camera calibration image, and the current pixel position information of the target calibration point; Obtain the correspondence between multiple preset movement distance values ​​and pixel movement values; Based on the correspondence between multiple preset moving distance values ​​and pixel moving values, the mapping relationship between pixel values ​​and physical values ​​is determined.

2. The board marking point alignment method according to claim 1, characterized in that, The method further includes: If the matching score of all candidate points is less than a preset failure threshold, move the camera in a preset direction. Reacquire the current camera image; Based on the size information of the reacquired current camera image and the marker points, determine the matching score corresponding to at least one new candidate point in the current camera image; For any new candidate point, if the matching score of the new candidate point is greater than a preset success threshold, the new candidate point is determined as the matching point.

3. The board marking point alignment method according to claim 2, characterized in that, The method further includes: If the matching scores of at least one newly determined candidate point are still less than the preset failure threshold, move the camera clockwise and return to the step of reacquiring the current camera image.

4. The board marking point alignment method according to claim 1, characterized in that, The method further includes: If the matching score of the candidate point with the highest matching score is greater than or equal to a preset failure threshold and less than or equal to a preset success threshold, the candidate point is determined to be a suspected matching point. Obtain the current pixel location information of the suspected alignment point; Based on the current pixel position information of the suspected alignment point, the position of the camera is moved so that the suspected alignment point is located at the center of the camera's field of view; Reacquire the current camera image; Based on the current camera image and the size information of the marker points, a new matching score is determined for the suspected alignment point; If the new matching score of the suspected matching site is greater than the preset success threshold, the suspected matching site is determined to be a matching site.

5. A board marking point alignment device, characterized in that, The device includes: The first acquisition module is used to acquire board parameter information and machine parameter information after the board is placed on the machine; wherein, the board parameter information includes the position information and size information of at least one marker point on the board, and the machine parameter information includes the relative position information between the board and the machine; The first determining module is used to determine the theoretical position information of the marker point based on the board parameter information and the machine parameter information; A moving module is used to move the camera according to the theoretical position information of the marker point so that the marker point is within the field of view of the camera; The second acquisition module is used to acquire the current camera image; The second determining module is used to determine the matching score corresponding to at least one candidate point in the current camera image based on the size information of the current camera image and the marker points; The third determining module is used to determine a candidate point as a matching point if the matching score of the candidate point is greater than a preset success threshold; wherein the matching point is the pixel of the marker point in the current camera image; The third acquisition module is used to acquire the current pixel position information of the alignment point; The adjustment module is used to fine-tune the position of the camera based on the current pixel position information of the alignment point, so that the alignment point is located at the center of the camera's field of view; The adjustment module is further configured to: determine the current physical position information of the alignment point based on the current pixel position information of the alignment point according to the mapping relationship between pixel values ​​and physical values; fine-tune the position of the camera based on the current physical position information so that the alignment point is located at the center of the camera's field of view; acquire the current pixel position information of the target calibration point and the current first camera calibration image; move the camera according to a preset movement distance value; acquire the current second camera calibration image; determine a pixel movement value based on the current second camera calibration image, the current first camera calibration image, and the current pixel position information of the target calibration point; acquire the correspondence between multiple preset movement distance values ​​and the pixel movement value; and determine the mapping relationship between the pixel value and the physical value based on the correspondence between multiple preset movement distance values ​​and the pixel movement value.

6. A board marking point alignment system, characterized in that, The system includes: a machine base, a camera, a robotic arm, and electronic equipment; The machine is used to carry circuit boards; The camera is used to capture the current camera image of the board; The electronic device uses the board marker alignment method as described in any one of claims 1 to 4 to control the robotic arm to adjust the position of the camera.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the board marker alignment method as described in any one of claims 1 to 4 when executing the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the board marker alignment method as described in any one of claims 1 to 4.