A method, system, and related equipment for reverse engineering and color mapping of knitted fabrics.

By employing a joint inversion mechanism combining multi-state observation and candidate topology verification, the problem of topology recovery under unknown original knitting procedures was solved, enabling precise tracking of yarn paths and reliable mapping of yarn coloring, thus ensuring the accuracy and reliability of knitted fabric manufacturing.

CN123114485APending Publication Date: 2026-11-17ZHEJIANG SHENJIA DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611611565.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately recover the topology and continuous yarn material coordinates of solid knitted fabrics under unknown original knitting procedures, and lack a mapping model for circumferential coloring of yarn and visible weights of the front and back sides, leading to ambiguity in topology identification and unreliable manufacturing results.

Method used

By combining multi-state observation, candidate topology verification, physical arc length mapping and forward reconstruction, and integrating multi-state observation and cross-state material region registration, a candidate topology map is generated. Arc length coordinates are tracked along the continuous yarn path to establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. Predictive data is generated through a forward model, the target topology is selected and visibility and color rendering data are output.

Benefits of technology

It achieves accurate reverse recovery of topology under unknown conditions, improves the accuracy and robustness of topology recognition, ensures the reliability of yarn dyeing and manufacturing, and realizes seamless conversion from reverse recovery results to knitting equipment instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114485A_ABST
    Figure CN123114485A_ABST
Patent Text Reader

Abstract

This application discloses a method, system, and related equipment for reverse compilation and color mapping of knitted fabrics, relating to the field of digital analysis technology for knitted fabrics. The method includes: acquiring and registering observation data from at least two different observation states of the same physical knitted fabric; generating candidate knitted topology maps based on loop characteristics, yarn direction, and occlusion information; tracing along continuous yarn paths, assigning physical arc length coordinate intervals to each topological event, and establishing a bidirectional mapping between fabric position and yarn number and arc length coordinates; determining the visibility data and / or circumferential color rendering data corresponding to the arc length intervals; generating prediction data using a forward model, and selecting a target topology based on the difference between prediction and observation, topology validity, yarn continuity, and manufacturing feasibility constraints; and outputting the target topology, bidirectional mapping, and visibility data and / or circumferential color rendering data. This application achieves reverse recovery of the topology and yarn material coordinates of a physical knitted fabric under unknown program conditions through multi-state observation and forward verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital analysis technology for knitted fabrics, and in particular to a method, system and related equipment for reverse compilation and color mapping of knitted fabrics. Background Technology

[0002] Knitted fabrics are made up of three-dimensional loops of continuous yarn interlocked together; the surface image of the actual fabric only shows a portion of the yarn segments, and the needle arcs, sinker arcs, and loops of the same loop may be distributed on the front, back, or inside. Hairiness, reflection, occlusion, loop tilting, tension deformation, and finishing shrinkage make the relationship between image pixels, needle count, and continuous yarn length ambiguous.

[0003] In the field of digital analysis of knitted fabrics, accurately restoring the topology, continuous yarn paths, and yarn arc length coordinates of physical knitted fabrics is of fundamental significance for the reverse generation of knitting programs, continuous yarn coloring control, and digital manufacturing.

[0004] In existing technologies, digital analysis and manufacturing process generation for knitted fabrics face numerous challenges.

[0005] When the original knitting process, continuous yarn path, and hidden structure are unknown, it is impossible to determine from a single frontal image which type of loop topology forms the appearance, or whether there are loop-forming, loop-gathering, floating, loop-shifting, yarn-adding, or multi-feed structures. Different topologies may produce similar two-dimensional appearances, leading to inherent ambiguity in topology identification.

[0006] Under unknown topological conditions, it is difficult to determine the order in which a continuous yarn passes through the loops, and which arc length interval on the yarn corresponds to a certain fabric position. Furthermore, existing technologies lack a unified physical arc length calculation model to determine how the actual yarn consumption per stitch varies under different tension, needle pitch, drafting, and finishing conditions.

[0007] Whether a yarn segment is primarily visible from the front or back after fabric formation, and which angular sector on the yarn circumference is visible, current technology has not established a mapping model between the circumferential color field of the yarn and the double-sided appearance of the fabric. Ordinary mapping from "pixels to one-dimensional color segments" cannot handle the circumferential partitioning of yarn color and the weight allocation for front and back visibility.

[0008] How to transform reverse analysis results into programs that can be executed on specific knitting machines and continuous yarn printing equipment? Existing technologies lack a complete compilation link from reverse recovery results to equipment instructions. When the model is uncertain, how to perform reshoots, trial knitting, or partial recalculation, rather than outputting unmanufacturable or high-risk results? Existing technologies lack proactive reshoot and closed-loop calibration mechanisms. Summary of the Invention

[0009] To address the aforementioned issues, this application provides a method for reverse compilation and color mapping of knitted fabrics. Through a joint inversion mechanism of multi-state observation, candidate topology verification, physical arc length mapping, and forward reconstruction, it achieves accurate reverse recovery of the topological structure of physical knitted fabrics and the coordinates of continuous yarn materials under the condition that the original knitting program is unknown. Correspondingly, a system and related equipment for reverse compilation and color mapping of knitted fabrics are also provided.

[0010] The first technical solution adopted in this application is: providing a method for reverse engineering and color mapping of knitted fabrics, including: Acquire observation data for at least two different observation states of the same solid knitted fabric, wherein the observation state is defined by at least one of the observation surface, load state, and imaging mode; Register the same fabric material region under different observation conditions; Based on the loop characteristics, yarn direction, overlap points and occlusion boundary information in the observation data, at least one candidate knitting topology is generated. The candidate knitting topology includes topology event nodes, continuous yarn connection edges and loop splicing edges. For each candidate knitting topology, trace the continuous yarn path along the continuous yarn connection edge, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. Based on the candidate knitting topology and the physical arc length coordinate interval, determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval; Using a forward model, prediction data for each observation state is generated based on the candidate knitting topology, the physical arc length coordinate range, and the yarn material parameters. Based on the difference between the predicted data and the observed data, and at least one of the topology legality constraints, yarn continuity constraints, and manufacturing feasibility constraints, a target topology is selected from the candidate knitting topology graph. Output the target topology, the bidirectional mapping relationship, and the visibility data and / or circumferential color data.

