Heat sink conveying workpiece positioning control method and system based on machine vision

By performing anti-interference enhancement processing and feature encoding on real-time images during the radiator conveying process, and combining this with vibration monitoring data for real-time correction, the problem of insufficient radiator positioning accuracy in existing technologies has been solved, achieving high-precision conveying and positioning, and improving the efficiency and quality of automated production lines.

CN121544714BActive Publication Date: 2026-04-28HUA HENG AUTOMATION EQUIP (TIANJIN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUA HENG AUTOMATION EQUIP (TIANJIN) CO LTD
Filing Date
2026-01-20
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing machine vision-based radiator positioning technology struggles to achieve high-precision positioning in industrial environments, especially when faced with interference from metal reflections, overlapping fin edges, and slight changes in workpiece posture caused by conveyor vibrations. This makes it impossible to meet assembly tolerance requirements, limiting the efficiency and quality of automated production lines.

Method used

By acquiring real-time images during the heatsink's transport process and performing anti-interference enhancement processing, the periodic reference of the fin array is extracted, a mesh is constructed and effective periodic units are selected, a heatsink-specific APF feature code is generated, and dynamic matching is performed by combining spatiotemporal attention and a deep learning model to calculate sub-pixel level pose results. Real-time correction is then performed by combining vibration monitoring data.

Benefits of technology

It improves the accuracy and robustness of radiator delivery and positioning, enhances adaptability to industrial environmental interference, and ensures the stability and efficiency of the positioning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544714B_ABST
    Figure CN121544714B_ABST
Patent Text Reader

Abstract

The application discloses a heat radiator conveying workpiece positioning control method and system based on machine vision, and relates to the technical field of industrial automation control.The method comprises the following steps: in step 100, real-time images of a heat radiator in a conveying process are acquired, and anti-interference enhancement processing is performed on the real-time images to obtain preprocessed images; in step 200, frequency domain period detection is performed on the preprocessed images to extract a period reference of a fin array; in step 300, a grid is constructed based on the period reference, period unit division is performed on the preprocessed images, and effective period units are screened; and in step 400, feature coding processing is performed on the effective period units to generate a heat radiator-specific APF feature code.The application improves the precision and robustness of heat radiator conveying positioning, enhances the adaptability to industrial environment interference, and guarantees the stability and efficiency of the positioning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation control technology, specifically to a machine vision-based method and system for positioning and controlling the conveying of workpieces in a radiator. Background Technology

[0002] In industrial automated production, radiators are key components of power equipment and large industrial equipment. High-precision positioning is required during assembly, testing, and other transportation processes to ensure the smooth operation of subsequent steps. Radiators typically have a dense fin structure and are mostly made of metal, making them susceptible to environmental factors during transportation. This places stringent demands on the stability and accuracy of positioning technology.

[0003] Existing machine vision-based radiator positioning technologies mostly rely on general image feature extraction algorithms for natural feature recognition and matching. However, these methods are not customized for the structural characteristics of radiators and interference factors in industrial conveying environments. They are difficult to effectively distinguish between interference information and effective features caused by metal reflection and overlapping fin edges. At the same time, they cannot adapt to the slight changes in workpiece posture caused by conveying vibration. Ultimately, the positioning accuracy cannot meet the stringent requirements of assembly tolerance in actual production, thus limiting the efficiency and quality of automated production lines. Summary of the Invention

[0004] The purpose of this invention is to provide a machine vision-based method and system for positioning and controlling the conveying of heat sink workpieces, in order to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a machine vision-based method for positioning and controlling the transport of heat sink workpieces, comprising the following steps:

[0006] Includes the following steps:

[0007] Step 100: Obtain a real-time image of the radiator during the transportation process, and perform anti-interference enhancement processing on the real-time image to obtain a pre-processed image;

[0008] Step 200: Perform frequency domain period detection on the preprocessed image to extract the period reference of the fin array;

[0009] Step 300: Construct a grid based on the periodic reference, divide the preprocessed image into periodic units, and filter out effective periodic units;

[0010] Step 400: Perform feature encoding processing on the effective periodic unit to generate an APF feature code specific to the heat sink;

[0011] Step 500: Based on the APF feature code, perform dynamic matching of spatiotemporal attention and deep learning model fusion to calculate the sub-pixel level pose result of the heat sink.

[0012] Step 600: Combining vibration monitoring data with the sub-pixel level pose results, the delivery posture of the radiator is corrected in real time through prediction, compensation and verification processing.

[0013] Step 700: Acquire a verification image of the radiator after attitude correction. Based on the verification image, determine whether the radiator has reached the target positioning point and whether the positioning accuracy meets the preset requirements. If it has not reached the target or the positioning accuracy does not meet the preset requirements, return to step 100 to reacquire a real-time image of the radiator's current delivery status and repeat the subsequent steps. If it has reached the target and the positioning accuracy meets the preset requirements, the positioning control is completed.

[0014] Preferably, step 100 further includes the following steps:

[0015] Step 110: Acquire real-time images of the radiator during the transport process. When step 100 is executed for the first time, the real-time image is the initial real-time image of the radiator during transport. When step 100 is executed again, the real-time image is the real-time image of the radiator in its current transport state.

[0016] Step 120: Perform polarization de-reflection processing on the real-time image, separating the reflective area from the effective edge through polarization filtering;

[0017] Step 130: The CLAHE algorithm is used to enhance the contrast of the image after polarization de-reflection processing;

[0018] Step 140: Apply a Gaussian filter with a σ value of 0.8 to the contrast-enhanced image to remove random noise in the industrial environment and obtain the preprocessed image, where σ is the standard deviation of the Gaussian kernel.

[0019] Preferably, step 200 further includes the following steps:

[0020] Step 210: Perform a two-dimensional Fourier transform on the preprocessed image to convert the image from the spatial domain to the frequency domain;

[0021] Step 220: Perform peak detection on the frequency domain image, identify the frequency domain peaks corresponding to the horizontal and vertical periods, and calculate the initial period parameters based on the frequency domain peaks;

[0022] Step 230: Optimize the initial period parameters by smoothing with a Gaussian kernel for 5 iterations, and output the final period reference and number of columns.

[0023] Preferably, steps 300 to 400 further include the following steps:

[0024] Step 310: Establish a local coordinate system based on the edge of the heat sink to complete the image coordinate system calibration;

[0025] Step 320: Divide the preprocessed image into N×M periodic units according to the periodic reference, where N is the number of columns and M is the number of vertical units;

[0026] Step 330: Select periodic units with an effective pixel ratio of not less than 80% as the effective periodic units;

[0027] Step 410: Select three consecutive effective periodic units in the central region to generate a standard periodic template;

[0028] Step 420: The edge curve of each effective periodic unit is phase-aligned with the standard periodic template using a dynamic time warping algorithm;

[0029] Step 430: Perform gray-scale integration processing on the effective periodic cells after phase alignment to obtain the gray-scale integration value;

[0030] Step 440: Normalize the grayscale integral value to the [0, 255] interval, and convert it into an 8-bit binary code with a threshold of 128 to obtain the APF subcode;

[0031] Step 450: Concatenate all the APF subcodes according to the spatial position of the effective periodic unit to generate the initial full code of APF;

[0032] Step 460: Add CRC-8 check bits to the initial full code of the APF, remove APF subcodes that fail to pass the check, and complete the APF feature code by interpolation of APF subcodes in adjacent valid periodic units.

[0033] Preferably, step 500 further includes the following steps:

[0034] Step 510: Construct a spatial attention mechanism to assign weights to the periodic units corresponding to the APF feature codes and focus on high-confidence units;

[0035] Step 520: Perform temporal correlation analysis on the APF feature code sequence of consecutive multi-frame images, calculate the similarity of inter-frame codes, and dynamically adjust the matching weight of abnormal frames.

[0036] Step 530: Using the APF feature code matching results of a preset number of consecutive frames as input, the deep learning model learns the temporal pattern of pose change and outputs the pose prediction value of the next frame in real time.

[0037] Step 540: Perform coarse matching based on the Hamming distance of the APF feature code to filter candidate matching regions;

[0038] Step 550: Combine the pose prediction value to perform affine transformation correction on the candidate matching region, and optimize the sub-pixel pose result by iterative nearest point algorithm. The sub-pixel pose result includes X coordinate, Y coordinate and rotation angle θ.

[0039] Preferably, step 600 further includes the following steps:

[0040] Step 610: Monitor the vibration intensity of the conveyor line in real time using vibration sensors and dynamically adjust the confidence threshold of the attitude prediction.

[0041] Step 620: Receive the attitude prediction value and the sub-pixel level pose result, and generate a composite control command that combines prediction compensation and real-time correction;

[0042] Step 630: The composite control command is sent to the conveying control system to achieve advance compensation for slight attitude changes through differential control of the servo motor.

[0043] Step 640: Compare the error between the subpixel-level pose result and the pose prediction value. If the error exceeds a preset threshold, dynamically adjust the control parameters using an adaptive PID algorithm.

[0044] Preferably, step 700 further includes the following steps:

[0045] Step 710: Acquire a verification image of the radiator after attitude correction. The verification image is a real-time image reflecting the current corrected position and attitude of the radiator.

[0046] Step 720: Based on the verification image, analyze the actual position and actual positioning accuracy of the heat sink;

[0047] Step 730: Determine whether the actual position coincides with the target positioning point, and whether the actual positioning accuracy is less than or equal to a preset accuracy threshold.

[0048] Step 740: If the actual position does not coincide with the target positioning point or the actual positioning accuracy is greater than the preset accuracy threshold, return to step 100, re-acquire the real-time image of the current conveying state of the radiator and perform subsequent processing; if the actual position coincides with the target positioning point and the actual positioning accuracy is less than or equal to the preset accuracy threshold, terminate the positioning control process.

[0049] The present invention also provides a machine vision-based workpiece positioning control system for heat sink conveying, comprising a vision acquisition unit, a data processing unit, and a conveying control unit:

[0050] The visual acquisition unit is used to acquire real-time images of the heat sink during the transportation process and verification images after attitude correction, and transmit the real-time images and verification images to the data processing unit.

[0051] The data processing unit is used to perform anti-interference enhancement processing on the real-time image to obtain a preprocessed image; perform frequency domain period detection on the preprocessed image to extract the period reference of the fin array; construct a grid based on the period reference, divide the preprocessed image into periodic units and filter effective periodic units; perform feature encoding processing on the effective periodic units to generate APF feature codes specific to the heat sink; perform dynamic matching of spatiotemporal attention and deep learning model fusion based on the APF feature codes to calculate the sub-pixel level pose result of the heat sink; and determine whether the heat sink has reached the target positioning point and whether the positioning accuracy meets the preset requirements based on the verification image.

[0052] The transport control unit is used to combine vibration monitoring data with the sub-pixel level pose results, and through prediction, compensation and verification processing, to correct the transport posture of the radiator in real time.

[0053] The present invention also provides an electronic device, which is a physical device, comprising:

[0054] The processor and the memory are communicatively connected.

[0055] The memory is used to store at least one executable instruction executed by the processor, which executes the executable instruction to implement the machine vision-based heat sink conveying workpiece positioning control method as described above.

[0056] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described machine vision-based workpiece positioning control method for heat sink conveying.

[0057] Compared with the prior art, the beneficial effects of the present invention are:

[0058] By acquiring real-time images of the radiator during transport and performing anti-interference enhancement processing, frequency domain period detection is performed on the preprocessed images to extract the periodic reference of the fin array. Based on the periodic reference, effective periodic units are divided and screened. Feature encoding is performed on the effective periodic units to generate APF feature codes. Based on the APF feature codes, dynamic matching is performed by fusing spatiotemporal attention and deep learning models to calculate sub-pixel level pose results. Combined with vibration monitoring data, prediction compensation and verification processing are performed to correct the transport posture. Verification images are collected to determine the positioning status and form a closed-loop control, thereby improving the accuracy and robustness of radiator transport positioning, enhancing adaptability to industrial environmental interference, and ensuring the stability and efficiency of the positioning process. Attached Figure Description

[0059] Figure 1The main flowchart of a machine vision-based workpiece positioning control method for heat sink conveying is provided in an embodiment of the present invention.

[0060] Figure 2 A schematic diagram of a machine vision-based workpiece positioning control system for radiator conveying provided in an embodiment of the present invention;

[0061] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0063] The method in this embodiment is executed by a terminal, which can be a mobile phone, tablet computer, PDA, laptop or desktop computer, etc. Of course, it can also be other devices with similar functions, and this embodiment does not limit them.

