Embroidery positioning printing method and device based on machine vision and storage medium

Through machine vision technology and image processing algorithms, the problem of insufficient positioning accuracy caused by deformation of embroidery materials is solved, and high-precision embroidery printing effect is achieved.

CN120279238AActive Publication Date: 2025-07-08GUANGZHOU SENYANG ELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202510341551.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-08
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The prior art is difficult to adapt to the deformation of embroidered materials, resulting in insufficient positioning accuracy and poor printing effect.

Method used

The embroidery positioning printing method based on machine vision is adopted, and the material position information is obtained through the calibration and distortion correction of the camera and printer, and the appropriate matching method is selected, and the morphological characteristics matching of the logo image and the template image is adjusted using image processing software, and the printing effect is optimized through Kalman filtering and color calibration.

Benefits of technology

Improve the positioning accuracy and printing effect of embroidered materials, ensure accurate alignment of logo images and template images in shape and angle, and improve print quality and color accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279238A_ABST
    Figure CN120279238A_ABST
Patent Text Reader

Abstract

The invention discloses an embroidery positioning printing method based on machine vision, electronic equipment and a computer readable storage medium, and relates to the technical field of embroidery printing, basic data of a camera and a printer are obtained, the camera is connected to an upper computer, and if the camera is used for the first time, a calibration process is executed to complete starting point binding and distortion correction of the camera and the printer; selecting template mapping positioning or template deformation mapping positioning according to matched material characteristics, intercepting a printing area image as a template, and extracting feature points for positioning; positioning the logo image and the template map, and adjusting a local form into a logo template by using image processing software; finally, the logo template and material position information are transmitted into a program and mapped to a blank TIF image, the blank TIF image is transmitted into a printer to complete positioning printing after PRN processing, the steps of calibration parameter calculation, stretching and compression scale factor calculation, rotation angle adjustment and the like are involved, coordinate optimization, color calibration and anti-aliasing processing are further conducted on the mapped image, and accurate embroidery positioning printing can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embroidery printing, and more specifically, to a machine vision-based embroidery positioning printing method, device, and storage medium. Background Art

[0002] In the current field of visual positioning printing, the traditional positioning method mainly obtains positioning information through template matching, and then maps and prints after aligning the logo image with the template. This method can achieve good matching and printing effects when processing materials such as badges and metal trademarks with small surface deformation differences after production and high coincidence degrees between shape features and the designed logo. However, due to the limitations of the production and processing conditions of embroidery objects, the final printing effect often cannot fully fit the designed logo. The traditional template matching positioning method is difficult to adapt to this characteristic of embroidery materials, resulting in insufficient positioning accuracy and poor printing effects.

[0003] In order to improve the positioning effect of embroidery printing, the prior art attempts to adjust the logo to fit the image features of the template embroidery, and then maps the blank TIF image with the deformed logo. However, it is difficult to ensure that each batch of embroidery materials has the same deformation characteristics in embroidery production. Matching and mapping other embroidery objects with only a single deformed logo cannot meet the high-precision printing requirements of the printer for different materials.

[0004] Therefore, the prior art is difficult to adapt to problems such as the deformation of embroidery materials and insufficient matching accuracy. Summary of the Invention

[0005] In order to overcome the problems in the prior art such as difficulty in adapting to the deformation of embroidery materials and insufficient matching accuracy, the present invention designs a machine vision-based embroidery positioning printing method, device, and storage medium that can effectively solve the above technical problems.

[0006] To solve the above technical problems, the technical solution of the present invention is as follows:

[0007] A machine vision-based embroidery positioning printing method includes the following steps:

[0008] Obtain the basic data of the camera and the printer, connect the camera to the host computer, adjust the image acquisition parameters to obtain the image of the printing area, and print a calibration pattern on the blank background image; if the system is used for the first time, execute the calibration process, collect the calibration pattern and calculate the calibration parameters, and complete the binding of the starting points of the camera and the printer and distortion correction;

