Cloth printing positioning method and system based on image processing

Through image processing technology, the abnormal area of fabric printing is identified, the degree of overlap and offset of the connecting domain are calculated, and the accurate printing positioning points are obtained using Hough linear detection, which solves the inaccuracy problem of traditional positioning methods and improves printing quality and adaptability.

CN120298484AInactive Publication Date: 2025-07-11GUANGDONG YITONG NEW MATERIAL TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510434478.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional fabric printing positioning methods rely on manual operation and feature point positioning, resulting in inaccurate positioning, affecting the quality of printing, and making it difficult to meet the needs of large-area fabric printing.

Method used

Using an image-based processing method, the fabric printing images are collected, pre-processed and sliding window traversal are performed, abnormal printing areas are identified, the degree of overlap and offset of the connecting domain is calculated, and accurate printing positioning points are obtained using Hough linear detection, and the printing integrity is judged based on confidence.

Benefits of technology

It improves the accuracy and adaptability of printing positioning, reduces the interference of abnormal printing areas on the overall positioning, and ensures the stability and accuracy of printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298484A_ABST
    Figure CN120298484A_ABST
Patent Text Reader

Abstract

The invention discloses a cloth printing positioning method and system based on image processing, and relates to the technical field of image processing, and the method comprises the following steps: S1, collecting a cloth printing image, and preprocessing the cloth printing image to obtain a region of interest; s2, sliding window traversal is carried out in the region of interest, the gray level and the gray level proportion of each sliding window are obtained, and abnormal printing points are obtained according to the gray level proportions of the sliding windows; s3, obtaining all abnormal printing connected domains according to all the abnormal printing points, and obtaining a minimum bounding rectangle of the abnormal printing connected domains; according to the method, the abnormal printing areas of the cloth are obtained, the accurate printing positioning points are obtained through the positioning points, the situation that the overall positioning effect of the cloth is affected due to printing abnormality is avoided, meanwhile, the accurate positioning points in the positioning points in each abnormal printing area are comprehensively decided according to the position information of each abnormal printing area, and the printing accuracy is improved. And the overall printing effect is prevented from being influenced by abnormal printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more specifically, to a cloth printing positioning method and system based on image processing. Background Art

[0002] In the cloth printing industry, during the cloth printing process, due to problems such as equipment errors and operation errors, there are often abnormal printing areas, that is, areas that do not conform to the standard printing area, resulting in defective cloth being produced. Therefore, in the printing area detection, it is necessary to timely obtain the abnormal cloth printing position, and according to the abnormal printing positioning information, obtain the positioning information within the qualified quality range, that is, within a certain error range, the positioning information can be considered normal, and subsequently, according to the positioning information, the cloth printing position can be considered the normal printing position.

[0003] In the cloth printing industry, cloth printing positioning is generally carried out through printing positioning points. Therefore, the printing quality mainly depends on the quality of the printing positioning points. If the positioning points are not accurately obtained, it will directly lead to inaccurate positioning of the printing points, and the printing quality cannot be guaranteed.

[0004] Traditional printing positioning methods mostly involve machine manual operation to mark positioning points and rely on auxiliary tools such as positioning paper and positioning needles. This method has low detection efficiency and low accuracy of positioning points, and it is difficult to meet the needs of large-area cloth printing. Currently, a positioning method based on cloth feature points is generally adopted, and printing positioning is achieved by quickly aligning feature points. The key lies in accurately obtaining the image position of the feature points. However, in actual production, equipment and operation errors will cause abnormal cloth printing, resulting in unclear or offset feature points. If all feature points are directly used for positioning, the printing quality cannot be guaranteed, which will further affect the cloth quality. In view of this, we propose a cloth printing positioning method and system based on image processing. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a cloth printing positioning method and system based on image processing, which obtains the abnormal printing area of the cloth through image processing, uses the positioning points in the abnormal printing area to obtain accurate printing positioning points, avoids affecting the overall positioning effect of the cloth due to printing abnormalities, and at the same time combines the position information of each abnormal printing area to comprehensively make a decision to utilize the positioning points in each abnormal printing area, so as to obtain accurate positioning points and avoid the overall printing effect being affected by abnormal printing.

