Cloth turning and sewing alignment control system based on machine vision
Through the grayscale peak recognition and tension direction correction module, the problems of feature boundary recognition errors and path correction hysteresis in the existing technology in the seam head alignment control of the cloth turning are solved, and the stability of image segment alignment and path response is improved.
Patent Information
- Application Number
- CN202511273416.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-09-08
AI Technical Summary
The existing technology relies on static template matching and edge threshold extraction in the alignment control of cloth turning seams, which makes it difficult to adapt to areas with irregular textures or slight grayscale changes, resulting in errors in feature boundary recognition, lack of directional trend judgment mechanism, and inability to respond to structural offsets, leading to path correction hysteresis and structural misalignment.
The grayscale peak recognition module is used to acquire image frames, identify the grayscale peak position, and analyze its spacing stability and grayscale gradient slope changes. The seam edge recognition module is combined to locate the mutation point, and the tension direction correction module is used to adjust the target point position. Multi-factor boundary conditions are introduced to improve the path response stability.
The image processing ability to recognize edge distribution has been enhanced, the alignment judgment between image segments has been improved, and the directional adaptability and path response stability of the target point under tension disturbance have been improved. The processing logic has established a linkage mechanism between image features, tension changes and path correction, which has enhanced the structural alignment stability during the dynamic changes of the cloth flipping.
Smart Images