[0009] Select a matching method according to the characteristics of the matching material, intercept the morphological features of the printed area image as the template image, and extract feature points for positioning to obtain the position information of the matching material;

[0010] Reading a logo image of the same size as the actual size, performing mapping positioning with the template image, using image processing software to adjust the local morphology to make it fit the features of the template image, and saving the logo image as a logo template;

[0011] The logo template and the matching material position information are passed into the program, the logo template is mapped to a blank TIF image through the program, the mapped TIF image is exported, and the image is passed into the printer after PRN processing to complete positioning printing.

[0012] Preferably, the calculation and calibration parameters include:

[0013] Using Zhang's calibration method, by collecting the calibration patterns at different angles and positions, the intrinsic parameters and extrinsic parameters of the camera are calculated;

[0014] Optimize the calibration results and iteratively optimize the calibration parameters using the maximum likelihood estimation method;

[0015] Before printing, the calibration result is verified, and the deviation between the actual measured feature points and the theoretical feature points is compared. If the feature point deviation exceeds the threshold, recalibration is performed.

[0016] Preferably, the matching method includes: template mapping positioning and template deformation mapping positioning,

[0017] If the template mapping positioning is selected, the printing area image is intercepted and the morphological features are extracted as the template image, and the feature points are extracted for positioning and the matching material position information is obtained;

[0018] If the template deformation mapping positioning is selected, the deformed logo image and the template image are input to achieve positioning.

[0019] Preferably, the selecting of the positioning method according to the characteristics of the matching material specifically includes:

[0020] Analyze the shape, material, surface texture and deformation law generated during the production process of the matching material;

[0021] If the deformation characteristics of the matching material are stable and the local changes are small, the template mapping positioning is selected; in the template mapping positioning, the key points of the template image are extracted by using a scale-invariant feature transformation or an accelerated robust feature algorithm;

[0022] If the deformation difference of the matching materials is large and the shapes are diverse, the template deformation mapping positioning is selected; in the template deformation mapping positioning, the deformation characteristics of different matching materials are learned through a deep learning model, and the labeled sample training model is used to predict the optimal deformation parameters.

[0023] Preferably, the adjustment of the local shape using image processing software to fit the template image features includes:

[0024] Adopting the Canny edge detection algorithm to obtain the edge contours of the logo image and the template image, and comparing to determine the area to be adjusted;

[0025] Calculating the stretching or compression scale factor according to the shape features of the template image, and performing geometric transformation using bicubic interpolation;

[0026] Adjusting the rotation angle of the logo image through affine transformation to match the template image.

[0027] Preferably, the calculation of the stretching or compression scale factor according to the shape features of the template image and the performance of geometric transformation using bicubic interpolation include the following steps:

[0028] Analyzing the shape features of the corresponding area in the template image, including width, height and ratio;

[0029] Calculating the stretching or compression scale factor of the logo image in the horizontal and vertical directions according to the shape features of the template image;

[0030] Performing geometric transformation on the logo image through the bicubic interpolation algorithm according to the adjustment precision to adjust its shape to match the template image.

[0031] Preferably, the adjustment of the rotation angle of the logo image through affine transformation to match the template image includes the following steps:

[0032] Calculating the rotation angle deviation between the two by comparing the edge contours of the logo image and the template image;

[0033] Constructing an affine transformation matrix according to the calculated rotation angle;

[0034] Using the affine transformation matrix to perform rotation adjustment on the logo image to make its angle consistent with the template image;

[0035] Comparing the adjusted logo image with the template image to verify the matching effect. If the requirements are not met, adjust the rotation angle and repeat the above steps.

[0036] Preferably, the mapping of the logo template to the blank TIF image further includes:

[0037] Adopting the Kalman filtering algorithm to optimize the positioning coordinates and correct the printer error;

[0038] Performing color conversion and calibration on the logo template according to the color profile of the printer;

