Fill-to-Stroke Conversion for Recovering Line Weight and Centerlines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Converting stroked paths to fills in graphics files results in the loss of essential features such as the shape of the original center line and line width, making them unusable for applications like cutter guides or automated software recognition.
Innovation Solution
A method to convert filled shapes back to stroked paths by defining outlines, identifying parallel segments, determining line weight, and reconstructing center lines and stroke properties using algorithms like Voronoi partitioning and parallel line segments, ensuring accurate reproduction of original stroke characteristics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Shape
If stroked paths are converted to fills, then the fill shape can be created, but the original stroke features (center line shape and line width) are lost
Solution Approach 1:
The patent inverts the conventional stroke-to-fill conversion process by implementing a fill-to-stroke conversion system. Instead of losing stroke information during conversion, the system analyzes the filled shape's outline to identify parallel segments, calculates their distances to determine line width, and reconstructs the original center line path, thereby recovering stroke features that would otherwise be lost
Solution Approach 2:
The patent applies preliminary action by first identifying and analyzing parallel segments in the filled shape outline before attempting to reconstruct the stroke. The system pre-processes the outline data to extract geometric relationships, calculates distances between parallel segments to determine line width, and prepares center line information before final stroke reconstruction, ensuring accurate recovery of stroke features
2Measurement precision
If parallel segments are identified with high precision, then accurate line weight can be determined, but the complexity of the conversion algorithm increases
Solution Approach 1:
The patent applies segmentation by dividing the filled shape outline into multiple line segments and then identifying parallel pairs among these segments. The system calculates distances between each parallel pair to determine line width, processes segments individually rather than treating the entire outline as a single entity, and reconstructs the stroke by connecting center lines of identified parallel segments
Solution Approach 2:
The patent uses parameter changes by analyzing the geometric parameters of the filled shape outline, specifically the distances between parallel segments. The system calculates these distances to determine line width, uses angular parameters to identify parallel relationships, and transforms the filled shape representation into stroke parameters (center line, line width, cap style, join style) through parameter analysis and transformation
3Reliability
If all parallel pairs of segments are processed, then complete stroke reconstruction is achieved, but the processing time increases
Solution Approach 1:
The patent applies extraction by identifying and extracting only the relevant parallel segment pairs from the filled shape outline that are necessary for stroke reconstruction. The system extracts center line information from parallel segments, determines line width from distances between specific parallel pairs, and extracts cap and join style information from endpoint configurations, processing only the essential geometric relationships rather than all possible segment combinations
Data Source
Figure 1~2D
Figure 3
Figure 4A~4E
AI summary
A computer-implemented method for defining a stroke. The method includes defining an outline of the filled shape, defining parallel segments in the defined outline, and converting Bézier segments in the defined outline to an approximation with straight line segments. Parallel pairs of segments are identified, with a most prevalent distance between the identified parallel pairs being identified as a line weight. End-cap-defining segments are identified as parallel segments having only non-parallel segments between them. A center line of the segment pair is then identified as the end-cap location. Center lines of remaining non-end-cap-defining segments are connected to one another, and neighboring segments and their respective center lines are also connected. Center lines are classified as finished or non-finished. Pairs of unfinished segments and their respective center lines are connected, and colinear segments merged. The connected center lines are then converted to an output path defined by a stroke.