Raster Scan Image Vectorization Using Single-Pass Line Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing raster-to-vector algorithms face inefficiencies when processing large images, requiring multiple random accesses to source data, leading to increased memory usage and processing time, especially when images are too large to fit in memory.

Innovation Solution

The method processes raster scan images line by line, storing only two scanlines of data in memory and creating vectors simultaneously, allowing for efficient detection and storage of edges without repeated data access, thereby reducing memory footprint and processing time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If the entire image is loaded into memory for random-access processing, then processing flexibility is improved, but memory usage increases significantly

Engineering Contradiction:
Improveprocessing flexibilityVSAvoidmemory usage
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The image is divided into scanlines that are processed sequentially. Only the current scanline and previous scanline data are loaded into memory at any given time, rather than loading the entire image. This segmentation allows random-access processing capabilities to be maintained within the constrained memory footprint of individual scanlines.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If the image is split into tiles for processing, then memory usage is reduced, but processing time increases due to multiple passes and stitching

Engineering Contradiction:
Improvememory usageVSAvoidprocessing time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The algorithm processes scanlines continuously in a single pass from top to bottom of the image. Vector construction begins on the first scanline and continues uninterrupted through subsequent scanlines, eliminating the need to stop, save intermediate results, load new tiles, and stitch vectors together. This continuous processing maintains low memory usage while avoiding the time penalty of multiple passes.

Inventive Principle:
Principle #20Continuity of useful action

3Manufacturing precision

If multiple random accesses are performed on large images, then vector accuracy is improved, but processing time increases significantly

Engineering Contradiction:
Improvevector accuracyVSAvoidprocessing time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The algorithm performs preliminary actions by maintaining an active vector stack that stores incomplete vectors as scanlines are processed. When a vector is completed (closed), it is immediately finalized and stored. This preliminary construction of vectors during the single scanline-by-scanline pass eliminates the need for subsequent random-access passes to complete vector construction, maintaining accuracy while reducing processing time.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8731309B1Method and system for processing raster scan images
Publication Date: 2014.05.20 NV5 GEOSPATIAL SOLUTIONS INC
  • US8731309B1 patent drawing
  • US8731309B1 patent drawing
  • US8731309B1 patent drawing

AI summary

A method of converting a raster scan image to a vector-based image including (a) reading a scanline of a raster scan image containing n pixels per scanline; (b) classifying n+1 groupings of four adjacent pixels within the scanline using only the four adjacent pixel values; (c) assigning to each grouping (x,y), for all groupings in the scanline, plural vectors based on (1) the classification of the grouping (x,y) and (2) vectors assigned to a grouping (x−1,y) and vectors assigned to a grouping (x, y−1); (d) adding a point (x,y) to at least one vector assigned to the grouping (x,y) when the classification of grouping (x,y) indicates that the point (x,y) corresponds to a corner; (e) determining whether the points added to any vector form a closed loop; (f) writing out the points added to any vector that form a closed loop; and (g) repeating steps (a)-(f) for all of the scanlines of the raster scan image.