[0064] Please see Figure 1 This invention provides a machine vision-based method for positioning and controlling the conveying of heat sink workpieces, the method being applied to, including:

[0065] Step 100: Obtain a real-time image of the radiator during the transportation process, and perform anti-interference enhancement processing on the real-time image to obtain a pre-processed image.

[0066] Specifically, step 100 further includes the following steps:

[0067] Step 110: Acquire real-time images of the radiator during the transport process. When step 100 is executed for the first time, the real-time image is the initial real-time image of the radiator during transport. When step 100 is executed again, the real-time image is the real-time image of the radiator in its current transport state.

[0068] Step 120: Perform polarization de-reflection processing on the real-time image, separating the reflective area from the effective edge through polarization filtering;

[0069] Step 130: The CLAHE algorithm is used to enhance the contrast of the image after polarization de-reflection processing;

[0070] Step 140: Apply a Gaussian filter with a σ value of 0.8 to the contrast-enhanced image to remove random noise from the industrial environment, and obtain the preprocessed image.

[0071] It should be noted that in this embodiment, "real-time image" refers to the image captured in real time by the vision acquisition unit during the heat sink transportation process. The first acquired "initial real-time image" is the first frame image when the heat sink enters the positioning control process, which is used to initialize the positioning analysis. The "real-time image of the current transportation state" when returning to execution reflects the dynamic position of the heat sink after partial correction, ensuring that subsequent processing is based on the latest state. The core of step 100 is to improve image quality through "anti-interference enhancement processing." "Polarization de-reflection processing" addresses the reflective nature of heat sink metal fins by utilizing the directional differences of polarized light. Images at different polarization angles are obtained by rotating a polarizer, and then a filtering algorithm separates the high-reflectivity areas from the effective edges of the fins (such as the fin contours), preventing reflections from obscuring key features. The "CLAHE algorithm" (contrast-limited adaptive histogram equalization) is a local contrast enhancement algorithm. By processing the image in blocks, it limits the slope of the cumulative distribution function of each histogram, preventing excessive amplification of local noise and thus enhancing the grayscale difference between the fins and the background, making the fin array clearer. "Gaussian filtering" uses a Gaussian kernel with a σ value of 0.8 to convolve with the image, smoothing random noise generated by industrial vibrations and electromagnetic interference while preserving fin edge details as much as possible. σ, the standard deviation of the Gaussian kernel, is the core parameter for controlling the filtering effect, used to balance noise filtering intensity and fin edge detail preservation. The overall purpose of these processes is to provide high-quality images for subsequent periodic detection and feature extraction, and to reduce the interference of noise and reflection on positioning accuracy.