[0039] Perform anti-aliasing processing on the edge of the logo template using Gaussian filtering.

[0040] An electronic device includes a memory and at least one processor, and instructions are stored in the memory; at least one of the processors calls the instructions in the memory to cause the embroidery positioning printing method based on machine vision to execute each step of the embroidery positioning printing method as described above.

[0041] A computer-readable storage medium stores instructions thereon, and when the instructions are executed by a processor, each step of the embroidery positioning printing method as described above is implemented.

[0042] Compared with the prior art, the beneficial effects of the present invention are as follows: Through camera connection and calibration, the Zhang's calibration method is used to calculate the internal parameters and external parameters of the camera, and the calibration results are optimized to ensure the accuracy and stability of camera imaging. During the template positioning process, a suitable matching method is selected according to the characteristics of the matching material, the morphological features of the printing area image are intercepted as the template image, and feature points are extracted for positioning to obtain the position information of the matching material, making the positioning more accurate; Analyze according to the shape, material, surface texture of the matching material and the deformation law generated during the production process, and select template mapping positioning or template deformation mapping positioning. Template mapping positioning is suitable for materials with stable deformation characteristics and small local changes, and the Scale-Invariant Feature Transform (SIFT) or Speeded-Up Robust Features (SURF) algorithm is used to extract the key points of the template image; Template deformation mapping positioning is suitable for materials with large deformation differences and diverse shapes. The deformation characteristics of different matching materials are learned through a deep learning model, and the optimal deformation parameters are predicted to achieve adaptive template matching, improving the adaptability and matching accuracy for different materials; During the Logo mapping process, the Canny edge detection algorithm is used to obtain the edge contours of the logo image and the template image, compare to determine the area to be adjusted, calculate the stretching or compression scale factor according to the shape characteristics of the template image, perform geometric transformation using bicubic interpolation, and adjust the rotation angle of the logo image through affine transformation to make it match the template image, ensuring that the logo image is precisely aligned with the template image in terms of shape and angle; During the process of mapping the logo template to a blank TIF image, the Kalman filter algorithm is used to optimize the positioning coordinates, correct the printer error, improve the positioning accuracy, and at the same time perform color conversion and calibration on the logo template according to the color profile of the printer to ensure the accuracy of the printed color. Gaussian filtering is used to perform anti-aliasing processing on the edge of the logo template to improve the image quality and make the printing effect clearer and more beautiful. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only exemplary. For those of ordinary skill in the art, without creative efforts, other implementation drawings can also be obtained based on the provided drawings.

[0044] Figure 1 is the method flow chart of the present invention;

[0045] Figure 2 is the method step diagram of the present invention. Specific embodiments

[0046] The drawings are only for exemplary illustration and should not be construed as a limitation of this patent;

[0047] To better illustrate this embodiment, some components in the drawings will be omitted, enlarged or reduced, which does not represent the size of the actual product;

[0048] For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0049] The following will further illustrate the technical solutions of the present invention in combination with the drawings and embodiments.

[0050] Embodiment

[0051] An embroidery positioning printing method based on machine vision, please refer to Figure 1-2 , including the following steps:

[0052] Obtain the basic data of the camera and the printer, connect the camera to the host computer, adjust the image acquisition parameters to obtain the image of the printing area, and print the calibration pattern on the blank base map; if the system is used for the first time, execute the calibration process, collect the calibration pattern and calculate the calibration parameters to complete the binding of the starting points of the camera and the printer and the distortion correction;

[0053] Select the matching method according to the characteristics of the matching material, intercept the morphological features of the printed area image as the template image, and extract the feature point positioning to obtain the position information of the matching material;

[0054] Read the logo image with the same actual size, perform the mapping positioning with the template image, use the image processing software to adjust the local morphology to fit the features of the template image, and save the logo image as the logo template;

[0055] Transfer the logo template and the matching material position information into the program. Through the program, map the logo template to a blank TIF image, export the mapped TIF image, and transfer it to the printer through PRN processing to complete the positioning and printing.