[0011] In an optional embodiment, the at least two different observation states include at least two combinations of the following states: (a) Front and back reference states of the knitted fabric; (b) The knitted fabric is in at least two of the following states: unstretched, warp-stretched, weft-stretched, and bi-directionally stretched. (c) Observational state of knitted fabrics from different perspectives; (d) Observational status of knitted fabrics in polarization imaging, multispectral imaging, or depth imaging modes; (e) Observation of the knitted fabric under the same surface reference state and at least two linearly independent deformation states.

[0012] In an optional embodiment, generating the at least one candidate knitting topology map includes: Obtain a local topological evidence vector, which includes at least one of the following: loop formation probability, loop clustering probability, floating thread probability, loop shifting probability, needle separation probability, upper and lower layer depth evidence, local yarn direction, and visibility confidence. Based on the knitting topology syntax rules, the loop state of each needle on the needle bed, the needle bed lateral movement, the yarn feeder position, and the yarn activity state are used as state variables. Combined with the local topology evidence vector, a state transition search is performed to generate a candidate topology graph that satisfies the continuous yarn constraint, the loop joining method, and the equipment capability constraint. The knitting topology syntax rules include at least one of the following: loop formation rules, loop gathering rules, floating yarn rules, loop shifting rules, needle separation rules, loop release rules, yarn feeder entry / exit rules, and needle bed lateral movement rules.

[0013] In an optional embodiment, assigning physical arc length coordinate intervals to each topological event includes: For each topological event, establish the yarn geometric centerline path based on at least one of the event type, needle pitch, needle or sinker motion parameters, yarn tension, local curvature, and tension state. Calculate the basic geometric length along the path of the geometric centerline; The basic geometric length is modified based on at least one of the following: yarn tension-strain relationship, frictional contact between yarn and needle or sinker, yarn elasticity parameter, unloading relaxation shrinkage rate and finishing shrinkage rate, to obtain the yarn consumption of the topological event. The yarn tension-strain relationship adopts a nonlinear model, which includes a nonlinear elongation term caused by the initial straightening of the yarn and a linear elongation term during the stable stress stage.

[0014] In an optional embodiment, it further includes: Based on the candidate knitting topology and the physical arc length coordinate range, a three-dimensional yarn centerline path and a material frame along the yarn centerline are established. Based on the material frame, determine the visibility coefficient and / or circumferential angle of each arc-length micro-segment on different fabric surfaces or under different observation conditions; Based on the visibility coefficient and / or circumferential angle, a bidirectional mapping kernel is established between fabric pixels and yarn number, arc length coordinates, circumferential angle and visibility weight; Based on the appearance of the target's front and back sides or measured images of the front and back sides, the circumferential color field of the yarn is solved under the constraint of the bidirectional mapping kernel. ,in Let the coordinates be the arc length. Circumferential angle, For color or spectral channels; The circumferential color field is output in at least one of the following forms: a defined circumferential angle value, an equivalent angle class, a probability distribution, or a circumferential average value.

[0015] In an optional embodiment, it further includes: The confidence level of each candidate knitting topology is determined based on the difference between the predicted data and the observed data corresponding to each candidate knitting topology. When the confidence level is lower than a preset threshold, additional observation states are selected for supplementary acquisition. The additional observation states include at least one of the following: stretching direction, observation surface, viewing angle, polarization angle, spectral band, or depth imaging mode; or, a trial fabrication sample is generated to eliminate ambiguity between candidates.

[0016] In an optional embodiment, it further includes: Based on the target topology and the physical arc length coordinate range, a machine-independent intermediate representation for knitting manufacturing is generated. The intermediate representation for knitting manufacturing includes topology data, arc length mapping data, visibility data, color rendering data, and equipment constraint data. The intermediate representation of the knitting manufacturing process is compiled into knitting instructions for the knitting equipment, printing events for the continuous yarn inkjet printing equipment, and color-fixing events, and a phase relationship is established between the knitting instructions, the printing events, and the color-fixing events. Perform trial weaving to obtain test data for the front and back sides of the finished fabric; Using the bidirectional mapping relationship, the detection error is located to the corresponding yarn arc length and topological event; Update at least one of the following based on the detection error: yarn consumption model, shrinkage parameter, circumferential angle model, color diffusion model, or color fixation response curve; The updated parameters will be used for the next trial weave or the next production batch.

[0017] The second technical solution adopted in this application is: providing a knitted fabric reverse engineering and color mapping system, including: The multi-state observation acquisition module is used to acquire observation data of at least two different observation states of the same knitted fabric. The registration module is used to register the same fabric material region under different observation conditions; The topology candidate generation module is used to generate at least one candidate knitting topology map based on the coil features, yarn direction, overlapping points and occlusion boundary information in the observed data. The arc length mapping module is used to trace the continuous yarn path along the continuous yarn connection edge for each candidate knitting topology, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. The visibility determination module is used to determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval based on the candidate knitting topology map and the physical arc length coordinate interval; The forward verification module is used to generate predicted data for each observation state based on the candidate knitting topology map, the physical arc length coordinate interval and yarn material parameters using a forward model, and select the target topology from the candidate knitting topology map based on the difference between the predicted data and the observed data, as well as at least one of the topology legality constraints, yarn continuity constraints and manufacturing feasibility constraints. The output module is used to output the target topology, the bidirectional mapping relationship, and the visibility data and / or circumferential color data.

[0018] The third technical solution adopted in this application is: providing an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the knitted fabric reverse compilation and color mapping method as described in any of the preceding claims.

[0019] The fourth technical solution adopted in this application is: providing a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the knitted fabric reverse compilation and color mapping method as described in any of the preceding claims.