[0006] To solve the above technical problem, the present invention provides the following technical solution: A cloth printing positioning method based on image processing, comprising the following steps: S1: Collect cloth printing images, and preprocess the cloth printing images to obtain regions of interest; S2: Perform a sliding window traversal in the region of interest, obtain the gray level and the proportion of the gray level of each sliding window, and obtain abnormal printing points according to the proportion of the gray level of the sliding window; S3: Obtain all abnormal printing connected components based on all abnormal printing points, obtain the minimum bounding rectangle of the abnormal printing connected components, and obtain the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected components and the minimum bounding rectangle; S4: Obtain the edge points and the tangents of the edge points of the abnormal printing connected components at the edge of each abnormal printing connected component, obtain two side points on the tangent of the side points, and obtain the coincidence degree offset coefficient according to the coincidence degree of the two side points; S5: Perform a sliding window traversal on the edge of each abnormal printing connected component, obtain the included angle between the center of gravity of the sliding window in the sliding window and the edge of the abnormal printing connected component, and obtain the coincidence degree offset coefficient of all included angles in each abnormal printing connected component; S6: Obtain the final coincidence degree of all abnormal printing connected components according to the coincidence degree offset coefficient and the coincidence degree offset coefficient of all included angles; S7: Obtain the position offset degree of the abnormal printing points of all abnormal printing points by using the final coincidence degree; S8: Obtain the pixels to be detected in each abnormal printing connected component, perform Hough line detection on the neighboring pixels of the pixels to be detected, obtain the Hough line and the voting value of the Hough line, and obtain the singular value points and the corresponding abnormality degrees of the singular value points according to the voting value and the gray value of the pixels to be detected; S9: Obtain the confidence level that the abnormal value points are singular value points according to the abnormality degree and the coordinates of the singular value points, obtain the overall confidence level according to the confidence level and the voting value, and obtain the printing integrity according to the comparison result between the overall confidence level and the preset threshold; S10: Obtain the printing complete area according to the abnormal printing point position offset degree and the printing integrity; S11: According to the difference between the gray value of each abnormal printing point pixel in the printing complete area and the gray value of the pixel in the standard printing area, obtain the abnormal printing point pixels in the printing complete area to obtain the optimal printing area positioning point.

[0007] The present invention obtains the abnormal printing area of the fabric through image processing, and then uses the positioning points in the abnormal printing area to obtain accurate printing positioning points, avoiding the influence of printing abnormalities on the overall positioning effect of the fabric. When the abnormal printing area of the fabric is obtained, by obtaining the minimum bounding rectangle of the connected component in the abnormal printing area, the integrity of the abnormal printing area is quantified according to its coincidence degree with the abnormal printing area, and then the accuracy at the positioning point is judged, solving the problem that the traditional positioning method is affected by abnormal printing and the positioning point is inaccurate, resulting in the inability to guarantee the printing quality.

[0008] Preferably, the specific calculation formula for obtaining the abnormal printing points according to the gray - level proportion of the sliding window in step S2 is as follows: ; In the formula, represents the abnormal printing points, represents the pixel points obtained by traversing the sliding window in the region of interest, is a constant coefficient with a value of 2.31, represents the gray - level proportion of the th sliding window in the region of interest, represents the standard deviation of the gray - level of the th sliding window in the region of interest, is the inverse function of the error function.

[0009] Preferably, in step S3, the initial coincidence degree between the minimum circumscribed rectangle of the abnormal printing connected region and the original rectangle is obtained according to the following formula: ; In the formula, is the initial coincidence degree between the minimum circumscribed rectangle of the abnormal printing connected region and the original rectangle, and respectively represent the lengths of the minimum circumscribed rectangle of the abnormal printing connected region and the original rectangle, and respectively represent the widths of the minimum circumscribed rectangle of the abnormal printing connected region and the original rectangle.

[0010] Preferably, in step S5, according to the angle between the center of gravity of the sliding window in the sliding window and the edge of the abnormal printing connected region, the coincidence degree deviation coefficient of all angles in each abnormal printing connected region is obtained. The specific calculation formula is as follows: ; In the formula, represents the coincidence degree deviation coefficient of the angle between the center of gravity of the sliding window in all sliding windows on each abnormal printing edge and the edge of the abnormal printing connected region, represents the angle between the center of gravity of the sliding window in the th sliding window on each abnormal printing edge and the edge of the abnormal printing connected region, represents the average value of the angles between the center of gravity of the sliding window in the th sliding window on each abnormal printing edge and the edge of the abnormal printing connected region, represents the standard deviation of the angles between the center of gravity of the sliding window in all sliding windows on each abnormal printing edge and the edge of the abnormal printing connected region.