[0072] In one possible implementation, the block size of the CLAHE algorithm can be set to 8×8, and the contrast threshold can be set to 30, thus achieving a balance between the enhancement effect and the computational cost.

[0073] For example, in one feasible implementation, when the heat sink enters the positioning area along the conveyor line, the industrial camera first acquires an initial real-time image. The image contains multiple highlight spots formed by the reflection of the fins, and the grayscale difference between the background and the fins is small. First, three sets of polarized images are acquired by rotating the polarizer to 0°, 90°, and 180°. The reflective area (highlight spots) is separated by a polarization filtering algorithm, and the effective edges of the fins are preserved. Then, the CLAHE algorithm is used to process the de-reflected image, with a block size of 8×8 and a contrast threshold of 30, which increases the grayscale difference between the fins and the background from 20 to 60. Finally, a Gaussian filter with σ=0.8 is applied to remove salt-and-pepper noise from the image, resulting in a pre-processed image. At this point, the fin edges are continuous and clear, with no obvious reflection or noise, and can be directly used for frequency domain period detection in step 200.

[0074] Step 200: Perform frequency domain period detection on the preprocessed image to extract the period reference of the fin array.

[0075] Specifically, step 200 further includes the following steps:

[0076] Step 210: Perform a two-dimensional Fourier transform on the preprocessed image to convert the image from the spatial domain to the frequency domain;

[0077] Step 220: Perform peak detection on the frequency domain image, identify the frequency domain peaks corresponding to the horizontal and vertical periods, and calculate the initial period parameters based on the frequency domain peaks;

[0078] Step 230: Optimize the initial period parameters by smoothing with a Gaussian kernel for 5 iterations, and output the final period reference and number of columns.

[0079] Step 300: Construct a grid based on the periodic reference, divide the preprocessed image into periodic units, and filter out effective periodic units.

[0080] It should be noted that the "two-dimensional Fourier transform" is a mathematical transformation that converts an image from the spatial domain (the variation of pixel grayscale with spatial position) to the frequency domain (the frequency distribution of grayscale changes). Its core is to decompose the image into sinusoidal wave components of different frequencies. The periodic fin array will exhibit obvious peaks in the frequency domain (corresponding to the frequency of the fin arrangement). "Frequency domain peak detection" identifies peak points corresponding to the lateral (along the transport direction) and longitudinal (perpendicular to the transport direction) arrangement periods of the fins by analyzing the amplitude distribution of the frequency domain image. The positions (frequency) of these peaks are inversely proportional to the period; therefore, the "initial period parameters" (i.e., the lateral and longitudinal period lengths) can be calculated from the peak positions. "Gaussian kernel iterative smoothing" uses a 3×3 Gaussian kernel to iteratively filter the initial period parameters multiple times. The purpose is to eliminate the interference of high-frequency noise in the frequency domain on the period calculation, making the obtained "period reference" closer to the actual physical period of the fins. Five iterations are an experimentally verified reasonable number, effectively filtering out noise without causing the period reference to deviate from the true value due to excessive smoothing. The overall purpose of step 200 is to accurately extract the periodic features of the fin array, providing a quantitative basis for subsequent periodic unit division. Compared with the method of directly detecting the period in the spatial domain, frequency domain analysis is more resistant to interference from local occlusion and dirt, and is especially suitable for densely arranged fin structures.

[0081] In one possible implementation, the two-dimensional Fourier transform can be implemented using the Fast Fourier Transform (FFT), which improves computational efficiency by more than 10 times compared to the traditional Fourier transform; peak detection can be combined with an adaptive threshold (taking 30% of the maximum amplitude of the frequency domain image) and 8-neighborhood maxima filtering to avoid false detection of noise peaks.

[0082] For example, in one feasible implementation, a two-dimensional FFT transformation is performed on the preprocessed image to obtain a frequency domain image, in which obvious peak clusters appear in the horizontal and vertical directions respectively; by using an adaptive threshold (30% of the maximum amplitude) and 8-neighborhood maxima filtering, the frequency corresponding to the horizontal peak is identified as 2.0 cycles / mm, and the frequency corresponding to the vertical peak is identified as 0.5 cycles / mm. The initial period parameters are calculated as follows: horizontal period 0.5mm (1 / 2.0), vertical period 2.0mm (1 / 0.5), and the number of columns (horizontal units) is initially determined to be 20; then, the initial period parameters are smoothed by 5 iterations using a 3×3 Gaussian kernel, and the final output period reference is 0.49mm horizontally, 1.98mm vertically, and 20 columns. The error between this result and the actual fin period of the heat sink (0.5mm horizontally, 2.0mm vertically) is less than 2%, and it can be directly used for the period unit division in step 300.

[0083] Specifically, step 300 further includes the following steps:

[0084] Step 310: Establish a local coordinate system based on the edge of the heat sink to complete the image coordinate system calibration;

[0085] Step 320: Divide the preprocessed image into N×M periodic units according to the periodic reference, where N is the number of columns and M is the number of vertical units;

[0086] Step 330: Select periodic units with an effective pixel ratio of not less than 80% as the effective periodic units.

[0087] It should be noted that the "local coordinate system" is a coordinate system established with the physical edges of the heat sink (such as the left or right edge, bottom edge) as the coordinate axes. Its function is to eliminate image geometric distortion caused by camera installation angle deviation, conveyor line tilt, etc. during image acquisition, ensuring that the spatial position of the periodic unit division corresponds one-to-one with the actual physical structure of the heat sink, and improving the spatial consistency of subsequent feature analysis. The "period reference" is the horizontal and vertical period lengths output in step 200, which is the quantitative basis for dividing the "periodic unit". Each periodic unit corresponds to a complete fin structure on the heat sink (the spacing between adjacent fins in the horizontal direction is the horizontal period, and the range of continuous fins in the vertical direction is the vertical period). N is the number of units (i.e., the number of columns) in the horizontal direction (along the conveying direction), and M is the number of units in the vertical direction (perpendicular to the conveying direction). "Effective periodic unit" refers to a unit in which the percentage of pixels belonging to the fins or normal background is ≥80%. The purpose of screening is to exclude units that are blocked by the conveyor line bracket, covered by surface stains, or have missing fins, so as to avoid the features of these invalid units interfering with the subsequent encoding results and ensure the reliability of the feature code.

