A machine vision-based embroidery positioning printing method, equipment, and storage medium

By using machine vision technology and image processing, the problem of insufficient positioning accuracy caused by deformation of embroidery materials has been solved, achieving high-precision embroidery printing effects.

CN120279238BActive Publication Date: 2025-12-02GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies are ill-suited to adapting to the deformation of embroidery materials, resulting in insufficient positioning accuracy and poor printing quality.

Method used

An embroidery positioning and printing method based on machine vision is adopted. By calibrating and correcting the distortion of the camera and printer, the material position information is obtained, an appropriate matching method is selected, the logo image is adjusted to fit the template features using image processing software, and the printing effect is optimized through Kalman filtering and color calibration.

Benefits of technology

It improves the positioning accuracy and printing quality of embroidery materials, ensuring that the logo image is precisely aligned with the template, and the printing effect is clear and beautiful.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279238B_ABST
    Figure CN120279238B_ABST
Patent Text Reader

Abstract

This invention discloses a machine vision-based embroidery positioning and printing method, electronic device, and computer-readable storage medium, relating to the field of embroidery printing technology. The method involves acquiring basic data from a camera and printer, connecting the camera to a host computer, and performing a calibration process to bind the camera and printer to their starting points and correct distortion if it is the first time using the device. Based on the characteristics of the matching material, template mapping or template deformation mapping is selected for positioning. An image of the printing area is captured as a template, and feature points are extracted for positioning. A logo image is positioned against the template, and image processing software is used to adjust the local shape to form the logo template. Finally, the logo template and material position information are input into the program, mapped onto a blank TIF image, processed by PRN, and then input into the printer to complete the positioning and printing. The method involves steps such as calibration parameter calculation, stretching / compression ratio factor calculation, and rotation angle adjustment. It also performs coordinate optimization, color calibration, and anti-aliasing processing on the mapped image, enabling precise embroidery positioning and printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embroidery printing technology, and more specifically, to an embroidery positioning printing method, equipment, and storage medium based on machine vision. Background Technology

[0002] In the current field of visual positioning printing, the traditional positioning method mainly obtains positioning information through template matching, and then maps the logo image to the template for printing. This method can achieve good matching printing results when dealing with materials such as badges and metal trademarks, which have small differences in surface deformation after production and whose shape features match the design logo well. However, due to the limitations of its production and processing conditions, the final printing effect of embroidered objects is often difficult to completely match the design logo. The traditional template matching positioning method is difficult to adapt to this characteristic of embroidered materials, resulting in insufficient positioning accuracy and poor printing effect.

[0003] To improve the positioning effect of embroidery printing, existing technologies attempt to adjust the logo to match the image features of the template embroidery, and then map the deformed logo onto the blank TIF image. However, embroidery production cannot guarantee that each batch of embroidery material has the same deformation characteristics. Matching and mapping other embroidery objects with only a deformed single logo cannot meet the printer's high-precision printing requirements for different materials.

[0004] Therefore, existing technologies are unable to adapt to the deformation of embroidery materials and have insufficient matching accuracy. Summary of the Invention

[0005] In order to overcome the problems of existing technologies being unable to adapt to the deformation of embroidery materials and having insufficient matching accuracy, this invention designs an embroidery positioning printing method, equipment and storage medium based on machine vision, which can effectively solve the above-mentioned technical problems.

[0006] To solve the above-mentioned 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] Acquire basic data of the camera and printer, connect the camera to the host computer, adjust the image acquisition parameters to acquire the image of the printing area, and print the calibration pattern on the blank background. If the system is used for the first time, execute the calibration process, acquire the calibration pattern and calculate the calibration parameters, and complete the starting point binding and distortion correction of the camera and the printer.

[0009] The matching method is selected based on the characteristics of the matching material, the morphological features of the printed area image are extracted as the template image, and the feature points are extracted and located to obtain the location information of the matching material;

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

[0011] The logo template and the matching material location information are input into the program. The program maps the logo template to a blank TIF image. The mapped TIF image is then exported, processed by PRN, and sent to the printer to complete the positioning and printing.

[0012] Preferably, the calculation calibration parameters include:

[0013] Using Zhang's calibration method, the camera's internal and external parameters are calculated by collecting the calibration patterns at different angles and positions.

[0014] The calibration results are optimized by iteratively optimizing the calibration parameters using the maximum likelihood estimation method.

[0015] Before printing, verify the calibration results by comparing the deviations of the actual measured feature points with the theoretical feature points. If the feature point deviation exceeds the threshold, recalibrate.

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

