These folders contain the result images and data used in the paper Co-Dithering for Jacquard Knitting, as well as the script we used to turn them into knits. The latest version of these materials is available at https://github.com/textiles-lab/knit-dithering-supplement .
More information below.
LICENSE: Copyright © 2025 James McCann ([email protected]) and Yue Xu ([email protected]). You are free to use this code for research, hobby, and other non-commercial purposes; as long as attribution is given. For a commercial use license, please contact the authors.
This script produces a knitout file for co-dithered double-sided Jacquard. To use the script:
$ node knit-jacquard.js <dithered-front.png> <dithered-back.png> (optional)--bindoff
Note that the calls to addCar() specify the current yarn carrier setup on the knitting machine; you may need to edit as you swap new yarn colors in to run certain results.
This should work on any pair of X-f.png and X-b.png images in the result/ folder.
The image table_*.svg files include the co-dithered result of all pairs of front and back images from our testing set, at four sizes. The images of size S, M, L, X are 60, 120, 240, 480 pixels wide. To read the tables, each row has the same target front image, and each column has the same target back image. The tables are divided into halves, with the left half showing the dithered front, and the right half showing the dithered back.
We recommend viewing these files in Inkscape because it has good pan and zoom controls.
These svg files are not standalone. They reference image files in result/images/.
These are the raw result images. Note that these images have one pixel per stitch, which means they should be viewed with a pixel aspect ratio of about 1.1 . (To display these images in the paper without interpolation artifacts we transformed each pixel into an 11x10 rectangle of constant color; the images here are the raw, untransformed versions.)
The *-in-*.png are the input images. Paintings are from van Gogh and Monet. We did not include cm2 or portrait in the paper but we include them here for your enjoyment.
The in-*.png are the input images, the other images are named by the cost function used to select yarns and dither them.
Images are paintings by van Gogh.
The in-[fb].png are the input images. The out-[fb]-nodiff.png images are outputs made without error diffusion. The out-[fb]-diff.png images are outputs made with error diffusion.
The in-*.png are the input images, the other images are named by the use-within window size, U, used. u0-*.png are the versions with no use limit. u14* does not appear in the paper owing to space constraints, but is included here as a bonus.
The *-in-[fb].png images are inputs. The *-u0-[fb].png images are outputs with no use-within constraint. The *-u9-[fb].png images are outputs with use-within window U = 9.
(If you knit the u0 results, be aware that having no use-within constraint tends to lead to yarn breaks.)
The in-*.png are the input images, the other images are named by the crossing-within window size, X, used. x0-*.png are the versions with no crossing limit. x20* and x28* do not appear in the paper owing to space constraints, but are included here as a bonus.
The in-[fb].png images are the input. yN-*.png use N yarns. y*-u0-x0-[fb].png images were dithered without any constraints. y*-u9-x24-[fb].png are dithered with knitting constraints.
Many pairs of dithered images at different sizes. Images named *-[SMLX].png are input images, images named *-*-[SMLX].png are outputs. The image_table_[SMLX].svg files (siblings of this README) are probably a better way to view these results than scrolling through a directory of images.
Some images from https://sipi.usc.edu/database/database.php?volume=misc .
The in-[SMLX]-[fb].png images are the inputs to our dithering program. The [SMLX]-u9-[fb].png images are the outputs.
The L-sized results also appear in Figure 1.
Images are wood block prints designed by Hokusai.
These patterns were hand-authored, and are not a result of our dithering algorithm.
This is the raw data used to compute our timing figures. Each row represents one co-dithering run. Description of the columns:
- 'single thread' is '1' if the result was run single-threaded and '0' if the result was run over multiple cores.
- 'bn' is the image pair that was dithered -- our algorithm isn't sensitive to image contents so we just ran a few pairs for variety.
- 'y' is the number of yarns used.
- 'u' is the use-within window size.
- 'x' is the cross-within window size.
- 'width' is the width of the interleaved image (so 2x the fabric width).
- 'height' is the height of the interleaved image (same as fabric height).
- 'total time' is the total program runtime in ms. (Timed externally to the program; includes startup and shutdown time.)
- 'table time' is the time, in ms, to precompute the transition table.
- 'dither time' is the time, in ms, to run the dynamic programming using the precomputed transition table.
Among our images we include several famous paintings and prints from the public domain. Here we attach their information and sources.
-
"The Japanese Footbridge and the Water Lily Pool, Giverny", by Claude Monet from https://commons.wikimedia.org/wiki/File:Claude_Monet,_French_-_The_Japanese_Footbridge_and_the_Water_Lily_Pool,_Giverny_-_Google_Art_Project.jpg
-
"Water-Lilies, Clouds", 1903, by Claude Monet from https://en.wikipedia.org/wiki/Water_Lilies_(Monet_series)#/media/File:Monet_w1656.jpg
-
"Impression, Sunrise", by Claude Monet from https://en.wikipedia.org/wiki/Impression,_Sunrise#/media/File:Monet_-_Impression,_Sunrise.jpg
-
"Self-Portrait with Grey Felt Hat" and "Sunflowers", by Vincent van Gogh from collection of Van Gogh Museum, Amsterdam (Vincent van Gogh Foundation)
-
"Self-Portrait", by Vincent van Gogh and "Under the Wave off Kanagawa", by Katsushika Hokusai, from collection of The Art Institute of Chicago
-
"South Wind, Clear Sky", by Katsushika Hokusai, from collection of the Metropolitan Museum of Art.