[0011] Preferably, in step S6, the final coincidence degree of all abnormal printing connected regions is obtained according to the coincidence degree offset coefficient and the coincidence degree offset coefficients of all included angles. The specific calculation formula is as follows: ; In the formula, represents the final coincidence degree of the abnormal printing point connected region and the minimum circumscribed rectangle, represents the initial coincidence degree of the minimum circumscribed rectangle of the abnormal printing point connected region and the original rectangle, represents the coincidence degree offset coefficient of the angle between the center of the sliding window in all sliding windows on the th abnormal printing edge and the edge of the abnormal printing connected region, represents the number of abnormal printing edges in the abnormal printing point connected region represents the number of abnormal printing point connected regions.

[0012] Preferably, in step S8, the singular value points and the corresponding abnormality degrees are obtained according to the voter value and the gray value of the pixel point to be detected. The specific calculation formula is as follows: ; In the formula, represents the th pixel point to be detected in the th abnormal printing connected region, is the voter value corresponding to the th pixel point to be detected in the th abnormal printing connected region, is the gray value of the th pixel point to be detected in the th abnormal printing connected region, represents the number of abnormal printing connected regions, represents the number of pixel points to be detected in each abnormal printing connected region.

[0013] Preferably, in step S9, the confidence that the abnormal value point is the singular value point is obtained according to the abnormality degree and the coordinates of the singular value point. The specific calculation formula is as follows: ; In the formula, represents the confidence of the th singular value point in the th abnormal printing connected region, and respectively represent the th singular value point in the th abnormal printing connected region Coordinates sum coordinates, is the confidence calculation function.

[0014] Preferably, in step S9, the overall confidence is obtained according to the confidence and the voter value , and is calculated by the following formula: ; In the formula, represents the number of abnormal printing connected components, represents the th number of singular value points in the th abnormal printing connected component; wherein, according to the comparison result between the overall confidence and the preset threshold , the printing integrity is obtained. Specifically: when , the area composed of all singular value point connected components of the current abnormal printing connected component is the printing complete area; when

[0015] ; In the formula, represents the difference between the gray value of the th abnormal printing point pixel in the printing complete area and the gray value of the th pixel in the standard printing area, represents the gray value of the th abnormal printing point pixel in the printing complete area, represents the gray value of the th pixel in the standard printing area.

[0016] An image - based fabric printing positioning system includes an image acquisition module for collecting fabric printing images and transmitting the images in real - time, a microprocessor for image processing and analysis of fabric printing images, a memory for storing data, a data storage module for storing preset parameter values to provide a reference basis for calculation and analysis, and a data processing module for assisting the microprocessor in data calculation and processing; Among them, the memory includes a volatile memory and a non - volatile memory. The volatile memory is used for temporarily storing intermediate data generated during the processing, and the non - volatile memory is used for long - term storing fabric printing image data, standard printing area data, and final positioning result data.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The present invention obtains the abnormal printing area of the fabric through image processing, and then uses the positioning points in the abnormal printing area to obtain accurate printing positioning points, avoiding the influence of abnormal printing on the overall positioning effect of the fabric. When the abnormal printing area of the fabric is obtained, the minimum circumscribed rectangle of the connected domain in the abnormal printing area is obtained, and the integrity of the abnormal printing area is quantified according to its coincidence degree with the abnormal printing area, and then its accuracy when positioning points is judged, solving the problem that the traditional positioning method is affected by abnormal printing and the positioning points are inaccurate, resulting in the inability to guarantee the printing quality.

[0018] 2. The present invention can also more accurately screen out the areas suitable as positioning points by precisely quantifying the integrity of the abnormal printing area. Compared with the traditional method that relies on manual experience judgment, it further improves the accuracy of positioning point selection, thereby improving the overall printing quality.