[0017] If the template mapping positioning is selected, the image of the printed area is cropped and the morphological features are extracted as the template image, and the feature points are extracted and the location information of the matching material 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 step of selecting the positioning method based on the characteristics of the matching material specifically includes:

[0020] The shape, material, surface texture, and deformation patterns of the matching materials during the production process are analyzed.

[0021] If the deformation characteristics of the matched material are stable and the local changes are small, then the template mapping positioning is selected; in the template mapping positioning, scale-invariant feature transformation or accelerated robust feature algorithm is used to extract the key points of the template image;

[0022] If the matching materials have large deformation differences and diverse shapes, the template deformation mapping is selected for positioning. In the template deformation mapping positioning, the deformation characteristics of different matching materials are learned through a deep learning model, and the model is trained using labeled samples to predict the optimal deformation parameters.

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

[0024] The edge contours of the logo image and the template image are obtained using the Canny edge detection algorithm, and the areas that need to be adjusted are determined by comparison.

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

[0026] The rotation angle of the logo image is adjusted by affine transformation to match the template image.

[0027] Preferably, the step of calculating the stretching or compression scaling factor based on the shape features of the template image and performing geometric transformation using bicubic interpolation includes the following steps:

[0028] Analyze the shape features of the corresponding region in the template image, including width, height, and proportion;

[0029] Based on the shape features of the template image, calculate the stretching or compression ratio factor of the logo image in the horizontal and vertical directions;

[0030] Based on the adjustment precision, the logo image is geometrically transformed using a bicubic interpolation algorithm to adjust its shape to match the template image.

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

[0032] The rotation angle deviation between the logo image and the template image is calculated by comparing their edge contours.

[0033] Based on the calculated rotation angle, construct the affine transformation matrix;

[0034] The logo image is rotated and adjusted using the affine transformation matrix to make its angle consistent with that of the template image;

[0035] 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.

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

[0037] The Kalman filter algorithm is used to optimize the positioning coordinates and correct printer errors.

[0038] The logo template is color-converted and calibrated according to the printer's color profile.

[0039] Gaussian filtering is used to anti-alias the edges of the logo template.

[0040] An electronic device includes a memory and at least one processor, the memory storing instructions; at least one of the processors invokes the instructions in the memory to cause a machine vision-based embroidery positioning printing method to perform the steps of the embroidery positioning printing method as described above.

[0041] A computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the embroidery positioning printing method described above.

[0042] Compared with existing technologies, the advantages of this invention are as follows: This invention uses camera connection and calibration, employs Zhang's calibration method to calculate the camera's internal and external parameters, and optimizes the calibration results to ensure the accuracy and stability of camera imaging. During template positioning, a suitable matching method is selected based on the characteristics of the matching material. The morphological features of the printed area image are extracted as the template image, and feature points are extracted for positioning to obtain the matching material's location information, making the positioning more accurate. Based on the analysis of the shape, material, surface texture, and deformation patterns of the matching material during production, template mapping positioning or template deformation mapping positioning is selected. Template mapping positioning is suitable for materials with stable deformation characteristics and small local changes, using scale-invariant feature transformation or accelerated robust feature algorithms to extract key points from the template image. Template deformation mapping positioning is suitable for materials with large deformation differences and diverse shapes. A deep learning model is used to learn the deformation characteristics of different matching materials and predict the optimal deformation parameters. The system employs a multi-step process to achieve adaptive template matching, improving adaptability and matching accuracy for different materials. During logo mapping, the Canny edge detection algorithm is used to obtain the edge contours of the logo image and the template image, comparing them to determine the areas requiring adjustment. A stretching or compression scaling factor is calculated based on the shape characteristics of the template image, and bicubic interpolation is used for geometric transformation. Affine transformation is then used to adjust the rotation angle of the logo image to match the template image, ensuring precise alignment in shape and angle. In mapping the logo template to a blank TIF image, a Kalman filter algorithm is used to optimize the positioning coordinates, correct printer errors, and improve positioning accuracy. Simultaneously, the logo template undergoes color conversion and calibration based on the printer's color profile to ensure accurate printing colors. Gaussian filtering is used to perform anti-aliasing on the logo template edges, improving image quality and resulting in a clearer and more aesthetically pleasing print. Attached Figure Description

[0043] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other embodiments can be derived from the provided drawings without creative effort.

[0044] Figure 1 This is a flowchart of the method of the present invention;

