ComfyUI Node
kubakub scan to line
A phone photo of a drawing becomes a clean line on the matrix: finds the paper (or use 4 corners), straightens it, removes paper colour, shadows and grain. Pencil keeps the greys, ink gives clean black. Draw on a print of the festival template and the scan lands exactly on it. A batch of photos (drawn animation) is scanned frame by frame.
kubakub scan to line
- photo
- drawing
- line
- projection
- found
- corners
- report
◄width0►
◄height0►
◄linepencil►
◄clean0.50►
◄boost1.00►
◄dots_in_linefalse►
◄corners►
Categorykubakub/2d/sketch
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| photo | IMAGE | Photo(s) of the drawing; the paper should be brighter than the table. | |
| width | INT | 00–16384 | Matrix width (link it from project settings); 0 = the paper's own size. |
| height | INT | 00–16384 | Matrix height; 0 = from the width and the paper's proportions. |
| line | COMBO | pencil | pencil = keep the soft greys of the stroke; ink = clean black and white. |
| clean | FLOAT | 0.500–1 | How much paper grain and faint marks are removed (1 = only strong lines). |
| boost | FLOAT | 1.000.2–4 | Makes light pencil darker (above 1) or keeps it delicate (below 1). |
| dots_in_lineopt | BOOLEAN | false | Off: coloured marker dots (names for regions from sketch) are left out of the line and projection outputs. On: they stay. |
| cornersopt | STRING | Paper corners in the photo (tl tr br bl, pixels) when the automatic search picks the wrong shape. Empty = automatic. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| drawing | IMAGE | The drawing on white, coloured strokes kept. |
| line | MASK | Line strength 0..1 (for regions from sketch and line overlay). |
| projection | IMAGE | White lines on black: ready to project as they are. |
| found | IMAGE | The photo with the paper outline that was used. |
| corners | STRING | The corners used (copy them into 'corners' to fix them). |
| report | STRING | One line per photo: how the paper was found, its size in the photo (pixels), the size it was straightened to and the corners used. |