Sketch image analysis and classification system based on line structure modeling

By modeling the line structure, we extract the line features of the sketch image and construct a topological network to identify the overlapping and occlusion relationships between lines. This solves the problem of the difficulty in restoring the line drawing order in the sketch image and realizes a deep understanding and structural analysis of the sketch creation.

CN121904293BActive Publication Date: 2026-06-02SICHUAN NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN NORMAL UNIV
Filing Date
2026-03-26
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technology cannot accurately identify the order in which lines are drawn and their overlapping relationships in a sketch image, making it difficult to deeply understand the logic and structure of sketch creation. In particular, it is easy to produce distortions in the determination of the form and skeleton when the lines are intertwined in complex areas.

Method used

By using a line structure modeling method, the image pixel grayscale matrix is ​​obtained, continuous line features are extracted, the line width gradient change rate and spatial distribution density are calculated, a topological correlation network matrix is ​​constructed, the occlusion relationship between lines is identified, and the drawing order is derived through a grayscale evolution model to generate a three-dimensional structured vector model.

Benefits of technology

It achieves precise mapping from disordered pixels to ordered structured vectors, objectively depicts the physical form and logical relationship of lines, deeply analyzes the dynamic creative logic of sketches, and improves the rigor and accuracy of sketching technique analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904293B_ABST
    Figure CN121904293B_ABST
Patent Text Reader

Abstract

The application discloses a sketch image analysis and classification system based on line structure modeling and relates to the technical field of sketch image analysis. An image pixel matrix is converted into a line vector set containing coordinates and line width by a data acquisition module; a semantic classification module labels functional attribute tags according to the width gradient change rate and distribution density; a network construction module constructs a topological correlation network matrix based on line space distance; a time sequence reconstruction module analyzes the cross-region superposition weight using a gray evolution model, identifies the shielding relationship and deduces the drawing sequence; a model conversion module generates a three-dimensional structured vector model by fusing multi-dimensional features; and an output module outputs a parameterized image expression matrix containing time sequence logic and space weight accordingly. The application realizes deep analysis from the bottom stroke to the high-level creative logic, effectively solves the problem that the dynamic drawing time sequence in the static sketch image is difficult to restore and accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sketch image analysis technology, specifically a sketch image analysis and classification system based on line structure modeling. Background Technology

[0002] The analysis of sketching techniques and digital expression technology is a core research direction at the intersection of computer vision and art education. It aims to deeply analyze the structural logic, brushstroke forms, and spatial patterns of sketches through digital image processing. In recent years, with the maturity of feature extraction operators and structured modeling algorithms, the analysis methods for sketch images have gradually evolved from global pixel statistics to local line vectorization. Existing technologies mostly extract line contours through edge detection algorithms and combine them with topological analysis or texture clustering to evaluate the completeness of the image, achieving qualitative identification of sketching level and possessing a certain degree of visual evaluation capability.

[0003] However, for sketching art, the drawing logic between lines (such as the order of strokes and the physical overlapping relationship of lines) is the core element that carries the artist's anatomical understanding and ability to construct form. Because lines in the sketching process are often accompanied by high-frequency intersections and repeated overlaps, this complex physical superposition will cause a non-linear cumulative effect of pixel grayscale, making the image hide a strong temporal dependence under static presentation.

[0004] Existing technologies, when dealing with scenes involving complex interwoven lines, often treat them as static geometric networks, failing to perform in-depth modeling of the grayscale evolution caused by line overlap. This makes it difficult to deduce the drawing sequence of the lines from the finished image. This lack of attention to the creative sequence leads to the system's inability to accurately identify the hierarchical occlusion relationships between lines. Consequently, structural lines with rigorous construction logic become confused with post-processed shading lines at the data layer, easily causing deviations in the understanding of the image's construction logic or distortions in the determination of the form's skeleton. This increases the uncertainty in the analysis of sketching techniques regarding the understanding of deep structure and the evaluation of dynamic processes. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a sketch image analysis and classification system based on line structure modeling.

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

[0007] This invention discloses a sketch image analysis and classification system based on line structure modeling, comprising:

[0008] The data acquisition module is used to acquire the pixel grayscale matrix of the image to be processed, extract continuous line features through edge detection and thinning processing, and convert the pixel grayscale matrix into an initial line vector set containing a spatial coordinate sequence and line width feature values.

[0009] The semantic classification module is used to calculate the width gradient change rate and spatial distribution density of each line in the initial line vector set, and to identify the attributes of the lines according to the preset functional attribute rules, thereby generating a semantic line dataset containing functional attribute labels.

[0010] The network construction module is used to retrieve the semantic line dataset, and construct a topological association network matrix reflecting the connection relationship between lines by calculating the spatial distance between adjacent lines, with each line as a node.

[0011] The temporal reconstruction module is used to parse the intersection nodes in the topological network matrix, extract the pixel grayscale superposition weights of the intersection region, identify the occlusion relationship between lines through a pre-trained grayscale evolution model, construct a directed graph based on the occlusion relationship, and deduce the drawing order sequence of the lines through a topological sorting algorithm to generate line generation sequence information.

[0012] The model conversion module is used to perform feature fusion by taking the initial line vector set, the topological correlation network matrix and the line generation sequence information as joint inputs to generate three-dimensional structured vector model data representing the sketch image;

[0013] The output module is used to reconstruct and output a parameterized image representation matrix containing line temporal logic and spatial weights based on the three-dimensional structured vector model data.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0015] 1. This invention achieves precise mapping from disordered pixels to ordered structured vectors. Based on feature extraction of line width gradient change rate and spatial distribution density, it can objectively depict the microscopic differences in the physical form of lines with different functional attributes. This allows the system to automatically identify the attributes of contour, light and dark, and texture lines from the geometric and distributional dimensions of the lines, thus providing a semantically based data source for subsequent in-depth technique analysis.

[0016] 2. This invention achieves scientific identification of the overlapping and occlusion relationships between lines by constructing a topologically related network matrix and combining it with a grayscale evolution model to analyze the pixel superposition weights of intersecting regions. This allows the system to reverse-engineer the drawing order of lines using directed graphs and topological sorting algorithms, thus solving the technical challenge of reconstructing the dynamic creative logic in static images. It effectively extracts spatial hierarchy information hidden in the interweaving of brushstrokes, enabling the analysis of sketches to go beyond the visual presentation of a two-dimensional surface and delve into the logical reconstruction of the painting process.

[0017] 3. The reconstruction method based on the three-dimensional structured vector model of this invention enables the image expression matrix to simultaneously accommodate multiple dimensions such as geometric shape, connection stability and pen stroke order. Therefore, it can more comprehensively depict the internal structural features of sketching techniques, providing a high-dimensional decision feature source for the machine to deeply analyze complex sketches, and enhancing the objectivity and rigor of the system's understanding of the structural rules of sketches. Attached Figure Description

[0018] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0019] Figure 1 This is a system module connection diagram of the present invention;

[0020] Figure 2 This is a flowchart of the workflow steps of the present invention;

[0021] Figure 3 This is a flowchart illustrating the conversion steps of the initial line vector set in this invention. Detailed Implementation

[0022] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0023] In existing technologies, sketching technique analysis often relies on global pixel statistics or low-level line geometric feature inversion, making it difficult to balance analytical depth with the restoration of creative logic. Traditional methods, when dealing with complex areas of high-frequency line intersections and repeated overlaps, suffer from non-linear accumulation effects of pixel grayscale, causing the system to fail to accurately identify the physical overlapping relationships between lines, resulting in distortions in form and skeleton determination. Existing technologies cannot simultaneously perceive the impact of brushstroke layering on spatial hierarchy, especially in images with rich tonal range and dense hatching; static recognition models struggle to distinguish between structural lines and post-processing lines, failing to meet the needs of art education for in-depth technique analysis and dynamic process evaluation.