[0019] 3. The present invention also comprehensively makes decisions on the use of positioning points by combining the position information of each abnormal printing area, which can reduce the interference of the abnormal printing area on the overall positioning to a greater extent, can effectively cope with different types of abnormal printing, and has stronger adaptability compared with the existing method that only relies on feature point positioning, ensuring accurate printing positioning can still be completed under complex abnormal conditions and guaranteeing the stability of the fabric printing quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic structural diagram of the system of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0021] Embodiment 1: A fabric printing positioning method based on image processing according to the present invention includes the following steps: S1: Collect the fabric printing image, and preprocess the fabric printing image to obtain the region of interest; S2: Perform a sliding window traversal in the region of interest, obtain the gray level and the gray level ratio of each sliding window, and obtain abnormal printing points according to the gray level ratio of the sliding window; In the embodiment of the present invention, the specific calculation formula for obtaining abnormal printing points according to the gray level ratio of the sliding window is as follows: ; In the formula, represents the abnormal printing point, represents the pixel point obtained by sliding window traversal in the region of interest, is a constant coefficient with a value of 2.31, represents the The gray - level proportion of a sliding window, represents the standard deviation of the gray - level of the th sliding window in the region of interest; is the inverse function of the error function; S3: Obtain all abnormal printing connected regions based on all abnormal printing points, obtain the minimum bounding rectangle of the abnormal printing connected region, and obtain the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected region and the initial minimum bounding rectangle; ; In the embodiment of the present invention, the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected region and the original rectangle is obtained according to the following formula: where is the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected region and the original rectangle, and respectively represent the lengths of the minimum bounding rectangle of the abnormal printing connected region and the original rectangle, and respectively represent the widths of the minimum bounding rectangle of the abnormal printing connected region and the original rectangle; S4: Obtain the edge points and the tangent lines of the edge points of the abnormal printing connected region at the edge of each abnormal printing connected region, obtain two side points on the tangent line of the side points, and obtain the coincidence - degree deviation coefficient according to the coincidence degree of the two side points; S5: Perform a sliding - window traversal on the edge of each abnormal printing connected region, obtain the angle between the center of gravity of the sliding window and the edge of the abnormal printing connected region in the sliding window, and obtain the coincidence - degree deviation coefficient of all angles in each abnormal printing connected region; ; In the embodiment of the present invention, the specific calculation formula for obtaining the coincidence - degree deviation coefficient of all angles in each abnormal printing connected region according to the angle between the center of gravity of the sliding window and the edge of the abnormal printing connected region is as follows: where represents the coincidence - degree deviation coefficient of the angle between the center of gravity of the sliding window and the edge of the abnormal printing connected region in all sliding windows on each abnormal printing edge, represents the angle between the center of gravity of the sliding window and the edge of the abnormal printing connected region in the th sliding window on each abnormal printing edge, represents the mean value of the angles between the center of gravity of the sliding window and the edge of the abnormal printing connected region in the th sliding window on each abnormal printing edge, S6: Obtain the final coincidence degree of all abnormal printing connected regions based on the coincidence degree offset coefficient and the coincidence degree offset coefficients of all included angles. In an embodiment of the present invention, the step of obtaining the final coincidence degree of all abnormal printing connected regions based on the coincidence degree offset coefficient and the coincidence degree offset coefficients of all included angles is specifically calculated as follows: ; In the formula, represents the final coincidence degree between the abnormal printing point connected region and the minimum circumscribed rectangle, represents the initial coincidence degree between the minimum circumscribed rectangle of the abnormal printing point connected region and the original rectangle, represents the coincidence degree offset coefficient of the included angle between the center of the sliding window and the edge of the abnormal printing connected region in all sliding windows on the th edge of the abnormal printing, represents the number of abnormal printing edges in the abnormal printing point connected region ; S7: Obtain the abnormal printing point position offset degree of all abnormal printing points by using the final coincidence degree. S8: Obtain the pixel points to be detected in each abnormal printing connected region, perform Hough line detection on the neighborhood pixel points of the pixel points to be detected, obtain the Hough line and the voting value of the Hough line, and obtain the singular value points and the corresponding abnormal degrees of the singular value points according to the voting value and the gray value of the pixel points to be detected. In an embodiment of the present invention, the step of obtaining the singular value points and the corresponding abnormal degrees of the singular value points according to the voting value and the gray value of the pixel points to be detected is specifically calculated as follows: ; In the formula, represents the th pixel point to be detected in the th abnormal printing connected region, is the voting value corresponding to the th pixel point to be detected in the th abnormal printing connected region, is the gray value of the th pixel point to be detected in the th abnormal printing connected region, represents the number of abnormal printing connected regions, represents the number of pixel points to be detected in each abnormal printing connected region; S9: Obtain the confidence level that the outlier point is a singular value point according to the degree of abnormality and the coordinates of the singular value point, obtain the overall confidence level according to the confidence level and the votor value, and obtain the integrity degree of the print according to the comparison result between the overall confidence level and the preset threshold; In an embodiment of the present invention, to obtain the confidence level that the outlier point is a singular value point according to the degree of abnormality and the coordinates of the singular value point, the specific calculation formula is as follows: ; In the formula, represents the confidence level of the th singular value point of the th connected domain of abnormal prints, and respectively represent the coordinate and coordinate of the th singular value point of the th connected domain of abnormal prints, is the confidence level calculation function; In an embodiment of the present invention, to obtain the overall confidence level according to the confidence level and the votor value , it is calculated by the following formula: ; In the formula, represents the number of connected domains of abnormal prints, represents the number of singular value points in the th connected domain of abnormal prints; In an embodiment of the present invention, in step S9, to obtain the integrity degree of the print according to the comparison result between the overall confidence level and the preset threshold , specifically: when , the area composed of all singular value point connected domains of the current connected domain of abnormal prints is the print complete area; when , the area composed of non-singular value points of the current connected domain of abnormal prints is the print complete area; S10: Obtain the print complete area according to the degree of position offset of the abnormal print points and the integrity degree of the print; S11: Obtain the optimal print area positioning point for the abnormal print points in the print complete area according to the difference between the gray value of each abnormal print point pixel in the print complete area and the gray value of the pixels in the standard print area; In an embodiment of the present invention, in step S11, to obtain the optimal print area positioning point for the abnormal print points in the print complete area according to the difference between the gray value of each abnormal print point pixel in the print complete area and the gray value of the pixels in the standard print area, it is obtained according to the following formula: ; In the formula, represents the difference between the gray value of the th abnormal printing point pixel in the complete printing area and the gray value of the th pixel in the standard printing area, represents the gray value of the th abnormal printing point pixel in the complete printing area, represents the gray value of the th pixel in the standard printing area.

