This instructable will take you from a photograph to a sophisticated, collated quilt pattern. In this instructable, we'll just go as far as creating the pattern. We'll photograph the progress of the quilt and post another instructable when it's complete. Errica [sic] has already done a few squares and you can really see how well it's going to come together!
- CoelPhotoPaint or another bitmap manipulation program. (I didn't have much luck with Paint.net, but you can give it a try!)
- The Python script included in this instructable.
Step 1: Select an Image
Take lots of photos. Make the close up, and make sure your background looks good. Here is a quick sample of the photos we took!
Step 2: Reduce the Resolution
Reduce the number of pixels. Be careful! A small change in resolution makes for a LOT more work: 10x10 = 100 squares, 20x20=400 squares, 40x40=1600 squares! A LOT of work to be sure.
Errica [sic] went bonkers and went for this image you see here, which is 39 x 47 = 1833 separate quilt pieces!
From this point on, be sure to save your images in .BMP format so that you don't loose any color information in encoding or decoding.
To reduce the number of pixels in the image, you choose Image->Resample. Be sure to change measurements to pixels, and specify around 40 pixel resolution. See photo for an example.
Step 3: Reduce the Number of Colors, Check Out Your Palette
I choose the settings shown in the image. Basically, play with it until you get something you like. I ended up with 30 colors.
Here's the output of the color count:
$ ./count_colors.py 01-flower4-reduced_pixel_count.bmp 02-flower4-reduced_colors.bmp
There are 1827 colors in this image, and 1833 pixels:
There are 30 colors in this image, and 1833 pixels:
So, we reduced the image from 1827 colors to 30 colors! This is a good thing ;-)
Check out your palette for any colors that are too close to one-another. If any are very close, you can keep reducing the color count.
Step 4: Run This Program That Creates the Quilt!
The attached program called create_quilt.py requires python with the Python Image Library.
You simply run the create_quilt.py program from your command line. If you are actually going to create one of these quilts and you don't have any clue how to run python or programs, just shoot me a message and run the program for you to create your palette and quilt pattern. If many people want to do it, I'll just stick it on a web page somewhere.
# create_quilt.py my_reduced_pixel_filename.bmp
and the follwoing files will be created:
The next couple of steps will describe each of those output files.
[UPDATE May 31, 2013: Added the create_quilt.zip file that contains the python script, as well as a stand alone windows executable for running the program.]
Step 5: Palette
Each square is labeled in a "A, B" format. A is the index of the color, B is the number of square of that color required. In this example, the top left is a light pink, and it says, "0, 36". That means that the color index is '0', and there are 36 of these squares needed. As you go across the image, you see that the color index simply increments by one each square. (Sorry I started the quilt indices at 0, not one, which often confuses non programmers... oh well. Just remember that '0' is a number ;-) )
Step 6: Quilt.png
The outsides of the pattern simply have the rows and columns numbered, and the number inside each quilt block represents the color index from your palette. Building your quilt is 'simply' quilting by number :-)
Step 7: Color_list.txt
# count RGB
0 36 [246, 215, 226]
1 62 [243, 143, 176]
2 65 [240, 111, 146]
3 55 [218, 157, 159]
The format is simply 'index count RGB color'. You can use this if you like, but really the previous photos are all that's required.
Step 8: Pick Your Fabrics
This is the end of the beginning. We'll keep you updated as the quilt progresses!
Stay tuned for instructable #2, where my wife actually builds the quilt. I only did the programming & helped with image selection, so my work here is done.
Step 9: Sneak Preview
Again, I'd be happy to run the little program for anybody that needs me to.