# US 2022/0044456 A1 · Generating vector graphics by processing raster graphics

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0044456 A1
- Document ID: US20220044456A1
- Status: Published application
- Kind: A1
- Application number: 17/500,897
- Filed: 2021-10-13
- Published: 2022-02-10
- Earliest claimed: 2019-08-19
- Assignees: reMarkable AS
- Applicants: Remarkable AS
- Inventors: Martin Tobias Holmedahl Sandsmark; Gunnar Sletta
- Web page: https://patentgrep.com/patent/US20220044456A1

## CPC

- G06T 11/23: using straight lines or curves
- G06F 3/04883: for inputting data by handwriting, e.g. gesture or text
- G06T 2210/56: Particle system, point based geometry or rendering
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment of a disclosed system, method, and computer readable storage medium which includes an algorithm for generating a vector graphic based on a raster graphic input. A tablet scribe system identifies a boundary of a raster graphic image. The boundary is comprised of contrasting pixels in the raster graphic. The system determines a slope for each line segment of the raster graphic boundary. Based on a comparison of the slope for the adjacent line segments, the system generates a contour replaces line segments with equivalent slopes wherein each line segments represents a point on the contour. The system condenses the contour by removing redundant points on the contour based on their position relative to neighboring points and converts the edges of one or more remaining line segments into continuous curves on the contour.

## Claims

### Claim 1

A non-transitory computer readable storage medium comprising stored instructions, which when executed by at least one processor, causes the processor to:
access a graphic outlined by a plurality of contour lines, wherein each contour line of the plurality of contour lines comprises one or more points on a boundary of the graphic;
for each contour line of the plurality of contour lines,
generate a centerline for the contour line;
determine a distance between each point of the contour line and a corresponding point on the centerline;
smoothen a shape of the contour line by adjusting the position of each point on the contour line within a threshold distance of the corresponding point on the centerline to a position of the corresponding point on the centerline; and
replace a pointed edge of the smoothened contour line with a continuous curve to generate a complete contoured representation of the graphic.

### Claim 2 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the graphic comprising the plurality of pixels is a raster graphic, further comprising stored instructions that when executed cause the processor to:
identify a line segment representing a boundary of each pixel of the plurality of pixels representing a contrast between a shaded pixel of the raster graphic and a white pixel of the raster graphic; and
connect each identified line segment to generate a boundary of the raster graphic.

### Claim 3 (depends on 1)

The non-transitory computer readable medium of claim 1, further comprising stored instructions that when executed cause the processor to:
compare a slope of a first neighboring line segment to a slope of a second neighboring line segment to determine a level of similarity, the second neighboring line segment adjacent to the first neighboring line segment;
compare the level of similarity to a threshold level of similarity; and
generate a set of neighboring line segments that includes the first neighboring line segment and the second neighboring line segment in response to the level of similarity exceeding the threshold level of similarity.

### Claim 4 (depends on 3)

The non-transitory computer readable medium of claim 3, further comprising stored instructions that when executed cause the processor to:
generate a first set of neighboring line segments and a second set of neighboring line segments in response to the level of similarity not satisfying the threshold level of similarity, wherein the first set includes the first neighboring line segment and the second set includes the second neighboring line segment; and
generate a first contour line to replace the first set of neighboring line segments and a second contour line to replace the second set of neighboring line segments.

### Claim 5 (depends on 1)

The non-transitory computer readable medium of claim 1, further comprising stored instructions that when executed cause the processor to:
for each contour line of the plurality of contour lines,
identify a set of neighboring points on each contour line positioned in a straight line, the set of neighboring points comprising a start point, an end point, and a plurality of midpoints;
remove the midpoints from the set of neighboring points; and
generate an updated contour line that replaces the start point and the end point.

### Claim 6 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the instructions to replace the pointed edge of each contour line with a continuous curve further comprises instructions that cause the processor to:
identify a line segment of the boundary that has not been replaced with the contour line;
determine a point representative of the identified line segment, a first point on a contour line behind the determined point, and a second point on a contour line ahead of the determined point;
determine a tangent line of the determined point based on the first point and the second point;
generate a first spline control point on the tangent line at a distance proportional to a distance between the first point and the determined point and a second spline control point on the tangent line at a distance proportional to a distance between the second point and the determined point; and
generate a curved representation of the identified line segment by connecting the first spline control point to the first point and the second spline control point to the second point.

### Claim 7

A system for generating a vector graphic, the system comprising:
a pixel data converter configured to access a graphic outlined by a plurality of contour lines, wherein each contour line of the plurality of contour lines comprises one or more points on a boundary of the graphic;
a segment refinement module configured to:
generate a centerline for the contour line;
determine a distance between each point of the contour line and a corresponding point on the centerline;
smoothen a shape of the contour line by adjusting the position of each point on the contour line within a threshold distance of the corresponding point on the centerline to a position of the corresponding point on the centerline; and
replace a pointed edge of the smoothened contour line with a continuous curve to generate a complete contoured representation of the graphic; and
a curve conversion module configured to replace a pointed edge of the smoothened contour line with a continuous curve to generate a complete contoured representation of the graphic.