[0022] Embodiment 2: As Figure 1 shown, an image - based fabric printing positioning system includes an image acquisition module for collecting fabric printing images and transmitting the images in real - time, a microprocessor for image processing and analysis of the fabric printing images, a memory for storing data, a data storage module for storing preset parameter values to provide a reference basis for calculation and analysis, and a data processing module for assisting the microprocessor in data calculation and processing; As another embodiment of the present invention, the memory includes a volatile memory and a non - volatile memory. The volatile memory is used for temporarily storing intermediate data generated during the processing, and the non - volatile memory is used for long - term storing fabric printing image data, standard printing area data, and final positioning result data.

[0023] Embodiment 3: During the fabric printing positioning process on a fabric printing production line, a fabric printing image with a size of 500×500 pixels is collected, and then the implementation data is gradually brought in for analysis: S1: Collect the fabric printing image and pre - process the fabric printing image to obtain the region of interest; The collected fabric printing image is 500×500 pixels; Through pre - processing operations such as image cropping and filtering, the region of interest is determined to be the part of the image with 300×300 pixels in the center. This is because in actual production, there may be some interference information at the fabric edges, and the central area can better represent the main part of the printing. Selecting the central part as the region of interest facilitates subsequent accurate analysis of the printing situation; S2: Perform a sliding window traversal in the region of interest, obtain the gray level and the proportion of the gray level of each sliding window, and obtain abnormal printing points according to the proportion of the gray level of the sliding window; Perform a sliding window traversal within the 300×300 region of interest, and set the size of the sliding window to 5×5 pixels.