[0056] The calculated calibration parameters include:

[0057] Adopt Zhang's calibration method. By collecting the calibration patterns at different angles and positions, calculate the internal parameters and external parameters of the camera;

[0058] Optimize the calibration results, and use the maximum likelihood estimation method to iteratively optimize the calibration parameters;

[0059] Verify the calibration results before printing. Compare the deviation between the actually measured feature points and the theoretical feature points. If the feature point deviation exceeds the threshold, recalibrate.

[0060] The matching methods include: template mapping positioning and template deformation mapping positioning.

[0061] If the template mapping positioning is selected, intercept the image of the printing area and extract the morphological features as the template image, and extract the feature points for positioning and obtain the matching material position information;

[0062] If the template deformation mapping positioning is selected, input the deformed logo image and the template image to achieve positioning.

[0063] The specific selection of the positioning method according to the characteristics of the matching material includes:

[0064] Analyze the shape, material, surface texture of the matching material and the deformation law generated during the production process;

[0065] If the deformation characteristics of the matching material are stable and the local changes are small, select the template mapping positioning; in the template mapping positioning, use the scale-invariant feature transform or the accelerated robust feature algorithm to extract the key points of the template image;

[0066] If the deformation differences of the matching material are large and the shapes are diverse, select the template deformation mapping positioning; in the template deformation mapping positioning, learn the deformation characteristics of different matching materials through a deep learning model, and use the labeled samples to train the model to predict the best deformation parameters.

[0067] The use of image processing software to adjust the local morphology to fit the template image features includes:

[0068] Adopt the Canny edge detection algorithm to obtain the edge contours of the logo image and the template image, and compare to determine the area to be adjusted;

[0069] Calculate the stretching or compression scale factor based on the shape features of the template image, and perform geometric transformation using bicubic interpolation;

[0070] Adjust the rotation angle of the logo image through affine transformation to match the template image.

[0071] The calculation of the stretching or compression scale factor based on the shape features of the template image and the performance of geometric transformation using bicubic interpolation include the following steps:

[0072] Analyze the shape features of the corresponding area in the template image, including width, height, and ratio;

[0073] Calculate the stretching or compression scale factors of the logo image in the horizontal and vertical directions according to the shape features of the template image;

[0074] Perform geometric transformation on the logo image through the bicubic interpolation algorithm according to the adjusted precision, and adjust its shape to match the template image.

[0075] The adjustment of the rotation angle of the logo image through affine transformation to match the template image includes the following steps:

[0076] Calculate the rotation angle deviation between the two by comparing the edge contours of the logo image and the template image;

[0077] Construct an affine transformation matrix according to the calculated rotation angle;

[0078] Use the affine transformation matrix to perform rotation adjustment on the logo image to make its angle consistent with the template image;

[0079] Compare the adjusted logo image with the template image to verify the matching effect. If the requirements are not met, adjust the rotation angle and repeat the above steps.

[0080] The mapping of the logo template to the blank TIF image further includes:

[0081] Optimize the positioning coordinates using the Kalman filter algorithm to correct the printer error;

[0082] Perform color conversion and calibration on the logo template according to the color profile of the printer;

[0083] Perform anti-aliasing processing on the edge of the logo template using Gaussian filtering.

[0084] An electronic device includes a memory and at least one processor, wherein the memory stores instructions; at least one of the processors calls the instructions in the memory to enable the embroidery positioning printing method based on machine vision to perform the various steps of the embroidery positioning printing method described above.

[0085] A computer-readable storage medium stores instructions, and when the instructions are executed by a processor, the various steps of the embroidery positioning printing method described above are implemented.

