A multi-track scanning and sub-track splicing and space-time positioning method and system for a PCB continuous plate feeding scene and a storage medium
Patent Information
- Application Number
- CN202611087846.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2046-07-22
AI Technical Summary
[0003]然而,当两块或更多PCB以不同速度、不同倾角甚至部分前后重叠的方式通过线扫区域时,现有技术方案要么将连续扫描行中所有前景区域合并成一个整体,导致多块板被错误地拼接为一幅长图;要么依赖后处理阶段根据尺寸或位置阈值进行被动拆分,而这种拆分往往需要等待所有目标完全离开观测区后才能执行,从而引起输出延迟,还可能伴随着目标拆分偏差和定位识别失误,最终无法稳定输出标准化、高精度的板级识别和检测结果
本申请提供一种面向PCB连续进板场景的多轨线扫分轨拼图与时空定位方法,首先在每个处理周期内生成带有采样时刻和输送方向位置参考的扫描行,以扫描行为识别单位采集像素点数据;其次对每条扫描行进行阈值判断和短白缝合并,将一个扫描行中的多个横向活动区间归纳为同一个横向活动区间集合,有效消除了带孔板、倾斜进板以及局部灰度波动带来的干扰,提升了识别鲁棒性;接着依据预设的匹配规则将每个横向活动区间独立续接到对应的既有活动轨道或分配至新创建的活动轨道,从而能够稳定分离同时或交错进入识别和检测的区域的多块PCB,避免误拼为长图或误拆导致识别失误;当某一活动轨道统计的连续未匹配续接的缺席行数达到预设闭合阈值时,该活动轨道立即闭合并生成轨道拼图图像,最后根据轨道拼图图像、轨道时间序列和轨道位置序列直接回推出板级识别定位信息,从而实现了标准化、高精度的板级结果输出,即对每一块板子进行板级识别和时空定位,而无需等待所有目标完全离开后再进行后处理拆分。
Smart Images