[0020] Due to the adoption of the above technical solution, this application has at least one of the following beneficial effects compared with the prior art: 1. By using multi-state observation and cross-state material region registration, the problem of coil occlusion, front-back relationship and topological ambiguity under multiple load conditions that cannot be handled by a single image is effectively solved, thus improving the accuracy and robustness of topology recognition.

[0021] 2. Through the candidate topology generation and forward reconstruction verification mechanism, topology misjudgment caused by single image ambiguity is fundamentally avoided, and the actual or optimal topology structure can be selected from multiple candidate topologies under the condition that the original knitting program is unknown.

[0022] 3. By using a physical arc length calculation model based on event type, needle pitch, tension, curvature, and tension state, combined with tension strain nonlinear correction and post-treatment shrinkage compensation, the precise allocation of yarn consumption for each topological event was achieved, and a two-way mapping relationship between fabric position and continuous yarn arc length coordinates was established.

[0023] 4. By jointly modeling the material frame, visibility coefficient, and circumferential color field, a quantitative description of the circumferential color partitioning of yarn and the visibility weight of the front and back sides is realized. It can distinguish the visible contribution of different angular sectors on the yarn circumference on the front and back sides of the fabric and under different deformation states.

[0024] 5. Through a confidence-driven active reshoot mechanism, the system can identify its own uncertain areas and acquire additional observation information in a targeted manner, thus avoiding the output of unreliable results under low confidence conditions.

[0025] 6. Through machine-independent knitting manufacturing intermediate representation and compilation link, seamless conversion from reverse recovery results to knitting equipment instructions and continuous yarn printing events is realized, and self-calibration across yarns, machine sizes, tensions and finishing conditions is realized through trial knitting closed loop. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 A flowchart illustrating a method for reverse engineering and color mapping of knitted fabrics according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0028] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0030] Existing digital analysis methods for knitted fabrics typically only use a single frontal image to identify the stitch pattern and generate a knitting program, without fully considering issues such as loop occlusion, front-back relationships, and topological ambiguity under multiple load conditions. At the same time, traditional solutions lack a precise calculation model for the physical arc length of continuous yarns and do not establish a mapping relationship between the circumferential color field of the yarn and the appearance of both sides of the fabric. This results in the inability to accurately recover the topological structure and manufacturing parameters of the physical fabric when the original knitting program is unknown, the yarn path is hidden, or the equipment is changed, making it difficult to meet the requirements of digital manufacturing for full-link, verifiable reverse engineering.

[0031] In view of this, the reverse compilation and color mapping method for knitted fabrics in this application effectively solves the above-mentioned drawbacks by introducing a multi-state observation and cross-state registration mechanism, a candidate topology generation and forward reconstruction verification mechanism, a physical arc length calculation and tension strain correction mechanism, and a joint modeling mechanism of material frame and circumferential color field. It achieves accurate reverse recovery of the topology of solid knitted fabrics and the coordinates of continuous yarn materials under the condition that the original knitting program is unknown.

[0032] The technical concept of this application can be summarized as follows: the knitted fabric is regarded as a computable object jointly determined by a "topology layer, geometry / mechanics layer, color / visibility layer and manufacturing layer"; firstly, several candidate topologies are generated based on observations of multiple surfaces, multiple viewpoints and / or multiple load states; then, the sequence and arc length of each continuous yarn are traced along the candidate topologies; subsequently, the visibility weight and circumferential angle of each yarn segment on different observation surfaces are estimated, the observations are reconstructed using a forward fabric generation model, and joint optimization is performed under manufacturing constraints to finally obtain an executable knitting and yarn coloring program.

[0033] This embodiment provides a method for reverse engineering and color mapping of knitted fabrics. This method can be applied to knitted fabric digital analysis systems, knitting equipment control systems, continuous yarn printing control systems, or other equipment requiring reverse analysis and manufacturing program generation of physical knitted fabrics. Knitted fabrics include, but are not limited to, weft-knitted and warp-knitted fabrics; topological events include, but are not limited to, loop formation, loop gathering, float, loop transfer, stitch turning, knit stitch, purl stitch, yarn addition, loop joining, and stitch separation. For example... Figure 1 As shown, Figure 1 A flowchart illustrating a method for reverse engineering and color mapping of knitted fabrics according to an embodiment of this application includes: Step S101: Obtain observation data for at least two different observation states of the same solid knitted fabric. The observation state is defined by at least one of the observation surface, load state, and imaging mode. The observation surface includes at least the front and back sides of the knitted fabric. The load state includes at least unstretched, warp-stretched, weft-stretched, and bidirectional-stretched. The imaging mode includes at least visible light imaging, polarization imaging, multispectral imaging, and depth imaging.

[0034] The number of observation states acquired is at least two, such as two observation states: front reference state and back reference state, or three observation states: front unstretched state, front meridional stretching state and front latitudinal stretching state. The specific number and combination of observation states are based on the ability to satisfy topological recognizability and are not limited to a fixed number or combination.

[0035] Specifically, the observation data includes at least one or more images of the first and second surfaces of the knitted fabric; preferably, it also includes images of different stretching states, different viewing angles, polarized images, depth data, or spectral data.

[0036] Step S102: Register the same fabric material region under different observation conditions. Specifically, this includes scaling, distortion correction, cross-plane registration, and load state registration of the observation data to obtain a unified fabric coordinate system.

[0037] For the same baseline state, unloading, reloading, and repeated imaging can be performed, and the repeatability of the state can be evaluated based on the root mean square error of registration of multiple images. For example, if the root mean square error of feature point positions after repeated acquisition is no greater than 0.2 pixels or no greater than 0.05 mm, the state is considered repeatable.

[0038] Step S103: Based on the loop characteristics, yarn direction, overlapping points, and occlusion boundary information in the observed data, generate at least one candidate knitting topology map; identify needle arcs, sinker arcs, loop columns, overlapping points, yarn centerlines, local tangentials, widths, depths, and occlusion boundaries. Output multiple "upper / lower relationship / event type" hypotheses and probabilities for each local region, without requiring a mandatory unique classification in the early stages.