Figure CN120765754A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of alignment control, in particular to a machine vision-based cloth seam alignment control system. Background Art
[0002] Positioning control technology is an important branch of automated control systems. It is mainly used for precise position coordination and alignment between multiple objects. This technology is widely used in printing, circuit board manufacturing, textile processing, packaging, mechanical assembly and other fields. It plays a core role in process processes that require high-precision positioning and matching. With the development of industrial automation and intelligent manufacturing, positioning control systems have gradually integrated advanced sensing technologies (such as lasers and vision sensors) with image processing algorithms to achieve rapid identification of targets, error detection and dynamic compensation control, so as to improve product quality and production efficiency.
[0003] Among them, the machine vision cloth turning and seam alignment control system is a control system that uses visual recognition to automatically detect and adjust the seam position during the cloth turning process. Its core is to capture the cloth seam image through machine vision equipment, analyze it in combination with image processing algorithms, and achieve precise alignment through control actuators. The system is mainly used in textile production lines, especially in the cloth turning and splicing links, to improve the quality of cloth splicing, reduce manual intervention, and improve the level of production automation and overall processing efficiency.
[0004] Existing technologies mostly rely on static template matching or edge threshold extraction. Image features are difficult to adapt to areas with irregular textures or weak grayscale changes, resulting in errors in feature boundary recognition. In image segment recognition, static coordinate difference judgment is generally adopted, lacking a directional trend judgment mechanism and unable to respond to structural offset problems. In tension disturbance scenarios, existing path control mostly relies on target position offset adjustment, ignoring the tension direction change trend, which can easily cause target instruction offset. Path advancement adjustment is based on angle offset, and multi-factor boundary conditions are not introduced, resulting in delayed execution of path correction. Under the combined effect of image structure offset and tension change, existing technologies have problems of response lag, structural dislocation and path instability in the cloth turning and seam head alignment scenario. Summary of the Invention
[0005] In order to solve the problems existing in the prior art of multi-dependence on static template matching or edge threshold extraction, image features are difficult to adapt to areas with irregular textures or weak grayscale changes, resulting in errors in feature boundary recognition. In image segment recognition, static coordinate difference judgment is generally adopted, lacking a direction trend judgment mechanism and unable to respond to structural offset problems. In tension disturbance scenarios, existing path control relies more on target position offset adjustment, ignoring the tension direction change trend, which easily causes target instruction offset. Path advancement adjustment is based on angle offset, and multi-factor boundary conditions are not introduced, resulting in hysteresis in path correction execution. Under the combined effect of image structure offset and tension change, the prior art has technical problems such as response lag, structural dislocation and path instability in the cloth turning and seam head alignment scenario. The embodiment of the present invention provides a cloth turning and seam head alignment control system based on machine vision. The technical solution is as follows: On the one hand, a machine vision-based control system for turning and seam alignment is provided, including: The grayscale peak recognition module obtains the image frames of the cloth turning process, identifies the continuous positions of grayscale peaks in the image, compares the stability of the spacing between adjacent peaks and the change of the grayscale gradient slope, determines whether the symmetry is stable, and obtains the effective section identification of the pattern; The seam edge recognition module constructs a change trajectory of the grayscale difference between adjacent pixels based on the effective segment identification of the pattern, locates the key position points of two sudden changes, analyzes the grayscale trend and relative structural characteristics between the two sudden changes, and obtains a set of structural sudden change feature points; The image segment alignment judgment module, based on the set of structural mutation feature points, calls the vertical coordinates of the mutation points in the two image segments, compares their position differences to see if they fall within the inter-segment offset range, detects whether the mutation direction remains consistent in consecutive image cycles, determines image segments with stable structural directions and controllable position changes, and obtains matching image segment data; The tension direction correction module collects the tension direction vector according to the regional coordinates in the matchable image segment data, constructs an angle sequence formed by the vector and the line connecting the seam head target point to the center of the fabric, analyzes whether the angle is reversed in direction in the image sequence, and obtains the target point relocation result.
[0006] On the other hand, the pattern valid segment identifier includes the peak position index, boundary spacing interval, and grayscale symmetry segment; the structural mutation feature point set includes the mutation point coordinate group, mutation point direction information, and grayscale difference change label; the matchable image segment data includes the inter-segment alignment coordinate group, structural direction correspondence, and image period distribution label; the target point repositioning result includes the tension main vector indication, the target point selection number, and the angle change sequence.
[0007] On the other hand, the grayscale peak identification module includes: The grayscale sequence extraction submodule obtains the image frame of the cloth turning process, extracts the grayscale distribution of each column in the Y-axis direction of the image, calculates the maximum grayscale amplitude for the grayscale set of each column, locates the grayscale amplitude change arrangement trend in consecutive columns, and generates an inter-column grayscale amplitude trend set; The grayscale trajectory construction submodule collects the change direction between each group of column differences based on the inter-column grayscale amplitude trend set, arranges them in order according to the column sequence, groups the continuous segments of the change direction, and integrates all direction segment sequences to construct a column sequence direction transfer trajectory group; The structural symmetry judgment submodule extracts the interval span between consecutive peaks in the column sequence based on the column sequence direction transfer trajectory group, collects the directional change length of the rising and falling segments on both sides of the peak, calculates the inter-column offset in the symmetric direction, and combines the relationship between the directional arrangement and the column sequence span in the structural symmetric segment to determine whether the symmetry condition is met and obtain the valid segment identifier of the pattern.
[0008] On the other hand, the seam edge recognition module includes: The column-wise sequence construction submodule extracts the grayscale value sequence of each column in the corresponding image area according to the effective segment identifier of the pattern, obtains the grayscale arrangement set of the corresponding row number in each column in column order, indexes and pairs the grayscales of the same row number in consecutive columns to form a column-wise sequence array, and obtains the column-wise pixel grayscale arrangement set; The gradient trajectory construction submodule calls the column-wise pixel grayscale arrangement set, establishes a difference set for the grayscale between adjacent pixels, obtains the change direction of the continuous pixel grayscale difference, records the start and end row numbers of the change segment according to the grayscale difference direction, connects them in sequence to form a direction arrangement chain, and obtains pixel grayscale difference trend data; The structural feature screening submodule identifies the mutation boundary where the grayscale direction turns based on the pixel grayscale difference trend data, records its vertical coordinates and the corresponding grayscale transformation direction, extracts the grayscale arrangement segments between two adjacent mutation boundaries, determines whether the arrangement direction is continuous and consistent, and screens stable structures where the arrangement has not reversed to obtain the set of structural mutation feature points.
[0009] On the other hand, the image segment alignment judgment module includes: The coordinate difference detection submodule extracts the vertical coordinates of the corresponding column sequences in the two image segments based on the structural mutation feature point set, calculates the vertical coordinate spacing of the corresponding points under the premise of consistent column sequence numbering, determines whether the coordinate spacing falls within the allowed interval of inter-segment offset, and obtains the column position offset interval; The direction change judgment submodule calls the column-wise position offset interval, extracts the grayscale gradient direction mark of the mutation point corresponding to each column in the continuous image cycle, records the gradient direction change results of the same column sequence in each cycle, identifies the point number where the direction changes, and counts the column number segments with continuous and consistent directions to obtain a list of directionally stable segments; The structural segment matching and screening submodule matches the column sequence segment combination with the smallest column offset and unchanged direction according to the list of directionally stable segments, determines whether the mutation points in the combination meet the dual conditions of consistent direction and continuous offset within the period, determines the controllable image segments, and obtains the matchable image segment data.
[0010] On the other hand, the formula is used to determine whether the mutation point in the combination satisfies the dual conditions of consistent direction and continuous offset within the period: ; Calculate the offset continuous eigenvalues, determine the controllable image segments, and obtain the matching image segment data, where: Representative The offset continuity eigenvalue used to judge the offset continuity in the combination of sequence segments, Representative The first The column-wise offset of the mutation point in each period is expressed in the form of horizontal pixel values of the image. Indicates the offset of the previous segment. Representative The first The image direction angle of the mutation point in the period segment is obtained by the gradient direction of the neighborhood direction of the mutation point in the image. is the image direction angle of the previous segment, To prevent positive constants with zero denominators, Indicates the number of valid periodic segments that can be calculated in the column sequence segment combination.
[0011] On the other hand, the tension direction correction module includes: The direction vector extraction submodule collects the starting and ending positions of the tension direction of the coordinate point according to the regional coordinates in the matchable image segment data, calculates the direction of the straight line between the starting and ending coordinates, and calibrates the projection direction of the vector in the image plane to obtain the tension direction projection trajectory; The angle sequence construction submodule calls the tension direction projection trajectory, obtains the angle between each tension vector and the line connecting the corresponding seam head target point to the center of the fabric, calculates the direction of change of the angle, sorts the image frames by number, determines whether the angle direction turns in consecutive frames, marks the position of the sudden change in direction, and generates an angle turning change distribution; The point relocation submodule selects vector segments whose directions have not been reversed according to the distribution of the angle steering changes, matches the coordinate points of the spare points with adjacent angle directions and the same extension direction, calls the extension direction coordinates of the spare points for cross-comparison, locates the points with overlapping directions in the current cycle, and obtains the target point relocation results.
[0012] On the other hand, the coordinate points in the matching spare points that are adjacent in angle direction and have the same extension direction are calculated using the formula: ; Calculate the adjacent difference value of the included angle, call the extension direction coordinates of the backup point for cross comparison, and locate the direction coincidence point in the current cycle, where: Represents the current candidate point The difference in angle direction with the backup point, Indicates candidate points The angle direction, Represents the average value of the angle direction of all spare points, Indicates candidate points The extension distance, Represents the extension distance set of all backup points. Indicates candidate points The rate of change in its extension direction, It represents the average value of the change rate of all backup points in their extension direction.
[0013] In another aspect, the system further comprises: The alignment trajectory adjustment module, based on the target point repositioning result, calls the execution path direction and movement record of the previous cycle, calculates the midline of the angle between the main tension direction and the original path direction, determines whether the midline is within the motion boundary interval, limits the path advancement direction, sets the adjustment trajectory along the midline direction, and obtains the corrected trajectory configuration; The modified trajectory configuration includes adjusting the path vector, the centerline angle direction, and the path boundary parameter group.
[0014] On the other hand, the alignment trajectory adjustment module includes: The path parameter extraction submodule extracts the image coordinates of the corresponding point in the current frame based on the target point relocation result, calls the execution path direction data and movement distance under the same column number in the previous cycle, calculates the angle difference between the tension direction and the original path direction, and obtains the tension and path angle comparison data; The centerline direction determination submodule calls the tension and path angle comparison data, calculates the symmetrical angle centerline of each pair of tension directions and the original path direction according to the cycle number, detects whether the starting point and end point of the centerline in the motion coordinate area are within the boundary interval, and marks the centerline segment numbers that meet the motion constraints to obtain the restricted interval advancement centerline set; The trajectory configuration generation submodule advances the centerline set according to the restricted interval, screens the coordinate segments in the continuous frames that have consistent centerline directions and do not touch the boundaries, extracts the advancement path between the starting and ending points of the segment, and connects it with the target point coordinates to form a path chain to obtain the corrected trajectory configuration.
[0015] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: By constructing grayscale peak trajectories and analyzing the stability of spacing and slope changes between peaks, the pattern rhythm area is accurately extracted, and the image processing ability to recognize edge distribution is enhanced. The directional characteristics and coordinate positions of grayscale mutation points are used for structural recognition, avoiding dependence on static feature templates and improving the adaptability of edge recognition. Image segments are aligned and judged based on the directional consistency and coordinate trend relationship of mutation points, enhancing the dynamic recognition of continuity between segments. The change in the angle between the tension direction and the target line drives the selection of spare points and the update of target points, improving the directional adaptability of the target point under tension disturbance. The path correction link introduces the judgment of the midline of the angle and combines it with the push boundary restriction to improve the stability of the path response. The processing logic constructs a linkage mechanism between image features, tension changes and path correction, enhancing the structural alignment stability during dynamic changes in cloth turning. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic diagram of the system of the present invention; Figure 2 Schematic diagram of the system framework of the present invention; Figure 3 This is a flow chart of the grayscale peak recognition module of the present invention; Figure 4 This is a flow chart of the seam edge recognition module of the present invention; Figure 5 This is a flow chart of the image segment alignment judgment module of the present invention; Figure 6 This is a flow chart of the tension direction correction module of the present invention; Figure 7 This is a flow chart of the alignment trajectory adjustment module of the present invention. DETAILED DESCRIPTION
[0018] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0019] In the embodiments of the present application, the words such as "exemplary", "for example", etc. are used to represent an example, illustration, or description. Any embodiment or design scheme described as "exemplary" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "exemplary" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.
[0020] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times, and it should be pointed out that the meanings expressed are consistent when the distinction is not emphasized. "Of", "corresponding" and "corresponding" can be used interchangeably at times, and it should be pointed out that the meanings expressed are consistent when the distinction is not emphasized.
[0021] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1, and the meanings expressed are consistent when the distinction is not emphasized.
[0022] In order to make the technical problems, technical schemes and advantages to be solved by the present application more clear, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0023] The embodiments of the present application provide a cloth turning and sewing head alignment control system based on machine vision, as shown in Figure 1 The system comprises: A gray peak identification module acquires a cloth turning process image frame, extracts a gray distribution of each column in a Y-axis direction of the image, constructs an inter-column gray projection change track, identifies continuous positions of the gray peaks in the image, compares a spacing stability between adjacent peaks and a gray gradient slope change, judges whether a symmetry in a continuously distributed peak structure is stable, and acquires a pattern effective section identifier. A sewing head edge identification module extracts a gray sequence of a corresponding region according to the pattern effective section identifier, constructs a change track of gray differences between adjacent pixels, locates two position points of key mutations, records coordinates and gradient directions in a vertical direction, analyzes a gray trend and a relative structure feature between the two mutation points, screens a stable gradient combination, and acquires a structure mutation feature point set. An image segment alignment judgment module calls vertical direction coordinates of the mutation points in two image segments based on the structure mutation feature point set, compares whether a position difference falls into a segment offset range, detects whether a mutation direction remains consistent in a continuous image period, determines an image segment with a stable structure direction and a controllable position change, and acquires matchable image segment data. The tension direction correction module collects the tension direction vector based on the regional coordinates in the matchable image segment data, constructs an angle sequence formed by the vector and the line connecting the seam head target point to the center of the fabric, analyzes whether the angle has reversed direction in the image sequence, and calls the points in the backup points with adjacent angle directions and overlapping extension directions to obtain the target point relocation results; The alignment trajectory adjustment module calls the execution path direction and movement record of the previous cycle based on the target point repositioning result, calculates the midline of the angle between the main tension direction and the original path direction, determines whether the midline is within the motion boundary interval, limits the path advancement direction, sets the adjustment trajectory along the midline direction, and obtains the corrected travel trajectory configuration.
[0024] The valid segment identification of the pattern includes the peak position index, boundary spacing interval, and grayscale symmetry segment. The structural mutation feature point set includes the mutation point coordinate group, mutation point direction information, and grayscale difference change label. The matchable image segment data includes the inter-segment alignment coordinate group, structural direction correspondence, and image period distribution label. The target point repositioning result includes the tension main vector indication, target point selection number, and angle change sequence. The correction of the travel trajectory configuration includes adjusting the path vector, the centerline angle direction, and the path boundary parameter group.
[0025] The mutation point refers to a position where the amplitude of gray scale change suddenly rises or falls in the gray scale gradient curve, corresponding to the light-dark transition area at the edge of the fabric pattern or seam head texture; the key position point refers to the coordinate position of the mutation point in the vertical direction (Y axis) of the image, which represents the key area of the image structure producing texture changes in this direction, and is usually used to judge the edge direction, structure continuity and seam head alignment reference; the image segment refers to a local area divided in the image according to the pattern rhythm, which is usually determined by the start and end column ranges marked by the “pattern rhythm effective segment number”, and is the basic object for subsequent structure consistency judgment and seam head alignment judgment, each image segment contains a relatively complete seam head pattern structure and its gradient change, which is the basic unit for the machine vision system to judge the seam head continuity and alignability between segments; the standby point refers to a set of candidate target point coordinates preset near the edge of the fabric or the seam head, which has the qualification to be replaced and called, and when the existing target point fails due to a sharp reversal of the target point angle direction or tension disturbance, the system selects the point with the smallest angle and the best alignment from the set as the new target, so as to ensure the coordination between the tension direction and the alignment point adjustment; the execution path refers to the actual motion trajectory planned by the execution mechanism during the movement of the fabric surface for aligning the seam head, which is represented as the change sequence of the advancing direction vector in the continuous period, and the execution path is composed of the advancing direction of the last period, the target point position and the tension vector, which is the core control object of the dynamic adjustment of the alignment action, and the path adjustment is based on the angle direction midline; the column sequence refers to the column position order numbered in sequence according to the pixel unit from left to right in the image, which represents the arrangement of each vertical pixel in the image, for example, the image column sequence is the column array number sorted by column number in the entire image frame, which usually starts from the first column on the left side numbered as 1 (or 0), and then is 2, 3, 4… until the rightmost column of the image, in a 640×480 resolution image, the column sequence number is 1~640, and each column sequence position corresponds to an entire column of 480 vertical pixels.
[0026] As shown in Figure 2 and Figure 3 , the gray scale peak recognition module includes: The gray scale sequence extraction submodule acquires the fabric turning process image frame, extracts the gray scale distribution of each column in the Y axis direction of the image, calculates the maximum gray scale amplitude for each column of pixel gray scale set, and locates the gray scale amplitude change arrangement trend in the continuous columns to generate the inter-column gray scale amplitude trend set; The gray data extraction operation is sequentially performed on each column of pixels in the Y-axis direction of the image frame, and the gray values of all the pixels in each column are represented as a gray column vector. For each gray column vector, the maximum gray value and the minimum gray value of all the pixels in the column are extracted first, and the maximum gray amplitude value of the column is calculated by the difference between the two values. For example, for a column containing pixel gray values [45, 60, 55, 80, 90, 100], the maximum value is 100, the minimum value is 45, and the maximum gray amplitude is 100-45=55. The gray amplitudes of all the columns are stored in the initial sequence according to the column sequence. Next, the gray amplitude change trend between adjacent columns is compared in sequence in all the columns. The difference between the gray amplitude values of the ith column and the (i+1)th column is calculated, and the positive or negative direction of the difference value is recorded. If the difference value is positive, it indicates that the gray amplitude is rising, and vice versa. For example, the gray amplitudes of column 1 and column 2 are 48 and 55 respectively, the difference value is +7, and the direction is rising. The gray amplitudes of column 2 and column 3 are 55 and 52 respectively, the difference value is -3, and the direction is falling. This process is repeated until all the columns are traversed. The inter-column gray amplitude change trend sequence is obtained by this difference calculation, which is used to represent the spatial evolution process of the local structure gray fluctuation in the flipping image. Finally, the trend sequence is stored as the inter-column gray amplitude trend set according to the original column sequence of the image.
[0027] The gray trajectory construction submodule collects the change direction between each group of column differences based on the inter-column gray amplitude trend set, sequentially arranges the change direction according to the column sequence, groups the continuous sections of the change direction, and integrates all the direction section sequences to construct the column sequence direction transition trajectory group. The change direction indicated by the gray amplitude difference between each group of adjacent columns is sequentially read, all the change directions are concatenated according to the image column sequence to form a one-dimensional original sequence of change directions, the paragraphs with consistent continuous change directions are grouped, each group is called a direction section group, for example, if the original sequence is [↑, ↑, ↑, ↓, ↓, ↑, ↑], it can be divided into three sections: [↑, ↑, ↑], [↓, ↓], and [↑, ↑], each section records the starting column, the ending column, and the change direction. The direction section sequence group is formed by scanning the entire trend sequence and sequentially accumulating the section group information. On this basis, the direction section groups are integrated to construct the column sequence direction transition trajectory group according to the arrangement order of the direction section groups in the image column sequence. The trajectory group retains the direction consistency, paragraph span, change order, and other multi-dimensional information of each gray fluctuation section, which facilitates subsequent analysis of structural symmetry. For example, a certain region in the image has a gray change direction sequence of [↑10 columns, ↓8 columns, ↑10 columns], which indicates that the structure has strong symmetry, which can be intuitively identified through the trajectory group.
[0028] The structure symmetry judgment submodule extracts the interval span of consecutive wave peaks in the column sequence, collects the length of the direction change of the rising and falling sections on both sides of the wave peak, calculates the column interval offset of the symmetry direction, judges whether the symmetry condition is met by combining the relationship between the direction arrangement and the column sequence span in the structure symmetry section, and obtains the pattern effective section identifier; The wave peak positions in adjacent direction sections are analyzed, the interval span of consecutive wave peaks in the column sequence is extracted, the index positions of each wave peak in the column sequence are recorded, and the span value is calculated by the column number difference between two wave peaks. If the wave peaks appear in the 20th column and the 36th column of the column sequence, the interval span is 16 columns. Then, the gray scale change directions on both sides of the wave peak and the lengths of the direction sections are collected, and the number of consecutive rising or falling sections on the left and right sides of the wave peak is counted. For example, the left side is [↑ 5 columns, ↑ 3 columns], and the right side is [↓ 3 columns, ↓ 5 columns]. The lengths of the rising and falling sections are 8 columns respectively. According to the data, the symmetry column interval offset values of the direction sections on both sides are calculated, that is, the distance difference from the symmetry boundary starting point to the center of the wave peak. For example, if the distance from the left side starting point to the wave peak is 8 columns and the distance from the right side starting point to the wave peak is 8 columns, the offset is 0. The judgment standard is whether the offset is less than the set threshold Δ. When Δ is set to not more than 3 columns, if the offset is less than or equal to 3, it is considered to meet the symmetry condition. The setting of Δ is based on the image resolution and the stable range of the width. If the horizontal resolution of the image is 640 columns and the maximum swing range of the width is ±10 mm, the image offset is ±6 columns. Therefore, setting Δ=3 can ensure that the offset is within a controllable range. Finally, the symmetry arrangement relationship between the direction sections and whether the column sequence span is equal are combined. If the length difference of the symmetry direction sections on both sides is not more than 1 column, and the directions are consistent and the arrangement order is symmetrical, the column sequence section is judged to meet the symmetry condition, and the column sequence range where it is located is marked as the pattern effective section identifier.
[0029] As shown in Figure 2 and Figure 4 , the seam head edge recognition module includes: The column sequence construction submodule extracts the gray scale value sequence of each column in the corresponding image area according to the pattern effective section identifier, obtains the gray scale arrangement set of each column corresponding to the row number, indexes and pairs the gray scales of the same row number in consecutive columns, forms a column sequence array, and obtains the column pixel gray scale arrangement set. First, determine the left and right boundaries and the upper and lower boundaries of the marked area in the image frame, locate each column of pixels in the area, and read the grayscale value of each pixel from top to bottom in each column to form a vertical grayscale arrangement sequence for each column. Establish a column-wise grayscale set based on the image column. In practical applications, if an image is 640 columns (px) wide and 480 rows (px) high, and the valid segment is from the 200th column to the 220th column, then it is necessary to extract the 480 grayscale values of each column in the 21-column range as a column-wise array. Each column array is arranged in order from top to bottom according to the row number. Then, in the adjacent columns, the grayscale values are sorted. Find the grayscale value pairs corresponding to the same row number, pair them one by one and form a pixel grayscale pairing structure, that is, record the grayscale combination of the same height in the two columns under each row number. For example, in the 100th row, the grayscale of the 200th column is 128, and the grayscale of the 201st column is 132, then the pairing is a group of grayscale points. Continue to complete the pairing of all row numbers downward, and finally form a column-wise grayscale arrangement array. The width of the array is the number of valid columns, and the length is the number of image rows. The overall structure is a column-wise grayscale sequence grid, which is suitable for identifying the horizontal change trend of grayscale between columns at the same height and completing the construction of the column-wise pixel grayscale arrangement set.
[0030] The gradient trajectory construction submodule calls the column-wise pixel grayscale arrangement set, establishes a difference set for the grayscale between adjacent pixels, obtains the change direction of the continuous pixel grayscale difference, records the start and end row numbers of the change segment according to the grayscale difference direction, connects them in sequence to form a direction arrangement chain, and obtains the pixel grayscale difference trend data; For the grayscale values of two adjacent pixels from top to bottom in each column, compare their grayscale values one by one, and mark the results as rising, falling, or unchanged to indicate the direction trend of the grayscale difference. In the image processing process, if in the 150th column, the 50th row pixel is 110 grayscale and the 51st row is 114 grayscale, since the latter is greater than the former, the grayscale trend is rising. On the contrary, if the next one is 112, it is falling. If the grayscale is the same, it is marked as stable. After completing this operation for each column in turn, the direction marks are connected in series according to the row number order to identify the continuous grayscale direction segments with the same trend and Record the starting and ending row numbers of each directional segment, and determine whether each grayscale change has directional continuity. If the grayscale in a continuous directional segment is always rising or falling, it is recorded as a complete directional segment. For example, if in the 205th column, the grayscale from the 20th row to the 30th row gradually increases and the change trend remains consistent, then this segment is a directional segment. Repeat this process until all columns are traversed, and all directional segments are connected in sequence according to the image column order to form a directional arrangement chain. This chain comprehensively records the continuous directional structure of grayscale changes with height, forming pixel grayscale difference trend data.
[0031] The structural feature screening submodule identifies the mutation boundary where the grayscale direction changes based on the pixel grayscale difference trend data, records its vertical coordinates and the corresponding grayscale transformation direction, extracts the grayscale arrangement segments between two adjacent mutation boundaries, determines whether the arrangement direction is continuous and consistent, and screens stable structures where the arrangement has not reversed to obtain the set of structural mutation feature points; Each column-wise arrangement chain is traversed in turn to locate the boundary point where the grayscale change direction first reverses. For example, the turning point when multiple consecutive rising segments are followed by a falling direction is considered a mutation boundary. The vertical row number position of the boundary point in the image and the direction of the grayscale change are recorded. For example, if the direction changes from rising to falling from row 100, 100 is recorded as the mutation row number and the direction is rising to falling. The operation is repeated to record all mutation boundary points. Then the grayscale arrangement segments corresponding to two adjacent mutation boundary points are extracted to check whether their overall grayscale change direction remains consistent. If there is no reversal, the arrangement direction is considered to be continuous and stable. For example, if the grayscale continues to decrease from row number 110 to row number 122 without any reversal trend, it is determined to be a stable structure segment. The length of the segment is checked to see if it exceeds the stability threshold. If the threshold is set to 5 rows, it is valid if the length exceeds this value. Finally, all grayscale arrangement segments whose directions are not reversed and whose lengths meet the set requirements are screened out. The structural feature point representing the segment is extracted from the middle position, and its column number, row number and change direction are recorded to form a set of structural mutation feature points.
[0032] like Figure 2 and Figure 5 As shown, the image segment alignment judgment module includes: The coordinate difference detection submodule extracts the vertical coordinates of the corresponding column sequences in the two image segments based on the set of structural mutation feature points, calculates the vertical coordinate spacing of the corresponding points under the premise of consistent column sequence numbering, determines whether the coordinate spacing falls within the allowed interval of inter-segment offset, and obtains the column position offset interval; Extract the row number information of the mutation points with exactly the same column number in the current image frame and the previous cycle image frame, ensuring that all point pairs come from the same column number and meet the prerequisite for comparison in consecutive image cycles. For each column number, extract the vertical coordinate value of the corresponding mutation point from the two cycle images respectively, and calculate the vertical row number difference of the mutation point corresponding to the column number in the two cycles. For example, in column 240, the mutation point in the current image frame is located at row 105 and in the previous cycle image frame at row 102. The vertical coordinate spacing between the two points is 3 rows, and this difference is called the coordinate spacing. After calculating the coordinate spacing of all corresponding points column by column, compare and see whether the differences fall within the allowed range of inter-segment offset. The setting of this range depends on the image resolution and the fluctuation characteristics of the fabric tension. For example, when the image resolution is 480 lines and the vertical fluctuation of the fabric surface within the cycle is controlled within 5 lines, the allowed offset range can be set to no more than 5 lines. That is, only column numbers with a coordinate spacing of no more than 5 lines are retained, and point pairs with offsets outside the range are excluded. The column numbers and corresponding offset ranges whose vertical offset values fall within the set range are obtained.
[0033] The direction change judgment submodule calls the column position offset interval to extract the grayscale gradient direction mark of the mutation point corresponding to each column in the continuous image cycle, records the gradient direction change results of the same column sequence in each cycle, identifies the point number where the direction changes, and counts the column number segments with continuous and consistent directions to obtain a list of directionally stable segments; In each periodic image frame, the grayscale gradient direction label recorded in the image structure at the column mutation point is read column by column. The direction labels of the same column number in consecutive periodic images are compared to see if they have changed. For example, if the direction of column 260 in the current cycle is rising and the direction in the previous cycle is also rising, the direction is consistent. If the direction in the previous cycle is falling, there is a direction change. The column number of each direction change point is recorded column by column, and the column numbers of the columns with unchanged direction are accumulated as a continuous region segment. The starting column number, ending column number, length, and direction consistency flag of each segment are counted. Each direction-consistent region segment is then numbered and stored to form a list of directionally stable segments. The span of the structural stability interval should be considered when setting the threshold. If the direction consistency length is required to be at least 5 columns to constitute a valid segment, segments with a length of less than 5 columns should be excluded. For example, if the direction is consistent in columns 200 to 206, a stable segment of 7 columns is formed, while columns 212 to 214 are only 3 columns and are not accepted. All column sequences that meet the continuous length requirement and have consistent direction are collected to form a list of directionally stable segments.
[0034] The structural segment matching and screening submodule matches the column sequence segment combination with the smallest column offset and unchanged direction according to the list of directionally stable segments. It determines whether the mutation point in the combination meets the dual conditions of consistent direction and continuous offset within the period, determines the controllable image segment, and obtains the matching image segment data. To determine whether the mutation point in the combination meets the dual conditions of consistent direction and continuous offset within the period, the formula is used: ; Calculate the offset continuous eigenvalues, determine the controllable image segments, and obtain the matching image segment data, where: Representative The offset continuity eigenvalue used to judge the offset continuity in the combination of sequence segments, Representative The first The column-wise offset of the mutation point in each period is expressed in the form of horizontal pixel values of the image. Indicates the offset of the previous segment. Representative The first The image direction angle of the mutation point in the period segment is obtained by the gradient direction of the neighborhood direction of the mutation point in the image. is the image direction angle of the previous segment, To prevent positive constants with zero denominators, Indicates the number of valid periodic segments that can be calculated in the column sequence segment combination; Let the sequence segment combination number be , the number of period segments is , indicating that there are 5 consecutive periodic segments involved in the combination judgment. Next, the column-wise offset and direction angle information of the mutation point of each periodic segment are extracted in sequence. , the horizontal pixel position of the mutation point in the image is obtained by the horizontal pixel difference between the mutation point in the previous cycle. Assuming that the pixel unit is the pixel value, the five segments of data measured from the image processing extraction are 3.2, 4.1, 5.0, 6.0, and 7.2 pixels respectively. The corresponding image direction angle data They are 85.0 degrees, 84.5 degrees, 86.2 degrees, 86.0 degrees, and 85.5 degrees respectively. The direction angle is calculated from the main edge direction vector in the image. The image gradient vector direction is used as the angle extraction method. The unit is degree. The offset continuous eigenvalue is calculated, where Take 0.01. To prevent the denominator from being 0, set a positive constant. The summation in the formula starts from the second to the fifth segment, a total of 4 calculations, and substitute them in order as follows: Sub-item of paragraph 2: ; Sub-item of paragraph 3: ; Sub-item of paragraph 4: ; Sub-item of paragraph 5: ; Add the 4 sub-items: ; Then take the average: ; Assume that the offset continuity judgment reference value threshold is , is the average value of the continuity index of the mutation point offset of 100 groups of images under the same scene acquisition conditions and standard deviation The upper limit of the mean value is set, that is , current results , it is judged that the offset continuity condition is met. On the other hand, the direction consistency is judged using the threshold ,According to the image direction angle difference values of each period segment, 0.5 degrees, 1.7 degrees, 0.2 degrees, and 0.5 degrees, except for the third segment which exceeds the threshold, the rest are within the threshold range. In order to ensure the overall consistency requirement, the maximum allowed single limit number of times should not exceed 1. The current situation meets this condition. The result shows that the combination The mutation points of the column sequence segment meet the requirements in terms of consistent direction and continuous offset within 5 cycles, confirming that the combined segment is controllable and obtaining the matching image segment data.
[0035] like Figure 2 and Figure 6 As shown, the tension direction correction module includes: The direction vector extraction submodule collects the starting and ending positions of the tension direction of the coordinate point based on the regional coordinates in the matching image segment data, calculates the direction of the straight line between the starting and ending coordinates, and calibrates the projection direction of the vector in the image plane to obtain the tension direction projection trajectory; First, the key coordinate point pair located in each image segment is read. This coordinate point pair is defined as the starting point and ending point of the tension action. Then, the column number and row number information of the starting coordinate and the ending coordinate are called in sequence, and the line segment formed by the two points in the image plane is defined as the tension direction line. By reading the coordinate change between the two points in the column sequence direction and the row number direction, the direction of the line segment is determined to be classified as upper left to lower right, lower left to upper right, horizontal to right, vertical downward, etc. The image projection direction of each line segment is marked according to this classification. For example, if the tension starting point is at the 240th column and the 100th row, and the end point is at the 250th column and the 130th row, and the column direction difference is positive and the row direction difference is positive, then the tension line segment is judged to be from the upper left to the lower right. The projection direction is stored as the label of the tension vector. The tension line segments in all image segments are arranged in column number order to form a tension direction projection trajectory.
[0036] The angle sequence construction submodule calls the tension direction projection trajectory to obtain the angle between each tension vector and the line connecting the corresponding seam head target point to the center of the fabric surface. It calculates the direction of change of the angle, sorts the image frames by number, determines whether the angle direction changes in consecutive frames, marks the position of the sudden change in direction, and generates the angle change distribution. The projection direction of each tension vector and the coordinate information of the seam head target point in the image segment where it is located are read in sequence, and then the coordinates of the center point of the cloth surface in the same frame are read to construct a line connecting the seam head target point to the center point of the cloth surface. By reading the changes in the column and row numbers of the starting and ending points of the two line segments, their spatial direction labels are constructed. Then the directions of the two line segments are classified as upper left, lower right, right, etc. The corresponding angle relationship between the two direction labels is matched and recorded as an angle value. Then, the image frame numbers are sorted from small to large, and the angle value in each frame is compared with the angle value in the previous frame to determine whether it changes from an increasing angle to a decreasing angle or from a decreasing angle to an increasing angle. If the direction changes, the current frame is marked as an angle direction mutation point. For example, if the angle is 42 degrees in the 5th frame, 45 degrees in the 6th frame, and 41 degrees in the 7th frame, the 7th frame is determined to be a mutation frame, and its image number is recorded. In the order of the image frame numbers, all the positions where the angle direction changes are formed into an angle direction change distribution.
[0037] The point relocation submodule selects vector segments with unchanged direction based on the distribution of angular steering changes, matches coordinate points with adjacent angles and the same extension direction among the backup points, calls the extension direction coordinates of the backup points for cross-comparison, locates the points with overlapping directions in the current cycle, and obtains the target point relocation results. Match the coordinate points with adjacent angles and the same extension direction among the backup points using the formula: ; Calculate the adjacent difference value of the included angle, call the extension direction coordinates of the backup point for cross comparison, and locate the direction coincidence point in the current cycle, where: Represents the current candidate point The angular proximity difference value with the backup point refers to a comprehensive quantitative indicator of the degree of deviation between the current candidate point and the backup point in three dimensions: angular direction, extension distance, and change rate. It evaluates the consistency of the angular direction, the similarity of the geometric extension features, and the dynamic coordination of the displacement rate between the candidate point and the backup point. Indicates candidate points The angle direction, Represents the average value of the angle direction of all spare points, Indicates candidate points The extended distance (i.e. the Euclidean distance between this point and its previous coordinate point), Represents the extension distance set of all backup points. Indicates candidate points The rate of change in its extension direction (i.e., the change in extension distance per unit time or unit step length), It represents the average value of the change rate of all spare points in their extension direction; Determine candidate points The angle direction , if the value is collected through the actual angle , and set a total of 3 spare points, the angle directions of which are 、 、 , then calculate its average value: ; The square of the angle difference is: ; Get candidate points Extension distance , assuming that , the backup point extension distance is 、 、 , and their squared differences are: ; ; ; The mean square error of the extension distance is: ; The square root is: ; Extract the extension rate of candidate points , the spare point extension rate is 、 、 , whose average value is: ; The square of the rate offset is: ; The maximum rate is: ; The normalization term is: ; Calculation results: ; The results show that the current candidate point The direction deviation, path distance error and speed fluctuation of the selected backup point are controlled within a reasonable range. If the matching threshold is 0.6, the value is , then it is below the matching threshold , determine that their directions coincide and can be used to relocate the target point.
[0038] like Figure 2 and Figure 7As shown, the alignment trajectory adjustment module includes: The path parameter extraction submodule extracts the image coordinates of the corresponding point in the current frame based on the target point relocation result, calls the execution path direction data and movement distance under the same column number in the previous cycle, calculates the angle difference between the tension direction and the original path direction, and obtains the tension and path angle comparison data; Get the new image coordinate position of the target point in the current image frame, read its corresponding column number and row number, and use the coordinate as the positioning reference point of the tension direction. Then call the path execution data with the same column number in the previous cycle image frame, extract the path direction unit vector information and the translation distance data of the corresponding point in the column in the previous cycle, and then use the column number and row number change between the starting point and the end point of the current tension direction as the direction reference. Read the components of the two sets of direction vectors of the tension vector and the path vector of the previous cycle, perform the angle calculation operation between the vector directions, and obtain the angular difference between the tension direction and the original path direction at each point. For example, if the current tension direction is a path from the upper left to the lower right, the original path direction is positive to the right, and the angle is 45 degrees, then it is recorded that the tension and path angle in this column is 45 degrees. After performing the same angle difference extraction on all column numbers, a tension and path angle comparison dataset is formed. This dataset contains the column number, tension direction mark, path direction mark, and the angle value information between them.
[0039] The centerline direction determination submodule calls the tension and path angle comparison data, calculates the symmetrical angle centerline of each pair of tension directions and the original path direction according to the cycle number, checks whether the starting point and end point of the centerline in the motion coordinate area are within the boundary interval, and marks the centerline segment numbers that meet the motion constraints to obtain the restricted interval advancement centerline set; The midline direction calculation operation is performed on the angle between each pair of directions one by one. That is, the symmetric angle segmentation direction corresponding to the angle between the tension direction and the original path direction is determined. This direction is the midline direction between the two vectors. The starting and ending coordinates in the image coordinate plane are then derived based on this midline direction. Their horizontal and vertical components are then determined to be within the preset boundary constraints within the image frame. If the image width is 640 columns and the height is 480 rows, and the boundary constraint interval is set to within 20 columns or 20 rows from the edge, only midline segments with both the starting and ending points between columns 21 and 620 and rows 21 and 460 are retained. If a midline starts in column 18 or ends in row 470, it is discarded. Only midline segments with both endpoints within the safe zone are marked as compliant path direction segments, and their corresponding frame numbers or cycle numbers are recorded. This results in a set of midline segment numbers that are within the motion restriction range, have complete projections, and satisfy the symmetric angle formation conditions, forming the restricted interval propagation midline set.
[0040] The trajectory configuration generation submodule advances the centerline set according to the restricted interval, selects the coordinate segments with consistent centerline direction and no boundary contact in the continuous frames, extracts the advancement path between the starting and ending points of the segment, and connects it with the target point coordinates to form a path chain to obtain the corrected trajectory configuration; Among all the centerline numbered segments, extract whether there are centerline segments with consistent direction labels between consecutive image frames, check frame by frame whether their direction labels are the same, if the directions of four consecutive frames in a segment are consistent and have not changed, record the frame range as a consistent segment, further read the centerline start and end coordinates of each frame in the consistent segment, connect the start and end coordinates to form a propulsion path segment, and check whether the boundary of the path segment in the image frame has been touched. If the start or end point is not in the edge area of the image, retain the path segment as a stable propulsion segment, then read the target point relocation coordinates in the current image frame, connect the end point coordinates of the propulsion path segment with the target point, establish a complete path structure link, connect point by point to form a path chain extending from the previous cycle to the current cycle, extract all coordinate segments with connectivity, direction consistency and boundary legality as the corrected path structure output, and construct a corrected travel trajectory configuration.
[0041] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0042] In this disclosure, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0043] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0044] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0045] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0046] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.
[0047] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0048] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0049] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical disks.
[0050] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. The machine vision-based control system for turning and sewing the fabric is characterized by: The system comprises: The grayscale peak recognition module obtains the image frames of the cloth turning process, identifies the continuous positions of grayscale peaks in the image, compares the stability of the spacing between adjacent peaks and the change of the grayscale gradient slope, determines whether the symmetry is stable, and obtains the effective section identification of the pattern; The seam edge recognition module constructs a change trajectory of the grayscale difference between adjacent pixels based on the effective segment identification of the pattern, locates the key position points of two sudden changes, analyzes the grayscale trend and relative structural characteristics between the two sudden changes, and obtains a set of structural sudden change feature points; The image segment alignment judgment module, based on the set of structural mutation feature points, calls the vertical coordinates of the mutation points in the two image segments, compares their position differences to see if they fall within the inter-segment offset range, detects whether the mutation direction remains consistent in consecutive image cycles, determines image segments with stable structural directions and controllable position changes, and obtains matching image segment data; The tension direction correction module collects the tension direction vector according to the regional coordinates in the matchable image segment data, constructs an angle sequence formed by the vector and the line connecting the seam head target point to the center of the fabric, analyzes whether the angle is reversed in direction in the image sequence, and obtains the target point relocation result.
2. The machine vision-based cloth turning and seam alignment control system according to claim 1 is characterized in that: The pattern valid segment identifier includes the peak position index, boundary spacing interval, and grayscale symmetry segment; the structural mutation feature point set includes the mutation point coordinate group, mutation point direction information, and grayscale difference change label; the matchable image segment data includes the inter-segment alignment coordinate group, structural direction correspondence, and image period distribution label; the target point repositioning result includes the tension main vector indication, the target point selection number, and the angle change sequence.
3. The machine vision-based cloth turning and seam alignment control system according to claim 1 is characterized in that: The grayscale peak recognition module includes: The grayscale sequence extraction submodule obtains the image frame of the cloth turning process, extracts the grayscale distribution of each column in the Y-axis direction of the image, calculates the maximum grayscale amplitude for the grayscale set of each column, locates the grayscale amplitude change arrangement trend in consecutive columns, and generates an inter-column grayscale amplitude trend set; The grayscale trajectory construction submodule collects the change direction between each group of column differences based on the inter-column grayscale amplitude trend set, arranges them in order according to the column sequence, groups the continuous segments of the change direction, and integrates all direction segment sequences to construct a column sequence direction transfer trajectory group; The structural symmetry judgment submodule extracts the interval span between consecutive peaks in the column sequence based on the column sequence direction transfer trajectory group, collects the directional change length of the rising and falling segments on both sides of the peak, calculates the inter-column offset in the symmetric direction, and combines the relationship between the directional arrangement and the column sequence span in the structural symmetric segment to determine whether the symmetry condition is met and obtain the valid segment identifier of the pattern.
4. The machine vision-based cloth turning and seam alignment control system according to claim 1, characterized in that: The seam edge recognition module includes: The column-wise sequence construction submodule extracts the grayscale value sequence of each column in the corresponding image area according to the effective segment identifier of the pattern, obtains the grayscale arrangement set of the corresponding row number in each column in column order, indexes and pairs the grayscales of the same row number in consecutive columns to form a column-wise sequence array, and obtains the column-wise pixel grayscale arrangement set; The gradient trajectory construction submodule calls the column-wise pixel grayscale arrangement set, establishes a difference set for the grayscale between adjacent pixels, obtains the change direction of the continuous pixel grayscale difference, records the start and end row numbers of the change segment according to the grayscale difference direction, connects them in sequence to form a direction arrangement chain, and obtains pixel grayscale difference trend data; The structural feature screening submodule identifies the mutation boundary where the grayscale direction turns based on the pixel grayscale difference trend data, records its vertical coordinates and the corresponding grayscale transformation direction, extracts the grayscale arrangement segments between two adjacent mutation boundaries, determines whether the arrangement direction is continuous and consistent, and screens stable structures where the arrangement has not reversed to obtain the set of structural mutation feature points.
5. The machine vision-based cloth turning and seam alignment control system according to claim 1 is characterized in that: The image segment alignment judgment module includes: The coordinate difference detection submodule extracts the vertical coordinates of the corresponding column sequences in the two image segments based on the structural mutation feature point set, calculates the vertical coordinate spacing of the corresponding points under the premise of consistent column sequence numbering, determines whether the coordinate spacing falls within the allowed interval of inter-segment offset, and obtains the column position offset interval; The direction change judgment submodule calls the column-wise position offset interval, extracts the grayscale gradient direction mark of the mutation point corresponding to each column in the continuous image cycle, records the gradient direction change results of the same column sequence in each cycle, identifies the point number where the direction changes, and counts the column number segments with continuous and consistent directions to obtain a list of directionally stable segments; The structural segment matching and screening submodule matches the column sequence segment combination with the smallest column offset and unchanged direction according to the list of directionally stable segments, determines whether the mutation points in the combination meet the dual conditions of consistent direction and continuous offset within the period, determines the controllable image segments, and obtains the matchable image segment data.
6. The machine vision-based cloth turning and seam alignment control system according to claim 5 is characterized in that: The formula used to determine whether the mutation point in the combination meets the dual conditions of consistent direction and continuous offset within the period is: ; Calculate the offset continuous eigenvalues, determine the controllable image segments, and obtain the matching image segment data, where: Representative The offset continuity eigenvalue used to judge the offset continuity in the combination of sequence segments, Representative The first The column-wise offset of the mutation point in each period is expressed in the form of horizontal pixel values of the image. Indicates the offset of the previous segment. Representative The first The image direction angle of the mutation point in the period segment is obtained by the gradient direction of the neighborhood direction of the mutation point in the image. is the image direction angle of the previous segment, To prevent positive constants with zero denominators, Indicates the number of valid periodic segments that can be calculated in the column sequence segment combination.
7. The machine vision-based control system for turning over and seaming the fabric according to claim 1 is characterized in that: The tension direction correction module includes: The direction vector extraction submodule collects the starting and ending positions of the tension direction of the coordinate point according to the regional coordinates in the matchable image segment data, calculates the direction of the straight line between the starting and ending coordinates, and calibrates the projection direction of the vector in the image plane to obtain the tension direction projection trajectory; The angle sequence construction submodule calls the tension direction projection trajectory, obtains the angle between each tension vector and the line connecting the corresponding seam head target point to the center of the fabric, calculates the direction of change of the angle, sorts the image frames by number, determines whether the angle direction turns in consecutive frames, marks the position of the sudden change in direction, and generates an angle turning change distribution; The point relocation submodule selects vector segments whose directions have not been reversed according to the distribution of the angle steering changes, matches the coordinate points of the spare points with adjacent angle directions and the same extension direction, calls the extension direction coordinates of the spare points for cross-comparison, locates the points with overlapping directions in the current cycle, and obtains the target point relocation results.
8. The machine vision-based cloth turning and seam alignment control system according to claim 7 is characterized in that: The matching of the coordinate points with adjacent angles and the same extension direction among the spare points adopts the formula: ; Calculate the adjacent difference value of the included angle, call the extension direction coordinates of the backup point for cross comparison, and locate the direction coincidence point in the current cycle, where: Represents the current candidate point The difference in angle direction with the backup point, Indicates candidate points The angle direction, Represents the average value of the angle direction of all spare points, Indicates candidate points The extension distance, Represents the extension distance set of all backup points. Indicates candidate points The rate of change in its extension direction, It represents the average value of the change rate of all backup points in their extension direction.
9. The machine vision-based control system for turning over and seam alignment according to claim 1, characterized in that: The system further comprises: The alignment trajectory adjustment module, based on the target point repositioning result, calls the execution path direction and movement record of the previous cycle, calculates the midline of the angle between the main tension direction and the original path direction, determines whether the midline is within the motion boundary interval, limits the path advancement direction, sets the adjustment trajectory along the midline direction, and obtains the corrected trajectory configuration; The modified trajectory configuration includes adjusting the path vector, the centerline angle direction, and the path boundary parameter group.
10. The machine vision-based cloth turning and seam alignment control system according to claim 9, characterized in that: The alignment trajectory adjustment module includes: The path parameter extraction submodule extracts the image coordinates of the corresponding point in the current frame based on the target point relocation result, calls the execution path direction data and movement distance under the same column number in the previous cycle, calculates the angle difference between the tension direction and the original path direction, and obtains the tension and path angle comparison data; The centerline direction determination submodule calls the tension and path angle comparison data, calculates the symmetrical angle centerline of each pair of tension directions and the original path direction according to the cycle number, detects whether the starting point and end point of the centerline in the motion coordinate area are within the boundary interval, and marks the centerline segment numbers that meet the motion constraints to obtain the restricted interval advancement centerline set; The trajectory configuration generation submodule advances the centerline set according to the restricted interval, screens the coordinate segments in the continuous frames that have consistent centerline directions and do not touch the boundaries, extracts the advancement path between the starting and ending points of the segment, and connects it with the target point coordinates to form a path chain to obtain the corrected trajectory configuration.
Citation Information
Patent Citations
Current transformer distortion current reconstruction method based on U-I trajectory curve
CN120064754A
Calcium carbonate master batch wind shear forming detection system based on machine vision
CN120404499A
Virtual haptic texture rendering method and device, display device, and storage medium
US20240302901A1
Cited By
Knitted label edge contour extraction and optimization method
CN121458748A
A method for knitted label edge profile extraction and optimization
CN121458748B