[0045] Figure 2 This is a diagram illustrating the steps of the method of the present invention. Detailed Implementation

[0046] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.

[0047] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;

[0048] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

[0049] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0050] Example

[0051] For a machine vision-based embroidery positioning printing method, please refer to [link / reference]. Figure 1-2 This includes the following steps:

[0052] Acquire basic data of the camera and printer, connect the camera to the host computer, adjust the image acquisition parameters to acquire the image of the printing area, and print the calibration pattern on the blank background. If the system is used for the first time, execute the calibration process, acquire the calibration pattern and calculate the calibration parameters, and complete the starting point binding and distortion correction of the camera and the printer.

[0053] The matching method is selected based on the characteristics of the matching material, the morphological features of the printed area image are extracted as the template image, and the feature points are extracted and located to obtain the location information of the matching material;

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

[0055] The logo template and the matching material location information are input into the program. The program maps the logo template to a blank TIF image. The mapped TIF image is then exported, processed by PRN, and sent to the printer to complete the positioning and printing.

[0056] The calculation calibration parameters include:

[0057] Using Zhang's calibration method, the camera's internal and external parameters are calculated by collecting the calibration patterns at different angles and positions.

[0058] The calibration results are optimized by iteratively optimizing the calibration parameters using the maximum likelihood estimation method.

[0059] Before printing, verify the calibration results by comparing the deviations of the actual measured feature points with 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, the image of the printed area is cropped and the morphological features are extracted as the template image, and the feature points are extracted and the location information of the matching material is obtained;

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

[0063] The specific steps of selecting the positioning method based on the characteristics of the matching material include:

[0064] The shape, material, surface texture, and deformation patterns of the matching materials during the production process are analyzed.

[0065] If the deformation characteristics of the matched material are stable and the local changes are small, then the template mapping positioning is selected; in the template mapping positioning, scale-invariant feature transformation or accelerated robust feature algorithm is used to extract the key points of the template image;

[0066] If the matching materials have large deformation differences and diverse shapes, the template deformation mapping is selected for positioning. In the template deformation mapping positioning, the deformation characteristics of different matching materials are learned through a deep learning model, and the model is trained using labeled samples to predict the optimal deformation parameters.

[0067] The step of using image processing software to adjust the local shape to fit the features of the template image includes:

[0068] The edge contours of the logo image and the template image are obtained using the Canny edge detection algorithm, and the areas that need to be adjusted are determined by comparison.

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

[0070] The rotation angle of the logo image is adjusted by affine transformation to match the template image.

[0071] The step of calculating the stretching or compression scaling factor based on the shape features of the template image and performing geometric transformation using bicubic interpolation includes the following steps:

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

[0073] Based on the shape features of the template image, calculate the stretching or compression ratio factor of the logo image in the horizontal and vertical directions;

[0074] Based on the adjustment precision, the logo image is geometrically transformed using a bicubic interpolation algorithm to adjust its shape to match the template image.

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

[0076] The rotation angle deviation between the logo image and the template image is calculated by comparing their edge contours.

[0077] Based on the calculated rotation angle, construct the affine transformation matrix;

[0078] The logo image is rotated and adjusted using the affine transformation matrix to make its angle consistent with that of 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 step of mapping the logo template to a blank TIF image also includes:

[0081] The Kalman filter algorithm is used to optimize the positioning coordinates and correct printer errors.

[0082] The logo template is color-converted and calibrated according to the printer's color profile.

[0083] Gaussian filtering is used to anti-alias the edges of the logo template.

[0084] An electronic device includes a memory and at least one processor, the memory storing instructions; at least one of the processors invokes the instructions in the memory to cause a machine vision-based embroidery positioning printing method to perform the steps of the embroidery positioning printing method as described above.

[0085] A computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the embroidery positioning printing method described above.

[0086] In the specific implementation, the staff first collects basic data and connects the equipment to obtain basic data. For the camera, parameters such as resolution, frame rate, and ISO range are specified. For the printer, information such as printing accuracy, color mode, and maximum printing size is provided. The camera is connected to the host computer via a data cable. Using the camera control software on the host computer, the image acquisition parameters are gradually adjusted. For example, the exposure time and gain value are adjusted appropriately according to the lighting conditions of the printing area to obtain a clear image of the printing area without overexposure or underexposure. Then, the printer is used to print a calibration pattern containing specific geometric shapes, such as a checkerboard pattern, on a blank background. The size and feature point distribution of the pattern must meet the subsequent calibration requirements.