[0039] The candidate knitting topology graph contains topological event nodes, continuous yarn connection edges, and loop interlocking edges, representing the knitting structure as a directed multigraph with attributes:

[0040] in, For topological events or coil segment nodes, These are the connecting edges of the same continuous yarn. For coil connections, overlaps, coil shifts, or contact edges, Event types include: circle formation, circle gathering, floating line, and circle shifting. To record manufacturing attributes such as needle bed, needle number, number of stitches, yarn feed opening, front and back beds, and time sequence; candidate topologies can be generated using deep learning, graph neural networks, visual Transformer, graph syntax, dynamic programming, probabilistic graphical models, integer programming, or combinations thereof.

[0041] Step S104: For each candidate knitting topology, trace the continuous yarn path along the continuous yarn connection edge, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates.

[0042] On the candidate topology Each yarn feed source is tracked to form an ordered event sequence. The basic geometric yarn consumption is calculated for each event, and then corrected based on tension, yarn elasticity, weave density, and finishing shrinkage. For unconfirmed splices or yarn feed changes, the system retains multiple paths and scores them based on yarn consumption conservation, color continuity, and front-back consistency.

[0043] Step S105: Based on the candidate knitting topology and the physical arc length coordinate interval, determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval.

[0044] Visibility data includes the visibility coefficients of each yarn arc length micro-segment on different fabric surfaces, under different load conditions, and from different viewing angles. The visibility coefficient ranges from 0 to 1, where 0 indicates completely invisible and 1 indicates completely visible. Circumferential color rendering data includes the yarn's arc length coordinates... Circumferential angle and color or spectral channels Color distribution on Visibility data and circumferential color data can be determined individually or jointly, depending on the application scenario.

[0045] Step S106: Using a forward model, predictive data for each observation state is generated based on the candidate knitting topology, physical arc length coordinate interval, and yarn material parameters. Specifically, the forward model is a differentiable rendering model, whose inputs are the candidate knitting topology, physical arc length coordinate interval, and yarn material parameters, and whose output is the predicted image for each observation state. The forward model determines the three-dimensional spatial position and orientation of each yarn micro-segment based on the physical arc length coordinate interval, determines the visible part of each yarn micro-segment and its circumferential color rendering contribution under the observation state, and performs a weighted summation of the color rendering amount of each color or spectral channel to obtain the predicted value of each observed pixel under the observation state. The yarn material parameters include at least one of the following: equivalent yarn diameter, yarn elasticity parameter, coefficient of friction between yarn and needle or sinker, unloading relaxation shrinkage rate, and finishing shrinkage rate. For nonlinear reflection or multi-ink mixing, the forward model can adopt a nonlinear rendering model and use the Jacobian matrix for local linearization in each iteration.

[0046] Step S107: Select the target topology from the candidate knitting topology graph based on the difference between the predicted data and the observed data, and at least one of the topology validity constraints, yarn continuity constraints and manufacturing feasibility constraints.

[0047] The system outputs the confidence score for each needle stitch, yarn segment, and image region. When the confidence score is below the threshold, the system does not directly output the final program, but automatically selects the most informative reshoot angle, stretching direction, or spectral band; or generates the smallest size sample and uses physical feedback to eliminate ambiguity between candidates.

[0048] Step S108: Output the target topology, bidirectional mapping relationship, and visibility data and / or circumferential color data.

[0049] bidirectional mapping relationship Allows you to find the number of the corresponding continuous yarn from the location in the fabric image. Arc length Circumferential angle and visible weights It also allows for the reverse lookup of the predicted position of a specific yarn micro-area on the front, back, and in different deformation states of the fabric. Among these, Indicates the viewing side (e.g., front or back). and These represent the pixel coordinates in the horizontal and vertical directions of the image plane, respectively. Indicates the load condition (e.g., no tension, longitudinal tension, or latitudinal tension). Indicates the yarn number. Represents the physical arc length coordinates along the yarn centerline. This indicates the circumferential angle of the yarn cross-section relative to the material frame. This represents the visibility weight of a micro-region on the yarn surface to a specified observation surface, with a value ranging from 0 to 1.

[0050] In an optional embodiment, the at least two different observation states include at least two combinations of the following states: (a) The reference state of the front and back of the knitted fabric; the reference state is preferably a bidirectional micro-pretension state, for example, applying a linear load of 0.1–0.5 N / cm in the warp and weft directions respectively, or applying a bidirectional pre-strain of 1%–3% to keep the fabric flat without significantly changing its structure. (b) The knitted fabric is in at least two of the following states: unstretched, warp-stretched, weft-stretched, and bi-directionally stretched. (c) Observational state of knitted fabrics from different perspectives; (d) Observational status of knitted fabrics in polarization imaging, multispectral imaging, or depth imaging modes; (e) Observation of the knitted fabric under the same surface reference state and at least two linearly independent deformation states.

[0051] The acquisition system records the load, clamping position, camera intrinsic and extrinsic parameters, fabric dimensions, and environmental conditions for reproduction in the forward model. After reaching the target state, it is held for 3–10 seconds, and the acquisition is repeated at least 3 times under the same clamping position, load, lighting, and camera parameters to determine registration error, imaging noise, and state repeatability.

[0052] For simple, single-layer plain knit fabrics where the main interlocking relationships can be observed from the front, only three states—unstretched on the front, stretched in the warp, and stretched in the weft—are collected. Topology reconstruction can be completed when the topology confidence reaches a preset threshold and the continuous yarn, yarn consumption conservation, and process constraints are all satisfied. For rib, double-sided, tucked, floated, yarn-added, loop-shifted, or multi-layered structures, the minimum engineering combination is: a front reference state, a back reference state, and at least one stretched state in the warp or weft.

