sketchkit.vectorization.LineDrawer package

Subpackages

Submodules

sketchkit.vectorization.LineDrawer.Line_Drawer module

class sketchkit.vectorization.LineDrawer.Line_Drawer.LineDrawer(method: str = 'CNNVE', device: str = 'cuda')[source]

Bases: object

Native LineDrawer integration that mirrors the structure of other vectorizers.

_convert_to_sketch(merge_dic: dict, height: int, width: int) Sketch[source]

Convert the CNNVE output dictionary to a Sketch object.

run(img: ndarray) Sketch[source]

Vectorize the provided numpy image.

Parameters:

img (np.ndarray) – Input image as a 2D numpy array (grayscale).

Returns:

The vectorized sketch.

Return type:

Sketch

Module contents

class sketchkit.vectorization.LineDrawer.LineDrawer(method: str = 'CNNVE', device: str = 'cuda')[source]

Bases: object

Native LineDrawer integration that mirrors the structure of other vectorizers.

_convert_to_sketch(merge_dic: dict, height: int, width: int) Sketch[source]

Convert the CNNVE output dictionary to a Sketch object.

run(img: ndarray) Sketch[source]

Vectorize the provided numpy image.

Parameters:

img (np.ndarray) – Input image as a 2D numpy array (grayscale).

Returns:

The vectorized sketch.

Return type:

Sketch