[0024] Suppose at a certain position, the proportion of the gray level of the pixel points in the th sliding window is calculated to be 0.3, and the standard deviation of the gray level is 0.08, the grayscale value of the currently traversed pixel point is 0.4, the constant coefficient Take 2.31; According to the formula Calculate ; , so this pixel point is determined to be an abnormal printing point; After traversing the entire region of interest, a total of 50 abnormal printing points are obtained; S3: Obtain all abnormal printing connected components based on all abnormal printing points, get the minimum bounding rectangle of the abnormal printing connected components, and obtain the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected components and the minimum bounding rectangle; Based on 50 abnormal printing points, 3 abnormal printing connected components are obtained through algorithm processing; For one of the connected components, the length of its minimum bounding rectangle is 20 pixels, and the width is 15 pixels; Let the length of the original rectangle (the rectangle corresponding to the ideal printing area) be 30 pixels, and the width is 25 pixels; According to the formula Calculate the initial coincidence degree; , this initial coincidence degree can intuitively reflect the difference degree between the abnormal printing connected component and the ideal printing area. The closer the value is to 1, the smaller the difference; S4: Obtain the edge points and the tangents of the edge points of the abnormal printing connected component at the edge of each abnormal printing connected component, obtain two side points on the tangent of the side points, and obtain the coincidence degree offset coefficient according to the coincidence degree of the two side points; Perform a sliding window traversal on the edge of this abnormal printing connected component (the sliding window is still 5×5 pixels); On a certain edge, the angle between the center of gravity of the sliding window and the edge of the abnormal printing connected component in the th sliding window is 30°, and the average value of the angles of all sliding windows on this edge is 25°, and the standard deviation of the angles is 2°; According to the formula Calculate, , by calculating the values of multiple sliding windows, the offset situation of the edge of this connected component can be comprehensively evaluated; S5: Perform a sliding window traversal on the edge of each abnormal printing connected component, obtain the angle between the center of gravity of the sliding window in the sliding window and the edge of the abnormal printing connected component, and obtain the coincidence degree deviation coefficient of all the angles in each abnormal printing connected component; Continue to perform a sliding window traversal on the edge of this connected component. This connected component has 4 edges ( ), and calculate according to the above method on each edge value; Then the values calculated on the four edges are 2.5, 2.5, 2.5, and 2.1 respectively; S6: Obtain the final coincidence degree of all abnormal printing connected components according to the coincidence degree deviation coefficient and the coincidence degree deviation coefficient of all the angles; It is known that there are 3 abnormal printing connected components ( ), and each connected component has 4 abnormal printing edges ( ); According to the and values calculated previously, calculate the final coincidence degree for one of the connected components. The values on the edges of this connected component are 2.5, 2.5, 2.5, and 2.1 respectively, then calculate according to the formula ; ; The final coincidence degree comprehensively considers the initial coincidence degree and the edge deviation situation, and more accurately reflects the matching degree between the abnormal printing connected component and the minimum circumscribed rectangle; S7: Use the final coincidence degree to obtain the position deviation degree of all abnormal printing points; According to the final coincidence degree , calculate that the position deviation degree of this abnormal printing point is approximately . The position deviation degree can help determine the severity of the printing abnormality and provide a basis for subsequent adjustment; S8: Obtain the pixels to be detected in each abnormal printing connected component, perform Hough line detection on the neighboring pixels of the pixels to be detected, obtain the Hough line and the vote value of the Hough line, and obtain the singular value points and the corresponding abnormality degree of the singular value points according to the vote value and the gray value of the pixels to be detected; Select the pixels to be detected in each abnormal printing connected component. 10 pixels to be detected are selected for each connected component ( ); For the th connected component and the th pixel to be detected, the vote value obtained by Hough line detection is 50, and the gray value of this pixel is 0.6. The sum of the vote values of all pixels to be detected , the total grayscale value ; Calculate according to the formula , , through The value can judge the abnormality degree of the pixel point. The larger the value, the more likely the pixel point is a singular value point.

[0025] S9: Obtain the confidence that the abnormal value point is a singular value point according to the abnormality degree and the coordinates of the singular value point, obtain the overall confidence according to the confidence and the value of the voting device, and obtain the printing integrity according to the comparison result between the overall confidence and the preset threshold; Confidence calculation function , for the 3rd singular value point of the 1st connected domain above, the coordinates , then the confidence of this point ; The 1st connected domain has 3 singular value points ( ), calculate the overall confidence according to the formula , and the overall confidence after calculation for the other two singular value points , the preset threshold .

[0026] Because , so the area composed of all singular value point connected domains of the current abnormal printing connected domain is the printing complete area. The calculation of the confidence and the overall confidence can comprehensively evaluate the integrity of the printing area and provide an important basis for judging the printing quality; S10: Obtain the printing complete area according to the position offset degree of the abnormal printing point and the printing integrity; According to the position offset degree of the abnormal printing point and the printing integrity, determine the final printing complete area. Help determine which areas of the printing are complete and usable, and which areas have abnormalities that need further processing; S11: Obtain the optimal printing area positioning point for the abnormal printing point pixels in the printing complete area according to the difference between the grayscale value of each abnormal printing point pixel in the printing complete area and the grayscale value of the pixel in the standard printing area.

[0027] In the determined printing complete area, according to the grayscale value of the abnormal printing point pixel , the corresponding pixel grayscale value of the standard printing area .

[0028] Calculate according to the formula , , by comparing the differences between the grayscale values of multiple abnormal printing point pixels and the pixels in the standard printing area, the optimal printing area positioning point can be determined, so as to accurately adjust the printing position.

[0029] In terms of positioning accuracy, by collecting fabric printing images and preprocessing them to obtain the region of interest, using a sliding window to traverse and combining with a specific formula to accurately identify abnormal printing points, and then determining the connected domain based on the abnormal printing points, calculating the relevant coincidence degree and offset coefficient, it is possible to accurately judge the integrity and position offset of the abnormal printing area, laying a foundation for accurate positioning. For example, in simulated data, abnormal points can be effectively identified and their offset situations can be quantified. Compared with traditional positioning methods, the positioning accuracy is greatly improved, avoiding the interference of abnormal printing on the overall positioning and ensuring the printing quality.