[0087] The printed calibration pattern is photographed from multiple angles and positions using a camera. Each photograph ensures the calibration pattern is clearly visible and occupies a certain proportion of the image. At least 10-15 images of the calibration pattern in different poses are collected to guarantee the accuracy of subsequent calibration. The Zhang calibration method is used to process the acquired images, including preprocessing operations such as noise reduction and grayscale conversion. Then, corner detection algorithms are used to detect corners in the calibration pattern. Based on the position information of the corners in different images, the camera's internal parameters, such as focal length and principal point coordinates, and external parameters, such as rotation, are calculated. The calibration process involves using matrices and translation vectors. Maximum likelihood estimation is employed to iteratively optimize the calibrated parameters. The number of iterations and a convergence threshold are set. In each iteration, the theoretical corner position is calculated based on the current parameters and compared with the actual detected corner position. The parameters are updated by minimizing the error function until the convergence condition is met or the maximum number of iterations is reached. Before printing, the calibration pattern is photographed again to measure the actual feature point positions and compare them with the theoretical feature point positions. If the feature point deviation exceeds a preset threshold, such as 0.5 pixels, the calibration process is re-executed.

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

[0089] Template mapping localization (suitable for materials with stable deformation characteristics) extracts a portion containing key material features from the printed area image as a template image. The Scale Invariant Feature Transform (SIFT) algorithm is used to process the template image, extracting its key points and feature descriptors. A feature matching algorithm is then used to find feature points in the actual material image that match the key points of the template image, thereby determining the material's location information. When using the SIFT algorithm, a Gaussian difference pyramid is first constructed on the template image to detect extreme points at different scales. These extreme points are then precisely located and their orientations assigned, ultimately yielding key points and their feature descriptors that are scale- and rotation-invariant.

[0090] Template deformation mapping localization (suitable for materials with large deformation differences) collects material images and corresponding logo images under different deformation states, and annotates them. A convolutional neural network, such as U-Net or Mask R-CNN, is used as a deep learning model. The annotated image data is divided into training, validation, and test sets. During training, the model parameters 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 localization.

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

[0092] The edge contours of the logo image and the template image are matched. After obtaining the edge contours using the Canny edge detection algorithm, the corresponding feature points are found through feature point matching algorithms, 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 region in the template image and calculate the width W of the corresponding region 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] Based on the shape characteristics of the template image, calculate the stretching or compression scaling factor of the logo image in the horizontal and vertical directions. The horizontal scaling factor is: W template / W logo The vertical scaling factor is: H template / H logo .

[0095] Based on the required precision, a bicubic interpolation algorithm is selected to perform a geometric transformation on the logo image. The bicubic interpolation algorithm can provide high precision and good image quality when processing image scaling. The calculated scaling factor is passed as a parameter to perform a geometric transformation on the logo image so that its shape matches the template image.

[0096] By comparing the edge contours of the logo image and the template image, Hough transform is used to detect straight lines in the images, the principal direction angles of the logo image and the template image are calculated, and then the angle difference θ between the two is calculated.

[0097] Based on the calculated rotation angle θ, construct the affine transformation matrix.

[0098] The constructed affine transformation matrix M is applied to the logo image and rotated to match the angle of the template image.

[0099] The adjusted logo image is compared with the template image, and the structural similarity index (SSIM) is used to evaluate the degree of matching between the adjusted logo image and the template image. If the SSIM value is lower than the preset threshold, the rotation angle is adjusted and the above steps are repeated. The adjusted logo image is then saved as the logo template.

[0100] The logo template and matching material location information are input into the program. The Kalman filter algorithm is used to optimize the positioning coordinates. The Kalman filter algorithm predicts and updates the coordinates based on the system's state equation and observation equation, correcting possible printer errors. According to the printer's color profile, color management software is used to perform color conversion and calibration on the logo template. The color space of the logo template is converted 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. Gaussian filtering is used to perform anti-aliasing on the edges of the logo template. By setting an appropriate Gaussian kernel size and standard deviation, the edges of the logo template are smoothed to reduce jaggedness 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 and resolution, and start the printer to complete the embroidery positioning printing.

[0102] The electronic device includes a memory and at least one processor. The memory stores instructions for implementing the embroidery positioning and printing method described above, and the processor calls these instructions to execute the embroidery positioning and printing method according to the detailed steps described above.

[0103] A computer-readable storage medium stores instructions that, when executed by a processor, enable the implementation of the various steps of the embroidery positioning printing method described above. For example, inserting a USB flash drive containing the instructions into a computer allows the computer's processor to read and execute the instructions, completing the embroidery positioning printing task.