[0088] In one possible implementation, when establishing a local coordinate system, the right edge of the heat sink can be selected as the X-axis (suitable for scenarios where the right side is unobstructed) and the bottom edge as the Y-axis; the threshold for the effective pixel percentage can be adjusted according to the actual occlusion situation, such as increasing it to 85% in automated production lines with less occlusion, and decreasing it to 75% in complex working conditions.

[0089] For example, in one feasible implementation, a local coordinate system is established with the right edge of the heat sink as the X-axis and the bottom edge as the Y-axis. The coordinate axes are identified and calibrated by an edge detection algorithm to eliminate the 2° angle deviation caused by camera tilt. The preprocessed image is divided into 20×5 (N=20, M=5) periodic units according to the periodic reference (0.49mm horizontally and 1.98mm vertically). Each unit corresponds to 32×160 pixels in the image (converted according to camera resolution and object distance). The effective pixel percentage of each unit is calculated. The units in the 3rd and 15th columns are blocked by the conveyor line bracket, and the effective pixel percentages are 65% and 70% respectively (both <80%). The remaining 18 units have a percentage of ≥80%. Therefore, 18 effective periodic units are selected for feature encoding processing in the subsequent step 400.

[0090] Step 400: Perform feature encoding processing on the effective periodic unit to generate a heat sink-specific APF feature code.

[0091] Specifically, step 400 further includes the following steps:

[0092] Step 410: Select three consecutive effective periodic units in the central region to generate a standard periodic template;

[0093] Step 420: The edge curve of each effective periodic unit is phase-aligned with the standard periodic template using a dynamic time warping algorithm;

[0094] Step 430: Perform gray-scale integration processing on the effective periodic cells after phase alignment to obtain the gray-scale integration value;

[0095] Step 440: Normalize the grayscale integral value to the [0, 255] interval, and convert it into an 8-bit binary code with a threshold of 128 to obtain the APF subcode;

[0096] Step 450: Concatenate all the APF subcodes according to the spatial position of the effective periodic unit to generate the initial full code of APF;

[0097] Step 460: Add CRC-8 check bits to the initial full code of the APF, remove APF subcodes that fail to pass the check, and complete the APF feature code by interpolation of APF subcodes in adjacent valid periodic units.

[0098] It should be noted that the "standard periodic template" is an average feature template generated by selecting three consecutive units from the central region of the effective periodic unit. The central region is less affected by image edge distortion, resulting in more stable template features and a more accurate reflection of the typical structure of the fins. The "Dynamic Time Warping (DTW) algorithm" is an algorithm for sequence alignment. Here, it calculates the cumulative distance between the edge curve (pixel coordinate sequence of the fin contour) of each effective periodic unit and the standard template curve to find the optimal alignment path, compensating for minor deformations between units caused by transport vibrations (such as slight bending of the fins), making the matching of edge features more accurate. The "grayscale integral value" is the result of accumulating the grayscale values ​​of all pixels in the effective periodic unit after phase alignment, which can comprehensively reflect the brightness and darkness features within the unit. Normalizing it to the [0,255] interval can eliminate the influence of different illumination intensities, and converting it into an 8-bit binary code to obtain the "APF subcode" simplifies feature storage and matching calculation. The "APF Initial Full Code" is a complete code formed by splicing all APF subcodes according to the spatial position of the effective periodic unit (such as the X-axis order). Adding a "CRC-8 check bit" (8-bit cyclic redundancy check code) can detect errors in the subcodes during calculation or transmission. Subcodes that fail the check are completed by interpolating adjacent subcodes (such as linear interpolation), and finally a complete and reliable "APF feature code" is obtained.

[0099] In one possible implementation, five consecutive effective periodic units can be selected when generating the standard periodic template (suitable for scenarios with more complex fin structures); the local constraint window of the DTW algorithm can be set to 3-7 (the larger the window, the higher the tolerance to deformation).

[0100] For example, in one feasible implementation, three units in columns 9-11 of the central region are selected from 18 effective periodic units. Their edge curves are extracted and the average curve is calculated to generate a standard periodic template. For the edge curve of each effective periodic unit, the DTW algorithm (local constraint window 5) is used to align it with the standard template, so that the average distance between the curves is reduced from 8 pixels before alignment to 1.2 pixels after alignment. Gray-scale integration is performed on the 18 aligned units to obtain the integration value range [600, 2400]. The integration value is normalized to [0, 255] (the normalization formula is: normalized value = (integral value - 600) / (2400 - 600) × 255, such as an integration value of 1500 corresponding to 127.5 ≈ 128). The value is converted to 8-bit binary code with 128 as the threshold. The conversion rule is: normalization. When the normalized value is ≥128, the binary bits are set to 1; when it is <128, they are set to 0. The bits are padded to 8 bits. For example, the normalized value of the integral value 1500 is ≈128 (≥128), which corresponds to the 8-bit binary code 10000000; the normalized value of the integral value 2000 is ≈198 (≥128), which corresponds to the 8-bit binary code 11000110. This yields an 8-bit binary APF subcode, and finally 18 APF subcodes. The subcodes are concatenated in the order of the X-axis (columns 1 to 20, which are actually 18 columns after removing invalid units) to generate the initial full code of the APF. After adding the CRC-8 check bit, it is found that the subcode in column 6 fails to check. The subcodes in columns 5 and 7 are padded by linear interpolation, and finally the APF feature code containing 18 subcodes is obtained. This feature code can uniquely distinguish the fin differences between this heatsink and other heatsinks of the same model.

[0101] Step 500: Based on the APF feature code, perform dynamic matching of spatiotemporal attention and deep learning model fusion to calculate the sub-pixel level pose result of the heat sink.

[0102] Specifically, step 500 further includes the following steps:

[0103] Step 510: Construct a spatial attention mechanism to assign weights to the periodic units corresponding to the APF feature codes and focus on high-confidence units;

[0104] Step 520: Perform temporal correlation analysis on the APF feature code sequence of consecutive multi-frame images, calculate the similarity of inter-frame codes, and dynamically adjust the matching weight of abnormal frames.

[0105] Step 530: Using the APF feature code matching results of a preset number of consecutive frames as input, the deep learning model learns the temporal pattern of pose change and outputs the pose prediction value of the next frame in real time.

[0106] Step 540: Perform coarse matching based on the Hamming distance of the APF feature code to filter candidate matching regions;

[0107] Step 550: Combine the pose prediction value to perform affine transformation correction on the candidate matching region, and optimize the sub-pixel pose result by iterative nearest point algorithm. The sub-pixel pose result includes X coordinate, Y coordinate and rotation angle θ.