[0030] In terms of integrity assessment, by obtaining singular value points and the degree of abnormality through Hough line detection, combining confidence calculation and comparison with a preset threshold, the integrity of the printing can be reliably judged. In the simulated case, the complete printing area is accurately divided according to the overall confidence, and the area suitable for positioning is screened out, improving the accuracy of positioning point selection.

[0031] This method and system have strong adaptability and can effectively handle different types of abnormal printing. By comprehensively considering the position information of the abnormal printing area, the printing positioning can be accurately completed even in complex abnormal situations, ensuring the stability of the fabric printing quality.

[0032] The fabric printing positioning method and system of the present invention are practical and feasible, can effectively solve the problems existing in traditional positioning methods, provide an efficient and accurate positioning solution for the fabric printing industry, and have good application prospects and promotion value.

[0033] The embodiments disclosed in the present invention are preferred embodiments, but not limited thereto. Those of ordinary skill in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes, but as long as they do not depart from the spirit of the present invention, they are within the protection scope of the present invention.

Claims

1. A cloth printing positioning method based on image processing, characterized in that, It includes the following steps: S1: Collect the fabric printing image, and preprocess the fabric printing image to obtain the region of interest; S2: Perform a sliding window traversal in the region of interest, obtain the gray level and the gray level ratio of each sliding window, and obtain the abnormal printing points according to the gray level ratio of the sliding window; S3: Obtain all abnormal printing connected components based on all abnormal printing points, obtain the minimum bounding rectangle of the abnormal printing connected components, and obtain the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected components and the minimum bounding rectangle; S4: Obtain the edge points and the tangent lines of the edge points of the abnormal printing connected components at the edge of each abnormal printing connected component, obtain two side points on the tangent line of the side points, and obtain the coincidence degree offset coefficient according to the coincidence degree of the two side points; S5: Perform a sliding window traversal on the edge of each abnormal printing connected component, obtain the included angle between the center of gravity of the sliding window in the sliding window and the edge of the abnormal printing connected component, and obtain the coincidence degree offset coefficient of all included angles in each abnormal printing connected component; S6: Obtain the final coincidence degree of all abnormal printing connected components according to the coincidence degree offset coefficient and the coincidence degree offset coefficient of all included angles; S7: Use the final coincidence degree to obtain the abnormal printing point position offset degree of all abnormal printing points; S8: Obtain the pixels to be detected in each abnormal printing connected component, perform Hough line detection on the neighboring pixels of the pixels to be detected, obtain the Hough line and the vote value of the Hough line, and obtain the singular value points and the corresponding abnormal degrees of the singular value points according to the vote value and the gray value of the pixels to be detected; S9: Obtain the confidence level that the abnormal value point is the singular value point according to the abnormal degree and the coordinates of the singular value point, obtain the overall confidence level according to the confidence level and the vote value, and obtain the printing integrity according to the comparison result between the overall confidence level and the preset threshold; S10: Obtain the printing complete area according to the abnormal printing point position offset degree and the printing integrity; S11: According to the difference between the gray value of each abnormal printing point pixel in the printing complete area and the gray value of the pixel in the standard printing area, obtain the abnormal printing point pixels in the printing complete area to obtain the optimal printing area positioning points.

2. The fabric printing positioning method based on image processing according to claim 1, wherein The specific calculation formula for obtaining the abnormal printing points according to the gray level ratio of the sliding window in step S2 is as follows: ; In the formula, represents abnormal printing dots, represents the pixel points obtained by traversing the sliding window in the region of interest, is a constant coefficient with a value of 2.31, represents the gray level proportion of the th sliding window in the region of interest, represents the standard deviation of the gray level of the th sliding window in the region of interest, is the inverse function of the error function.

3. The method for positioning fabric printing based on image processing according to claim 2, characterized in that, In step S3, the initial coincidence degree between the minimum bounding rectangle of the abnormal printing connected component and the original rectangle is obtained according to the following formula: ; In the formula, is the initial coincidence degree between the minimum circumscribed rectangle of the abnormal printing connected domain and the original rectangle, and respectively represent the lengths of the minimum circumscribed rectangle of the abnormal printing connected domain and the original rectangle, and respectively represent the widths of the minimum circumscribed rectangle of the abnormal printing connected domain and the original rectangle.