Figure CN122617875B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of industrial machine vision and continuous conveying recognition technology, and in particular to a multi-track line scanning and spatiotemporal positioning method, system and storage medium for PCB continuous board feeding scenarios. Background Technology
[0002] In line scanning inspection scenarios involving continuous PCB board feeding, the vision system needs to capture and identify circuit boards sequentially passing through the observation area in real time while the conveyor belt is constantly moving. To address this need, existing technologies have developed several typical processing approaches. The first type is line scanning methods based on single-object crossing detection. The core idea is to track whether an object completely passes through a certain observation plane and generate a complete image after the object has completely left. This method is suitable for simple assembly line scenarios where objects are spaced far apart and do not overlap. The second type focuses on contour extraction and boundary envelope modeling. By analyzing edge information in the line scan image, it obtains the target's size, shape, or envelope. This is often used for sorting, measurement, or preliminary screening, and its output is primarily geometric parameters rather than a board-level structured image. The third type employs continuous image registration and large-image stitching strategies. It treats the continuous rows of data obtained from line scanning as a single image, transforms and aligns them, stitches them into a long image, and then segments out individual targets. The fourth type mainly focuses on hardware image acquisition, emphasizing the optical calibration, geometric distortion correction, and image acquisition accuracy improvement of the line scan camera, aiming to obtain clear and stable raw image data.
[0003] However, when two or more PCBs pass through the line scan area at different speeds, angles, or even partially overlapping, existing technologies either merge all foreground areas in the continuous scan line into a single whole, resulting in multiple boards being incorrectly stitched into a long image; or they rely on passive splitting based on size or position thresholds in the post-processing stage. This splitting often requires waiting for all targets to completely leave the observation area before it can be performed, causing output delays and potentially accompanied by target splitting deviations and positioning and recognition errors. Ultimately, it is impossible to stably output standardized, high-precision board-level recognition and detection results. Summary of the Invention
[0004] This application discloses a multi-track scanning and spatiotemporal positioning method, system, and storage medium for PCB continuous board feeding scenarios, which is used to stably output board-level recognition results.
[0005] The first aspect of this application discloses a multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios, including:
[0006] Within each processing cycle, multiple scan lines for the current processing cycle are generated, and the sampling time and transport direction position reference information corresponding to each scan line are determined; Thresholding and short white stitching are performed on the pixels of each scan line to obtain a set of horizontal active regions; According to the preset matching rules, each horizontal active interval in the set of horizontal active intervals of each scan line is matched and continued to the corresponding existing active track, or assigned to a newly established active track. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent matching and continued is retained. Each active track is accumulated with its corresponding track image row, track time series, and track position sequence. The track image row includes pixel data of all matching lateral active interval sets for each active track. The track time series includes the sampling time of all matching scan rows for each active track. The track position sequence includes the transport direction position reference information of all matching scan rows for each active track. Count the number of missing rows in each activity track that are not continuously matched and continue into the horizontal activity interval; When the number of consecutive missing rows of any active track reaches a preset closure threshold, the active track is closed, and a track mosaic image is generated based on the track image row corresponding to the active track. Based on the track mosaic image, the track time series, and the track position series, corresponding board-level results are generated, and zero or more board-level results generated in the current processing cycle are output as the board-level identification and positioning information for the current period.
[0007] Optionally, the step of thresholding and short white stitching of pixels in each scan line to obtain a set of horizontal active regions includes: Binarization thresholding is performed on the pixels of each scan line to obtain foreground pixels and background pixels; Extract all continuous foreground segments in a single scan line as the original horizontal active range of the single scan line. The width of the original horizontal active range is greater than or equal to a preset extremely narrow foreground width threshold. For each scan line, when the pixel width of the short white gap between two adjacent continuous foreground segments in the same scan line is less than or equal to a preset merging width threshold, the short white gap is filled into the foreground to merge the two adjacent continuous foreground segments and obtain the horizontal activity range of the same scan line.
[0008] Optionally, the preset matching rules include interval overlap priority rules and / or center continuity backoff rules; The interval overlap priority rule is as follows: if the range of any horizontal active interval in the set of horizontal active intervals of the current scan line overlaps with the range of the horizontal active interval most recently matched and continued by any existing active track, then the horizontal active interval will be matched and continued to the corresponding overlapping existing active track. The center continuity rollback rule is as follows: If the range of any horizontal active interval in the current scan row's horizontal active interval set does not overlap with the range of the most recently matched and continued horizontal active intervals of all existing active tracks, then the center of the any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track are extracted respectively; the distance value between the center of the any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track is calculated respectively; when any distance value is less than or equal to a preset center continuity threshold, then the existing active track uniquely corresponding to the any distance value is determined, and the any horizontal active interval is matched and continued to the uniquely corresponding existing active track; when all distance values are greater than the preset center continuity threshold, then the any horizontal active interval is assigned to a newly established active track.
[0009] Optionally, the step of generating corresponding board-level results based on the track mosaic image, the track time series, and the track position series, and outputting zero or more board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period includes: The track mosaic image is binarized and connected component detection is performed. If holes are detected in the track puzzle image, the holes are repaired to obtain a repaired track puzzle image; Calculate the bounding box, main direction, and geometric center of the repaired track mosaic image, and the horizontal and vertical pixel coordinates are located in the pixel coordinate system. Based on the orbit time series, the sampling time of the geometric center is obtained; Based on the orbital position sequence, the horizontal and vertical pixel coordinates of the geometric center are mapped to the horizontal position and transport direction position in the world coordinate system, respectively. Map the principal direction to an attitude angle in the world coordinate system; The bounding box, the sampling time of the geometric center, the lateral position in the world coordinate system, the transport direction position, and the attitude angle are used as board-level results, and zero or one board-level results generated in the current processing cycle are output as the board-level identification and positioning information for the current period.
[0010] Optionally, obtaining the sampling time of the geometric center based on the orbital time series includes: Based on the vertical pixel coordinates of the geometric center, determine the scan line occupied by the geometric center, as well as the scan lines adjacent to the scan line occupied by the geometric center. Based on the orbit time series, determine the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines; The sampling time of the geometric center is obtained by performing linear interpolation on the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines before and after it.
[0011] Optionally, mapping the lateral and longitudinal pixel coordinates of the geometric center to the lateral and transport direction positions in the world coordinate system according to the orbital position sequence includes: Based on the total number of pixels in a single scan line and the width of the conveyor belt, the lateral pixel coordinates of the geometric center are mapped to the lateral position in the world coordinate system. Based on the track position sequence, determine the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines; Based on the vertical pixel coordinates of the geometric center, linear interpolation is performed on the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines to map and calculate the transport direction position in the world coordinate system.
[0012] Optionally, mapping the principal direction to an attitude angle in the world coordinate system includes: Extract the unit vector of the main direction; Calculate the principal direction angle of the unit vector relative to the horizontal coordinate axis of the pixel coordinate system; When the positive direction of the horizontal coordinate axis of the pixel coordinate system is consistent with the positive direction of the horizontal coordinate axis in the world coordinate system, the principal direction angle is directly used as the attitude angle in the world coordinate system. When the positive direction of the horizontal axis of the pixel coordinate system is opposite to the positive direction of the horizontal axis in the world coordinate system, the opposite of the principal direction angle is taken as the attitude angle in the world coordinate system.
[0013] The second aspect of this application discloses a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, including: The receiving unit is used to generate multiple scan lines for the current processing cycle in each processing cycle, and determine the sampling time and transport direction position reference information corresponding to each scan line; The merging processing unit is used to perform threshold judgment and short white stitching on the pixels of each scan line to obtain a set of horizontal active regions; The matching unit is used to match and continue each horizontal active interval in the set of horizontal active intervals of each scan line to the corresponding existing active track, or to allocate it to a newly established active track, according to a preset matching rule. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent matching and continued is retained. The accumulation unit is used to accumulate the track image line, track time series and track position sequence corresponding to each active track respectively. The track image line includes the pixel data of all the sets of horizontal active intervals that are matched for each active track. The track time series includes the sampling time of all the scan lines that are matched for each active track. The track position sequence includes the transport direction position reference information of all the scan lines that are matched for each active track. The statistics unit is used to count the number of missing rows in each activity track that are not continuously matched and extended to the horizontal activity interval; A closure unit is used to close any active track when the number of consecutive absent rows of any active track reaches a preset closure threshold, and to generate a track mosaic image based on the track image row corresponding to any active track. The output unit is used to generate corresponding board-level results based on the track mosaic image, the track time series, and the track position series, and output zero or one board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period.
[0014] The third aspect of this application provides a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, including: Processor, memory, input / output units, and bus; The processor is connected to memory, input / output units, and a bus; The memory stores a program, which the processor calls to execute, such as the first aspect and any optional multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios.
[0015] The fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, performs a multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios, as described in the first aspect and any optional method of the first aspect.
[0016] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: This application provides a multi-track scanning and spatiotemporal positioning method for continuous PCB feeding scenarios. First, within each processing cycle, a scan line with sampling time and conveying direction position reference is generated, and pixel data is collected using the scan line as the identification unit. Second, threshold judgment and short white stitching are performed on each scan line, summarizing multiple lateral activity intervals in a scan line into a single lateral activity interval set. This effectively eliminates interference caused by perforated boards, tilted feeding, and local grayscale fluctuations, improving recognition robustness. Then, according to preset matching rules, each lateral activity interval is independently connected to the corresponding existing activity track or sub-track. The newly created active track can stably separate multiple PCBs that enter the recognition and detection area simultaneously or intermittently, avoiding mis-assembly into long images or mis-disassembly that could lead to recognition errors. When the number of consecutive unmatched missing rows counted by a certain active track reaches a preset closure threshold, the active track immediately closes and generates a track mosaic image. Finally, the board-level recognition and positioning information is directly deduced based on the track mosaic image, track time series, and track position series, thus achieving standardized and high-precision board-level result output. That is, board-level recognition and spatiotemporal positioning are performed on each board without waiting for all targets to completely leave before post-processing and disassembly. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art 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.
[0018] Figure 1 This is a schematic diagram of an embodiment of the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios in this application; Figure 2 A schematic diagram of an embodiment of the method for generating a set of lateral activity intervals for this application; Figure 3 A schematic diagram of an embodiment of the method for generating board-level results and board-level identification and positioning information for this application; Figure 4 This is a schematic diagram of the first embodiment of the multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios of this application; Figure 5 This is a schematic diagram of the second embodiment of the multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios in this application; Figure 6 A schematic diagram illustrating the line scanning process and the output of board-level identification and positioning information for each active track; Figure 7This is a schematic diagram of a status panel generated by the backend of a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, based on board-level identification and positioning information. Detailed Implementation
[0019] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0020] It should be understood that, when used in this application specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0021] It should also be understood that the term “and / or” as used in this application specification means any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations.
[0022] As used in this application specification, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0023] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0024] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0025] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. 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 scope of protection of this application.
[0026] The method described in this application can be applied to servers, systems, devices, terminals, or other devices with logical processing capabilities; therefore, this application does not limit its application. For ease of description, the following description uses a system as the executing entity.
[0027] Please see Figure 1 This application provides an embodiment of a multi-track line scanning and spatiotemporal positioning method for PCB continuous board feeding scenarios, including: 101. In each processing cycle, generate multiple scan lines for the current processing cycle and determine the sampling time and transport direction position reference information corresponding to each scan line; In this embodiment, at the beginning of each processing cycle, the system first obtains the scene snapshot, time increment, and cycle number of the current cycle from the external cycle scheduling layer. The scene snapshot describes the geometric state and distribution relationship of all visible PCB targets in the current observation area, such as the position, orientation, and overlap of each circuit board; the time increment represents the length of time elapsed since the end of the previous processing cycle; and the cycle number is used to identify the order of the current processing cycle. Based on the scene snapshot, the system generates several scan lines within the current processing cycle according to the conveyor belt speed and the observation line position of the current observation area—each scan line corresponds to a position on the conveyor belt with a fixed sampling interval. For example, if the processing cycle generates 10 scan lines, the system simulates the pixel sequence of these 10 scan lines sequentially from front to back according to the direction of the conveyor belt movement. The pixel sequence of each scan line reflects the grayscale distribution on a certain transverse cross section of the conveyor belt, that is, the distribution of the grayscale value of each collected pixel. At the same time, the system uses the time increment and the conveyor belt speed parameter, combined with the sequential position of each scan line in the sequence, to calculate the sampling time of each scan line one by one. In the specific calculation, the sampling time of each row is calculated in reverse order of the scan row generation, i.e., the last scan row was sampled earliest. In addition, each scan row also includes corresponding conveyor direction position reference information. This information can be calculated from the sampling time, the reference origin time, and the conveyor belt speed, reflecting the physical position coordinates of the scan row in the conveyor belt's direction of movement. The pixel sequence of the scan row, the sampling time, and the conveyor direction position reference together constitute the standard input data for subsequent track-by-track mosaicking.
[0028] 102. Threshold judgment and short white stitching are performed on the pixels of each scan line to obtain the set of horizontal active ranges; In this embodiment, for each scan line generated in step 101, the system first distinguishes between the foreground and background of the scan line. The foreground determination condition may include at least one of the following: grayscale value greater than a threshold, grayscale value less than a threshold, adaptive threshold, and multi-channel threshold. One example is: threshold judgment is performed on the pixels of the scan line, that is, a grayscale threshold is set to classify each pixel as representing a part of PCB material or a part of conveyor belt / air. After threshold judgment, the pixel sequence on the scan line becomes a binary sequence. Then, the system identifies all continuous segments representing PCB material in the binary sequence. Each continuous foreground segment representing PCB material is called an original lateral active range. Because there may be holes, slots, or dirt on the PCB surface, the segments that should be continuous are interrupted by several white pixels representing conveyor belt / air, forming multiple adjacent narrow intervals, i.e., short white seams, also known as short background seams or short gaps, which refer to background pixel segments in the same scan line whose width between two adjacent foreground segments does not exceed a preset merging width threshold. To merge these small gaps caused by holes or noise back into the same target area, the system performs short white stitching and processing, thereby merging the two original lateral active regions and the gap in between into a longer lateral active region. After the above merging process, each scan line has zero or one or more lateral active regions, which together constitute the set of lateral active regions for that scan line. For example, a line may simultaneously contain the regions corresponding to the left PCB and the right PCB.
[0029] 103. According to the preset matching rules, each horizontal active interval in the set of horizontal active intervals of each scan line is matched and continued to the corresponding existing active track, or assigned to a newly established active track. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent match is retained. Optionally, the preset matching rules include interval overlap priority rules and / or center continuity backoff rules; The interval overlap priority rule is as follows: if the range of any horizontal active interval in the set of horizontal active intervals of the current scan line overlaps with the range of the horizontal active interval most recently matched and continued by any existing active track, then the horizontal active interval will be matched and continued to the corresponding overlapping existing active track. The center continuity rollback rule is as follows: If the range of any horizontal active interval in the current scan line's horizontal active interval set does not overlap with the range of the most recently matched and continued horizontal active intervals of all existing active tracks, then extract the center of any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track; calculate the distance between the center of any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track; when any distance value is less than or equal to a preset center continuity threshold, determine the existing active track that uniquely corresponds to that distance value, and match and continue any horizontal active interval to the uniquely corresponding existing active track; when all distance values are greater than the preset center continuity threshold, assign any horizontal active interval to a newly established active track. In this embodiment, for each scan line, the system attempts to connect each horizontal active interval in the set of horizontal active intervals of that scan line to an existing active track or to create a new active track, according to a preset matching rule. In a preferred embodiment, the interval overlap priority rule and the center continuity backtracking rule are executed sequentially to select the accurate corresponding active track one by one, ensuring the correctness of the subsequent recognition results. First, each existing active track records the "range of the most recently matched and connected horizontal active interval", that is, the start and end pixel coordinates of the most recently matched horizontal active interval of that active track. For any horizontal active interval on the current scan line, the system matches according to the interval overlap priority principle: if the horizontal active interval overlaps with the most recently matched range of an existing active track, that is, the horizontal active intervals of the two intervals have the same or overlapping range, then the interval is connected to the existing active track. If no corresponding overlapping existing active track is found, the center continuity backoff principle is applied: the difference (absolute value) between the center coordinates of the current horizontal active interval and the center coordinates of the most recently matched and continued horizontal active interval of each existing active track is calculated. If the center difference of the most recently matched and continued horizontal active interval of an active track is less than or equal to a preset center continuity threshold, the horizontal active interval of the scan line is continued to the existing active track. When a horizontal active interval meets the matching conditions of multiple existing active tracks, a unique existing active track is determined based on at least one of the following: maximum overlap length, minimum center distance, closest recent hit time, or preset track priority. When a unique existing active track cannot be determined, the horizontal active interval is assigned to a newly established active track or marked as an interval to be confirmed. This center continuity backoff mechanism can cope with the lateral drift caused by the PCB tilting during board entry. Even if the horizontal active intervals of the upper and lower scan lines do not directly overlap, the same track can still be maintained as long as the center continues to change. If the current lateral activity range neither overlaps with any existing orbit nor satisfies the center continuity backoff condition, the system considers the lateral activity range to represent a newly entered PCB (Content Processing Zone) in the observation area, and thus establishes a new activity orbit for it. It is important to note that whenever an existing activity orbit successfully connects to a new lateral activity range, the existing activity orbit immediately updates its recorded "range of the most recently matched lateral activity range" to the range of the currently connected lateral activity range, rather than merging it with the historical range. This ensures that the orbit range always follows the latest position of the target and avoids mistakenly merging adjacent targets due to historical envelope expansion.
[0030] 104. Accumulate the track image row, track time series and track position sequence corresponding to each active track respectively. The track image row includes the pixel data of all the horizontal active interval sets corresponding to each active track. The track time series includes the sampling time of all the scan lines corresponding to each active track. The track position sequence includes the transport direction position reference information of all the scan lines corresponding to each active track. In this embodiment, after matching each horizontal active range to the corresponding active track or assigning it to a newly established active track in step 103, the system accumulates three types of data for each active track: track image rows, track time series, and track position sequences. Specifically, for a given active track, whenever it successfully connects to a horizontal active range on a scan line, the system extracts the corresponding pixel segment from the original pixel sequence of that scan line, i.e., the image stripe of the PCB on that scan line, and appends this row of image stripes to the track's "track image row" sequence. Simultaneously, the system appends the sampling time of that scan line to the track's "track time series" and the transport direction position reference information of that scan line to the track's "track position sequence." Each active track independently maintains its own three sets of sequences, and the sequence lengths are all equal to the number of scan lines currently accumulated for that active track. It is important to note that the track image rows store the local image stripes of the PCB on each scan line, rather than all pixels of the entire scan line. This significantly reduces storage overhead and ensures that each track retains only its own image data. The orbit time series and orbit position series record the spatiotemporal labels corresponding to each row of images, providing a basis for subsequently mapping image coordinates to physical world coordinates. Through this row-by-row accumulation method, each active orbit is actually gradually building a complete jigsaw puzzle image of the corresponding PCB, while fully preserving the sampling time and transport direction position information of each row.
[0031] 105. Count the number of missing rows in each activity track that are not continuously matched and continued into the horizontal activity interval; In this embodiment, after each scan line is processed, the system needs to count the "number of consecutively unmatched missing lines connected to a horizontal active interval" for all currently existing active tracks. For each active track, the system checks whether the active track has been successfully connected to a horizontal active interval in the currently processed line. If so, the "number of consecutively missing lines" for that active track is cleared to zero, because there is still new data input for that active track, indicating that the corresponding PCB has not yet left the observation area. Conversely, if the active track has not matched any horizontal active interval in the current line, that is, no interval in the line has been connected to this track, its "number of consecutively missing lines" is increased by 1. This statistical process is carried out for each scan line in each processing cycle. Initially, when an active track is just created, its number of consecutively missing lines is 0. As the scan lines advance, if the PCB corresponding to an active track has completely left the line scan observation area, then in the next few scan lines, the active track will never be able to match a new interval, and its number of consecutively missing lines will continue to accumulate. This statistic is not dependent on the boundaries of the processing cycle, but is updated continuously, row by row. The system maintains an independent counter for each active track, recording the number of consecutive rows it has been absent from.
[0032] 106. When the number of consecutive absent rows of any active track reaches the preset closure threshold, close any active track and generate a track mosaic image based on the track image rows corresponding to any active track. In this embodiment, a closure threshold is preset for each active track, for example, 5 rows. This closure threshold represents the maximum number of consecutive missing rows allowed for an active track. When the system updates the number of consecutive missing rows for an active track in step 105, it immediately compares this value with the preset closure threshold. If the number of consecutive missing rows for the active track has reached or exceeded the closure threshold, the system determines that the PCB corresponding to the active track has completely left the line scan observation area. At this time, the active track no longer waits for any new intervals that may appear later, but immediately triggers an independent closure operation. The closure operation includes the following: First, the status of the active track is marked as "closed," so that it no longer participates in the subsequent matching and continuation process. Second, according to the accumulated "track image row" sequence of the active track, the system stitches all the image stripes stored in the sequence from top to bottom into a complete two-dimensional image according to the order of the scan rows, that is, the time order represented by the sampling time. This image is called the "track mosaic image." This image contains all the line scan image information of the PCB from entering the observation area to leaving the observation area, and since each row has been arranged according to the actual sampling time, the geometric relationship of the image is consistent with the actual physical posture. It is worth noting that the closure of different activity trajectories is independent of each other—the PCB that leaves the observation area earlier can close first to generate the mosaic image, without having to wait for other PCBs still in the observation area. This "first to leave, first to close" mechanism avoids the delay caused by the traditional method that requires waiting for all targets to leave before unified post-processing.
[0033] 107. Based on the track mosaic image, track time series, and track position series, generate the corresponding board-level results, and output the zero or one board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period.
[0034] In this embodiment, when an active track is closed, the system generates board-level results using the track mosaic image, track time series, and track position series of that track. First, the system binarizes the track mosaic image and then uses a connected component detection algorithm to identify the pixel regions in the image belonging to the PCB. Based on these pixel regions, the system calculates the geometric center, bounding box (minimum bounding rectangle), and principal direction (i.e., the principal axis direction of the pixel region). Next, the system maps the geometric center in the image to the world coordinate system based on the track time series and track position series of the active track. Furthermore, the system converts the principal direction of the pixel region into an attitude angle in the world coordinate system. Finally, the system organizes the calculated information, such as the lateral position of the geometric center, the transport direction position, the sampling time, the attitude angle, and the bounding box, into board-level results. It outputs zero or more board-level results generated within the current processing cycle as the board-level identification and positioning information for use by downstream business systems. That is, if multiple active tracks are closed within the same processing cycle, each track independently generates its own board-level identification and positioning information, which is then output together within that cycle. For practical applications of steps 101 to 107, please refer to... Figure 6 and Figure 7 , Figure 6 This is a schematic diagram illustrating the line scanning process and the process of outputting board-level identification and positioning information for each active track. Figure 7 This is a schematic diagram of a status panel generated by the backend of a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, based on board-level identification and positioning information.
[0035] In this embodiment, firstly, a scan line with sampling time and conveying direction position reference is generated in each processing cycle, and pixel data is collected by scanning line as the identification unit. Secondly, threshold judgment and short white stitching are performed on each scan line to summarize multiple horizontal active intervals in a scan line into the same horizontal active interval set, effectively eliminating the interference caused by perforated plates, tilted plates, and local grayscale fluctuations, and improving the recognition robustness. Then, according to the preset matching rules, each horizontal active interval is independently continued to the corresponding existing active track or assigned to a newly created active track, so as to stably separate multiple PCBs that enter the recognition and detection area at the same time or in an interleaved manner, avoiding mis-pasting into long images or mis-disassembly leading to recognition errors. When the number of consecutive unmatched missing lines counted by a certain active track reaches the preset closure threshold, the active track is immediately closed and a track mosaic image is generated. Finally, the board-level recognition and positioning information is directly deduced from the track mosaic image, track time series, and track position series, thereby realizing standardized and high-precision board-level result output, that is, board-level recognition and spatiotemporal positioning of each board without waiting for all targets to completely leave before post-processing and splitting.
[0036] Please see Figure 2Regarding step 102, which involves thresholding and short white stitching of pixels in each scan line to obtain a set of horizontal active intervals, this application provides an embodiment of a method for generating a set of horizontal active intervals, which may include, but is not limited to, the following: 201. Perform binarization thresholding on the pixels of each scan line to obtain foreground pixels and background pixels; 202. Extract all continuous foreground segments in a single scan line as the original horizontal active range of the single scan line. The width of the original horizontal active range is greater than or equal to the preset extremely narrow foreground width threshold. 203. For each scan line, when the pixel width of the short white gap between two adjacent continuous foreground segments in the same scan line is less than or equal to the preset merging width threshold, the short white gap is filled into the foreground to merge the two adjacent continuous foreground segments and obtain the horizontal activity range of the same scan line.
[0037] In this embodiment, step 201 performs binarization thresholding segmentation on each scan line. First, the system acquires a one-dimensional pixel sequence for the scan line, where the grayscale value of each pixel is typically an integer between 0 and 255. The system presets a grayscale threshold, which can be determined through calibration based on actual lighting and PCB material, for example, 120. Then, for each pixel on the scan line, its grayscale value is compared with the threshold: if the grayscale value is greater than or equal to the grayscale threshold, the pixel is determined to be a foreground pixel, representing the presence of PCB material; if the grayscale value is less than the grayscale threshold, it is determined to be a background pixel, representing the conveyor belt or air. This process converts the original grayscale scan line into a binary sequence composed of foreground and background. For example, a scan line has 20 pixels with original grayscale values of [80,95,200,210,180,90,85,220,230,200,110,100,205,195,80,70,210,220,190,90]. With a preset threshold of 120, binarization yields the following sequence: [0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0]. This binary sequence clearly identifies which continuous areas belong to the PCB and which belong to the background, providing a direct basis for subsequent extraction of the lateral activity range.
[0038] Step 202 extracts all continuous foreground segments on the binarized scan line and filters out noise segments with excessively small widths. The specific process is as follows: The system scans the binary sequence of the line pixel by pixel from left to right. Whenever a foreground pixel is encountered and its left side is background (or it is at the beginning of the line), it is marked as the start position of a segment. The system then continues scanning to the right until it encounters a background pixel or the end of the line, at which point the end position of the segment is recorded. This yields an original horizontal active range with a width of (end position - start position + 1) pixels. For example, the binary sequence [0,0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0] in step 201 can be scanned from left to right to obtain three original horizontal activity intervals: Interval A: starting index 3 to 5 (starting index 1, usually index 0 in actual code), width 3; Interval B: starting index 8 to 10, width 3; Interval C: starting index 13 to 14, width 2; Interval D: starting index 17 to 19, width 3. After extracting all the original intervals, the system filters according to a preset "extremely narrow foreground width threshold". This threshold is used to remove isolated noise points or very small dirt, for example, the threshold is set to 2 pixels. Then, intervals with a width less than 2 will be discarded, that is, in this example, interval C has a width of 2, and is retained if it is equal to the threshold; if the threshold is 3, then interval C is discarded. The filtering operation can effectively avoid false foreground segments caused by dust, small scratches or electromagnetic interference from interfering with subsequent track splitting logic. Ultimately, all the original lateral active regions retained are output as the "original lateral active region set" for that scan line. Each of these regions represents a potential target segment, but the splitting caused by holes has not yet been addressed. To illustrate more specifically, assume a transport bandwidth of 800 mm, corresponding to 800 pixels, with each pixel approximately 1 mm. A real PCB is 300 mm wide, but due to tilt or holes, its projection might split on a single line into two regions with widths of 120 and 150 pixels respectively, separated by a short white slit of 5 pixels. The extremely narrow foreground width threshold is typically set to a very small value (e.g., 2 pixels), so both regions are preserved and not filtered out as noise. The primary target of filtering is random noise with a width of only 1 pixel.
[0039] Step 203 performs short white seam stitching and processing on adjacent original horizontal active intervals on the same scan line to repair internal breaks in the target caused by holes, slots, or local grayscale fluctuations. The system first obtains the set of original horizontal active intervals output in step 202. Then, it processes adjacent intervals sequentially from left to right, checking the "short white seam pixel width" between them. The short white seam refers to the number of consecutive background pixels between two intervals. The system presets a "merging width threshold," for example, 6 pixels, or dynamically calculates it based on the total number of pixels in a single row. If the short white seam width is less than or equal to this merging width threshold, the system determines that the short white seam is caused by holes, slots, or temporary occlusion on the PCB, rather than a true target interval. Therefore, all pixels in this short white seam are changed from background to foreground, thus merging the left and right intervals into a new, longer horizontal active interval. Then, the system continues to compare this merged interval with the next adjacent interval until merging is no longer possible. For example: Suppose the original horizontal active regions on a scan line are: Region 1 [100, 150] (width 51), Region 2 [157, 200] (width 44), and Region 3 [250, 300] (width 51). The short white gap between Region 1 and Region 2 is 6 pixels from 151 to 156 (because 156-151+1=6). If the merging width threshold is 6, then pixels 151-156 are filled with foreground pixels, resulting in a new region [100, 200]. Then, check the new region [100, 200] and Region 3 [250, 300]: the short white gap between them is 49 pixels from 201 to 249, which is much larger than the threshold, so they are not merged. Finally, the set of horizontal active regions for this scan line is {[100, 200], [250, 300]}. This merging operation restores the projection of the same PCB piece, which was previously split due to holes, to a complete lateral activity range, preventing it from being mistakenly treated as two separate tracks laterally. After all merging is complete, step 203 outputs the "lateral activity range set" of the current scan line, where each range represents an independent, continuous foreground region on that scan line that is most likely to belong to the same physical target.
[0040] Please see Figure 3 Regarding step 107, which generates corresponding board-level results based on the track mosaic image, track time series, and track position series, and outputs zero or more board-level results generated within the current processing cycle as the board-level identification and positioning information for the current period, this application provides an embodiment of a method for generating board-level results and board-level identification and positioning information, which may include, but is not limited to, the following: 301. Perform binarization and connected component detection on the track mosaic image; 302. If holes are detected in the track puzzle image, repair the holes to obtain a repaired track puzzle image; 303. Calculate the bounding box, main direction, and geometric center of the repaired track mosaic image, including the horizontal and vertical pixel coordinates, which are located in the pixel coordinate system. 304. Based on the orbital time series, obtain the sampling time of the geometric center; 305. Based on the orbital position sequence, map the horizontal and vertical pixel coordinates of the geometric center to the horizontal position and transport direction position in the world coordinate system, respectively. 306. Map the principal direction to an attitude angle in the world coordinate system; 307. The sampling time of the bounding box and geometric center, the lateral position in the world coordinate system, the position in the transport direction and the attitude angle are taken as the board-level results, and the zero or one or more board-level results generated in the current processing cycle are taken as the board-level identification and positioning information of the current period.
[0041] Optionally, obtaining the sampling time of the geometric center based on the orbit time series includes: determining the scan line occupied by the geometric center and the scan lines adjacent to the scan line occupied by the geometric center based on the vertical pixel coordinates of the geometric center; determining the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines based on the orbit time series; and performing linear interpolation on the sampling time of the scan line occupied by the geometric center and the sampling times of the adjacent scan lines to obtain the sampling time of the geometric center.
[0042] Optionally, mapping the horizontal and vertical pixel coordinates of the geometric center to the horizontal and transport direction positions in the world coordinate system according to the track position sequence includes: mapping the horizontal pixel coordinates of the geometric center to the horizontal position in the world coordinate system based on the total number of pixels in a single scan line and the width of the conveyor belt; determining the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of adjacent scan lines based on the track position sequence; and performing linear interpolation on the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of adjacent scan lines based on the vertical pixel coordinates of the geometric center to obtain the transport direction position in the world coordinate system.
[0043] Optionally, mapping the principal direction to an attitude angle in the world coordinate system includes: extracting the unit vector of the principal direction; calculating the principal direction angle of the unit vector relative to the horizontal axis of the pixel coordinate system; when the positive direction of the horizontal axis of the pixel coordinate system is consistent with the positive direction of the horizontal axis of the world coordinate system, directly using the principal direction angle as the attitude angle in the world coordinate system; when the positive direction of the horizontal axis of the pixel coordinate system is opposite to the positive direction of the horizontal axis of the world coordinate system, using the negative of the principal direction angle as the attitude angle in the world coordinate system.
[0044] In this embodiment, step 301 performs binarization and connected component detection on the track mosaic image generated by the closed active track. First, the system acquires the track mosaic image, which is a two-dimensional grayscale image formed by stitching together all track image rows accumulated by the active track in chronological order from top to bottom. Its height is equal to the number of scan rows accumulated by the track. The system performs binarization processing on the image, sets a grayscale threshold (e.g., the same threshold 120 as in step 201), and classifies each pixel as foreground (representing PCB material) or background. The binarized image becomes a binary image composed of foreground (1) and background (0), clearly outlining the contour area of the PCB. Subsequently, the system performs connected component detection on the binary image. Commonly used methods are 8-connected or 4-connected scanning algorithms. The algorithm scans pixel by pixel starting from the upper left corner of the image. Whenever an unmarked foreground pixel is encountered, it uses that pixel as a seed for flooding and filling, marking all connected (8-connected or 4-connected) foreground pixels as the same connected component and assigning a unique identifier. After scanning, the system obtains one or more connected components, each representing an independent target region in the image. Since the track jigsaw puzzle image theoretically contains only the projection of one PCB, usually only one main connected component is detected. The results of connected component detection include basic information such as the pixel set and bounding box of each connected component. To illustrate more specifically, assume that the size of a track jigsaw puzzle image is 150 rows × 302 columns. After binarization, the foreground pixels form an approximately rectangular region, but due to the presence of vias on the PCB, several isolated background pixel clusters appear inside this rectangle, i.e., holes. The eight-connectedness detection algorithm marks the large area of foreground on the periphery as the same connected component, while the background pixels inside are not counted as foreground. Therefore, the detected connected component is a region with "holes"—that is, the description of the connected component includes the outer contour and the inner contour (hole boundary). The system records all the outer boundary pixels and inner boundary pixels of the connected component for hole repair in step 302. If two separate connected components unexpectedly appear in the track puzzle image (e.g., due to a break caused by severe tilting, or two boards being incorrectly merged into the same track), the system needs to process them further or mark the anomaly. However, in general, the output of step 301 is a main connected component and its internal hole information.
[0045] Step 302 repairs the detected holes to obtain the repaired track mosaic image. The system first analyzes the connected component structure obtained in step 301: a connected component may contain multiple closed holes (i.e., background areas completely surrounded by foreground pixels). These holes mainly originate from two sources: first, vias, slots, or mounting holes that actually exist on the PCB, which appear as isolated background areas in the image; second, small areas inside the target that are misjudged as background due to improper binarization threshold selection or uneven local illumination. To obtain the complete PCB area for accurate geometric center and attitude estimation, these holes need to be filled as foreground. Specific repair methods can include morphological closing operations (dilation followed by erosion) or directly performing pixel filling on each hole within the connected component. That is, for each closed hole, the system obtains the coordinates of all pixels inside its contour, changes the values of these pixels from background to foreground, and the PCB area in the repaired track mosaic image becomes a solid connected region without holes.
[0046] Step 303 calculates the bounding box, main direction, and horizontal and vertical pixel coordinates of the geometric center of the repaired track mosaic image. The system first obtains the foreground pixel set in the repaired track mosaic image. Based on the number of pixels in the foreground pixel set and the coordinates of each pixel in the pixel coordinate system, the horizontal and vertical pixel coordinates of the geometric center are calculated. This pixel coordinate system typically uses the width of the conveyor belt as the x-axis (referred to as the horizontal axis in this embodiment) and the conveying direction of the conveyor belt as the y-axis (referred to as the vertical axis in this embodiment). Next, the bounding box is calculated: traversing all foreground pixels, the minimum and maximum values of the horizontal and vertical pixel coordinates in the foreground pixel set are found. The bounding box can then be represented as an axis-aligned rectangle. Finally, the main direction is calculated. The main direction refers to the direction in which the foreground pixels are most dispersed, usually corresponding to the long side of the PCB. The system first constructs a 2×2 covariance matrix, and then solves for the eigenvalues and eigenvectors of the covariance matrix. Since the covariance matrix is a real symmetric matrix, it has two eigenvalues, both greater than or equal to 0, and two unit eigenvectors corresponding to these two eigenvalues. The eigenvector corresponding to the larger eigenvalue is the principal direction unit vector, which represents the direction in which the pixel distribution is longest. Finally, the bounding box boundary values, principal direction unit vector, and geometric center are output.
[0047] Step 304 obtains the sampling time of the geometric center based on the orbit time series. The orbit time series is a list of sampling times of all matching scan lines recorded during the accumulation process of the active orbit, arranged in the order of scan lines. Each element corresponds to the sampling time of the corresponding line in the orbit puzzle image. Since the v-th row (v starts from 0) of the orbit puzzle image corresponds to the v-th matching scan line in the accumulation process, the orbit time series corresponds one-to-one with the image row index. The vertical pixel coordinates of the geometric center are usually not integers, for example, 74.5, indicating that the geometric center falls between the 74th and 75th rows of the image. The system first takes k = floor(74.5), rounds down to 74; then calculates the decimal part λ = 74.5 - 74 = 0.5. Then, the sampling times of the 74th and 75th rows are extracted from the orbit time series and denoted as t. 74 and t 75 Sampling time t at the geometric center 74.5 Calculated using the linear interpolation formula: t 74.5 =(1-λ)t 74 +λt 75 If the vertical pixel coordinates of the geometric center are exactly integers (e.g., 75.0), then k=75, λ=0, and the sampling time t is directly taken. 75 No interpolation is required. This interpolation method assumes that the sampling time between adjacent rows varies linearly with time, while actual line scan cameras sample at fixed time intervals, so linear interpolation is a reasonable approximation. Step 304 outputs the sampling time of the geometric center, which corresponds to the precise time it takes for the PCB to pass through its geometric center point on the observation line.
[0048] Step 305 maps the lateral and longitudinal pixel coordinates of the geometric center to the lateral and conveying direction positions in the world coordinate system based on the track position sequence. First, the lateral position (denoted as X) in the world coordinate system corresponds to the width direction of the conveyor belt, typically in millimeters. Let the actual width of the conveyor belt be W. b (e.g., 800 mm), each row of the image has P x Given 800 pixels (e.g., 100 pixels), and the known correspondence between the positive horizontal coordinates of the pixel coordinate system and the positive horizontal coordinates of the world coordinate system (which may be the same or opposite). The horizontal pixel coordinates of the geometric center are u. c Then the formula for calculating the world's horizontal position X is: If the positive horizontal direction of the image is consistent with the positive horizontal direction of the world: X = (u c +0.5) / P x ×W b Conversely: X=W b -(u c +0.5) / P x ×W bAdding 0.5 is to convert the pixel index to pixel center coordinates. Next, the conveyor direction position (denoted as Y) is processed: the conveyor direction position refers to the physical coordinates of the geometric center in the direction of the conveyor belt's movement. The system uses a linear interpolation method similar to step 304, but utilizes a track position sequence. The track position sequence records the conveyor direction position reference corresponding to each row (i.e., the Y coordinate of that scan row on the conveyor belt). The vertical pixel coordinate of the geometric center is v. c For example, let's take k = floor(v) c ), λ=v c -k, extracts the transport direction position references from the k-th and (k+1)-th rows of the orbital position sequence, denoted as y. k and y {k+1} Calculate Y = (1-λ)y k +λy {k+1} This gives us the world transport direction position of the geometric center. Step 305 outputs the world lateral position X and transport direction position Y.
[0049] Step 306 maps the principal direction to an attitude angle in the world coordinate system. The system first obtains the unit vector of the principal direction from step 303 and calculates the principal direction angle in the pixel coordinate system. The principal direction angle is defined as the angle between the unit vector and the horizontal axis of the pixel coordinate system. The range of the principal direction angle is typically (-π, π], with a negative angle indicating a slight upward tilt of the principal direction. Then, the attitude angle is determined based on the relationship between the positive direction of the horizontal axis of the pixel coordinate system and the positive direction of the horizontal axis of the world coordinate system. If the two directions are the same, the attitude angle is directly equal to the principal direction angle; if the directions are opposite, the attitude angle is equal to the negative of the principal direction angle. The attitude angle is used to represent the actual orientation and degree of tilt of the PCB on the conveyor belt plane.
[0050] Step 307 organizes the calculated information into board-level results. These board-level results are a structured data set containing at least the following fields: bounding box, sampling time of the geometric center, lateral position in the world coordinate system, transport direction position, and attitude angle. Furthermore, when no valid board-level results are generated for a single board, or when there is a suspected multi-board merging state, board-level identification and positioning information with abnormal status information is generated and output. For example, if an unrepairable hole or multiple disconnected areas are detected in step 302, an anomaly can be marked. Then, zero or more board-level results generated within the current processing cycle are output as the board-level identification and positioning information for the current period. This board-level identification and positioning information is packaged into a data format conforming to the downstream interface agreement and returned to the upper-layer business system through the result output unit. That is, if multiple active tracks are closed within the current processing cycle, each track generates independent board-level results, which are combined into a set and output as board-level identification and positioning information; if no tracks are closed, an empty set or an equivalent no-result state is output. Through step 307, the downstream system does not need to concern itself with the complex accumulation and jigsaw puzzle process of the visual system's internal activity tracks, and can directly obtain standardized board-level recognition and positioning results, which can be used for subsequent grouping, aggregation, alignment or execution control.
[0051] In summary, step 301, binarization and connected component detection, transforms the image into a quantifiable target region; step 302, hole repair, effectively eliminates the damage to the region's integrity caused by PCB vias, slots, and other structures, ensuring the accuracy of subsequent geometric calculations; step 303 accurately calculates the bounding box, geometric center, and principal direction of the target region, laying the foundation for size verification and attitude estimation; steps 304 and 305 utilize orbital time series and position series, and through linear interpolation, map the geometric center pixel coordinates in the image to the sampling time and physical position (lateral coordinates and transport direction coordinates) in the real world, achieving a precise conversion from pixel space to physical space; step 306 converts the principal direction into an attitude angle, allowing the output results to be directly used for downstream pose control; and step 307 outputs all board-level identification and positioning information in a structured form, facilitating direct consumption by downstream systems.
[0052] The following is provided Figure 1 The specific calculation process of the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios, as shown in the embodiment, is as follows: Each processing cycle generates a fixed number of scan lines. Let t be the end time of the c-th processing cycle. c The total number of scan rows generated in this cycle is N. L The conveyor belt speed is v b The sampling interval for the conveying direction corresponding to a single scan line is Δy. line , where v b >0. Then the sampling time t of the j-th scan line in this period is...{c,j} It can be represented as: t {c,j} =t c -(N L -1-j)×Δy line / v b ; Where j = 0, 1, 2, ..., N L -1.
[0053] If we let the time corresponding to the reference point of the conveying direction position be t... ref0 The origin is located at y ref0 The transport direction position corresponding to the j-th scan line in this cycle is referenced by y. {c,j} It can be represented as: y {c,j} =y ref0 +v b ×(t {c,j} -t ref0 ); When the center coordinates of the horizontal pixels in a scan line are u, and the line width is P pixels... x The actual width of the conveyor belt is W. b If the positive horizontal direction of the pixel coordinate system coincides with the positive horizontal direction of the world coordinate system, for example, both correspond to west to east, then the world horizontal position x(u) corresponding to the pixel center can be expressed as: x(u) = (u + 0.5) / P x ×W b ; If the positive horizontal direction of the pixel coordinate system is opposite to the positive horizontal direction of the world coordinate system, for example, if the positive horizontal direction of the pixel coordinate system corresponds to west to east and the positive horizontal direction of the world coordinate system corresponds to east to west, then it can be represented as: x(u)=W b -(u+0.5) / P x ×W b ; To ensure that the parameters in the above examples have a verifiable closing method, the following rules can be used: First, if the pixel width of the short white slit between two adjacent black foreground segments in the same scan line is denoted as g... gap The line width in pixels is denoted as P. x Therefore, it is preferable to use g gap ≤max(2,round(0.003×P x When performing inline merging, where `round` indicates rounding; additionally, it is preferred to filter lines with widths less than `max(2,round(0.002×P)` first. x The extremely narrow black section is used to prevent noise fragments from entering subsequent track splits.
[0054] Second, if the current lateral activity range after merging does not directly overlap with the lateral range of the most recent hit of the existing activity trajectory, and the difference between their centers is denoted as Δu c Then it is preferred to be in Δu c ≤max(6,round(0.01×P x When the conditions for center continuity rollback and reconnection are met, it is determined that the conditions are met.
[0055] Third, let n be the number of rows where a certain activity track fails to find a new interval consecutively. miss The threshold for continuous absence closure is denoted as N. close Then it is preferred to be in n miss ≥N close The independent closure of the active track is triggered at that time.
[0056] The following is provided Figure 3 The specific calculation process of the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios, as shown in the embodiment, is as follows: Let Ω be the original foreground connected region (i.e., the track mosaic image) corresponding to a certain closed active track. i The pixel set obtained after repairing the closed holes (i.e., the repaired track mosaic image) is Ω. i '.' Here, (u,v) represents the coordinates of a pixel in the track puzzle image, where u is the horizontal pixel coordinate and v is the vertical pixel coordinate. The bounding box (bbox) i Taking only the minimum / maximum boundaries of the repaired pixel set in the horizontal and vertical directions, it can be represented as: u min =min{u|(u,v)∈Ω i '}; u max =max{u|(u,v)∈Ω i '}; v min =min{v|(u,v)∈Ω i '}; v max =max{v|(u,v)∈Ω i '}; bbox i ={x min =u min ,x max =u max ,y min =v min ,y max =v max}; Furthermore, |Ω i '| represents Ω iThe number of pixels contained in ', Σ(u,v∈Ω) i ')u represents the relationship between Ω and Ω. i The sum of the horizontal pixel coordinates of all pixels in ', Σ(u,v∈Ω) i ')v represents the state of Ω i The vertical pixel coordinates of all pixels in the target pixel region are summed. The center (geometric center) of the target pixel region is obtained by averaging the coordinates of all pixels. u i =(1 / |Ω i '|)×Σ(u,v∈Ω i ')u; v i =(1 / |Ω i '|)×Σ(u,v∈Ω i ')v; To estimate the main extension direction of the target region in the image, we can first use the geometric center as a reference to statistically analyze the dispersion of the horizontal and vertical distribution of the target pixels, and construct a 2×2 covariance matrix Ci: ; c uu =(1 / |Ω i '|)×Σ(u,v∈Ω i ')(uu i )2; c vv =(1 / |Ω i '|)×Σ(u,v∈Ω i ')(vv i )2; c uv =(1 / |Ω i '|)×Σ(u,v∈Ω i ')(uu i (vv) i ); Among them, c uu c represents the degree of dispersion of the horizontal pixel coordinates of the target pixel relative to the geometric center. vv c represents the degree of dispersion of the vertical pixel coordinates of the target pixel relative to the geometric center. uv This represents the common change relationship between the horizontal and vertical pixel coordinates of the target pixel; when c uv When the value is not zero, it indicates that the distribution of target pixels is tilted relative to the horizontal or vertical direction. The above normalization coefficients can also be replaced by equivalent covariance normalization coefficients; as long as the same normalization method is used for each matrix component, the uniform scaling of the matrix as a whole does not change the subsequently obtained principal direction.
[0057] Based on C iThe principal direction unit vector e of the target pixel distribution can be obtained. i =(e {i,1} ,e {i,2} ) T For any unit direction vector q, the dispersion of the target pixel after projection along that direction can be expressed as D(q) = q. T ·C i ·q. When D(q) reaches its maximum value, the corresponding direction is the direction with the greatest projection dispersion of the target region in the track mosaic image, which usually corresponds to the main extension direction (i.e., the main direction) of the plate-shaped target. Therefore, in this implementation, the unit eigenvector corresponding to the maximum eigenvalue of Ci is taken as the basic vector of the main direction, which can be obtained according to the following relationship: C i ·e i =λ (i,max) ·e i ; e {i,1} 2 +e {i,2} 2 =1; θ {i,img} =norm [-π / 2,π / 2] (atan2(e {i,2} ,e {i,1} )); Where, λ (i,max) Represents the covariance matrix C i The larger eigenvalues correspond to the unit eigenvector e. i This indicates the direction with the greatest dispersion in the target pixel distribution. The first line of the formula states: when C i With direction vector e i When multiplying, the direction does not change; it is only proportional to λ. (i,max) Zoom in or zoom out; the formula in the second row represents e. i It is a unit vector. {i,1} e represents the component of that direction on the horizontal coordinate in the pixel coordinate system. {i,2} This represents the component of that direction on the vertical coordinate axis of the pixel coordinate system. In other words, e i This only indicates the main extension direction of the repaired track mosaic image, not the target size. [-π / 2,π / 2] ( ) indicates that the direction angle is normalized to the interval [-π / 2, π / 2] to avoid angle jumps caused by the same target flipping. atan2(e {i,2} ,e {i,1} () represents the arctangent function with quadrant determination, used to determine the component e of the unit vector in the principal direction on the vertical axis of the pixel coordinate system. {i,2} and the component e on the horizontal coordinate u in the pixel coordinate system {i,1}Calculate the direction angle of the main direction relative to the horizontal coordinate axis u of the pixel coordinate system.
[0058] Furthermore, attitude angle r i It can be calculated from the principal direction based on the relationship between the positive direction of the horizontal coordinate in the pixel coordinate system and the positive direction of the horizontal coordinate in the world coordinate system. If the positive direction of the horizontal coordinate in the pixel coordinate system is consistent with the positive direction of the horizontal coordinate in the world coordinate system, take r. i =θ {i,img} If the positive horizontal direction of the pixel coordinate system is opposite to the positive horizontal direction of the world coordinate system, then take r. i =-θ {i,img} ; r i =θ {i,img} The positive horizontal direction of the pixel coordinate system is consistent with the positive horizontal direction of the world coordinate system. r i =-θ {i,img} The positive horizontal direction of the pixel coordinate system is opposite to the positive horizontal direction of the world coordinate system. The vertical pixel coordinate of the geometric center mentioned above is v i Let k = floor(v) i ), λ=v i -k. Where floor(v i Let ) represent the largest integer not greater than vi, used to determine the smaller row number of the target center's location. Since the target center is usually obtained from the pixel average, it may fall between two scan rows. Therefore, k and k+1 are first used to determine the two adjacent scan rows that sandwich the center position, and then λ represents the proportion by which the target center shifts from row k to row k+1. For example, λ=0 indicates that the geometric center falls in row k, and λ=0.50 indicates that the center is located in the middle of the two rows. Let t be the sampling time of row k and row k+1 in the orbital time series. k row With t (k+1) row Then the sampling time in the board-level results can be obtained by linear interpolation: t i =(1-λ)×t k row +λ×t (k+1) row ; Similarly, if the transport direction position references of the k-th row and the (k+1)-th row in the track position sequence are denoted as y... k row With y (k+1) row Then the transport position reference corresponding to the row with the same geometric center can be represented as: i =(1-λ)×y krow +λ×y (k+1) row ; The horizontal pixel coordinate of the geometric center mentioned above is u i Let the total number of pixels in a single scan line be P. x The actual width of the conveyor belt is W. b When the positive direction of the horizontal coordinate of the pixel coordinate system coincides with the positive direction of the world horizontal coordinate, then the world horizontal position x corresponding to the horizontal pixel coordinate of the geometric center is... i It can be represented as: x i =(u i +0.5) / P x ×W b ; If the positive direction of the horizontal coordinate in the pixel coordinate system is opposite to the positive direction of the world horizontal coordinate, it can be represented as: x i =W b -(u i +0.5) / P x ×W b .
[0059] If the row at the geometric center is at the boundary of the orbit time series or orbit position series, the nearest valid row or equivalent boundary interpolation method can be used; this boundary case does not affect the linear interpolation logic of adjacent rows shown in the following numerical substitution examples.
[0060] In the basic backtracking path that does not rely on orbital-level target association prompts, it is possible to directly... i As yi. In other words, as long as the closed orbit has preserved the orbit time series and orbit position series, the system can form a basic t without relying on orbit-level target association prompts. i With y i .
[0061] The above basic path can already form x i y i r i and t i If a closed active trajectory has accumulated trajectory-level target association information during continuous accumulation, and this information can be associated with the corresponding target in the current device state, then enhancement processing can be performed by combining the position reference and attitude reference in the current device state. Specifically, for y... i , can t i For the target sampling time, the world transport direction position of the target at that time is reconstructed based on the current device position reference. Let the current device position reference be y. cur The current system time is t. cur,but: y i =y cur -v b ×max(t cur -t i ,0); The purpose of the above method is to improve y, assuming the basic path is already established. i Robustness associated with targets and batches, or for backfilling target and batch information. For attitude angle r... i The basic path is still based on the principal direction estimation result of the target region in the closed orbit image, and is obtained by conversion from the principal direction; it can also be combined with the attitude reference in the current device state to adjust the r. i Perform consistency verification or backfilling. The above attitude angle processing also falls under the category of preferred correlation backfilling methods.
[0062] The above embodiments illustrate the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios provided by this application. The following describes the multi-track line scanning and spatiotemporal positioning system and storage medium for continuous PCB board feeding scenarios provided by this application: Please see Figure 4 This application provides an embodiment of a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, comprising: The receiving unit 401 is used to generate multiple scan lines for the current processing cycle in each processing cycle, and determine the sampling time and conveying direction position reference information corresponding to each scan line; The merging processing unit 402 is used to perform threshold judgment and short white stitching processing on the pixels of each scan line to obtain a set of horizontal active regions; The matching unit 403 is used to match and continue each horizontal active interval in the set of horizontal active intervals of each scan line to the corresponding existing active track, or to assign it to a newly established active track, according to a preset matching rule. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent matching is retained. The accumulation unit 404 is used to accumulate the track image line, track time series and track position sequence corresponding to each active track respectively. The track image line includes the pixel data of all the sets of horizontal active intervals that are matched for each active track. The track time series includes the sampling time of all the scan lines that are matched for each active track. The track position sequence includes the transport direction position reference information of all the scan lines that are matched for each active track. The statistics unit 405 is used to count the number of missing rows in each activity track that are not continuously matched and continued into the horizontal activity interval; Closure unit 406 is used to close any active track when the number of consecutive absent rows of any active track reaches a preset closure threshold, and generate a track mosaic image based on the track image row corresponding to any active track; The output unit 407 is used to generate corresponding board-level results based on the track mosaic image, track time series and track position series, and output zero or one board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period.
[0063] Optionally, the merging processing unit 402 is specifically used for: Binarization thresholding is performed on the pixels of each scan line to obtain foreground pixels and background pixels; Extract all continuous foreground segments in a single scan line as the original horizontal active range of the single scan line. The width of the original horizontal active range is greater than or equal to the preset extremely narrow foreground width threshold. For each scan line, when the pixel width of the short white gap between two adjacent continuous foreground segments in the same scan line is less than or equal to the preset merging width threshold, the short white gap is filled into the foreground to merge the two adjacent continuous foreground segments and obtain the horizontal activity range of the same scan line.
[0064] Optionally, the preset matching rules include interval overlap priority rules and / or center continuity backoff rules; The interval overlap priority rule is as follows: if the range of any horizontal active interval in the set of horizontal active intervals of the current scan line overlaps with the range of the horizontal active interval most recently matched and continued by any existing active track, then the horizontal active interval will be matched and continued to the corresponding overlapping existing active track. The center continuity rollback rule is as follows: If the range of any horizontal active interval in the current scan line's horizontal active interval set does not overlap with the range of the most recently matched and continued horizontal active intervals of all existing active tracks, then the center of any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track are extracted respectively; the distance value between the center of any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track is calculated respectively; when any distance value is less than or equal to a preset center continuity threshold, then the existing active track that uniquely corresponds to any distance value is determined, and any horizontal active interval is matched and continued to the uniquely corresponding existing active track; when all distance values are greater than the preset center continuity threshold, then any horizontal active interval is assigned to a newly established active track.
[0065] Optionally, output unit 407 is specifically used for: Binarization and connected component detection are performed on the track mosaic image; If holes are detected in the track puzzle image, the holes are repaired to obtain a repaired track puzzle image; Calculate the bounding box, main direction, and geometric center of the repaired track mosaic image, and the horizontal and vertical pixel coordinates are located in the pixel coordinate system. Based on the orbital time series, obtain the sampling time of the geometric center; Based on the orbital position sequence, the horizontal and vertical pixel coordinates of the geometric center are mapped to the horizontal position and transport direction position in the world coordinate system, respectively. Map the principal direction to an attitude angle in the world coordinate system; The sampling time of the bounding box and geometric center, the lateral position in the world coordinate system, the position in the transport direction, and the attitude angle are used as the board-level results. Zero or one or more board-level results generated in the current processing cycle are used as the board-level identification and positioning information for the current period.
[0066] Optionally, output unit 407 is specifically used for: Based on the vertical pixel coordinates of the geometric center, determine the scan line occupied by the geometric center, as well as the scan lines adjacent to the scan line occupied by the geometric center. Based on the orbit time series, determine the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines; The sampling time of the geometric center is obtained by linear interpolation of the sampling time of the scan line occupied by the geometric center and the sampling times of the adjacent scan lines before and after it.
[0067] Optionally, output unit 407 is specifically used for: Based on the total number of pixels in a single scan line and the width of the conveyor belt, the horizontal pixel coordinates of the geometric center are mapped to the horizontal position in the world coordinate system. Based on the track position sequence, determine the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines; Based on the vertical pixel coordinates of the geometric center, linear interpolation is performed on the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines to obtain the transport direction position in the world coordinate system.
[0068] Optionally, output unit 407 is specifically used for: Extract the unit vector of the principal direction; Calculate the principal direction angle of the unit vector relative to the horizontal axis of the pixel coordinate system; When the positive direction of the horizontal axis of the pixel coordinate system is consistent with the positive direction of the horizontal axis of the world coordinate system, the principal direction angle is directly used as the attitude angle in the world coordinate system. When the positive direction of the horizontal axis of the pixel coordinate system is opposite to the positive direction of the horizontal axis of the world coordinate system, the negative value of the principal direction angle is taken as the attitude angle in the world coordinate system.
[0069] Please see Figure 5 This application provides a multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, including: Processor 501, memory 502, input / output unit 503, and bus 504.
[0070] The processor 501 is connected to the memory 502, the input / output unit 503, and the bus 504.
[0071] The memory 502 stores a program, and the processor 501 calls the program to execute it, such as... Figure 1 , Figure 2 or Figure 3 A multi-track line scanning and spatiotemporal positioning method for PCB continuous board feeding scenarios.
[0072] This application provides a computer-readable storage medium on which a program is stored, and when the program is executed on a computer, it performs the following... Figure 1 , Figure 2 or Figure 3 A multi-track line scanning and spatiotemporal positioning method for PCB continuous board feeding scenarios.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0075] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0076] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0077] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios, characterized in that, include: Within each processing cycle, multiple scan lines for the current processing cycle are generated, and the sampling time and transport direction position reference information corresponding to each scan line are determined; Thresholding and short white stitching are performed on the pixels of each scan line to obtain a set of horizontal active regions; According to the preset matching rules, each horizontal active interval in the set of horizontal active intervals of each scan line is matched and continued to the corresponding existing active track, or assigned to a newly established active track. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent matching and continued is retained. Each active track is accumulated with its corresponding track image row, track time series, and track position sequence. The track image row includes pixel data of all matching lateral active interval sets for each active track. The track time series includes the sampling time of all matching scan rows for each active track. The track position sequence includes the transport direction position reference information of all matching scan rows for each active track. Count the number of missing rows in each activity track that are not continuously matched and continue into the horizontal activity interval; When the number of consecutive missing rows of any active track reaches a preset closure threshold, the active track is closed, and a track mosaic image is generated based on the track image row corresponding to the active track. Based on the track mosaic image, the track time series, and the track position series, corresponding board-level results are generated, and zero or more board-level results generated in the current processing cycle are output as the board-level identification and positioning information for the current period.
2. The method according to claim 1, characterized in that, The process of thresholding and short white stitching for pixels in each scan line to obtain a set of horizontal active regions includes: Binarization thresholding is performed on the pixels of each scan line to obtain foreground pixels and background pixels; Extract all continuous foreground segments in a single scan line as the original horizontal active range of the single scan line. The width of the original horizontal active range is greater than or equal to a preset extremely narrow foreground width threshold. For each scan line, when the pixel width of the short white gap between two adjacent continuous foreground segments in the same scan line is less than or equal to a preset merging width threshold, the short white gap is filled into the foreground to merge the two adjacent continuous foreground segments and obtain the horizontal activity range of the same scan line.
3. The method according to claim 1, characterized in that, The preset matching rules include interval overlap priority rules and / or center continuity backoff rules; The interval overlap priority rule is as follows: if the range of any horizontal active interval in the set of horizontal active intervals of the current scan line overlaps with the range of the horizontal active interval most recently matched and continued by any existing active track, then the horizontal active interval will be matched and continued to the corresponding overlapping existing active track. The center continuity rollback rule is as follows: If the range of any horizontal active interval in the current scan row's horizontal active interval set does not overlap with the range of the most recently matched and continued horizontal active intervals of all existing active tracks, then the center of the any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track are extracted respectively; the distance value between the center of the any horizontal active interval and the center of the most recently matched and continued horizontal active interval of each existing active track is calculated respectively; when any distance value is less than or equal to a preset center continuity threshold, then the existing active track uniquely corresponding to the any distance value is determined, and the any horizontal active interval is matched and continued to the uniquely corresponding existing active track; when all distance values are greater than the preset center continuity threshold, then the any horizontal active interval is assigned to a newly established active track.
4. The method according to claim 1, characterized in that, The step of generating corresponding board-level results based on the track mosaic image, the track time series, and the track position series, and outputting zero or more board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period includes: The track mosaic image is binarized and connected component detection is performed. If holes are detected in the track puzzle image, the holes are repaired to obtain a repaired track puzzle image; Calculate the bounding box, main direction, and geometric center of the repaired track mosaic image, and the horizontal and vertical pixel coordinates are located in the pixel coordinate system. Based on the orbit time series, the sampling time of the geometric center is obtained; Based on the orbital position sequence, the horizontal and vertical pixel coordinates of the geometric center are mapped to the horizontal position and transport direction position in the world coordinate system, respectively. Map the principal direction to an attitude angle in the world coordinate system; The bounding box, the sampling time of the geometric center, the lateral position in the world coordinate system, the transport direction position, and the attitude angle are used as board-level results, and zero or one board-level results generated in the current processing cycle are output as the board-level identification and positioning information for the current period.
5. The method according to claim 4, characterized in that, The step of obtaining the sampling time of the geometric center based on the orbit time series includes: Based on the vertical pixel coordinates of the geometric center, determine the scan line occupied by the geometric center, as well as the scan lines adjacent to the scan line occupied by the geometric center. Based on the orbit time series, determine the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines; The sampling time of the geometric center is obtained by performing linear interpolation on the sampling time of the scan line occupied by the geometric center and the sampling time of the adjacent scan lines before and after it.
6. The method according to claim 5, characterized in that, The step of mapping the lateral and longitudinal pixel coordinates of the geometric center to the lateral and transport direction positions in the world coordinate system according to the orbit position sequence includes: Based on the total number of pixels in a single scan line and the width of the conveyor belt, the lateral pixel coordinates of the geometric center are mapped to the lateral position in the world coordinate system. Based on the track position sequence, determine the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines; Based on the vertical pixel coordinates of the geometric center, linear interpolation is performed on the transport direction position reference information of the scan line occupied by the geometric center and the transport direction position reference information of the adjacent scan lines to map and calculate the transport direction position in the world coordinate system.
7. The method according to claim 4, characterized in that, The step of mapping the principal direction to an attitude angle in the world coordinate system includes: Extract the unit vector of the main direction; Calculate the principal direction angle of the unit vector relative to the horizontal coordinate axis of the pixel coordinate system; When the positive direction of the horizontal coordinate axis of the pixel coordinate system is consistent with the positive direction of the horizontal coordinate axis in the world coordinate system, the principal direction angle is directly used as the attitude angle in the world coordinate system. When the positive direction of the horizontal axis of the pixel coordinate system is opposite to the positive direction of the horizontal axis in the world coordinate system, the opposite of the principal direction angle is taken as the attitude angle in the world coordinate system.
8. A multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, characterized in that, The multi-track scanning and spatiotemporal positioning system includes: The receiving unit is used to generate multiple scan lines for the current processing cycle in each processing cycle, and determine the sampling time and transport direction position reference information corresponding to each scan line; The merging processing unit is used to perform threshold judgment and short white stitching on the pixels of each scan line to obtain a set of horizontal active regions; The matching unit is used to match and continue each horizontal active interval in the set of horizontal active intervals of each scan line to the corresponding existing active track, or to allocate it to a newly established active track, according to a preset matching rule. The existing active track is updated each time it is matched and continued, and only the range of the horizontal active interval of the most recent matching and continued is retained. The accumulation unit is used to accumulate the track image line, track time series and track position sequence corresponding to each active track respectively. The track image line includes the pixel data of all the sets of horizontal active intervals that are matched for each active track. The track time series includes the sampling time of all the scan lines that are matched for each active track. The track position sequence includes the transport direction position reference information of all the scan lines that are matched for each active track. The statistics unit is used to count the number of missing rows in each activity track that are not continuously matched and extended to the horizontal activity interval; A closure unit is used to close any active track when the number of consecutive absent rows of any active track reaches a preset closure threshold, and to generate a track mosaic image based on the track image row corresponding to any active track. The output unit is used to generate corresponding board-level results based on the track mosaic image, the track time series, and the track position series, and output zero or one board-level results generated in the current processing cycle as the board-level identification and positioning information for the current period.
9. A multi-track line scanning and spatiotemporal positioning system for continuous PCB board feeding scenarios, characterized in that, include: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, and the processor calls the program to execute the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed on a computer, performs the multi-track line scanning and spatiotemporal positioning method for continuous PCB board feeding scenarios as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent control method and system for PCB (Printed Circuit Board) splitting machine
CN116001000A
Time-sharing stroboscopic streaming defect detection method, device and equipment and storage medium
CN121703105A