[0024] To address the aforementioned issues, the study discovered an implicit correlation between the grayscale evolution of line intersections and their drawing sequence. An evolutionary model based on pixel grayscale superposition weights was established to inversely deduce occlusion relationships. Further investigation revealed that the line width gradient change rate and spatial distribution density can effectively map their functional attributes in sketching (such as outline, light and shadow, and texture). This led to the proposal of a three-dimensional structured model incorporating semantic classification, topological networks, and temporal sequences. Furthermore, through algorithm integration, physical overlap features and spatial logical weights were introduced into a multi-dimensional quantitative analysis operator, forming a closed-loop analytical system that maps from low-level pixels to high-level creative logic.

[0025] After introducing the basic concept of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0026] like Figure 1 As shown, a sketch image analysis and classification system based on line structure modeling includes:

[0027] The data acquisition module is used to acquire the pixel grayscale matrix of the image to be processed, extract continuous line features through edge detection and thinning processing, and convert the pixel grayscale matrix into an initial line vector set containing spatial coordinate sequence and line width feature values.

[0028] The semantic classification module is used to calculate the width gradient change rate and spatial distribution density of each line in the initial line vector set, and to label the lines according to the preset functional attribute rules to generate a semantic line dataset containing functional attribute labels.

[0029] The network construction module is used to retrieve semantic line datasets. Using each line as a node, it constructs a topological association network matrix that reflects the connection relationship between lines by calculating the spatial distance between adjacent lines.

[0030] The temporal reconstruction module is used to parse the intersection nodes in the topological association network matrix and extract the pixel grayscale superposition weights of the intersection region. It identifies the occlusion relationship between lines through a pre-trained grayscale evolution model, constructs a directed graph based on the occlusion relationship, and derives the drawing order sequence of the lines through a topological sorting algorithm to generate line generation sequence information.

[0031] The model conversion module is used to perform feature fusion by taking the initial line vector set, the topological correlation network matrix and the line generation sequence information as joint inputs to generate three-dimensional structured vector model data representing the sketch image;

[0032] The output module is used to reconstruct and output a parameterized image representation matrix containing line temporal logic and spatial weights based on the 3D structured vector model data.

[0033] like Figure 2 The diagram shown illustrates the workflow of this application. The physical implementation of this application includes an image acquisition terminal, a central processing unit (CPU), a graphics processing unit (GPU), and a storage device. The storage device contains computer program instructions that execute the logic of each module, and the following workflow is achieved through the use of hardware resources:

[0034] The data acquisition module collects the raw optical information of the sketch using a high-resolution scanning device or image sensor and converts it into a discrete pixel grayscale matrix stored in memory. The system calls edge detection operators (such as Canny or Sobel operators) to locate areas with drastic pixel gradient changes, and uses morphological thinning algorithms to peel away edge pixels, generating a single-pixel-width line skeleton. Through a line tracing algorithm, the system traverses the connectivity between skeleton pixels, abstracting the discrete pixel set into a continuous spatial coordinate sequence. Simultaneously, the system resamples the original pixel grayscale matrix along the line normal direction, extracting line width feature values ​​by calculating the full width at half maximum (FWHM) or Gaussian fitting values ​​of the grayscale distribution. Finally, each line is encapsulated into an initial line vector set containing geometric topological information and physical morphological parameters.

[0035] The semantic classification module performs attribute preprocessing on the acquired initial line vector set. The system iterates through each line vector, calculates the width value fluctuations corresponding to the coordinate point sequence using first-order difference, and obtains the width gradient change rate to characterize the fluctuation of brushstroke force. It also uses spatial retrieval algorithms (such as KD trees) to statistically analyze the line distribution frequency per unit area, obtaining the spatial distribution density. The system inputs these two quantitative features into a preset functional attribute rule base and automatically labels the lines according to threshold matching logic. For example, lines with low change rate and low density are labeled as "outline lines," and lines with high change rate and high clustering are labeled as "texture lines," thereby generating a semantic line dataset containing functional attribute labels, achieving semantic transformation from pure geometric data to pictorial language data.

[0036] In the network construction module, the system retrieves the semantic line dataset and abstracts each labeled line as a node in a graph theory model. The processor constructs a topological network matrix describing spatial adjacency relationships by calculating the shortest Euclidean distance between any two line vectors. If the distance between two lines is lower than a preset connection threshold, the corresponding adjacency point in the topological network matrix is ​​set to a valid value, indicating that there is a physical connection or logical support relationship between the lines. This matrix not only records the geometric arrangement of the image but also reflects the structural center of gravity and compositional skeleton of the sketch image through the distribution of node degrees.

[0037] The temporal reconstruction module locates the connection points marked as "intersecting" in the topological network matrix and backtracks to the original pixel grayscale matrix to extract overlapping pixel information in the intersection regions. Based on a grayscale evolution model constructed from physical experiments, the system calculates the pixel grayscale superposition weights of the intersection regions relative to the non-intersection regions. Since later-drawn lines physically occlude earlier-drawn lines, the grayscale distribution of the overlapping parts exhibits specific non-linear distribution characteristics. By identifying this grayscale evolution pattern, the system identifies the hierarchical coverage relationships between lines and constructs a directed graph of coverage relationships based on the identification results. Nodes represent lines, and directed edges point from covered lines to covering lines. The system then calls a topological sorting algorithm (such as the Kahn algorithm) to extract at least one valid drawing order sequence from the directed graph. If a cycle exists in the graph (i.e., a coverage conflict), the system initiates a conflict resolution strategy, prioritizing the retention of coverage relationships with higher grayscale superposition weights. Finally, the system outputs line generation sequence information, reflecting the logical order of line drawing.

[0038] The model conversion module, acting as the core processing hub, receives the joint input of the initial vector set, topological matrix, and time series sequence. The machine-side utilizes a multi-dimensional quantization analysis operator to fuse the second-order curvature (geometric), nodal degree distribution (topological), and temporal backtracking frequency (logic) of the lines. Through this cross-dimensional feature integration, the system transforms planar image information into three-dimensional structured vector model data. This model data not only includes the lines in… The coordinates of the plane also endow the lines with "depth" information through the temporal dimension and "logical strength" information through topological weights, thus constructing a holographic mathematical representation of the image.

[0039] The output module parses the aforementioned 3D structured vector model and performs the final data reconstruction. The machine-side, based on a preset parametric template, maps the fused features into a parametric image representation matrix that includes temporal logic (drawing order) and spatial weights (structural importance). This matrix, as the system's final output, not only accurately reproduces the visual representation of the image but also provides structured features for further machine recognition and classification. The output process writes the matrix data to storage media or transmits it to the display terminal via the system interface, completing a closed loop from original image input to high-dimensional representation output.

[0040] This application achieves the digital reconstruction of the deep structural patterns of sketch images. By employing a grayscale evolution model and topological sorting, it solves the problem of the irreversibility of dynamic drawing logic in static images, enabling the system to objectively extract the temporal superposition features between lines. Secondly, through the construction of a topological association network matrix and a three-dimensional structured vector model, subjective drawing techniques are transformed into quantifiable topological parameters and spatial weights, improving the system's accuracy in analyzing the rigor of sketch structure. Finally, the generated parametric image representation matrix can simultaneously carry geometric, semantic, and logical information, providing a highly discriminative feature source for subsequent automated classification and evaluation, effectively reducing the interference of complex background lines on the recognition results, and enhancing the system's robustness in professional sketch technique analysis scenarios.