[0108] It should be noted that the "spatial attention mechanism" calculates the confidence level (e.g., verification pass rate, matching stability) of the APF subcodes of each periodic unit, assigning higher weights (e.g., 0.8) to high-confidence units and lower weights (e.g., 0.2) to low-confidence units, thus focusing the matching process on reliable features and reducing noise interference. The "temporal correlation analysis" calculates the Hamming distance (code value difference) of APF feature codes across multiple consecutive frames to assess the consistency of features between frames. For "abnormal frames" with excessively large differences (e.g., caused by momentary occlusion), their matching weight is reduced (e.g., from 1.0 to 0.3), ensuring the continuity of the matching sequence. The "deep learning model" here uses an LSTM (Long Short-Term Memory) network, which can capture the temporal dependencies of pose changes. By inputting the matching results of 5-10 consecutive frames, it learns the motion patterns of the heat sink on the conveyor line (e.g., constant speed, acceleration), outputting "pose prediction values" (X, Y coordinates and rotation angle θ) to predict future poses. "Hamming distance" is the bit difference between two binary codes, used to quickly filter candidate matching regions similar to the target feature code, reducing the computational load of subsequent fine-grained matching. "Affine transformation correction" combines the pose prediction value with rotation and translation transformations of the candidate region to align it with the standard pose; "Iterative nearest point algorithm (ICP)" improves the pose calculation accuracy to "sub-pixel level" (≤0.1 pixels) by iteratively optimizing the distance error of matching point pairs. The overall purpose of step 500 is to calculate the real-time pose of the heat sink with high precision through spatiotemporal fusion dynamic matching, providing a quantitative basis for subsequent correction.

[0109] In one possible implementation, the LSTM model has 8 input frames, 32 hidden layer nodes, and a training dataset containing 10,000 pose sequences at different transport speeds; the ICP algorithm has 20 iterations and a convergence threshold of 0.001 pixels.

[0110] For example, in one feasible implementation, a spatial attention mechanism is constructed, assigning a weight of 0.8 to the top 30% of the 18 effective units based on their confidence, and 0.2 to the rest; Hamming distance is calculated for eight consecutive frames of APF feature code sequences, and it is found that the similarity between the fifth frame and its adjacent frames is only 0.6 (below the threshold of 0.7), so its matching weight is adjusted from 1.0 to 0.3; the matching results of the eight frames are input into an LSTM model (32 hidden nodes), and the output pose prediction values ​​are (X=150.3mm, Y=80.5mm, ...). (θ=0.2°); Calculate the Hamming distance between the current APF feature code and the template code, and select 3 candidate matching regions with a distance ≤ 5; Combine the predicted value to perform affine transformation correction on the candidate regions, and then iterate 20 times through the ICP algorithm (convergence threshold 0.001 pixels) to finally obtain the sub-pixel level pose result (X=150.28mm, Y=80.49mm, θ=0.19°), with an error of ≤0.03mm and a rotation angle error of ≤0.01° compared with the actual position, meeting the requirements of high-precision positioning.

[0111] Step 600: Combining vibration monitoring data with the sub-pixel pose results, the delivery posture of the radiator is corrected in real time through prediction, compensation and verification processing.

[0112] Specifically, step 600 further includes the following steps:

[0113] Step 610: Monitor the vibration intensity of the conveyor line in real time using vibration sensors and dynamically adjust the confidence threshold of the attitude prediction.

[0114] Step 620: Receive the attitude prediction value and the sub-pixel level pose result, and generate a composite control command that combines prediction compensation and real-time correction;

[0115] Step 630: The composite control command is sent to the conveying control system to achieve advance compensation for slight attitude changes through differential control of the servo motor.

[0116] Step 640: Compare the error between the subpixel-level pose result and the pose prediction value. If the error exceeds a preset threshold, dynamically adjust the control parameters using an adaptive PID algorithm.

[0117] It should be noted that "vibration monitoring data" refers to the vibration acceleration values ​​of the conveyor line collected by vibration sensors (such as piezoelectric accelerometers), reflecting the intensity of mechanical interference during the conveying process. The stronger the vibration, the lower the reliability of attitude prediction. Therefore, it is necessary to "dynamically adjust the confidence threshold" (e.g., when the vibration intensity is ≥0.5g, the threshold is raised from 0.8 to 0.9) to reduce the impact of unreliable predictions. "Composite control commands" are control signals that integrate "predictive compensation" (adjustments based on attitude prediction values) and "real-time correction" (instant adjustments based on the current pose result). Compared to single commands, this can more quickly offset attitude deviations caused by vibration. "Servo motor differential speed control" achieves fine adjustments to the radiator's rotational attitude (θ angle) by adjusting the speed difference between the servo motors on both sides of the conveyor line (e.g., increasing the speed on the left by 0.5% while keeping the speed on the right unchanged). This is more precise than overall speed regulation. The "adaptive PID algorithm" dynamically adjusts the proportional coefficient (Kp), integral time (Ti), and derivative time (Td) based on the pose error (the difference between the current pose and the predicted value). For example, when the error is >0.1mm, Kp is increased to speed up the response, and when the error is <0.05mm, Kp is decreased to avoid overshoot, thus solving the adaptability problem of traditional PID under changing operating conditions. The overall purpose of step 600 is to achieve real-time closed-loop correction of the radiator's attitude by integrating vibration monitoring and pose data, thereby offsetting conveyor line interference and ensuring positioning stability.

[0118] In one possible implementation, the sampling frequency of the vibration sensor is set to 2kHz to capture high-frequency vibrations; the preset error thresholds are set to 0.1mm (position) and 0.05° (rotation angle) to trigger PID parameter adjustment.

[0119] For example, in one feasible implementation, the piezoelectric accelerometer detects a conveyor line vibration intensity of 0.6g (≥0.5g), and adjusts the confidence threshold for attitude prediction from 0.8 to 0.9; it receives the attitude prediction value (X=150.3mm, Y=80.5mm, θ=0.2°) and the sub-pixel-level pose result (X=150.28mm, Y=80.49mm, θ=0.19°), and calculates the prediction compensation (Δθ=0.01°) and the real-time correction (ΔX=0.02°). The system generates composite control commands (mm); these commands are sent to the conveying control system, which increases the speed of the left servo motor by 0.3% while keeping the right motor unchanged, thus achieving slight attitude change compensation; the posture errors (0.02mm, 0.01°) are compared and found to be less than the preset thresholds (0.1mm, 0.05°), so no adjustment of the PID parameters is required (currently Kp=5, Ti=0.1s, Td=0.05s); after correction, the attitude deviation of the radiator is controlled within 0.03mm and 0.02°, effectively offsetting the vibration effect.

[0120] Step 700: Acquire a verification image of the radiator after attitude correction. Based on the verification image, determine whether the radiator has reached the target positioning point and whether the positioning accuracy meets the preset requirements. If it has not reached the target or the positioning accuracy does not meet the preset requirements, return to step 100 to reacquire a real-time image of the radiator's current delivery status and repeat the subsequent steps. If it has reached the target and the positioning accuracy meets the preset requirements, the positioning control is completed.

[0121] Specifically, step 700 further includes the following steps:

[0122] Step 710: Acquire a verification image of the radiator after attitude correction. The verification image is a real-time image reflecting the current corrected position and attitude of the radiator.