[0086] In the specific implementation, to obtain basic data and connect the equipment, the staff first collects the basic data of the camera and printer. For the camera, clarify its parameters such as resolution, frame rate, and sensitivity range; for the printer's printing accuracy, color mode, maximum printing size and other information, connect the camera to the host computer through a data cable, and use the camera control software that comes with the host computer to gradually adjust the image acquisition parameters. For example, according to the lighting conditions of the printing area, appropriately adjust the exposure time and gain value to obtain a clear image of the printing area without overexposure or underexposure. Then, use the printer to print a calibration pattern containing specific geometric shapes, such as a checkerboard, on a blank base map. The size of the pattern and the distribution of feature points must meet the subsequent calibration requirements.

[0087] Use the camera to shoot the printed calibration pattern from multiple different angles and positions. Make sure that the calibration pattern is clearly visible and occupies a certain proportion in each shot. Collect at least 10-15 calibration pattern images in different postures to ensure the accuracy of subsequent calibration. Use Zhang's calibration method to process the collected images, perform preprocessing on the images, such as denoising and grayscale, and then use the corner detection algorithm to detect the corners in the calibration pattern. According to the position information of the corners in different images, calculate the internal parameters of the camera, such as focal length, principal point coordinates, and external parameters, such as rotation. Matrix, translation vector; use the maximum likelihood estimation method to iteratively optimize the parameters obtained by calibration, set the number of iterations and convergence threshold, in each iteration, calculate the theoretical corner point position according to the current parameters, and compare it with the actual detected corner point position, and update the parameters by minimizing the error function until the convergence condition is met or the maximum number of iterations is reached; before formal printing, use the camera to shoot the calibration pattern again, measure the position of the actual feature points, and compare them with the theoretical feature point position. If the feature point deviation exceeds the preset threshold, such as 0.5 pixels, the calibration process is re-executed.

[0088] Analyze material characteristics and select matching methods to conduct detailed analysis on the shape, material, surface texture and possible deformation patterns of the matching materials during the production process. For example, for materials with a hard texture, regular shape and small deformation during the production process, it can be judged that their deformation characteristics are stable and the local changes are small; while for materials with a soft texture, diverse shapes and prone to large deformation during the production process, they belong to the type with large deformation differences and diverse shapes.

[0089] Template mapping positioning (applicable to materials with stable deformation characteristics) extracts the part containing the key features of the material from the printing area image as the template image, and uses the scale-invariant feature transform (SIFT) algorithm to process the template image, extract its key points and feature descriptors, and use the feature matching algorithm to find feature points that match the key points of the template image in the actual material image, thereby determining the location information of the material; when using the SIFT algorithm, first construct a Gaussian difference pyramid for the template image, detect extreme points in different scale spaces, and then accurately locate and assign directions to the extreme points, and finally obtain key points and feature descriptors with scale and rotation invariance.

[0090] Template deformation mapping positioning (suitable for materials with large deformation differences) collects material images and corresponding logo images in different deformation states, and annotates them. It uses convolutional neural networks, such as U-Net or MaskR-CNN, as deep learning models to divide the annotated image data into training sets, validation sets, and test sets. During the training process, the parameters of the model are continuously adjusted so that the model can learn the deformation characteristics of different materials and predict the optimal deformation parameters. The deformed logo image and template image are input, and the trained deep learning model is used to predict and adjust the deformation of the logo image to match the actual shape of the material, thereby achieving positioning.

[0091] The Canny edge detection algorithm is used to process the logo image and the template image respectively to obtain their edge contours, and the area that needs to be adjusted in the logo image is found through a feature point matching algorithm, such as a matching method based on SIFT or ORB features.

[0092] The edge contours of the logo image and the template image are matched. After the edge contours are obtained using the Canny edge detection algorithm, the corresponding feature points are found through a feature point matching algorithm, such as descriptor-based matching, to determine the area in the logo image that needs to be adjusted.

[0093] Analyze the shape features of the corresponding area in the template image and calculate the width W of the corresponding area in the template image template and height H template , and the width W of the corresponding area in the logo image logo and height Hlogo 。

