sketchkit.ordering.LineDrawer package

Subpackages

Module contents

class sketchkit.ordering.LineDrawer.LineDrawer(method='CNNVE', device='cpu')[source]

Bases: Orderer

Implementation of LineDrawer: Stroke-Level Process Reconstruction of Complex Line Art Based on Human Perception.

This method uses a reference video to recover the drawing order of a vector sketch by matching static vector strokes to the video frames where they first appear.

run(img: ndarray, ref_video_path: str) Sketch[source]

Run LineDrawer to determine the drawing order using the reference video.

Parameters:
  • img – numpy array of the sketch image (grayscale).

  • ref_video_path – Path to the reference video file.

Returns:

A Sketch object with ordered paths, where the order of paths corresponds to the drawing sequence.

Return type:

Sketch