[0123] Step 720: Based on the verification image, analyze the actual position and actual positioning accuracy of the heat sink;

[0124] Step 730: Determine whether the actual position coincides with the target positioning point, and whether the actual positioning accuracy is less than or equal to a preset accuracy threshold.

[0125] Step 740: If the actual position does not coincide with the target positioning point or the actual positioning accuracy is greater than the preset accuracy threshold, return to step 100, re-acquire the real-time image of the current conveying state of the radiator and perform subsequent processing; if the actual position coincides with the target positioning point and the actual positioning accuracy is less than or equal to the preset accuracy threshold, terminate the positioning control process.

[0126] It should be noted that the "verification image" is an image acquired by the vision acquisition unit (from the same source as step 100) after attitude correction. It is used to visually reflect the correction effect. There is a slight delay (≤50ms) between the acquisition timing and the execution of the correction command to ensure that it reflects the latest state. The "actual position" is the center coordinates (X, Y) and rotation angle (θ) of the radiator based on the analysis of the verification image. The "actual positioning accuracy" is the deviation value (such as position deviation ΔX, ΔY, angle deviation Δθ) between the actual position and the "target positioning point" (preset ideal position). The "preset accuracy threshold" is a qualified standard set according to the application scenario. For example, it is set to 0.05mm (position) and 0.03° (angle) in high-precision assembly scenarios, and can be relaxed to 0.1mm and 0.05° in general scenarios. The core of step 700 is to form a closed-loop control of "acquisition-processing-correction-verification". By judging the actual positioning status, it is determined whether secondary correction is needed: if it does not meet the standard, it returns to step 100 for reprocessing, and the error is gradually reduced by using an iterative mechanism; if it meets the standard, the process is terminated to ensure that the final positioning meets the requirements. This closed-loop design is particularly suitable for scenarios with large vibrations or large initial deviations in the conveyor line, and can significantly improve the positioning success rate.

[0127] In one possible implementation, the method for parsing the verification image is consistent with the pose calculation method in step 500 (such as ICP optimization) to ensure a unified accuracy evaluation standard; the target positioning points can be pre-stored through a teaching method.

[0128] For example, in one feasible implementation, 50ms after attitude correction, the industrial camera acquires a verification image and analyzes it using the same method as in step 500 to obtain the actual position (X=200.02mm, Y=100.01mm, θ=0.01°). The target positioning point is (200.00mm, 100.00mm, 0.00°), and the actual positioning accuracy is ΔX=0.02mm, ΔY=0.01mm, Δθ=0.01°. The preset accuracy thresholds are 0.05mm and 0.03°. The judgment result is that the actual position coincides with the target point and the accuracy meets the standard, so the positioning control process is terminated. If the analyzed value is ΔX=0.06mm (>0.05mm), the process returns to step 100 to reacquire the current real-time image and repeats the subsequent processing for secondary correction until the accuracy requirements are met.

[0129] In this embodiment, by acquiring real-time images of the radiator during the transport process and performing anti-interference enhancement processing, frequency domain period detection is performed on the preprocessed images to extract the period reference of the fin array. Based on the period reference, effective periodic units are divided and screened. Feature encoding is performed on the effective periodic units to generate APF feature codes. Based on the APF feature codes, dynamic matching calculation of sub-pixel level pose results is performed by fusing spatiotemporal attention and deep learning models. Combined with vibration monitoring data, prediction compensation and verification processing are performed to correct the transport posture. Verification images are collected to determine the positioning status and form closed-loop control, thereby improving the accuracy and robustness of radiator transport positioning, enhancing adaptability to industrial environment interference, and ensuring the stability and efficiency of the positioning process.

[0130] Based on the above embodiments, such as Figure 2 As shown, the present invention also provides a machine vision-based workpiece positioning control system for radiator conveying, used to support the machine vision-based workpiece positioning control method for radiator conveying described in the above embodiments. The machine vision-based workpiece positioning control system for radiator conveying includes a vision acquisition unit 11, a data processing unit 12, and a conveying control unit 13.

[0131] The visual acquisition unit 11 is used to acquire real-time images of the heat sink during the transportation process and verification images after attitude correction, and transmit the real-time images and verification images to the data processing unit 12.

[0132] The data processing unit 12 is used to perform anti-interference enhancement processing on the real-time image to obtain a preprocessed image; perform frequency domain period detection on the preprocessed image to extract the period reference of the fin array; construct a grid based on the period reference, divide the preprocessed image into periodic units and filter effective periodic units; perform feature encoding processing on the effective periodic units to generate APF feature codes specific to the heat sink; perform dynamic matching of spatiotemporal attention and deep learning model fusion based on the APF feature codes to calculate the sub-pixel level pose result of the heat sink; and determine whether the heat sink has reached the target positioning point and whether the positioning accuracy meets the preset requirements based on the verification image.

[0133] The transport control unit 13 is used to combine vibration monitoring data with the sub-pixel level pose results and perform real-time correction of the transport posture of the radiator through prediction, compensation and verification processing.

[0134] It should be noted that in this embodiment, the system achieves high-precision positioning control during the radiator transport process through the collaborative work of the visual acquisition unit 11, the data processing unit 12, and the transport control unit 13. The three units have clearly defined roles and form a closed loop: the visual acquisition unit 11 is the "perception layer," responsible for acquiring image data reflecting the radiator's state. Its real-time images are used to dynamically track changes in the radiator's position, and verification images are used to evaluate the correction effect; both provide the system with raw perception information. The data processing unit 12 is the "decision layer," using a series of image processing and analysis algorithms (such as anti-interference enhancement, frequency domain period detection, feature encoding, and dynamic matching) to transform image data into quantified pose results and positioning judgments, which is the core of the system's accurate positioning. The transport control unit 13 is the "execution layer," generating and executing correction commands based on the pose results output by the data processing unit 12 and the monitoring data from the vibration sensor, achieving real-time adjustment of the radiator's posture. This system architecture ensures that the system can quickly respond to dynamic changes (such as vibration and posture deviation) during the transport process, significantly improving positioning accuracy and stability.

[0135] In one possible implementation, the vision acquisition unit 11 can integrate a high-resolution industrial camera (e.g., 20 megapixels), a ring-polarized light source, and a lens module to reduce reflections and improve image clarity; the data processing unit 12 can adopt a heterogeneous computing architecture of GPU+FPGA, where the GPU is responsible for complex calculations such as deep learning, and the FPGA is responsible for real-time image preprocessing to meet the system's real-time requirements (processing latency ≤10ms).

[0136] Optionally, the data flow design between units is crucial for the efficient operation of the system: the vision acquisition unit 11 can transmit image data to the data processing unit 12 via Gigabit Ethernet, with the transmission frame rate matching the camera acquisition frame rate (e.g., 30fps); the data processing unit 12 sends the calculated sub-pixel pose results to the transport control unit via an industrial bus (e.g., EtherCAT), with a transmission cycle ≤1ms, ensuring the timeliness of control commands; after performing correction, the transport control unit 13 informs the data processing unit 12 through a status feedback signal, triggering the acquisition and judgment of the verification image, forming a complete closed-loop control flow. This data flow design ensures both the real-time nature of data transmission and the coordinated operation of each unit.