[0094] According to the shape characteristics of the template image, calculate the stretching or compression scale factors of the logo image in the horizontal and vertical directions. The horizontal scale factor is: W template / W logo and the vertical scale factor is: H template / H logo 。

[0095] According to the adjusted precision requirements, select the bicubic interpolation algorithm to perform geometric transformation on the logo image. The bicubic interpolation algorithm can provide high precision and good image quality when processing image scaling; Pass the calculated scale factors as parameters to perform geometric transformation on the logo image to make its shape match the template image.

[0096] By comparing the edge contours of the logo image and the template image, use the Hough transform to detect the straight lines in the image, calculate the main direction angles of the logo image and the template image, and then calculate the angle difference θ between the two.

[0097] According to the calculated rotation angle θ, construct an affine transformation matrix

[0098] Apply the constructed affine transformation matrix M to the logo image to perform rotation adjustment to make its angle consistent with the template image.

[0099] Compare the adjusted logo image with the template image, and use the structural similarity index (SSIM) to evaluate the matching degree between the adjusted logo image and the template image. If the SSIM value is lower than the preset threshold, adjust the rotation angle and repeat the above steps, and save the adjusted logo image as the logo template.

[0100] Pass the logo template and the matching material position information into the program, and use the Kalman filter algorithm to optimize the positioning coordinates. The Kalman filter algorithm predicts and updates the coordinates according to the state equation and observation equation of the system, corrects the possible errors of the printer, and uses color management software to perform color conversion and calibration on the logo template according to the color profile of the printer; Convert the color space of the logo template from the source color space, such as sRGB, to the target color space supported by the printer to ensure that the printed color is consistent with the expectation; Use Gaussian filtering to perform anti-aliasing processing on the edge of the logo template, and smooth the edge of the logo template by setting appropriate Gaussian kernel size and standard deviation to reduce the jagged phenomenon and make the printing effect smoother.

[0101] Export the mapped and processed TIF image, perform PRN processing, transfer the processed file to the printer, set appropriate printing parameters such as printing speed, resolution, etc., and start the printer to complete the embroidery positioning printing.

[0102] An electronic device includes a memory and at least one processor. Instructions for implementing the above embroidery positioning printing method are stored in the memory, and the processor calls these instructions to execute the embroidery positioning printing method according to the above detailed steps.

[0103] A computer-readable storage medium stores instructions that, when executed by a processor, can implement each step of the above embroidery positioning printing method. For example, insert a USB flash drive storing the instructions into a computer, and the processor of the computer reads and executes the instructions therein to complete the embroidery positioning printing task.

[0104] Identical or similar reference numerals correspond to identical or similar components;

[0105] The terms describing the positional relationship in the drawings are for illustrative purposes only and should not be construed as a limitation of this patent;

[0106] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention and are not limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.

Claims

1. An embroidery positioning printing method based on machine vision, characterized in that, It includes the following steps: Obtain the basic data of the camera and the printer, connect the camera to the host computer, adjust the image acquisition parameters to obtain the image of the printing area, and print the calibration pattern on the blank background image; If the system is used for the first time, execute the calibration process, collect the calibration pattern and calculate the calibration parameters to complete the starting point binding and distortion correction of the camera and the printer; Select the matching method according to the characteristics of the matching material, intercept the morphological features of the printing area image as the template image, and extract the feature point positioning to obtain the position information of the matching material; Read the logo image with the same actual size, perform texture mapping positioning with the template image, use image processing software to adjust the local morphology to fit the template image features, and save the logo image as the logo template; Input the logo template and the position information of the matching material into the program, map the logo template to the blank TIF image through the program, export the mapped TIF image, and pass it through PRN processing and input it into the printer to complete the positioning printing.

2. The embroidery positioning printing method according to claim 1, characterized in that The calculation of the calibration parameters includes: Adopt the Zhang's calibration method, calculate the internal parameters and external parameters of the camera by collecting the calibration patterns at different angles and positions; Optimize the calibration result, and use the maximum likelihood estimation method to iteratively optimize the calibration parameters; Verify the calibration result before printing, compare the deviation between the actually measured feature points and the theoretical feature points. If the feature point deviation exceeds the threshold, re-calibrate.