[0053] In an optional embodiment, generating at least one candidate knitting topology map includes: Obtain a local topological evidence vector, which includes at least one of the following: loop formation probability, loop clustering probability, floating thread probability, loop shifting probability, needle separation probability, upper and lower layer depth evidence, local yarn direction, and visibility confidence. Based on the knitting topology rules, the loop state of each needle on the needle bed, the needle bed lateral movement, the yarn feeder position, and the yarn activity state are used as state variables. Combined with local topological evidence vectors, state transition search is performed to generate candidate topology graphs that satisfy continuous yarn constraints, loop joining method, and equipment capability constraints. Knitting topology rules include at least one of the following: loop formation rules, loop gathering rules, floating yarn rules, loop shifting rules, needle separation rules, loop release rules, yarn feeder entry / exit rules, and needle bed lateral movement rules.

[0054] Specifically, the needle bed state and the local evidence vector are represented as follows:

[0055] in, and These represent the front needle bed and the rear needle bed, respectively. The orderly coiled threads on the needle; Indicates the relative lateral displacement of the front and rear needle beds; Indicates the first The position of the yarn feeder Indicates the direction of movement of the yarn feeder. This indicates whether the corresponding yarn is in an active state.

[0056] Local evidence vector:

[0057] in, The observed probabilities are the events of forming circles, clustering circles, floating lines, shifting circles, and minute hand events, respectively. Evidence of upper or lower layers or depth, For local yarn direction, For yarn width, The visibility confidence level.

[0058] For each position t, the current state is... and local evidence Enumerate all rules that satisfy the preconditions to obtain the new state. .

[0059] The cumulative cost of the global candidate paths is:

[0060] in, This indicates that the state is reached at position t. The cumulative cost; The needle bed status at position t includes the loop status of each needle on the front needle bed, the loop status of each needle on the rear needle bed, the relative lateral movement of the needle bed, the position of each yarn feeder, and the yarn movement status. Indicates the state of the previous position; This represents the topology rule action performed at position t; Indicates local evidence Perform actions under certain conditions The posterior probability; This is a continuity constraint for continuous yarn paths, used to check whether the yarn path is interrupted or experiences unprovided jumps. This is a constraint item for coil sleeve connection method, used to check whether the coil sleeve connection, retention, unwinding and node degree are legal; These are equipment capability constraints used to check whether the shift distance, needle bed lateral movement, needle position, and yarn feeder movement are legal. This is a yarn consumption conservation constraint term, used to check whether the predicted yarn consumption and the actual yarn supply are conserved. This is a visibility consistency constraint term for both the front and back sides, used to check whether the occlusion relationship is consistent under different observation states; , , , , These are the weighting coefficients for each constraint term.

[0061] The search is performed hierarchically according to row-column, knitting machine event time, or estimated yarn feeding sequence. After each event layer is completed, candidates with the same needle bed loops, traverse state, and yarn feeder state are merged, retaining only those with the lowest cumulative cost. One engineering embodiment uses a bundle search with a bundle width B=64, retaining 64 candidate states per layer, and finally outputting the 5 candidate topologies with the highest scores; the bundle width can be set between 8 and 512, and the number of output candidates can be set between 1 and 20.

[0062] If a state violates the continuous yarn constraint, generates a sourceless coil, exceeds the maximum coil depth allowed by the device, or exceeds the allowed coil shift distance, then the topology is pruned directly. If the cost difference between the final highest candidate and the second highest candidate is less than a preset threshold, then multiple candidates are retained and supplementary observations are triggered; a unique topology is not forced to be selected.

[0063] In an optional embodiment, assigning physical arc length coordinate intervals to each topological event includes: For each topological event, establish the yarn geometric centerline path based on at least one of the event type, needle pitch, needle or sinker motion parameters, yarn tension, local curvature, and tension state. Calculate the geometric length of the foundation along the geometric centerline path; Based on at least one of the following factors: yarn tension-strain relationship, frictional contact between yarn and needle or sinker, yarn elasticity parameters, unloading relaxation shrinkage rate, and finishing shrinkage rate, the basic geometric length is modified to obtain the yarn consumption of this topological event. The yarn tension-strain relationship is modeled using a nonlinear model, which includes a nonlinear elongation term resulting from the initial straightening of the yarn after crimping and a linear elongation term during the stable stress stage.

[0064] Specifically, for the nth topological event, its geometric centerline path is first established. This path is composed of multiple cubic B-splines or Bézier curves, as well as arc segments formed by yarn wrapping around the needle hook, sinker, or contact area between adjacent yarns. Control points are generated based on the event type, needle pitch, needle and sinker motion parameters, needle bed position, loop distance, and tension state.

[0065] Taking a looping event as an example, one possible method for constructing the geometric centerline path is as follows: the yarn path of the looping event is divided into a first arc segment around the needle hook, a loop column segment connecting adjacent loops, and a sinking arc segment; the center of the first arc segment is taken as the center of the needle hook, the radius is taken as the sum of the needle rod radius and the equivalent diameter of the yarn, and its central angle is determined by the movement depth of the needle or sinker; the start and end points of the loop column segment are respectively taken as the intersection points of the event and the adjacent events before and after on the back and belly sides of the needle, and the tangential direction is determined by the lateral displacement of the needle bed and the pulling direction; the sinking arc segment is constrained by the position of the sinker between two adjacent needles and determined by the suspension shape under the pulling state; the segments are connected by positional continuity and tangential continuity as boundary conditions, and the number of control points is set according to the event type and fitting accuracy.

[0066] For other event types such as loop gathering, floating yarn, and loop shifting, the same segmentation method is used, only changing the number of segments, the radius of the arc, and the end tangent (the floating yarn event does not include the looping hook arc segment but consists of two loop column segments and one cross-needle floating yarn segment; the loop shifting event adds a transition segment determined by the needle position difference before and after the loop shift). Alternatively, the geometric centerline path can be solved using an elastic rod model: using the position and tangent of the connection points between the two ends of the event and the adjacent event as boundary conditions, and the weighted sum of the yarn bending energy and length constraint as the objective function, the minimum value is found at the discrete control points, and the resulting curve is the geometric centerline path.

[0067] The basic geometric length is obtained by integrating along the geometric centerline. Based on this, adjustments are made item by item according to local tension, yarn strain, frictional contact, elastic parameters, unloading relaxation shrinkage, and finishing shrinkage.