[0137] In one possible implementation, a time synchronization mechanism (such as PTP precise time protocol) can be used between the data processing unit 12 and the transport control unit 13 to ensure that the timestamp error between the pose result and the vibration data is ≤10μs, thereby improving the accuracy of prediction compensation.

[0138] For example, in one feasible implementation, the system is applied to an automated assembly line for a heat sink: the vision acquisition unit 11 uses a 20-megapixel industrial camera (30fps) and an 850nm ring-polarized light source, installed 1.5m directly above the conveyor line, to acquire real-time images of the heat sink (initial image for the first time, and current status images for subsequent times) and verification images, and transmits them to the data processing unit via gigabit Ethernet; the data processing unit 12 uses a GPU (NVIDIA Jetson AGX) + FPGA (Xilinx) The FPGA, based on the Kintex architecture, performs real-time image polarization de-reflection, CLAHE enhancement, and Gaussian filtering within 1ms to obtain a pre-processed image. The GPU performs frequency domain period detection (extracting the period reference), periodic cell division (selecting 18 effective cells), and APF feature code generation on the pre-processed image. Then, through dynamic matching using spatiotemporal attention-LSTM model fusion, it calculates sub-pixel level pose results (error ≤ 0.05mm) and determines whether the positioning meets the standard based on the verification image. The conveying control unit 13 uses a PLC (Siemens S7-1200) and a servo driver (Yaskawa SGD7S). It receives the pose results via EtherCAT and, combined with the monitoring data from a piezoelectric vibration sensor (sampling rate 2kHz), generates composite control commands to drive the servo motors on both sides of the conveyor line to operate at different speeds (speed adjustment accuracy 0.1%) to achieve posture correction. When the data processing unit 12 determines that the positioning meets the standard, it sends a termination signal via the bus, and the system completes the positioning control. The single closed-loop cycle of the entire process is ≤ 50ms, meeting the cycle time requirements of the assembly line.

[0139] In this embodiment, by acquiring real-time images of the radiator during the transport process and performing anti-interference enhancement processing, frequency domain period detection is performed on the preprocessed images to extract the fin array period reference. Based on the period reference, effective periodic units are divided and screened. Feature encoding is performed on the effective periodic units to generate APF feature codes. Based on the APF feature codes, dynamic matching calculation of sub-pixel level pose results is performed by fusing spatiotemporal attention and deep learning models. Combined with vibration monitoring data, prediction compensation and verification processing are performed to correct the transport posture. Verification images are collected to determine the positioning status and form closed-loop control. This achieves the beneficial effects of improving the accuracy and robustness of radiator transport positioning, enhancing adaptability to industrial environment interference, ensuring the stability and efficiency of the positioning process, and adapting to the radiator positioning requirements under different working conditions.

[0140] Furthermore, the machine vision-based radiator conveying workpiece positioning control system can run the above-mentioned machine vision-based radiator conveying workpiece positioning control method. For specific implementation, please refer to the method embodiment, which will not be repeated here.

[0141] Based on the above embodiments, such as Figure 3 As shown, the present invention also provides an electronic device, the electronic device comprising:

[0142] The processor 22 includes at least one processor 22, at least one memory 21, a communication interface 23, and a communication bus 24, wherein the processor 22 is communicatively connected to the memory 21.

[0143] In this embodiment, the memory 21 can be implemented in any suitable manner, for example, the memory 21 can be a read-only memory, a hard disk drive, a solid-state drive, or a USB flash drive, etc.; the memory 21 is used to store at least one executable instruction executed by the processor;

[0144] In this embodiment, the processor 22 can be implemented in any suitable manner. For example, the processor 22 can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc.; the processor is used to execute the executable instructions to implement the machine vision-based heat sink conveying workpiece positioning control method as described above.

[0145] Based on the above embodiments, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the machine vision-based workpiece positioning control method for heat sink conveying described above.

[0146] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0147] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0148] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion 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 invention. The aforementioned storage medium includes various media capable of storing program instructions, such as USB flash drives, portable hard drives, read-only storage servers, random access storage servers, magnetic disks, or optical disks.

[0149] Furthermore, it should be noted that the combination of the various technical features in this case is not limited to the combination methods described in the claims of this case or the combination methods described in the specific embodiments. All technical features described in this case can be freely combined or combined in any way, unless they contradict each other.

[0150] It should be noted that the above examples are merely specific embodiments of the present invention, and the present invention is obviously not limited to the above embodiments, with many similar variations. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in this invention should fall within the protection scope of this invention.

[0151] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A machine vision-based method for positioning and controlling the conveying of heat sink workpieces, characterized in that, Includes the following steps: Step 100: Obtain a real-time image of the radiator during the transportation process, and perform anti-interference enhancement processing on the real-time image to obtain a pre-processed image; Step 200: Perform frequency domain period detection on the preprocessed image to extract the period reference of the fin array; Step 300: Construct a grid based on the periodic reference, divide the preprocessed image into periodic units, and filter out effective periodic units; Step 400: Perform feature encoding processing on the effective periodic unit to generate an APF feature code specific to the heat sink; Step 500: Based on the APF feature code, perform dynamic matching of spatiotemporal attention and deep learning model fusion to calculate the sub-pixel level pose result of the heat sink. Step 600: Combining vibration monitoring data with the sub-pixel level pose results, the delivery posture of the radiator is corrected in real time through prediction, compensation and verification processing. Step 700: Acquire a verification image of the radiator after attitude correction. Based on the verification image, determine whether the radiator has reached the target positioning point and whether the positioning accuracy meets the preset requirements. If it has not reached the target or the positioning accuracy does not meet the preset requirements, return to step 100 to reacquire a real-time image of the radiator's current delivery status and repeat the subsequent steps. If the target location has been reached and the positioning accuracy meets the preset requirements, then the positioning control is complete. Step 400 includes: Step 410: Select three consecutive effective periodic units in the central region to generate a standard periodic template; Step 420: The edge curve of each effective periodic unit is phase-aligned with the standard periodic template using a dynamic time warping algorithm; Step 430: Perform gray-scale integration processing on the effective periodic cells after phase alignment to obtain the gray-scale integration value; Step 440: Normalize the grayscale integral value to the [0, 255] interval, and convert it into an 8-bit binary code with a threshold of 128 to obtain the APF subcode; Step 450: Concatenate all the APF subcodes according to the spatial position of the effective periodic unit to generate the initial full code of APF; Step 460: Add CRC-8 check bits to the initial full code of the APF, remove the APF subcodes that fail the check, and complete the APF feature code by interpolation of the APF subcodes of adjacent valid periodic units; Step 500 includes: Step 510: Construct a spatial attention mechanism to assign weights to the periodic units corresponding to the APF feature codes and focus on high-confidence units; Step 520: Perform temporal correlation analysis on the APF feature code sequence of consecutive multi-frame images, calculate the similarity of inter-frame codes, and dynamically adjust the matching weight of abnormal frames. Step 530: Using the APF feature code matching results of a preset number of consecutive frames as input, the deep learning model learns the temporal pattern of pose change and outputs the pose prediction value of the next frame in real time. Step 540: Perform coarse matching based on the Hamming distance of the APF feature code to filter candidate matching regions; Step 550: Combine the pose prediction value to perform affine transformation correction on the candidate matching region, and optimize the sub-pixel pose result by iterative nearest point algorithm. The sub-pixel pose result includes X coordinate, Y coordinate and rotation angle θ.

