Software to Divide an Image Into Discrete Patterns
slashyslashy asks: "My preschooler son is fond of color-by-number pages. We have already exhausted most of the online sites that offer somewhat limited sets of coloring pages that he can print to a paper and color. Besides, most of them offer extremely basic (read boring) sets of simple images (flowers, dinosaurs, etc). We were wondering if we can take any regular picture image and convert it into a pattern suitable (divide up the black and white picture into series of random patterns) for color-by-number pages. Is there any good software that allows converting a picture to a pattern suitable for coloring by numbers? Linux is preferable but Windows is also fine. Thank you."
Just goto the 99 cent store and get him some books. Not everything needs to involve a computer
Religion is a gateway psychosis. -- Dave Foley
It's discrete, not discreet.
I don't care what other people think of my patterns. Yeah, that's right, I'll Fourier transform whatever I damn well please. You prudes can go stuff it.
This could be wrong, and it could be like trying to kill an ant with a sledgehammer, but here's a possible approach.
A program like photoshop with lug-ins and image processing / manipulation capabilities may do the job.
Scan an image, and using a combination of options such as color-reduction, "mattisify" (or others, e.g. Bas-Relief, etc), etc... may produce an acceptable result.
Good luck
Sam
...they could see through your Blackman Windows. :-) Just a little signal processing humor. I kill me.
The problem with quotes on the internet, is that nobody bothers to check their veracity. -- Abraham Lincoln
It's easy to write but no one has done it. First take an image and do a histogram for it. Chose the "n" most common colors with certain restrictions of course. Then simply put a number in the center of the region. Also take the gradient of the image and add it, make em black, and then add to the original to find the borders.
----
Go canucks, habs, and sens!
When I was a kid, Dinosaurs were really cool.
God spoke to me.
Open inkscape. Drag image in. Select imported image. Go Path -> Trace bitmap. You'll probably want to use the 'multiple scanning' options. Probably with fewer than the default 8 scans. Select created vectors. Open the fill & stroke dialog and set it to 'no fill' and a plain black stroke.
As always, you'll want to play with parameters to get good results.
Malike Bamiyi wanted my assistance.
The kid could just trace regular porn you print out, and then color it in. Then he would have two different things to do, *and* and he'd be learning what boy and girl parts are for.
-- http://thegirlorthecar.com funny dating game for guys
If you want to save money and have a picture of anything you want, you could draw one for him or encourage him to be creative to make his own. I always liked being creative when I was younger(and I still do).
Fallout 3 will suck.
is the program you want :P that + Illustrator :) This is standard stuff btw in any sort of image process programming, and there are better programs than adobe streamline (new algorithms for image segmentation). In fact, 99.0% sure there is probably already a plugin for Adobe that does your "coloring book" type conversion in one step.
--
Adobe Streamline takes a raster image, and segments it into vector regions of color; you then would open up Illustrator and set all the color regions to black border and invisible center. That should do the trick
There used to be some jigsaw puzzle generators that allowed you to specify basic types of shapes, which might obscure the picture you are "jigsawing" enough to entertain a preschooler.
Search Google for "color by numbers software" http://www.stoik.com/hobby/Color_By_Number/ Is it really that hard?
If you have the macromedia suite and basic knowledge of flash you can. (Not the easiest or cheapest way to go but it works...)
In Macromedia Flash you can Trace Bitmap and it will tranform it to a vector image. Select each color piece, remove the fill and add a stoke color (to give it a border around it.) Add numbers and you are done, happiness!!!
http://imagemagick.org/ is free, runs on most any platform you'd ever case to use, and implements fuzzy c-means for image segmentation (which basically turns regular photos into "coloring book" versions of themselves). the c-means segmentation may be a bit too coarse for what you want to do. in that case, implementing a mean-shift segmenter (google for comaniciu and meer) will probably do a nice job. hope this helps!
First, The Gimp makes something like this pretty easy. Open an image and go to 'Image -> Mode -> Indexed...', select the Generate Optimized Palette, and select the number of colors you want to use (10 might last your son 5 minutes, 200 might last him four years). Turn dithering off and hit OK. Next, go to 'Image -> Mode -> RGB' to switch it back to RGB color, then go to 'Filters -> Artistic -> Cartoon...', tweak the settings (Mask radius=10 and Percent black=1.0 seem to work), and hit OK. With these two, I was able to get a 'completed-looking' color-by-numbers image from a photo in about 10 seconds. The rest is up to you (I would start by selecting by color, getting the black outlines, and copying them into a new layer. Add in numbers and a legend, and you're good to go). If you want to get fancy, you could use some python-jitsu and whip up some script-fu to do it automagically.
Second, you can keep it hardcore and use a program like NIH Image (or its PC counterpart, ScionImage) and use a procedeure called thresholding to get different levels of black and white from an image. The program is scriptable, and if you google around enough (or poke through the sample scripts) you might be able to hack something together pretty easily. I've used this software to track points glued onto soft tissues (ligaments), and if I recall correctly, it was fairly easy to get it to do this sort of thing (i.e., Biomedical Engineering undergrads were able to get it to work). N.B. This is a serious research-level program, so it is not super user-friendly. I also doubt you'll find anything in the help forums if you search for color-by-number. Search instead for thresholding.
The first option is likely to be waaay easier than the second.
It's called Photoshop.
1. image->adjustments->posterize
2. filter->stylize->find edges
3. image->adjustments->desaturate
4. image->adjustments->levels, pull the leftmost triangle all the way to the right
You can skip the first step, but then it'll be reeeeally complex.
You might also want to scale your images up a lot before processing them.
Or you could use autotrace tools like Streamline, or the "LiveTrace" feature built into Illustrator.
Or you could pop up another layer over it and trace the image by hand, then turn off the original image layer and print it out.
Or, yeah, you could just go buy some coloring books, they're reeeeeeally cheap!
egypt urnash minimal art.
This program is supposed to be able to convert photos to color by number pictures, suitable for paint, crayon, etc. I haven't tried it, but it does have a free trial and is $19.95 to buy. http://www.stoik.com/hobby/colorbynumber.htm
I don't know of particular packages, but try searching google for "image segmentation" programs. Most of it would be in scientific papers and such, but some of them usually have demo programs. You could also try searching for "paint by numbers".
m
Wait, I think I found one. http://sharewareconnection.com/color-by-number.ht
Good luck.
I'll add to the parent by pointing out that if you go into Filter->Blur->Selective Gaussian Blur, with radius of 5-10 and Max Delta of around 92-128, before converting to index mode then you will end up with bigger-rounder shapes, like what you normally see in a color-by number. Afterwords, the easiest way to get rid of the color and be left with only the black outline is to go into Image->Colors->Threshold, and slide the left slider almost all the way to the left.
>It's easy to write but no one has done it.
It's actually, both mathematically and computationally, a very difficult problem.
Image Segmentation
I'm sure if you know how to do it, and write a nice paper, those folks will be very interested though..
A tip: most things that are obvious problems that 'no one has done' are actually quite difficult if you think about them for more then 10 seconds.
my password really is 'stinkypants'
Oops, that should have been Layers->Colors->Threshold.
Also I realized that the cartoon filter may be troublesome if one of the indexed colors in your picture is black. Here is an alternate procedure:
* Filter : Blur : Selective Gaussian Blur, with radius of 5-10 and Max Delta of around 16-128 (depending on how textured image is)
* Image : Mode : Index, with Generate Optimum Palette of 5 - 20 colors
* Image : Mode : RGB
* Filters : Edge-Detect : Sobel (vertical and horizontal)
* Layers : Colors : Invert
* Layers : Colors : Threshold, move black slider all the way to the right.
Or the Adobe Element allows contrast search or something similar where it brings up the lines. In Emboss, you can further contrast the image to make it black n white. That should work. If you arent happy with the think boundary lines the elements tool (pretty sure theres something similar in linux) will give you sharp lines that you can contrast more. Of course only certain images will work, not everything.
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
Anyone know how Flashes bitmap to Vector translations work ?
Maybe Illustrator.
Vecotrization seems the way to go.
Wanna fight ? Bend over, stick your head up your ass, and fight for air.
Peter Selinger's Potrace could probably be a good start. He links to a dude who uses Potrace in conjunction with a few other tools to create stained glass. He also links to one of my projects, although he calls it pocopo instead of pacopo. I don't think that pacopo is what you're looking for although it may give you some ideas.
cheers
p
I think what you need is an edge detection algorithm of some kind. Try FILTERS.
Downloaded it and tried it. What is a "Pango" Error? It said something about fonts, too, and promplty crashed. I couldn't get it to open at all.
Willie...
Cheap but not free, like the GIMP. So, let's try what you just did with five thousand dollars worth of software.
Woops, now it's just a cartoon that's already been colored. Well, you get the idea.
Friends don't help friends install M$ junk.
//WR
I would bet that ImageJ would do the job for you.
It is multi-platform, fairly fast and has a number of plugins and macros. If you find a combination of operations that work well, you can save it as a macro that a kid could probably handle on their own.
It is available at http://rsb.info.nih.gov/ij/index.html.
The website is rudimentary, but the program itself is fun to mess with.
Warning: The intelligence of this post may be larger than it appears.
I'm not sure that can be done, but ImageMagick is a set of command line tools that allow you to do amazing things.
But the frst part could be Edge detection, from there you're on your own...
think again
my password really is 'stinkypants'
Last time I looked potrace was used by Inkscape for it's "trace bitmap" feature. I've had success vectorising images by doing "posterise" color (sic) reduction in GIMP, possibly doing some image smoothing too (oilify works quite well for this) - then importing into Inkscape and doing a trace.
HTH
Print the image out faintly, perhaps in grayscale, and let him trace and fill in the image himself. Computers just aren't that good at recognising the boundaries of objects in pictures; a preschooler could probably do a better job than a computer and it'll make it less "boring" for him too...
Software patents delenda est.
The best course would be to use vectorized images, but it can be tedious work drawing elaborate images (which is what you seem to be interested in) and it may not be all that easy to find such images on online.
My suggestion is that you visit some online forum/board where people regularly vectorize images. The only place I know is 4chan. Check the cute, anime wallpapers, and anime threads. There's usually people requesting (and supplying) vectorized images there. Try asking some of the people to send you the vectorized images.
You can always try to start doing some Papercraft. There's some nice stuff on the pepakura section.
If you visit 4chan.org, try to keep an open mind. Or at least, don't visit the other boards (such as "sexy beautiful women" and hentai, and especially not4chan.org).
but why not go Tracing Paper -> Scanner -> Printer
If the original images are starting off on the computer, just put an extra initial Printer stage in there.
Just open any JPEG - reduce the color palette to 16 colors or so, and then emboss the image to get lines. Print and color. I do it for my kids all the time.
Look Grampa has Red hair! Fun times.
>to actually find the edges of an image and determine what colors are in there is a trivial process
bullshit.
>Then, you perform some sort of edge detection.
that simple, eh?
>it's not something there's much demand for
crap.
anyone who disagrees with this is welcome to perform the task without manual adjustments on one nontrivial, standard digital photograph and post the results and their method as a reply.
my password really is 'stinkypants'
You'll find that there are quite a few programs and websites out there that will breakdown an image into areas of certain colors. They work really nicely. You'd just need to convert the cross stitch thread numbers to colors for your pre-schooler.
We are talking royalty free images here of course, correct?
You already have a problem that completely doesn't need to be solved using computers. You might as well go with the enterprise leaders,/ and
Visual Learning Systems (recently bought by Overwatch) http://www.featureanalyst.com/feature_analyst.htm
Definiens http://www.definiens.com/
Hi, I think Gimp can do it. If I remember correctly, there's an option in Gimp to "detect border" in an image, and the resulting new image would be black and white.
I did not use that option often but I think I can come out with the results you want. If you want me to help you more in details please reply to this message.
Have a good day.