[0041] like Figure 3 The diagram shows the flowchart of the initial line vector set conversion steps in this application. This application further proposes implementation steps for converting the pixel grayscale matrix into an initial line vector set containing a spatial coordinate sequence and line width feature values ​​by extracting continuous line features through edge detection and thinning processing.

[0042] First, the system invokes an edge detection operator (such as the Canny operator) to perform an edge detection algorithm on the pixel grayscale matrix, calculating multi-scale gradients. During this process, the system uses a pre-defined dual-threshold strategy to obtain the set of edge pixels, where the higher threshold... Set in the range of 150 to 200 to identify significant edges; low threshold. Setting it within the range of 50 to 80 is used to connect weak edges, thereby ensuring the integrity of lines against complex sketch backgrounds, for example... .

[0043] After obtaining the edge pixel set, the system performs morphological thinning operations on it. Through an iterative, layer-by-layer pixel stripping algorithm (such as the Zhang-Suen thinning algorithm), redundant edge pixels are removed while maintaining line connectivity until a skeleton line with a single pixel width is obtained. This process abstracts the brushstrokes with physical thickness into a geometrically meaningful central axis, laying the foundation for subsequent vectorized modeling.

[0044] Based on the skeleton lines, the system performs line tracking and segmentation. The system traverses the skeleton pixels, identifies bifurcation points (pixels with a degree greater than 2) and endpoints (pixels with a degree equal to 1), and performs logical disconnection at the bifurcation points, thereby decomposing the complex network of intersecting lines into multiple continuous and single-path line segments.

[0045] For each line segment, the system transforms its discrete coordinate points into a smooth spatial coordinate sequence using third-order spline interpolation or polynomial fitting. Subsequently, the system performs a crucial width feature extraction step: for each sampling point on the line segment, the system calculates the normal direction of the tangent at that point and scans the original pixel grayscale matrix along this normal direction to both sides. By analyzing the grayscale profile distribution along the normal path, the system finds the boundary points where the grayscale value decays to a preset proportion (e.g., 50% of the peak grayscale, i.e., full width at half maximum). The Euclidean distance between the two boundary points is calculated as the line width value for that sampling point. The width values ​​of all sampling points are arranged chronologically to form a width value sequence corresponding to the spatial coordinate sequence.

[0046] To improve the robustness of line width calculation, the system can use a Gaussian distribution fitting model when calculating the width value. This assumes that the pixel grayscale distribution along the normal direction conforms to a Gaussian function, and the grayscale value... The calculation formula is as follows:

[0047] ;

[0048] in, This represents the gray value at a distance x along the normal. For amplitude parameters, The center position of the line, Standard deviation The background grayscale reference is used. The sampled pixels are fitted using the least squares method, and the system takes... The line width value at that point This method effectively filters out the interference of scanning noise on stroke edge determination. Finally, the system matches the spatial coordinate sequence of each line segment with its corresponding width value sequence. Perform data encapsulation to form a standard line vector in the initial line vector set.

[0049] When handling the recognition of overlapping regions, the grayscale evolution model used by the system needs to be optimized under specific training conditions. The training data comes from 5000 sets of superimposed pen stroke samples with known drawing orders, covering different media such as pencils and charcoal pencils, with line widths ranging from 0.5mm to 5.0mm. During training, a three-layer fully connected neural network is used. The input is the grayscale distribution features of the overlapping regions (such as mean, variance, gradient, etc., totaling 12 dimensions), and the output is three types of overlapping relationships (previous covering later, later covering before, and simultaneous drawing). The loss function used is cross-entropy loss, the optimizer is Adam, the learning rate is set to 0.001, the batch size is 64, and the iterations are more than 150 rounds. To prevent overfitting, Dropout (with a retention rate of 0.7) and an early stopping strategy are added during training, and the model is trained on a GPU cluster.

[0050] The training environment is based on a high-performance computing cluster, utilizing the parallel computing capabilities of GPUs to perform nonlinear mapping on the pixel grayscale accumulation features of intersecting regions. Through this training mode, the grayscale evolution model can accurately capture the microscopic grayscale occlusion rate of later-drawn lines on earlier-drawn lines, thereby enabling accurate reverse derivation of the drawing logic in practical applications.

[0051] Considering that the images to be processed may originate from shooting under different lighting conditions or scanning with different qualities, the pixel grayscale matrix may contain non-uniform local shadows or digital noise. If the line width feature values ​​in the initial line vector set oscillate at high frequencies due to noise interference, it may lead to misjudgment by the semantic classification module. To address this, the system pre-configures "adaptive smoothing processing logic," performing bilateral filtering on the matrix before feature extraction to filter out background noise while maintaining the sharpness of line edges. For overall grayscale shifts caused by uneven lighting, the system uses a local background normalization algorithm to eliminate the influence of lighting on the calculation of pixel grayscale superposition weights.

[0052] By extracting lines and encapsulating them into vectors, this application achieves a deep digital reconstruction of sketch brushstrokes by converting discrete pixel-level information into a vector representation with geometric continuity and physical width. The grayscale sampling along the normal direction and the Gaussian fitting mechanism effectively overcome the accuracy loss problem of traditional edge extraction methods when dealing with blurred brushstrokes or gradient lines, ensuring that the width feature sequence can truly reflect the microscopic changes in brush pressure.

[0053] Furthermore, after constructing the initial line vector set, the semantic classification module transforms geometric data into pictorial semantics through quantitative analysis of the morphological features of the lines. This application proposes specific steps for calculating the width gradient change rate and spatial distribution density of each line in the initial line vector set.

[0054] For each line vector, the system first calculates the width gradient rate of change to characterize the degree of pressure control exerted by the writer during the stroke. Then, it extracts the corresponding width value sequence along the spatial coordinate sequence of the line. And calculate the first-order difference of the width values ​​between adjacent sampling points. .

[0055] To eliminate the effects of scanning noise or subtle digitization jitter, the system sets a first preset threshold. (The recommended value range is 0.05mm to 0.15mm, for example, 0.1mm). The system statistics meet the conditions. Number of sampling points And calculate its proportion in the total number of sampling points n. This ratio That is, as the rate of change of the width gradient, A higher value indicates a more pronounced undulation at the edge of the brushstroke, typically corresponding to the "roughness" characteristic of texture depiction; conversely, a lower value indicates a lower rate of change in width gradient. This indicates smooth brushstrokes and steady penmanship, and is often seen in the outlining of shapes.

[0056] For the current target line The system uses its geometric center as the center of a circle with a preset radius. (Based on the screen resolution, the value typically ranges from 5mm to 20mm, e.g., 10mm) Define a circular neighborhood. The system then retrieves all lines falling within this preset radius from the semantic line dataset. The set of all other lines within the circular neighborhood And calculate the total length of these lines in the neighborhood. Total length The ratio to the circular neighborhood is used as the spatial distribution density. The calculation formula is as follows:

[0057] ;

[0058] in, The dimension of is the line length per unit area, used to distinguish sparse structural lines from dense hatching shaded areas.

[0059] The system combines the width gradient rate of change and spatial distribution density into a two-dimensional feature vector. Input based on the preset width gradient change rate threshold and spatial distribution density threshold The constructed functional attribute rules are matched to output the corresponding functional attribute labels. Among these, the width gradient change rate threshold... The standard setting is between 0.2 and 0.4, with a typical value of 0.25; spatial distribution density threshold. The value is set between 0.3 and 0.6 after normalization based on image resolution, with a typical value of 0.45. The specific value can be adaptively determined through cluster analysis.

[0060] By employing a synergistic analysis based on microscopic width fluctuations and macroscopic spatial distribution, this application effectively transforms subjective techniques in sketching art into computer-recognizable attribute labels through the establishment of an objective mathematical statistical model. The first-order difference statistical method accurately captures the textural features of brushstrokes, simulating the human visual perception of the density relationship within a composition. This multi-dimensional feature vector construction and threshold matching mechanism eliminates the ambiguity of single-feature attribute determination, ensuring that the semantic line dataset accurately reflects the structural hierarchy and technical logic of the artwork. This provides reliable high-level semantic feature support for the subsequent construction of the topological network and the derivation of the drawing sequence.

[0061] In one embodiment, after extracting the two-dimensional feature vector of each line vector, the semantic classification module performs logical discrimination based on preset functional attribute rules. These functional attribute rules define the mapping relationship; this process essentially establishes a multi-dimensional decision space by adjusting the width gradient rate of change. Spatial distribution density The threshold cross-combination maps abstract geometric parameters to specific painting functional semantics.

[0062] For lines in the image that define the boundaries of shapes, the system sets a judgment condition: when the width gradient change rate is lower than the width gradient change rate threshold. And the spatial distribution density is lower than the spatial distribution density threshold. In this context, lines are characterized by smooth strokes, minimal width fluctuations, and sparse distribution within a local space. Lines exhibiting these characteristics are labeled "outline tags," which, in a physical sense, correspond to the long lines used in sketching to define the outer contour or core structural transitions of an object.

[0063] For lines in the image used to assist in positioning, establishing perspective relationships, or assisting in shape modeling, the system determines that if the width gradient rate of change is lower than the width gradient rate of change threshold... (Manifested as smooth brushstrokes) and spatial distribution density higher than the spatial distribution density threshold. In this case, these lines typically appear inside an object in parallel or intersecting arrangements, forming line groups with a certain degree of clustering but stable strokes. Lines that conform to this characteristic are marked as "construction line labels," representing the author's logical deduction of the object's internal structure during the drawing process.

[0064] For lines that represent the transition between the lit and shadowed sides of an object and reflect tonal gradations, the system executes a more dynamic judgment logic: when the width gradient rate of change is higher than the width gradient rate of change threshold... Furthermore, when the spatial distribution density exhibits a gradient change (i.e., the density value monotonically increases or decreases with coordinate offset), the system outputs "light and dark line labels." At this time, the dramatic fluctuations in width reflect the changes in the pressure applied by the brush, while the gradient evolution of density physically reproduces the "shading" effect in sketching techniques, which achieves tonal transitions through the density of hatching lines.

[0065] For lines used in sketching to represent the microscopic features of an object's surface (such as roughness, graininess, or specific textures), the system introduces feature extraction targeting high-frequency signals. When the frequency of positive and negative extreme value switching within a preset unit length (e.g., within 10mm) of the width gradient change rate exceeds a second preset threshold... (The recommended range is 3 to 8 times per unit length), and when the spatial distribution density is non-linear and irregularly clustered, the system outputs a "texture line label". Under this condition, the high-frequency switching of positive and negative extreme values ​​represents the short and highly fluctuating tremor of the brushstroke, while the irregular clustering simulates the random distribution characteristics of natural texture on the screen.

[0066] To ensure the robustness of the above classification rules, a threshold for the rate of change of the width gradient is set. Spatial distribution density threshold The selection of data employs an adaptive calibration method based on sample statistics. During the initialization phase, the system pre-analyzes 1000 sample images, including standard structural sketches and chiaroscuro sketches, statistically analyzing the cluster centers of lines from different techniques in the feature space. Finally, the width gradient change rate threshold is determined. Defined around 0.25, the spatial distribution density threshold. It is defined around 0.45 of the normalized density value.

[0067] Through the aforementioned multidimensional threshold cross-matching and high-frequency component analysis, this application achieves automated and accurate labeling of sketch lines. This method, based on physical feature mapping semantic attributes, not only identifies the morphological features of individual lines but also captures the collaborative expression logic between line groups through density gradient analysis. This allows the semantic line dataset generated by the system to highly reproduce the technical intent in sketch creation. This refined labeling...

[0068] This application further proposes that, after generating the semantic line dataset, the network building module transforms the discrete line features into a graph theory model with structural logic by establishing spatial adjacency relationships between lines.

[0069] The system first performs a global line pair traversal process, iterating through all line pairs in the semantic line dataset. To optimize computational efficiency, the system employs a pre-screening mechanism based on spatial bounding boxes (AABB), performing fine-grained distance calculations only on line pairs whose bounding boxes overlap or whose spacing is within a safe range.

[0070] For each selected line pair (set as line) and The system determines the connection status of two lines by calculating the Euclidean distance between all pairs of coordinate points on the two lines. Contains a sequence of coordinate points ,line Contains a sequence of coordinate points Then the minimum spatial distance of the line pair Defined as:

[0071] ;

[0072] In its implementation, the system employs differentiated processing algorithms for different line segment types to balance computational accuracy and processing speed. For straight lines marked as "outline" or "construction line" with low curvature statistical characteristics, the system simplifies them to an analytical expression and quickly calculates the minimum distance using the geometric distance formula from a point to a line segment, avoiding traversal of the entire point set. For curve segments with high curvature (such as "texture lines" or complex "light and dark lines"), the system uses piecewise linear approximation or a nearest neighbor search algorithm based on spatial hashing. Through local iterative convergence, it quickly identifies candidate point pairs that may generate the minimum distance, thereby accurately obtaining the minimum gap between curves.