3. The embroidery positioning printing method according to claim 1, characterized in that, The matching methods include: template mapping positioning and template deformation mapping positioning. If the template mapping positioning is selected, intercept the printing area image and extract the morphological features as the template image, and extract the feature point positioning to obtain the position information of the matching material; If the template deformation mapping positioning is selected, input the deformed logo image and the template image to achieve positioning.

4. The embroidery positioning printing method according to claim 3, characterized in that, The specific selection of the positioning method according to the characteristics of the matching material includes: Analyze the shape, material, surface texture of the matching material and the deformation law generated during the production process; If the deformation characteristics of the matching material are stable and the local change is small, select the template mapping positioning; in the template mapping positioning, use the scale-invariant feature transform or the accelerated robust feature algorithm to extract the key points of the template image; If the deformation difference of the matching material is large and the shapes are diverse, select the template deformation mapping positioning; in the template deformation mapping positioning, use the deep learning model to learn the deformation characteristics of different matching materials, and use the labeled samples to train the model to predict the best deformation parameters.

5. The embroidery positioning printing method according to claim 1, characterized in that, The use of image processing software to adjust the local morphology to fit the template image features includes: Adopt the Canny edge detection algorithm to obtain the edge contours of the logo image and the template image, and compare to determine the area to be adjusted; Calculate the stretching or compression scale factor according to the shape features of the template image, and use bicubic interpolation for geometric transformation; Adjust the rotation angle of the logo image through affine transformation to match the template image.

6. The embroidery positioning printing method according to claim 5, characterized in that, The calculation of the stretching or compression scale factor according to the shape features of the template image and the use of bicubic interpolation for geometric transformation includes the following steps: Analyze the shape features of the corresponding region in the template image, including width, height, and ratio; Calculate the stretching or compression scale factors of the logo image in the horizontal and vertical directions according to the shape features of the template image; Perform geometric transformation on the logo image through the bicubic interpolation algorithm according to the adjusted precision to adjust its shape to match the template image.

7. The embroidery positioning printing method according to claim 6, characterized in that, The step of adjusting the rotation angle of the logo image through affine transformation to match the template image includes the following steps: Calculate the rotation angle deviation between the two by comparing the edge contours of the logo image and the template image; Construct an affine transformation matrix according to the calculated rotation angle; Use the affine transformation matrix to perform rotation adjustment on the logo image to make its angle consistent with the template image; Compare the adjusted logo image with the template image to verify the matching effect. If the requirements are not met, adjust the rotation angle and repeat the above steps.

8. The embroidery positioning printing method according to claim 1, characterized in that The step of mapping the logo template to the blank TIF image further includes: Optimize the positioning coordinates by using the Kalman filtering algorithm to correct the printer error; Perform color conversion and calibration on the logo template according to the color profile of the printer; Use Gaussian filtering to perform anti-aliasing processing on the edge of the logo template.

9. An electronic device, characterized in that, It includes a memory and at least one processor. Instructions are stored in the memory; at least one of the processors calls the instructions in the memory so that the embroidery positioning printing method based on machine vision executes each step of the embroidery positioning printing method described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, Instructions are stored on the computer-readable storage medium, and when the instructions are executed by the processor, each step of the embroidery positioning printing method described in any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Method and equipment for positioning and printing deformed embroidery cloth and storage medium

    CN118560178A

  • Multi-target positioning printing method and device based on flat plate and storage medium

    CN118578801A

  • AOI graph template matching method, computer control system and storage medium

    CN118967839A

  • Digital image calculation method and system for RGB-d camera multi-view matching based on variable template

    US20240428430A1

Cited By

  • Printing image matching method, device and system, storage medium and program product

    CN120563513A