[0068] Local tension can be calculated based on the contact friction relationship, which is an exponential function of the event entry tension multiplied by the contact wrap angle. The friction coefficient and the cumulative contact wrap angle are jointly determined by the yarn material properties and the geometric path.

[0069] The strain of the yarn under tension is modeled using a nonlinear model, which includes two terms: the first term represents the nonlinear elongation caused by the initial crimping of the yarn or the straightening of the interfiber structure, and the second term represents the approximately linear elongation after entering the stable stress stage. The model parameters are determined by tensile tests or trial weaving calibration.

[0070] The yarn consumption of a topology event is calculated as follows:

[0071] in, This represents the amount of yarn consumed in the nth topological event; Represents the geometric centerline path of the nth topological event; Indicates the event type (e.g., loop formation, clustering, floating line, or moving loop); and These are the first and second correction coefficients corresponding to different event types, used to characterize the degree of influence of tension state and curvature on yarn consumption; The value ranges from 0.5 to 1.5, representing the normalized draw weight, tissue density, or coil retention. Indicates the position of the yarn at the arc length. Local curvature at that point; The equivalent diameter of the yarn; Indicates the yarn tension Strain under action; Represents the integral variable along the geometric path; For residual length correction terms corresponding to different event types; The yarn unloading relaxation shrinkage rate; This refers to the shrinkage rate of yarn after finishing, including washing shrinkage and heat setting shrinkage.

[0072] Model parameters can be calibrated using standard samples that include events such as loop formation, loop gathering, floating, and loop shifting. The needle pitch coverage range is, for example, 0.5–7.5 mm; the ratio of needle or sinker movement depth to needle pitch is 0.2–3.0; yarn tension is 2–80 cN; and the drafting or weave state parameter is 0.5–1.5. For each event type, at least 5 tension levels, 4 loop formation depth levels, and 3 drafting levels should be selected, and each set of conditions should be repeated at least 3 times. The actual yarn consumption length is measured using a yarn feed encoder, and the model parameters are solved using weighted least squares or robust regression. After calibration, independent samples are used for verification, ideally ensuring that the average relative error of yarn consumption for each event does not exceed 5%.

[0073] In an optional embodiment, it further includes: Based on the candidate knitting topology and physical arc length coordinate range, a three-dimensional yarn centerline path and a material frame along the yarn centerline are established. Based on the material frame, determine the visibility coefficient and / or circumferential angle of each arc length micro-segment on different fabric surfaces or under different observation conditions; Based on the visibility coefficient and / or circumferential angle, establish a bidirectional mapping kernel between fabric pixels and yarn number, arc length coordinates, circumferential angle and visibility weight; Based on the appearance of the front and back of the target or measured images of the front and back, the circumferential color field of the yarn is solved under the constraint of a two-way mapping kernel. ,in Let the coordinates be the arc length. Circumferential angle, For color or spectral channels; The circumferential color field is output in at least one of the following forms: a defined circumferential angle value, an equivalent angle class, a probability distribution, or a circumferential average value. For scenarios where the absolute circumferential angle cannot be determined, a circumferential probability distribution or a circumferential average color value can be output.

[0074] Specifically, the yarn centerline is represented as a function of arc length coordinates, with its domain extending from 0 to the total yarn length. A material frame is set along the centerline to define the circumferential direction of the yarn cross-section.

[0075] Each yarn is divided into multiple intervals along its arc length and multiple sectors along its circumference, with multiple color or spectral channels set. All unknown colorimetric quantities form a colorimetric vector. ,in Indicates the yarn number. This represents the interval index divided along the arc length direction. This indicates the sector index along the circumferential direction. Represents the color or spectral channel index; for each observed pixel, establish the observation equation under the current geometry, topology, and imaging parameters:

[0076] in, This represents the observed value of the v-th observed pixel; This represents the contribution weight of the color rendering amount of the m-th yarn in the p-th arc length interval, j-th circumferential sector, and k-th channel to the v-th observed pixel, i.e., the bidirectional mapping kernel; This indicates the color rendering value for the corresponding position and channel; This is a background item used to compensate for ambient light or sensor dark current. This represents the observation noise term. For nonlinear reflections or multi-ink mixing, a nonlinear rendering model can be used, with local linearization performed using the Jacobian matrix in each iteration.

[0077] The circumferential color field is solved using a constrained optimization model:

[0078] in, A vector representing all unknown color rendering values, whose elements are the color rendering values ​​of each yarn in each arc length interval, each circumferential sector, and each color channel; The maximum value constraint for each color rendering quantity is represented; W is the weight matrix, used to assign different confidence levels to different observed pixels; A is the visibility and imaging kernel matrix, which comprehensively represents the visible area, occlusion relationship, surface normal, illumination, lens point spread, spectral response and color mixing weight of each yarn segment to each pixel; y is the actual observation value vector. It is a difference operator along the arc length direction, used to constrain the smooth variation of the color field along the yarn axis; D is the difference operator along the circumferential direction, used to constrain the smooth variation of the color field along the yarn circumference; D is the total variation operator, used to reduce unnecessary isolated color points. , , , , These are the regularization coefficients for each item, used to balance the relative importance of each constraint; To create constraint functions, including minimum printable length constraint, maximum ink volume per unit area constraint, circumferential print resolution constraint, color channel limitation constraint, and color fixation capability constraint; Represents the square of the L2 norm. It represents the first norm.

[0079] The prediction process of the forward model includes three stages: geometric path and projection, visibility and circumferential color rendering mixing, and imaging. In the geometric path and projection stage, a three-dimensional yarn centerline path is generated from topological events as described above, and a material frame is set along the yarn centerline. Then, based on the observation surface, load state, camera intrinsic and extrinsic parameters, and fabric coordinate system under this observation state, the micro-area of ​​the yarn surface is projected onto the image plane. In the visibility and circumferential color rendering mixing stage, the contribution weight of each yarn arc length micro-segment and each circumferential sector to each observed pixel is determined based on the visibility coefficient and / or circumferential angle described above. The color rendering amount of each channel is then weighted and summed according to the observation equation described above. In the imaging stage, the observation noise is set to zero during prediction, and the predicted value of each observed pixel under this observation state is output according to the calibrated background term. The difference between the predicted data and the observed data is calculated using the weighted L2 norm.