[0104] The same or similar labels correspond to the same or similar parts;

[0105] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0106] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all implementation methods here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the claims of the present invention.

Claims

1. A machine vision-based embroidery positioning printing method, characterized in that, Includes the following steps: Acquire basic data for the camera and printer, connect the camera to the host computer, adjust the image acquisition parameters to acquire the image of the printing area, and print the calibration pattern on the blank background. If it is the first time using the system, execute the calibration process, collect the calibration pattern and calculate the calibration parameters, and complete the starting point binding and distortion correction of the camera and the printer. The matching method is selected based on the characteristics of the matching material, the morphological features of the printed area image are extracted as the template image, and the feature points are extracted and located to obtain the location information of the matching material; Read a logo image of the same size as the actual size, perform mapping and positioning with the template image, use image processing software to adjust the local shape to fit the features of the template image, and save the logo image as a logo template; The logo template and the matching material location information are input into the program. The program maps the logo template to a blank TIF image, exports the mapped TIF image, processes it through PRN, and sends it to the printer to complete the positioning and printing. The matching method includes: template mapping positioning and template deformation mapping positioning. If template mapping positioning is selected, the printed area image is cropped and the morphological features are extracted as the template image, and the feature points are extracted and the matching material position information is obtained. If template deformation mapping positioning is selected, the deformed logo image and the template image are input to achieve positioning. The specific steps for selecting the positioning method based on the characteristics of the matching material include: analyzing the shape, material, surface texture, and deformation patterns of the matching material during production; if the deformation characteristics of the matching material are stable and local changes are small, then template mapping positioning is selected; in template mapping positioning, scale-invariant feature transformation or accelerated robust feature algorithm is used to extract key points of the template image; if the deformation differences of the matching material are large and the shapes are diverse, template deformation mapping positioning is selected; in template deformation mapping positioning, the deformation characteristics of different matching materials are learned through a deep learning model, and the model is trained using labeled samples to predict the optimal deformation parameters.

2. The embroidery positioning printing method according to claim 1, characterized in that, The calculation calibration parameters include: Using Zhang's calibration method, the camera's internal and external parameters are calculated by collecting the calibration patterns at different angles and positions. The calibration results are optimized by iteratively optimizing the calibration parameters using the maximum likelihood estimation method. Before printing, verify the calibration results by comparing the deviations of the actual measured feature points with the theoretical feature points. If the feature point deviation exceeds the threshold, recalibrate.

3. The embroidery positioning printing method according to claim 1, characterized in that, The step of using image processing software to adjust the local shape to fit the features of the template image includes: The edge contours of the logo image and the template image are obtained using the Canny edge detection algorithm, and the areas that need to be adjusted are determined by comparison. Calculate the stretching or compression scaling factor based on the shape features of the template image, and perform geometric transformation using bicubic interpolation; The rotation angle of the logo image is adjusted by affine transformation to match the template image.

4. The embroidery positioning printing method according to claim 3, characterized in that, The step of calculating the stretching or compression scaling factor based on the shape features of the template image and performing geometric transformation using bicubic interpolation includes the following steps: Analyze the shape features of the corresponding region in the template image, including width, height, and proportion; Based on the shape features of the template image, calculate the stretching or compression ratio factor of the logo image in the horizontal and vertical directions; Based on the adjustment precision, the logo image is geometrically transformed using a bicubic interpolation algorithm to adjust its shape to match the template image.

5. The embroidery positioning printing method according to claim 4, 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: The rotation angle deviation between the logo image and the template image is calculated by comparing their edge contours. Based on the calculated rotation angle, construct the affine transformation matrix; The logo image is rotated and adjusted using the affine transformation matrix to make its angle consistent with that of 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.

6. The embroidery positioning printing method according to claim 1, characterized in that, The step of mapping the logo template to a blank TIF image also includes: The Kalman filter algorithm is used to optimize the positioning coordinates and correct printer errors. The logo template is color-converted and calibrated according to the printer's color profile. Gaussian filtering is used to anti-alias the edges of the logo template.

7. An electronic device, characterized in that, The method includes a memory and at least one processor, wherein the memory stores instructions; at least one of the processors invokes the instructions in the memory to cause the machine vision-based embroidery positioning printing method to perform the steps of the embroidery positioning printing method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of the embroidery positioning printing method as described in any one of claims 1-6.

Citation Information

Patent Citations

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

    CN118560178A

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

    CN118967839A