2. The machine vision-based workpiece positioning control method for heat sink conveying according to claim 1, characterized in that, Step 100 further includes the following steps: Step 110: Acquire real-time images of the radiator during the transport process. When step 100 is executed for the first time, the real-time image is the initial real-time image of the radiator during transport. When step 100 is executed again, the real-time image is the real-time image of the radiator in its current transport state. Step 120: Perform polarization de-reflection processing on the real-time image, separating the reflective area from the effective edge through polarization filtering; Step 130: The CLAHE algorithm is used to enhance the contrast of the image after polarization de-reflection processing; Step 140: Apply a Gaussian filter with a σ value of 0.8 to the contrast-enhanced image to remove random noise in the industrial environment and obtain the preprocessed image, where σ is the standard deviation of the Gaussian kernel.

3. The machine vision-based workpiece positioning control method for heat sink conveying according to claim 1, characterized in that, Step 200 further includes the following steps: Step 210: Perform a two-dimensional Fourier transform on the preprocessed image to convert the image from the spatial domain to the frequency domain; Step 220: Perform peak detection on the frequency domain image, identify the frequency domain peaks corresponding to the horizontal and vertical periods, and calculate the initial period parameters based on the frequency domain peaks; Step 230: Optimize the initial period parameters by smoothing with a Gaussian kernel for 5 iterations, and output the final period reference and number of columns.

4. The machine vision-based workpiece positioning control method for heat sink conveying according to claim 1, characterized in that, Step 300 further includes the following steps: Step 310: Establish a local coordinate system based on the edge of the heat sink to complete the image coordinate system calibration; Step 320: Divide the preprocessed image into N×M periodic units according to the periodic reference, where N is the number of columns and M is the number of vertical units; Step 330: Select periodic units with an effective pixel ratio of not less than 80% as the effective periodic units.

5. The machine vision-based workpiece positioning control method for heat sink conveying according to claim 1, characterized in that, Step 600 further includes the following steps: Step 610: Monitor the vibration intensity of the conveyor line in real time using vibration sensors and dynamically adjust the confidence threshold of the attitude prediction. Step 620: Receive the attitude prediction value and the sub-pixel level pose result, and generate a composite control command that combines prediction compensation and real-time correction; Step 630: The composite control command is sent to the conveying control system to achieve advance compensation for slight attitude changes through differential control of the servo motor. Step 640: Compare the error between the subpixel-level pose result and the pose prediction value. If the error exceeds a preset threshold, dynamically adjust the control parameters using an adaptive PID algorithm.

6. The machine vision-based workpiece positioning control method for heat sink conveying according to claim 1, characterized in that, Step 700 further includes the following steps: Step 710: Acquire a verification image of the radiator after attitude correction. The verification image is a real-time image reflecting the current corrected position and attitude of the radiator. Step 720: Based on the verification image, analyze the actual position and actual positioning accuracy of the heat sink; Step 730: Determine whether the actual position coincides with the target positioning point, and whether the actual positioning accuracy is less than or equal to a preset accuracy threshold. Step 740: If the actual position does not coincide with the target positioning point or the actual positioning accuracy is greater than the preset accuracy threshold, return to step 100, re-acquire the real-time image of the current conveying state of the radiator and perform subsequent processing; if the actual position coincides with the target positioning point and the actual positioning accuracy is less than or equal to the preset accuracy threshold, terminate the positioning control process.

7. A machine vision-based workpiece positioning and control system for heat sink conveying, characterized in that, It includes a vision acquisition unit, a data processing unit, and a transport control unit: The visual acquisition unit is used to acquire real-time images of the heat sink during the transportation process and verification images after attitude correction, and transmit the real-time images and verification images to the data processing unit. The data processing unit is used to perform anti-interference enhancement processing on the real-time image to obtain a preprocessed image; Frequency domain period detection is performed on the preprocessed image to extract the period reference of the fin array; A mesh is constructed based on the periodic reference. The preprocessed image is divided into periodic units, and effective periodic units are selected. Feature encoding is performed on the effective periodic units to generate APF feature codes specific to the heat sink. Based on the APF feature codes, dynamic matching of spatiotemporal attention and deep learning model fusion is performed to calculate the sub-pixel pose result of the heat sink. Based on the verification image, it is determined whether the heat sink has reached the target positioning point and whether the positioning accuracy meets the preset requirements. The conveying control unit is used to combine vibration monitoring data with the sub-pixel level pose results and perform real-time correction of the conveying posture of the radiator through prediction, compensation and verification processing. The data processing unit is further configured to select three consecutive effective periodic units in the central region to generate a standard periodic template; and to perform phase alignment between the edge curve of each effective periodic unit and the standard periodic template using a dynamic time warping algorithm. The effective periodic units after phase alignment are subjected to grayscale integration processing to obtain grayscale integral values; the grayscale integral values ​​are normalized to the [0, 255] interval and converted into 8-bit binary codes with a threshold of 128 to obtain APF subcodes; all APF subcodes are concatenated according to the spatial position of the effective periodic units to generate the initial full code of APF; CRC-8 check bits are added to the initial full code of APF, APF subcodes that fail the check are removed, and the APF feature code is obtained by interpolation of the APF subcodes of adjacent effective periodic units; The data processing unit is also used to construct a spatial attention mechanism to assign weights to the periodic units corresponding to the APF feature codes and focus on high-confidence units. Temporal correlation analysis is performed on the APF feature code sequence of consecutive multi-frame images to calculate the similarity of inter-frame codes and dynamically adjust the matching weight of abnormal frames. Using the APF feature code matching results of a consecutive preset number of frames as input, a deep learning model is used to learn the temporal pattern of pose change and output the pose prediction value of the next frame in real time; coarse matching is performed based on the Hamming distance of the APF feature code to filter candidate matching regions; affine transformation correction is performed on the candidate matching regions in combination with the pose prediction value, and the sub-pixel pose result is obtained by iterative nearest point algorithm. The sub-pixel pose result includes X coordinate, Y coordinate and rotation angle θ.

8. An electronic device, characterized in that, The electronic device includes: The processor and the memory are communicatively connected. The memory is used to store at least one executable instruction executed by the processor, the processor being used to execute the executable instruction to implement the machine vision-based heat sink conveying workpiece positioning control method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the machine vision-based workpiece positioning control method for heat sink conveying as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Machine vision dynamic defect detection method and device for precise structural part

    CN119887745A

  • Automatic obstacle avoidance point selection and obstacle avoidance method for photovoltaic station polled by unmanned aerial vehicle

    CN119937623A