[0080] In an optional embodiment, it further includes: The confidence level of each candidate knitting topology is determined based on the difference between the predicted data and the observed data corresponding to each candidate knitting topology. When the confidence level is lower than the preset threshold, additional observation states are selected for supplementary acquisition. The additional observation states include at least one of the following: stretching direction, observation surface, viewing angle, polarization angle, spectral band, or depth imaging mode; or, a trial fabrication sample is generated to eliminate ambiguity between candidates.

[0081] After completing the baseline state acquisition, the system calculates the confidence level and observation identifiability of the candidate topologies. The preset threshold can be set according to the application scenario, ranging from 0.80 to 0.95. In one embodiment, the preset threshold is 0.90; in another embodiment, it is 0.85. The preset value for the score difference between the highest and second-highest candidate topologies ranges from 0.05 to 0.25. When the confidence level of the highest candidate topology is higher than the preset threshold, and the score difference between the highest and second-highest candidate topologies is higher than the preset difference, the system stops adding observation states; otherwise, for each candidate supplementary acquisition condition, the system calculates the predicted observation difference of each candidate topology under that condition and selects the supplementary acquisition condition that maximizes the predicted difference between the candidate topologies.

[0082] In an optional embodiment, it further includes: Based on the target topology and physical arc length coordinate range, a machine-independent knitting manufacturing intermediate representation (KIR) is generated, which includes topology data, arc length mapping data, visibility data, color rendering data, and equipment constraint data. The intermediate representation of knitting manufacturing is compiled into knitting instructions for knitting equipment, printing events and color fixing events for continuous yarn inkjet printing equipment, and the phase relationship between knitting instructions, printing events and color fixing events is established. Perform trial weaving to obtain test data for the front and back sides of the finished fabric; By utilizing a bidirectional mapping relationship, the detection error can be located to the corresponding yarn arc length and topological event; Update at least one of the following based on the detection error: yarn consumption model, shrinkage parameter, circumferential angle model, color diffusion model, or color fixation response curve; The updated parameters will be used for the next trial weave or the next production batch.

[0083] After obtaining the KIR, the compiler generates a specific machine program based on the target device's needle bed, needle count, machine number, yarn feed port, and control language; at the same time, it generates printing and fixing events based on the printhead position, phase, tension, circumferential control method, and color fixing capability of the continuous yarn printing equipment.

[0084] During sample processing, the system records yarn feed length, tension, knitting machine cycle time, printing events, and color fixation parameters. After the finished product is imaged from both sides, the system uses the π (pi) parameter to pinpoint the error to the corresponding yarn arc length and topological event, and updates the unit needle count yarn consumption model, tension-elongation relationship, loop migration / tension / finishing shrinkage parameters, circumferential angle retention / rotation model, color diffusion model, phase deviation between the target needle count and the actual fabric position, and response curves between different colors / ink absorption / color fixation energy. The updated parameters only apply to yarn segments that have not yet been printed or woven, or to the next sample / batch; the system employs sliding window, recursive least squares, Kalman filtering, Bayesian updating, or gradient optimization.

[0085] This application also provides a system for reverse engineering and color mapping of knitted fabrics, including: The multi-state observation acquisition module is used to acquire observation data of at least two different observation states of the same knitted fabric. The registration module is used to register the same fabric material region under different observation conditions; The topology candidate generation module is used to generate at least one candidate knitting topology map based on the coil features, yarn direction, overlapping points and occlusion boundary information in the observed data. The arc length mapping module is used to trace the continuous yarn path along the continuous yarn connection edge for each candidate knitting topology, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. The visibility determination module is used to determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval based on the candidate knitting topology map and the physical arc length coordinate interval; The forward verification module is used to generate prediction data for each observation state based on the candidate knitting topology map, physical arc length coordinate range and yarn material parameters using the forward model, and select the target topology from the candidate knitting topology map based on the difference between the prediction data and the observation data, as well as at least one of the topology legality constraints, yarn continuity constraints and manufacturing feasibility constraints. The output module is used to output the target topology, bidirectional mapping relationship, and visibility data and / or circumferential color data.

[0086] Regarding the above embodiments, this application provides a computer device; please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device includes a memory and a processor, wherein the memory and the processor are coupled to each other. The memory stores program data, and the processor is used to execute the program data to implement the steps of any embodiment of the above-described knitted fabric reverse compilation and color mapping method.

[0087] In this embodiment, the processor may also be referred to as a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0088] The methods described in the above embodiments can be implemented as computer programs; therefore, this application proposes a computer-readable storage medium. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium stores program data that can be executed by a processor. The program data can be executed by the processor to implement the steps of any embodiment of the above-described knitted fabric reverse engineering and color mapping method.

[0089] In this embodiment, the computer-readable storage medium can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a medium capable of storing program data. Alternatively, it can be a server storing the program data, which can send the stored program data to other devices for execution or run the stored program data itself.

[0090] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0091] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0092] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0093] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for reverse engineering and color mapping of knitted fabrics, characterized in that, include: Acquire observation data for at least two different observation states of the same solid knitted fabric, wherein the observation state is defined by at least one of the observation surface, load state, and imaging mode; Register the same fabric material region under different observation conditions; Based on the loop characteristics, yarn direction, overlap points and occlusion boundary information in the observation data, at least one candidate knitting topology is generated. The candidate knitting topology includes topology event nodes, continuous yarn connection edges and loop splicing edges. For each candidate knitting topology, trace the continuous yarn path along the continuous yarn connection edge, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. Based on the candidate knitting topology and the physical arc length coordinate interval, determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval; Using a forward model, prediction data for each observation state is generated based on the candidate knitting topology, the physical arc length coordinate range, and the yarn material parameters. Based on the difference between the predicted data and the observed data, and at least one of the topology legality constraints, yarn continuity constraints, and manufacturing feasibility constraints, a target topology is selected from the candidate knitting topology graph. Output the target topology, the bidirectional mapping relationship, and the visibility data and / or circumferential color data.