4. The fabric printing positioning method based on image processing according to claim 3, wherein, In step S5, according to the included angle between the center of gravity of the sliding window in the sliding window and the edge of the abnormal printing connected component, the coincidence degree offset coefficient of all included angles in each abnormal printing connected component is obtained. The specific calculation formula is as follows: ; In the formula, represents the degree of deviation of the coincidence of the angle between the center of gravity of the sliding window in all sliding windows on each abnormal printing edge and the edge of the connected domain of the abnormal printing, represents the angle between the center of gravity of the sliding window in the th sliding window on each abnormal printing edge and the edge of the connected domain of the abnormal printing, represents the angle between the center of gravity of the sliding window in the th sliding window on each abnormal printing edge and the edge of the connected domain of the abnormal printing, represents the standard deviation of the angle between the center of gravity of the sliding window in all sliding windows on each abnormal printing edge and the edge of the connected domain of the abnormal printing.

5. A fabric printing positioning method based on image processing according to claim 4, characterized in that, In step S6, the final coincidence degree of all abnormal printing connected components is obtained according to the coincidence degree offset coefficient and the coincidence degree offset coefficient of all included angles. The specific calculation formula is as follows: ; Wherein, represents the final coincidence degree of the abnormal printing dot connected domain with the minimum circumscribed rectangle, represents the initial coincidence degree of the minimum circumscribed rectangle of the abnormal printing dot connected domain with the original rectangle, represents the coincidence degree deviation coefficient of the included angle between the center of the sliding window and the edge of the abnormal printing connected domain in all sliding windows on the th abnormal printing edge, represents the number of abnormal printing edges in the abnormal printing dot connected domain represents the number of abnormal printing dot connected domains.

6. The fabric printing positioning method based on image processing according to claim 5, wherein, In step S8, the singular value points and the corresponding abnormal degrees of the singular value points are obtained according to the vote value and the gray value of the pixels to be detected. The specific calculation formula is as follows: ; Wherein, represents the th th pixel to be detected in the th connected region of abnormal printing, is the th voting value corresponding to the th pixel to be detected in the th connected region of abnormal printing, is the gray value of the th pixel to be detected in the th connected region of abnormal printing, represents the number of connected regions of abnormal printing, and represents the number of pixels to be detected in each connected region of abnormal printing.

7. A method for positioning fabric printing based on image processing according to claim 6, wherein, In step S9, the confidence level that the abnormal value point is a singular value point is obtained according to the abnormal degree and the coordinates of the singular value point. The specific calculation formula is as follows: ; In the formula, represents the confidence of the -th singular value point of the -th abnormal printing connected domain, and respectively represent the -th -th singular value point of the coordinate and coordinate of the is the confidence calculation function.

8. A method for positioning fabric printing based on image processing according to claim 7, characterized in that In step S9, the overall confidence is obtained based on the confidence and the voter value , which is calculated by the following formula: ; In the formula, represents the number of abnormal printing connected regions, represents the number of singular value points in the th abnormal printing connected region; Among them, the integrity degree of the print is obtained according to the comparison result between the overall confidence level and a preset threshold value , specifically as follows: when , the area composed of all the singular value point connected domains of the current abnormal print connected domain is the print complete area; when , the area composed of the non-singular value points of the current abnormal print connected domain is the print complete area.

9. A cloth printing positioning method based on image processing according to claim 8, characterized in that In step S11, according to the difference between the gray value of each abnormal printing point pixel in the complete printing area and the gray value of the pixel in the standard printing area, the optimal printing area positioning point of the abnormal printing point pixel in the complete printing area is obtained according to the following formula: ; In the formula, represents the difference between the gray value of the th abnormal printing dot pixel in the complete printing area and the gray value of the th pixel in the standard printing area, represents the gray value of the th abnormal printing dot pixel in the complete printing area, represents the gray value of the th pixel in the standard printing area.

10. A cloth printing positioning system based on image processing, which uses a cloth printing positioning method based on image processing as described in claim 9, characterized in that, including: An image acquisition module, which is used to acquire the fabric printing image and transmit the image in real time; A microprocessor, which is used to perform image processing and analysis on the fabric printing image; A memory, which is used to store data; A data storage module, which is used to store preset parameter values and provide a reference basis for calculation and analysis; A data processing module, which is used to assist the microprocessor in data calculation and processing; Among them, the memory includes a volatile memory and a non-volatile memory. The volatile memory is used to temporarily store intermediate data generated during the processing, and the non-volatile memory is used to store the fabric printing image data, the standard printing area data, and the final positioning result data for a long time.

Citation Information

Cited By

  • Remote acquisition method and system for inkjet printing image data

    CN120726146A

  • Road total element model rapid establishment method based on image recognition

    CN121435361A