[0073] Obtain the minimum spatial distance Then, the system compares it with the third preset threshold. Perform a comparison. Third preset threshold. The setting should be based on the average width of sketch lines, typically set between 1.0mm and 3.0mm (corresponding to a pixel distance of approximately 10 to 30 pixels, depending on the image resolution). If Then it is determined that the two lines have a spatial contact, intersection, or logical connection relationship, and in The corresponding row and column positions of the topological interconnected network matrix of the dimension ( and Set it to 1; otherwise, set it to 0.

[0074] Furthermore, to enhance the expressiveness of the topology network, the system also considers the semantic labels of lines when determining connectivity. For example, if both lines are identified as "outline lines," the system will appropriately increase the third preset threshold. The tolerance is adjusted to compensate for minor breaks in the brushstrokes that may occur when the author writes quickly; and for the connection between "light and dark lines" and "texture lines", a more stringent distance judgment is adopted to accurately distinguish between dense parallel lines and real structural connections.

[0075] In extremely complex sketching creations (such as hyperrealist works), the number of lines may exceed the computational threshold of single-frame image processing, leading to computational redundancy in the topological network matrix. For such ultra-large-scale datasets, the system employs a "spatial divide-and-conquer algorithm" to divide the image into multiple logically related sub-regions for parallel processing, and performs a "topological stitching operator" at the boundaries of the sub-regions.

[0076] By calculating spatial distances and constructing a topological matrix, this application successfully abstracts a sketch into a topological network reflecting the supporting relationships of forms. This processing method, based on minimizing point-to-point Euclidean distance and combined with line segment type optimization algorithms, can not only identify physical line intersections but also capture visual logical closures and transitions. The system can analyze the compositional rigor and form logic of the image from a structured perspective.

[0077] This application further proposes specific steps for extracting the pixel grayscale superposition weights of the intersection region. The system first searches the topological correlation network matrix and filters out line pairs marked as connected and overlapping or intersecting in geometric space. For the selected line pair (set as the first line...), ... With the second line The system uses an overlap detection algorithm based on spatial coordinate sequences to locate the precise intersection region. The intersection area Defined as being composed of the first line With the second line The set of pixels whose vector envelope is covered by the pixel grayscale matrix.

[0078] The system extracts the grayscale features of the intersection region and its neighborhood from the original pixel grayscale matrix. The system uses mask extraction technology to extract the grayscale set of the first pixel belonging to the first line. and the set of grayscale values ​​of the second pixel belonging to the second line .

[0079] The system not only extracts the grayscale values ​​at intersections, but also samples the non-intersection areas extending outwards from each line along the intersections by a preset step size (e.g., 5 to 10 pixels). The system calculates... and Average gray value of pixels in the intersection This value reflects the final visual response after the physical overlay of brushstrokes. Simultaneously, the system calculates... and Average gray value of non-intersecting pixels in the set and This serves as the baseline brightness characteristic of the line in an undisturbed state.

[0080] Based on the subtractive color mixing principle in physical optics or the superposition effect of opaque media, the system calculates pixel grayscale superposition weights. This is used to quantify the physical characteristics of the intersection region. The calculation formula is as follows:

[0081] .

[0082] in, Represents the pixel grayscale overlay weights;

[0083] The average grayscale value of the pixels in the intersection region;

[0084] The set of grayscale values ​​of the first pixel of the first line The average gray value;

[0085] The grayscale set of the second pixel of the second line The average gray value.

[0086] Pixel grayscale superposition weights It is usually represented in discrete levels from 0 to 255, or normalized by mapping to the [0,1] interval. When the calculation results are significantly biased to one side, it indicates that the grayscale representation of the intersection area is closer to the baseline characteristics of one of the lines. Specifically, because the later-drawn stroke (overlay) occludes the earlier-drawn stroke (bottom layer) through its coverage, the final grayscale of the intersection area is more significantly affected by the later-drawn line. For example, if the calculated... A positive value and a large value indicate that the gray level of the intersection region is high. and The difference is smaller, and the later-drawn line is located on the physical upper layer, contributing more to the grayscale of the pixels in the intersection area. Therefore, the average grayscale value of the intersection area is closer to the grayscale characteristics of the later-drawn line in the non-intersection area.

[0087] The grayscale evolution model in this application is mainly based on optical subtractive color mixing and physical overlay principles. However, in extreme cases, such as when the author repeatedly applies paint to the same local area at an extremely high frequency (e.g., more than 20 times), causing the painting medium (e.g., graphite) to reach saturation, the pixel grayscale values ​​in the intersection areas will tend to be consistent, potentially leading to superimposed weights. It is difficult to reflect the true coverage level. For such media saturation scenarios, the system will automatically activate the "spatial topology-assisted judgment logic". By referring to the connection relationship of the line in the non-saturated area and its logical order with the global composition, it will determine its temporal position, thereby ensuring that the continuity of the temporal sequence can still be maintained through macroscopic logic when the micro grayscale signal is distorted.

[0088] By employing the aforementioned weight extraction scheme based on local grayscale difference comparison, this application transforms the complex physical phenomenon of brushstroke superposition into quantifiable numerical differences, effectively overcoming the challenge of traditional visual algorithms in recognizing depth layers in static single-channel images. The system can not only identify simple line overlaps but also perceive the sequence of brushstroke pressure through subtle fluctuations in grayscale gradients. This provides high-confidence input features for subsequent grayscale evolution models to determine the overlapping and occlusion relationships between lines, thereby ensuring the authenticity and logic of the line generation sequence information.

[0089] This application further proposes to extract the pixel grayscale superposition weights in the intersection region. Then, the system calls the pre-trained grayscale evolution model to perform logical discrimination to determine the physical hierarchy and drawing order between lines. This grayscale evolution model is based on the attenuation law of material superposition, that is, the medium of the lines drawn later (such as graphite or carbon powder) will cover the particles of the lines drawn earlier, resulting in the average grayscale value of the intersection area. Statistically, the grayscale value of the line drawn later tends to be closer to the baseline grayscale value.

[0090] To achieve automated logical decision-making, the system introduces a fourth preset threshold. The fourth preset threshold The value is typically set between 5.0 and 15.0, with a typical value of 10.0 (taking 8-bit grayscale as an example). Its specific value is determined through cross-validation based on environmental parameters such as paper texture and the opacity of the painting medium during the system's pre-training process, and can be adjusted according to image contrast. The specific judgment criteria are as follows:

[0091] If pixel grayscale weights are superimposed Greater than the fourth preset threshold ,Right now ,show and The difference is significantly greater than its difference with The difference (i.e.) According to the grayscale evolution model, this means that the intersection area is affected by the second line. The physical shielding is relatively weak, while it is affected by the first line. The grayscale features are more dominant. Based on the logical direction defined by the formula, this is now determined to be the second line. Cover the first line ,Right now Draw lines later.

[0092] If pixel grayscale weights are superimposed Less than the fourth preset threshold The negative value, that is Then determine the first line. Cover the second line That is, the first line The lines are drawn later. In this case, the grayscale characteristics of the intersection area statistically belong to the overlay features of the second stroke, thus confirming the first line. With the second line The timing lead.

[0093] If pixel grayscale weights are superimposed The absolute value is less than or equal to the fourth preset threshold. ,Right now If the system determines that two lines were drawn simultaneously or at the same drawing level, then it will determine that the coverage relationship between the two lines is unclear. At the physical level, this typically corresponds to two situations: first, the two lines were drawn simultaneously (e.g., strokes blending together in wet-on-wet or rapid hatching techniques); second, the two lines are determined to be at the same drawing level (e.g., parallel construction lines drawn in the same sketch stage). In this case, the two lines have the same temporal position in the logical sequence, and the system will no longer enforce a distinction between their order.

[0094] Furthermore, to ensure the robustness of the grayscale evolution model in complex environments, a fourth preset threshold is used. It can be dynamically adjusted. For dense areas marked as "texture lines," the system will automatically increase the adjustment due to higher background grayscale noise. To avoid misjudgment; and for a single intersection of "outline" and "construction line", the system uses a lower [value]. This is used to capture weak superimposed signals.

[0095] Based on the determination mechanism of the fourth preset threshold, this application simplifies the complex physical occlusion phenomenon into a highly deterministic three-state logic determination. cover , cover (Or at the same level). This method, which combines quantized weights with dynamic thresholds, effectively solves the problem of irreversible line drawing order in static sketch images. Through the occlusion relationship output by this model, the system can rearrange all intersecting lines in a logical order from bottom to top, thereby generating line generation sequence information that reflects the essential logic of painting.

[0096] The grayscale evolution model is based on the general rule that later drawn lines physically cover earlier drawn lines. However, under certain sketching techniques, such as using an eraser (highlighting) or paper and pen to rub (smearing), the pixel grayscale matrix will undergo global or destructive reorganization.

[0097] Erasing technique: When an abnormal increase in grayscale value is detected in a local area (i.e., from dark to light) and the line edges show unnatural breaks, the system marks this behavior as a "reverse modification event" and regards it as the highest level of logical overlay in the time sequence.

[0098] Blending technique: For areas where the edges of lines become blurred and diffused, the system will automatically lower the fourth preset threshold. The weights are then used to extract the texture statistical features of the region.

[0099] This application further proposes that, after obtaining the initial line vector set, the topological correlation network matrix, and the line generation sequence information, the model conversion module calls the multi-dimensional quantization analysis operator and performs deep feature extraction through three parallel processing branches to construct a holographic feature space describing sketching techniques.

[0100] The first processing branch focuses on the geometric properties of the lines. The system parses the initial set of line vectors and calculates the coordinate sequence of each line vector. The second-order difference operation is used to calculate the discrete curvature at each sampling point. The calculation formula is as follows:

[0101] ;

[0102] By statistically analyzing the probability distribution of the curvature of all lines in the painting, statistical features of curvature (such as average curvature and curvature variance) are obtained to evaluate the smoothness and turning force of the artist's brushstrokes. At the same time, the system statistically analyzes the length distribution of all line vectors, dividing them into three intervals: long lines, medium lines, and short lines, forming the first feature group representing the geometric foundation of the painting.

[0103] The second processing branch utilizes graph theory algorithms to analyze the inherent structure of the image. The system performs graph theory analysis on the topological network matrix, counting the number of connections for each node by traversing the non-zero elements of the matrix rows / columns, thus obtaining the node degree distribution characteristics. Based on this, the system retrieves closed triangular structures between adjacent nodes and calculates the ratio of the actual number of connections between all neighboring nodes of a given node to the theoretical maximum number of connections, i.e., the clustering coefficient. It also uses shortest path algorithms (Dijkstra's or Floyd-Warshall's, etc.) to calculate the average path length between any two nodes in the network. These indicators quantify the stability of the form structure in the sketch and the logical tightness between structural points, forming the second set of features characterizing the overall robustness of the composition.

[0104] The third processing branch focuses on reconstructing dynamic drawing behavior. The system parses the line generation sequence information and extracts the timestamp or relative temporal index corresponding to each line. Based on significant jumps (i.e., breakpoints) in the temporal index, the system performs cluster analysis (K-means or density clustering algorithm (DBSCAN)) to divide the lines into different temporal clusters, thereby automatically classifying the drawing stages such as "drafting, finalization, detailed rendering, and adjustment". Simultaneously, by identifying repeated coverage trajectories of temporal coordinates in the same local spatial region, the system identifies the author's repeated erasure or modification of a specific detail, statistically analyzing the number of backtracking events to form the third feature group. These dynamic dimensional data constitute the third feature group characterizing the drawing logic and proficiency.

[0105] The system performs dimensionality reduction on the first, second, and third feature groups. It employs Principal Component Analysis (PCA) or Linear Discriminant Analysis (LDA) to remove redundant features and assigns contribution weights to each feature dimension using a pre-defined weight learning operator. The weight learning process is based on an expert rating sample library and uses gradient descent to minimize the residual between the predicted score and the expert score. Finally, the system encapsulates the fused high-dimensional feature vectors to generate a three-dimensional structured vector model.

[0106] Through the aforementioned parallelized, multi-dimensional feature processing mechanism, this application achieves a quantitative leap in sketching techniques from sensory aesthetics to rational modeling. By capturing micro-management of brushstrokes using second-order difference, analyzing the compositional framework through graph theory indicators, and restoring the drawing rhythm through temporal breakpoint reconstruction, an evaluation system with triple constraints of time, space, and semantics is constructed. This not only covers the static quality of the image but also analyzes the dynamic logic of the painting process.

[0107] Furthermore, after completing the dimensionality reduction and weight learning of the first, second, and third feature groups, the system enters the stage of generating three-dimensional structured vector model data. The core logic of this stage lies in enhancing traditional two-dimensional image data into a three-dimensional feature space with temporal logic and logical strength through the fusion of multi-dimensional features.

[0108] In the specific implementation, the machine first calls the time-series mapping operator to parse the time index in the line generation sequence information and convert it into a normalized time-dimensional coordinate T. The range of values ​​for this coordinate T is then normalized and mapped to... The interval is defined as follows: 0 represents the starting point of drawing (e.g., initial sketch lines), and 1 represents the ending point of drawing (e.g., final line details). The system uses matrix concatenation to combine the spatial coordinate sequence of the initial line vector set. With this time dimension coordinate Deep integration, thereby constructing a representation of the entire painting process in computational memory. A three-dimensional dynamic coordinate system. This spatiotemporal fusion model not only preserves the geometric shape of the brushstrokes, but also physically reproduces the evolutionary trajectory of artistic creation along the timeline.

[0109] Subsequently, the system utilizes a topological network matrix to delve into the structural functions between lines. The machine-side traverses the matrix and statistically analyzes the degree distribution of each node, calculating the connectivity value of each line to quantify its "spatial support weight" within the overall composition. This weight reflects the logical strength of the line as a skeletal support; for example, contour lines with high connectivity will be assigned higher support weights. The system establishes linear or nonlinear mapping functions to convert this support weight into the magnitude attribute of a vector, thereby generating three-dimensional structured vector model data with spatiotemporal logic. During model calculation, the preset weight allocation ratio references a standard database of artistic anatomy; for example, the weight coefficient range for structural support lines is set to [range missing]. The weighting coefficient range for decorative cabling is... .

[0110] To ensure the accuracy of the model data, the system's embedded mapping operator is calibrated using a pre-trained nonlinear regression model. This model employs a multilayer perceptron (MLP) architecture, and the training environment is based on high-performance GPU parallel computing nodes (such as graphics processors with more than 12GB of VRAM), using over 50,000 sets of real sketch trajectories as a sample library. The training condition is set with a learning rate of... The model employs the Adam optimizer and introduces L2 regularization during training to prevent overfitting. After approximately 200 iterations, the model is able to accurately predict the nonlinear relationship between line support weights and visual modulus under different techniques.

[0111] Based on a spatiotemporal fusion and topological weighting modeling approach, this application eliminates semantic ambiguity caused by overlapping lines in traditional image analysis by introducing a temporal dimension, thus giving overlapping brushstrokes a unique and definite logical position in three-dimensional space. By converting topological connectivity into vector magnitude, the system can objectively and mathematically represent the structural center of gravity and intensity distribution in painting creation, thereby supporting high-precision quantitative analysis of the rigor and logic of sketching techniques at the data level. This three-dimensional structured model provides a complete and accurate data benchmark for the subsequent output of a parameterized expression matrix containing spatial weights and temporal logic, ensuring the robustness and scientific rigor of the analysis system in recognizing sketches of different styles.

[0112] This application further proposes that after the construction of the three-dimensional structured vector model is completed, the system enters the final result integration stage, namely, generating and outputting the parameterized image representation matrix. This process is the core link in compressing high-dimensional physical and logical features into a tensor data stream that can be directly called by a computer.

[0113] In its implementation, the output module first initiates the 3D model parsing operator to perform a depth scan of the 3D structured vector model stored in memory. The machine then reads the T-axis component of each vector node and performs a time-series index rearrangement of the vector sequence. The T-axis value is obtained by normalizing the sequence index after topological sorting to establish a clear logical chain. In terms of hardware implementation, the system utilizes the GPU's parallel sorting unit, employing radix sort or quicksort algorithms to ensure that thousands of line vectors are strictly reassembled according to the order in which they were drawn. The reassembled sequence not only reflects the static result of the image but also, in the form of a data stream, recreates the author's dynamic thought process from "sketching" to "local detailing" and then to "overall adjustments."

[0114] The system constructs a multidimensional tensor, filling the tensor with the spatial weights (mapped from topological connectivity), temporal order (rearranged sequence numbers), and width feature values ​​(reflecting the strength of the stroke) corresponding to each line according to a preset dimension index. For example, constructing a tensor with dimension... The matrix (where N is the total number of lines and C is the feature channel) stores the position, width, weight and temporal information of each channel.

[0115] To eliminate numerical differences caused by varying artwork resolutions and drawing media (such as hard and soft pencils), the system then performs global normalization. The machine calculates the mean and variance of various metrics within the tensor and uses Z-score normalization or Min-Max scaling operators to map all feature values ​​to a standardized numerical range (e.g., ...). or During the normalization process, the system references preset "technique benchmark parameters," such as setting the average connectivity of professional-grade structural sketches to a normalization reference point of 0.5. This step ensures that subsequent analysis modules have a consistent standard of measurement when comparing different works.

[0116] Finally, the system generates and outputs a parametric image representation matrix containing the distribution of image structure intensity (represented by a spatial weight matrix) and the drawing logic trajectory (represented by a temporal tensor). This matrix is ​​output to a display terminal or storage device via the system bus for subsequent classification models to use.

[0117] By transforming 3D models into parametric matrices, this application achieves efficient compression and accurate representation of holographic data on sketching techniques. Through the construction and global normalization of multidimensional tensors, the system transforms complex artistic expression into standard computer vision language, effectively eliminating environmental noise interference during image acquisition. The generated parametric matrix, by deeply coupling spatial weights with temporal positions, enables the machine to understand the construction logic of the sketch from a "dynamic evolution" perspective, rather than merely focusing on pixel-level contour recognition. This significantly enhances the objectivity of the system's evaluation of the intrinsic quality of sketches, providing a physically supported and logically interpretable data core for advanced applications such as automated teaching assistance and art style identification.

[0118] The following is a specific example of a sketch image analysis and classification system based on line structure modeling:

[0119] A digital teaching platform at an art college has introduced a sketch image analysis and classification system based on line structure modeling to perform in-depth analysis of students' submitted human anatomy sketches. When a student uploads a pencil sketch with a resolution of 300 DPI, the system converts it into an 8-bit grayscale matrix (4096×3072 pixels) using a high-resolution scanning device.

[0120] The data acquisition module uses the Canny edge detection operator (high threshold 180, low threshold 60) to locate pixel gradient change areas, and generates a single-pixel width line skeleton using the Zhang-Suen thinning algorithm. Through line tracking and segmentation, the image is decomposed into 1287 continuous line segments. For the sampling points of each line segment, a Gaussian distribution fitting model is used along the normal direction to calculate the width value, ultimately generating an initial line vector set containing a spatial coordinate sequence and line width feature values. Among them, the standard deviation of the width sequence of the longest contour line is 0.12mm, and the width fluctuation coefficient of the shortest texture line reaches 0.45.

[0121] The semantic classification module iterates through all line vectors and calculates the width gradient change rate using first-order difference. Statistics show that 62% of the lines in the image have a width gradient change rate below the threshold. =0.25, of which 38% of the lines have a spatial distribution density below the spatial distribution density threshold. =0.45, marked as "outline"; 24% of the lines have a density higher than the spatial distribution density threshold. =0.45, classified as a "construction line". Additionally, 27% of the lines have a width gradient rate of change higher than the width gradient rate of change threshold. =0.25 and the density shows a gradient distribution, which is identified as "light and dark lines"; the remaining 11% of the lines have a width extreme value switching frequency of 5 times / unit length within a 10mm length and an irregular spatial distribution, which is marked as "texture lines".

[0122] The network construction module abstracts each marked line as a graph theory node and calculates the minimum Euclidean distance between line pairs. For straight line segments with curvature less than 0.05, the point-to-line segment distance formula is used for fast calculation; for curve segments with curvature greater than 0.3, a spatial hash partitioning algorithm is used to lock candidate point pairs. A third preset threshold is set. =2.0mm, and finally a 1287×1287 dimension topological network matrix is ​​constructed, in which the average connectivity of contour line nodes is 8.7 and the average connectivity of light and dark line nodes is 3.2.

[0123] The temporal reconstruction module locates 1568 connection points marked as "intersecting" in the localization matrix, and then traces back to the original pixel grayscale matrix to extract pixel information in the intersection region. The average grayscale value of the intersection region is then calculated. Average gray value of the area where the two lines do not intersect , The difference is used to obtain the pixel grayscale superposition weight. For example, in the hip joint crossing area on the left side of the image, the calculation is... =12.7, which is greater than the fourth preset threshold γ=10.0, therefore the second line is determined to cover the first line; in the right clavicle intersection area, = -8.3, determining that the first line covers the second line. Based on the covering relationship, a directed graph is constructed, and the line drawing order is deduced using the Kahn algorithm, generating line generation sequence information containing temporal indices. The temporal value of the earliest drawn contour line is 0.02, and the temporal value of the last drawn texture line is 0.97.

[0124] The model transformation module initiates a multi-dimensional quantization analysis operator to process three feature branches in parallel:

[0125] The first branch calculates the second difference of the line coordinate sequence, and obtains the average curvature of the entire line as 0.18 and the curvature variance as 0.09. The distribution of line length is statistically analyzed, with long lines (>100mm) accounting for 22%, medium lines (30-100mm) accounting for 57%, and short lines (<30mm) accounting for 21%, forming a geometric feature group.

[0126] The second branch performs graph theory analysis on the topological network matrix. The node degree distribution exhibits power-law characteristics (γ=2.3), the average clustering coefficient is 0.42, and the average path length is 4.8, forming a topological feature group.

[0127] The third branch analyzes the line generation sequence and divides the drawing process into four stages (drafting, shaping, deepening, and adjustment) based on the time-series index breakpoints; it also counts the repeated coverage trajectories of local spatial regions, with a backtracking frequency feature of 0.15, forming a time-series feature group.

[0128] The system employs Principal Component Analysis (PCA) to reduce the dimensionality of the three sets of features, retaining 95% of the information entropy. Feature weights are learned using gradient descent (geometric feature weight 0.35, topological feature weight 0.40, temporal feature weight 0.25). The line generation sequence is mapped to a time-dimensional coordinate T (normalized to the [0,1] interval), and fused with spatial coordinates (X,Y) to construct a three-dimensional coordinate system. The spatial support weights of the lines are calculated using topological connectivity (contour line weight range 0.7-1.0, light and dark line weight range 0.2-0.5), and mapped to vector magnitudes, ultimately generating three-dimensional structured vector model data.

[0129] The output module rearranges the vector sequence according to the temporal index, filling the spatial weight, temporal position, and width feature value of each line into a 4×1287-dimensional tensor. Global normalization is performed, mapping the feature values ​​to the [0,1] interval to generate a parametric image representation matrix. Matrix data shows that the center of gravity of the image's structural intensity distribution is concentrated in the torso region (mean weight 0.68), and the drawing logic trajectory exhibits an evolutionary characteristic "from the whole to the part" (stage temporal percentage: initial draft 15%, finalization 35%, refinement 30%, adjustment 20%).

[0130] This embodiment demonstrates the complete application process of the system in an art education scenario. Through the synergistic effect of line semantic classification, topological network construction, and temporal sequence reconstruction, it achieves in-depth analysis from pixel-level data to creative logic, providing objective and quantitative technical evaluation criteria for sketching teaching, and assisting students in accurately grasping the drawing rules of human body structure and line application skills.

[0131] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A sketch image analysis and classification system based on line structure modeling, characterized in that, include: The data acquisition module is used to acquire the pixel grayscale matrix of the image to be processed, extract continuous line features through edge detection and thinning processing, and convert the pixel grayscale matrix into an initial line vector set containing a spatial coordinate sequence and line width feature values. The semantic classification module is used to calculate the width gradient change rate and spatial distribution density of each line in the initial line vector set, and to perform attribute labeling on the lines according to preset functional attribute rules to generate a semantic line dataset containing functional attribute labels; wherein, the attribute labeling of the lines according to preset functional attribute rules specifically involves: judging the relationship between the width gradient change rate and spatial distribution density and the corresponding threshold, and then labeling the lines according to their attributes. The network construction module is used to retrieve the semantic line dataset, and construct a topological association network matrix reflecting the connection relationship between lines by calculating the spatial distance between adjacent lines, with each line as a node. The temporal reconstruction module is used to parse the intersection nodes in the topological network matrix and extract the pixel grayscale superposition weights of the intersection regions. The formula is as follows: ; in, The set of grayscale values ​​of the first pixel belonging to the first line; The set of grayscale values ​​of the second pixel belonging to the second line; The first pixel grayscale set With the second pixel grayscale set The average gray value of pixels in the intersection; and The first pixel grayscale set and the second pixel grayscale set The average grayscale value of the middle pixel; The grayscale evolution model identifies the overlapping and occlusion relationships between lines. The input of the grayscale evolution model is the grayscale distribution features of the intersection area, and the output is three types of overlapping relationships, including: front covering back, back covering front, and simultaneous drawing. A directed graph is constructed based on the coverage relationship, and the drawing order sequence of the lines is derived through the topological sorting algorithm to generate the line generation sequence information; The model conversion module is used to perform feature fusion by taking the initial line vector set, the topological correlation network matrix and the line generation sequence information as joint inputs to generate three-dimensional structured vector model data representing the sketch image; The output module is used to reconstruct and output a parameterized image representation matrix containing line temporal logic and spatial weights based on the three-dimensional structured vector model data.

2. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The specific steps for extracting continuous line features through edge detection and thinning processing, and converting the pixel grayscale matrix into an initial line vector set containing spatial coordinate sequences and line width feature values, include: An edge detection algorithm is performed on the pixel grayscale matrix to obtain a set of edge pixels; A morphological thinning operation is performed on the edge pixel set to obtain a skeleton line with a single pixel width; Based on the skeleton lines, line tracing and segmentation are performed to form multiple continuous line segments; For each line segment, scan the original pixel grayscale matrix along its normal direction, calculate the line width value at each sampling point, and generate a sequence of width values. The spatial coordinate sequence of the line segment and the corresponding width value sequence are packaged to form the line vector in the initial line vector set.

3. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The specific steps for calculating the width gradient change rate and spatial distribution density of each line in the initial line vector set are as follows: For each line in the initial line vector set, the first-order difference of the width value between adjacent sampling points is calculated along the coordinate sequence of each line, and the proportion of the absolute value of the difference exceeding the first preset threshold is used as the width gradient change rate. Centered on the current line, calculate the ratio of the total length of all other lines in a circular neighborhood with a preset radius to the area of ​​the neighborhood, and use this ratio as the spatial distribution density; The width gradient change rate and the spatial distribution density are combined into a two-dimensional feature vector, and the input is based on a preset width gradient change rate threshold. and spatial distribution density threshold The constructed functional attribute rules are matched, and the corresponding functional attribute tags are output.

4. The sketch image analysis and classification system based on line structure modeling according to claim 3, characterized in that, In the process of assigning attribute labels to the lines according to preset functional attribute rules, the functional attribute rules are defined by the following mapping relationship: When the width gradient change rate is lower than the width gradient change rate threshold And the spatial distribution density is lower than the spatial distribution density threshold. When outputting the outline label; When the width gradient change rate is lower than the width gradient change rate threshold And the spatial distribution density is higher than the spatial distribution density threshold. When the time comes, output the construction line label; When the width gradient change rate is higher than the width gradient change rate threshold Furthermore, when the spatial distribution density exhibits a gradient change, light and dark line labels are output; When the frequency of switching between positive and negative extreme values ​​of the width gradient change rate within a preset unit length is greater than a second preset threshold and the spatial distribution density exhibits irregular clustering, a textured line label is output.

5. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The specific steps for constructing a topological network matrix that reflects the connection relationships between lines are as follows: Iterate through all line pairs in the semantic line dataset; For each pair of lines, calculate the Euclidean distance between all pairs of coordinate points on the two lines, and take the minimum value as the minimum spatial distance of the line pair. If the minimum spatial distance is less than the third preset threshold, then the corresponding row and column position in the topological association network matrix is ​​set to 1, indicating that there is a connection relationship; otherwise, it is set to 0.

6. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The specific steps for identifying the overlapping and occlusion relationships between lines using a pre-trained grayscale evolution model include: If the pixel grayscale superposition weight If the value is greater than the fourth preset threshold, then the second line is determined to cover the first line; If the pixel grayscale superposition weight If the negative value is less than the fourth preset threshold, it is determined that the first line covers the second line; If the pixel grayscale superposition weight If the absolute value is less than or equal to the fourth preset threshold, then the two lines are determined to be drawn simultaneously or to be at the same drawing level.

7. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The initial line vector set, the topological correlation network matrix, and the line generation sequence information are used as joint inputs for feature fusion. Specifically, feature fusion is performed using a multi-dimensional quantization analysis operator, including the following parallel processing branches: The initial set of line vectors is analyzed, the second difference of the coordinate sequence of each line vector is calculated to obtain curvature statistical features, and the length distribution of all line vectors is statistically analyzed to form the first feature group; Graph theory analysis is performed on the topological network matrix. The degree distribution characteristics of nodes are obtained by statistically analyzing the number of connections of each node. The clustering coefficient is calculated based on the proportion of closed triangle structures between adjacent nodes. The average path length characteristics are calculated using the shortest path algorithm to form the second feature group. The line generation sequence information is parsed, and cluster analysis is performed based on the breakpoints of the time index to realize the division of the drawing stage. The number of backtracking features is statistically analyzed by identifying the repeated coverage trajectory of the time coordinate in the same local spatial region, and a third feature group is formed. The first feature group, the second feature group, and the third feature group are subjected to dimensionality reduction and weight learning to generate the three-dimensional structured vector model data.

8. The sketch image analysis and classification system based on line structure modeling according to claim 7, characterized in that, Generating 3D structured vector model data representing a sketch image specifically includes the following steps: The line generation sequence is used as the time dimension coordinate T, and the spatial coordinates of the line vector are used as the coordinates. A three-dimensional coordinate system is constructed by fusion; The spatial support weights of lines are calculated using the connectivity of the topological network matrix, and the spatial support weights are mapped to the magnitude of vectors to generate the three-dimensional structured vector model data with spatiotemporal logic.

9. The sketch image analysis and classification system based on line structure modeling according to claim 1, characterized in that, The output is a parameterized image representation matrix containing line temporal logic and spatial weights. Specific steps include: The three-dimensional structured vector model data is parsed, the vector sequence is rearranged according to the temporal index, and the spatial weight, temporal position and width feature value of each line are filled into the multidimensional tensor. Perform global normalization processing to generate and output a parameterized matrix that reflects the intensity distribution of the image structure and the drawing logic trajectory.