### Claim 8 (depends on 7)

The system of claim 7, wherein the graphic comprising the plurality of pixels is a raster graphic, the pixel data converter further configured to:
identify a line segment representing a boundary of each pixel of the plurality of pixels representing a contrast between a shaded pixel of the raster graphic and a white pixel of the raster graphic; and
connect each identified line segment to generate a boundary of the raster graphic.

### Claim 9 (depends on 7)

The system of claim 7, wherein the slope detection module is further configured to:
compare a slope of a first neighboring line segment to a slope of a second neighboring line segment to determine a level of similarity, the second neighboring line segment adjacent to the first neighboring line segment;
compare the level of similarity to a threshold level of similarity; and
generate a set of neighboring line segments that includes the first neighboring line segment and the second neighboring line segment in response to the level of similarity exceeding the threshold level of similarity.

### Claim 10 (depends on 7)

The system of claim 7, wherein the slope detection module is further configured to:
generate a first set of neighboring line segments and a second set of neighboring line segments in response to the level of similarity not satisfying the threshold level of similarity, wherein the first set includes the first neighboring line segment and the second set includes the second neighboring line segment; and
generate a first contour line to replace the first set of neighboring line segments and a second contour line to replace the second set of neighboring line segments.

### Claim 11 (depends on 7)

The system of claim 7, wherein the segment refinement module is further configured to:
for each contour line of the plurality of contour lines,
identify a set of neighboring points on each contour line positioned in a straight line, the set of neighboring points comprising a start point, an end point, and a plurality of midpoints;
remove the midpoints from the set of neighboring points; and
generate an updated contour line that replaces the start point and the end point.

### Claim 12 (depends on 7)

The system of claim 7, wherein the curve conversion module is further configured to:
identify a line segment of the boundary that has not been replaced with the contour line;
determine a point representative of the identified line segment, a first point on a contour line behind the determined point, and a second point on a contour line ahead of the determined point;
determine a tangent line of the determined point based on the first point and the second point;
generate a first spline control point on the tangent line at a distance proportional to a distance between the first point and the determined point and a second spline control point on the tangent line at a distance proportional to a distance between the second point and the determined point; and
generate a curved representation of the identified line segment by connecting the first spline control point to the first point and the second spline control point to the second point.

### Claim 13

A method for generating a vector graphic, the method comprising:
generating a boundary of a graphic comprising a plurality of pixels by connecting line segments outlining the graphic, each line segment of the boundary representing a contrast between pixels in the graphic;
determining a slope of each line segment of the boundary;
generating a plurality of contour lines outlining the boundary of the graphic, wherein each contour line replaces a set of neighboring line segments of the boundary with similar slopes such that each replaced neighboring line segment corresponds to a point on the contour line;
for each contour line of the plurality of contour lines,
generating a centerline for the contour line;
determining a distance between each point of the contour line and a corresponding point on the centerline;
smoothen a shape of the contour line by adjusting the position of each point on the contour line within a threshold distance of the corresponding point on the centerline to a position of the corresponding point on the centerline; and
replacing a pointed edge of the smoothened contour line with a continuous curve to generate a complete contoured representation of the graphic.

### Claim 14 (depends on 13)

The method of claim 13, wherein the graphic comprising the plurality of pixels is a raster graphic, the method further comprising:
identifying a line segment representing a boundary of each pixel of the plurality of pixels representing a contrast between a shaded pixel of the raster graphic and a white pixel of the raster graphic; and
connecting each identified line segment to generate a boundary of the raster graphic.

### Claim 15 (depends on 13)

The method of claim 13, wherein generating each contour line of the plurality of contour lines comprises:
comparing a slope of a first neighboring line segment to a slope of a second neighboring line segment to determine a level of similarity, the second neighboring line segment adjacent to the first neighboring line segment;
comparing the level of similarity to a threshold level of similarity; and
generating a set of neighboring line segments that includes the first neighboring line segment and the second neighboring line segment in response to the level of similarity exceeding the threshold level of similarity.

### Claim 16 (depends on 13)

The method of claim 13, further comprising:
for each contour line of the plurality of contour lines,
identifying a set of neighboring points on each contour line positioned in a straight line, the set of neighboring points comprising a start point, an end point, and a plurality of midpoints;
removing the midpoints from the set of neighboring points; and
generating an updated contour line that replaces the start point and the end point.

### Claim 17 (depends on 13)

The method of claim 13, wherein replacing the pointed edge of each contour line with a continuous curve comprises:
identifying a line segment of the boundary that has not been replaced with the contour line;
determining a point representative of the identified line segment, a first point on a contour line behind the determined point, and a second point on a contour line ahead of the determined point;
determining a tangent line of the determined point based on the first point and the second point;
generating a first spline control point on the tangent line at a distance proportional to a distance between the first point and the determined point and a second spline control point on the tangent line at a distance proportional to a distance between the second point and the determined point; and
generating a curved representation of the identified line segment by connecting the first spline control point to the first point and the second spline control point to the second point.