2. The method according to claim 1, characterized in that, The at least two different observation states include at least two combinations of the following states: (a) Front and back reference states of the knitted fabric; (b) The knitted fabric is in at least two of the following states: unstretched, warp-stretched, weft-stretched, and bi-directionally stretched. (c) Observational state of knitted fabrics from different perspectives; (d) Observational status of knitted fabrics in polarization imaging, multispectral imaging, or depth imaging modes; (e) Observation of the knitted fabric under the same surface reference state and at least two linearly independent deformation states.

3. The method according to claim 1, characterized in that, Generating the at least one candidate knitting topology includes: Obtain a local topological evidence vector, which includes at least one of the following: loop formation probability, loop clustering probability, floating thread probability, loop shifting probability, needle separation probability, upper and lower layer depth evidence, local yarn direction, and visibility confidence. Based on the knitting topology syntax rules, the loop state of each needle on the needle bed, the needle bed lateral movement, the yarn feeder position, and the yarn activity state are used as state variables. Combined with the local topology evidence vector, a state transition search is performed to generate a candidate topology graph that satisfies the continuous yarn constraint, the loop joining method, and the equipment capability constraint. The knitting topology syntax rules include at least one of the following: loop formation rules, loop gathering rules, floating yarn rules, loop shifting rules, needle separation rules, loop release rules, yarn feeder entry / exit rules, and needle bed lateral movement rules.

4. The method according to claim 1, characterized in that, Assign physical arc length coordinate intervals to each topological event, including: For each topological event, establish the yarn geometric centerline path based on at least one of the event type, needle pitch, needle or sinker motion parameters, yarn tension, local curvature, and tension state. Calculate the basic geometric length along the path of the geometric centerline; The basic geometric length is modified based on at least one of the following: yarn tension-strain relationship, frictional contact between yarn and needle or sinker, yarn elasticity parameter, unloading relaxation shrinkage rate and finishing shrinkage rate, to obtain the yarn consumption of the topological event. The yarn tension-strain relationship adopts a nonlinear model, which includes a nonlinear elongation term caused by the initial straightening of the yarn and a linear elongation term during the stable stress stage.

5. The method according to claim 1, characterized in that, Also includes: Based on the candidate knitting topology and the physical arc length coordinate range, a three-dimensional yarn centerline path and a material frame along the yarn centerline are established. Based on the material frame, determine the visibility coefficient and / or circumferential angle of each arc-length micro-segment on different fabric surfaces or under different observation conditions; Based on the visibility coefficient and / or circumferential angle, a bidirectional mapping kernel is established between fabric pixels and yarn number, arc length coordinates, circumferential angle and visibility weight; Based on the appearance of the target's front and back sides or measured images of the front and back sides, the circumferential color field of the yarn is solved under the constraint of the bidirectional mapping kernel. ,in Let the coordinates be arc length. Circumferential angle, For color or spectral channels; The circumferential color field is output in at least one of the following forms: a defined circumferential angle value, an equivalent angle class, a probability distribution, or a circumferential average value.

6. The method according to claim 1, characterized in that, Also includes: The confidence level of each candidate knitting topology is determined based on the difference between the predicted data and the observed data corresponding to each candidate knitting topology. When the confidence level is lower than a preset threshold, additional observation states are selected for supplementary acquisition. The additional observation states include at least one of the following: stretching direction, observation surface, viewing angle, polarization angle, spectral band, or depth imaging mode; or, a trial fabrication sample is generated to eliminate ambiguity between candidates.

7. The method according to any one of claims 1 to 6, characterized in that, Also includes: Based on the target topology and the physical arc length coordinate range, a machine-independent intermediate representation for knitting manufacturing is generated. The intermediate representation for knitting manufacturing includes topology data, arc length mapping data, visibility data, color rendering data, and equipment constraint data. The intermediate representation of the knitting manufacturing process is compiled into knitting instructions for the knitting equipment, printing events for the continuous yarn inkjet printing equipment, and color-fixing events, and a phase relationship is established between the knitting instructions, the printing events, and the color-fixing events. Perform trial weaving to obtain test data for the front and back sides of the finished fabric; Using the bidirectional mapping relationship, the detection error is located to the corresponding yarn arc length and topological event; Update at least one of the following based on the detection error: yarn consumption model, shrinkage parameter, circumferential angle model, color diffusion model, or color fixation response curve; The updated parameters will be used for the next trial weave or the next production batch.

8. A system for reverse engineering and color mapping of knitted fabrics, characterized in that, include: The multi-state observation acquisition module is used to acquire observation data of at least two different observation states of the same knitted fabric. The registration module is used to register the same fabric material region under different observation conditions; The topology candidate generation module is used to generate at least one candidate knitting topology map based on the coil features, yarn direction, overlapping points and occlusion boundary information in the observed data. The arc length mapping module is used to trace the continuous yarn path along the continuous yarn connection edge for each candidate knitting topology, assign physical arc length coordinate intervals to each topology event, and establish a two-way mapping relationship between fabric position and yarn number and arc length coordinates. The visibility determination module is used to determine the visibility data and / or circumferential color rendering data corresponding to the physical arc length coordinate interval based on the candidate knitting topology map and the physical arc length coordinate interval; The forward verification module is used to generate predicted data for each observation state based on the candidate knitting topology map, the physical arc length coordinate interval and yarn material parameters using a forward model, and select the target topology from the candidate knitting topology map based on the difference between the predicted data and the observed data, as well as at least one of the topology legality constraints, yarn continuity constraints and manufacturing feasibility constraints. The output module is used to output the target topology, the bidirectional mapping relationship, and the visibility data and / or circumferential color data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the knitted fabric reverse compilation and color mapping method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the knitted fabric reverse compilation and color mapping method as described in any one of claims 1 to 7.