Step 3: Reduce the Number of Colors, Check Out Your Palette

Using CorelPhotoPaint or similar program, you can reduce the number of colors in the image.  Use the 'Image->Convert to Paletted' command.  I tried this in Paint.net with Posterize, but it resulted in WAY too many colors.  The CorelPhotoPaint works well, and I'm sure this can be done in photoshop.

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.

Absolutely amazing! I hope you'll update when the quilt is finished, I know it will be gorgeous - that is the perfect flower to make a quilt out of. <br /> <br />I'm saving this to my favorites - I've always wanted to make a photo quilt. :D
<p>Hey, the create_quilt.py file is essentially empty (only 20 bytes long). What happened to the full program?</p>
Oh boy, good question. It should be a whole program, I'm not sure what happened to it. I'll check when I get home to see if I have it still.<br><br>
No, nevermind. I saw the newer zip file available in a later step, and was able to download that no problem. Thanks a lot for replying though!
<p>Oh, great. I'll just remove this file to avoid confusion.</p>
<p>I have a quick question if you're still checking this out from time to time. I am having a problem with the palette.jpg because I have it down to 30 colors but the palette is only showing 25 of them. I attached the image here so that you could see, just in case I'm missing something obvious.</p><p>Also, thanks so much for doing this, it's a huge help!</p>
<p>Oops! You are absolutely correct! The palette.jpg.xxx.jpg files for each separate palette color are generated correctly, but the palette.jpg does not contain all of the squares.</p><p>The fix is a 2 line change in the create_quilt.py file: </p><p>Change the line<br>from math import sqrt, pow<br>to<br>from math import sqrt, pow, ceil</p><p>and<br>rows = int(sqrt(num_colors))<br>to<br>rows = int(ceil(sqrt(num_colors)))</p>
<p>Thanks so much! Now to just get started collecting the fabrics for this FF VII quilt. </p>
can someone send me a step by step method on what to do and what to download , and where. duh . would really like to do a wedding quilt but can not figure this photographic quilt program
Okay, on step 4 or so, now there is a 'create_quilt.zip' file that contains a stand alone executable file that will run the program. No need to install python or PIL. It's windows only for now. If you need to run on a mac, let me know, and I can do the same thing for the mac. <br> <br>-Caleb <br>
Hi there, <br> The program is not a 'point-and-click' simple program. You do have to go through the steps detailed in the instructable up to step 3 yourself, which includes choosing the image, reducing the resolution, and reducing the colors down to something manageable, like 30 colors. <br> <br>I assume that you have done that. The next step is running the program. Oopsie! Looks like the 'create_quilt.py' file is broken. I need to re-upload it. Unfortunately, it's at home, so I'll have to do it tonight. <br> <br>If you already have an image ready for 'quiltifying', you can send me a message and I'll run the program for you. <br> <br>-Caleb <br>
I cant wait to see more of this quilt! and make my own:)
It's coming along! About 30% done :-)
Hey Caleb and Errica, <br> <br>It's pretty amazing that you've figured out how to program &amp; do the process. Errica your quilt is going to be show-worthy. It's really starting to take shape. More! Show us another ujpdate. <br> <br>Caleb. I want my own program!! Can you get it to me via your dad?
Hi FufuMa, <br>Thank you!! I just went to the fabric store with the photo swatches that mostly match my big print out of the whole flower. You can see what I'm working off of to the left of the quilt blocks. I made sure that they fit what the computer was aiming for by looking at both the &quot;map&quot; and the real photo. I also picked what I liked together and changed the background that was mostly black to dark greens and blues. I also went with all batiks because they flow nicely together and each one has more than one color. The big block of mustardy yellow is going to be ripped out and replaced with a batik.
Hi fufu, <br> Programming is kinda my thang. :-) Anyway, here's another sneak preview. Also, I'll see if I can package the program in an easy way that you could use. <br><br>
Wowie Kazowie!! Errica, it's gorgeous!! Were you able to select exactly 30 colors, or did you have to select several of a color to allow for fudge factor ... or does Caleb;s program give a result that's true to color? Fabric stores don't print RGB values on fabrics,so how do you gauge a fabric color to the RGB values?? Color wheel? Use colors as the printer sees them? Would love to know the answer to that. <br> <br>Errica what is the finished size? And Caleb, does your program allow the user to plug in finished size &amp;the work backwards from there to choose size of individual blocks? How do you control block size if you want a specific sized quilt? So many questions ... <br> <br>The result is veryvery implressive!
Ya, looks to be shaping up really well so far. I think she's something like 1/20th done already :-) <br>

About This Instructable




More by ccrome:Macro Photography Robot for about $15 30 Minute Jolly Roger Sharp Drive/Pinch Wheel for Type A Machines 2014 Series 1 Beta 3d pinter 
Add instructable to: