Slashdot Mirror


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."

30 of 109 comments (clear)

  1. Jesus H Christ by Monkelectric · · Score: 5, Insightful

    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

    1. Re:Jesus H Christ by bcat24 · · Score: 4, Interesting

      This is Slashdot, a geek site. Of course the submitter could just go to the store and buy some books, but where's the fun in that? Maybe just wants to see if it's possible to do it himself.

    2. Re:Jesus H Christ by CastrTroy · · Score: 2, Interesting

      Yeah seriously. You could probably get a book of 100 pages for around $1.00. That's cheaper than printing out the pages on even a laser printer, not even talk about the cost of inkjet printers. Not to mention that it's a lot easier to just pick up a book that's already there then go print something from the computer every time. Although I think the computer would be nice, as it could be used for whichever images he wanted. On a completely unrelated note, he could even encourage him to draw some of his own pictures. I've heard that coloring books are to blame for a lot of kids' poor drawing and lack of art skills. We only ever learn to fill in lines that were already drawn for us. If we never try to draw anything for ourselves, we will never be able to draw anything. Kids will be just as happy with a blank sheet of paper and some crayons as they will with some fancy coloring book. And they'll be much better off because they will be learning a useful skill. Instead of learning to fill in predrawn images with color.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    3. Re:Jesus H Christ by Anonymous Coward · · Score: 2, Insightful

      Are those books going to have personal pictures? You know, something a little extra that the family can have fun with. No? That's what I thought.

      Fucking asshole.

  2. Could you at least spell-check the title? by ptbarnett · · Score: 4, Informative

    It's discrete, not discreet.

    1. Re:Could you at least spell-check the title? by bcat24 · · Score: 2, Funny

      Eye halve a spelling chequer,
      It came with my pea sea,
      It plainly marques four my revue
      Miss steaks eye kin knot sea.

      Eye strike a key and type a word
      And weight four it two say
      Weather eye am wrong oar write
      It shows me strait a weigh.

      As soon as a mist ache is maid
      It nose bee fore two long
      And eye can put the error rite
      Its rarely ever wrong.

      Eye have run this poem threw it
      I'm shore your pleased two no
      Its letter perfect in it's weigh,
      My chequer tolled me sew.

      (Shamelessly stolen from, umm, who wrote this again?)

    2. Re:Could you at least spell-check the title? by mad.frog · · Score: 3, Insightful

      To the bonehead moderators who marked the parent "offtopic" and "troll" --

      what the fuck is wrong with you?

      Offtopic, maybe a little, but geez, it's a grade-school level grammar mistake in the headline, for fuck's sake. The editors deserve to be slapped around for it; they should know better.

      And if you think that proper spelling and grammar are optional, well, I just feel sorry for you.

    3. Re:Could you at least spell-check the title? by arb · · Score: 4, Funny

      If only Slashdot had editors - they could proof-read the submissions and fix errors like this.

  3. How discreet do you need them? by Anonymous Coward · · Score: 2, Funny

    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.

    1. Re:How discreet do you need them? by Apro+im · · Score: 3, Insightful

      I almost went into grammar nazi mode to correct your use of "it's" in lieu of "its". However, re-parsing the sentence, I prefer to interpret it as "I'd still recommend the comic, for it's intelligent humour," because it's a construction that needs to be used more often. So, feel duly admonished for leaving out the comma.

  4. Possible approach... by Sam+Nitzberg · · Score: 3, Interesting

    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

    1. Re:Possible approach... by FooAtWFU · · Score: 2, Informative
      A program like photoshop with lug-ins and image processing / manipulation capabilities may do the job.
      It's called The GIMP. Duh. :)
      --
      The World Wide Web is dying. Soon, we shall have only the Internet.
  5. Since when are Dinosaurs boring by CrazyJim1 · · Score: 2, Interesting

    When I was a kid, Dinosaurs were really cool.

    1. Re:Since when are Dinosaurs boring by keithmo · · Score: 3, Funny
      When I was a kid, Dinosaurs were really cool.

      When I was a kid, they still roamed the Earth.

    2. Re:Since when are Dinosaurs boring by eam · · Score: 5, Funny

      > Since when are Dinosaurs boring?

      Jurassic Park III

  6. Quick by labratuk · · Score: 5, Informative

    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.
  7. Trace porn first, then colour it in. by acidrain · · Score: 2, Funny

    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
    1. Re:Trace porn first, then colour it in. by Some+Guy · · Score: 2, Funny
  8. Saving Money by WindozeSux · · Score: 3, Insightful

    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.
  9. Google it by quaker5567 · · Score: 5, Informative

    Search Google for "color by numbers software" http://www.stoik.com/hobby/Color_By_Number/ Is it really that hard?

    1. Re:Google it by pixelfood · · Score: 3, Informative

      I downloaded the free trial of this product, and the company was either brave or stupid to offer a free trial.

  10. image magick by blackcoot · · Score: 2, Informative

    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!

  11. Two Options... by WhyCause · · Score: 4, Informative

    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.

  12. Photoshop! by Peganthyrus · · Score: 5, Informative

    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.
  13. pimpin' aint easy by weierstrass · · Score: 3, Informative

    >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'
    1. Re:pimpin' aint easy by SlickMcSly · · Score: 2, Interesting

      The problem is in provide a discreet definition for subjective and inuitive judgements. I work my own computer vision program as a hobby, and the biggest hurdle is in defining what exactly is a "thing." Take a scene of a park. The hills may have soft shadows around their curves, where does the light green end and the dark green begin when the border is blurred across 50 pixels? What about rational constructs such as a tree? Abstractly it would just be a field of green with bushy edges, but in actuallity you'll have 1000s of leaves in different positions and orientations leading to many contrasting colors. A raw measurement of color would yield several small fields of varying shades of green. Intelligence is required to properly segment an arbitrary image. Either in the program's ability to recognize context or in the user's choice of picture. Ppl don't realize just how difficult seemingly simple things like sight really are because the mind is a massively parallel processor that learns by example, whereas a computer is a linear device that requires exact specification. From my experience, I've learned that there will always be scene ambiguous enough to too fool a computer and even a human (e.g. optical illusions). What is necessary to teach a computer to see isn't an accurate definition of a "thing" (there will never be one), it's experience. Teaching a computer THAT is a whole 'nother story. Regarding simple segmentation for color-by-numbers, it's best to fool around in your (scriptable) editor of choice looking for the sequence of steps that would do the job manually. (plenty of edge detection plugins around) Then automate that process and only select pictures that suit that process. It took billions of years under constant threat of death for our vision to evolve to what it is today, then many years more before we can utilize it (colored rings, round pegs in square holes). Rather than wait for computer scientists to reinvent the eye, limit your expectation and simplify the problem.

  14. Bitmap to Vector by Joebert · · Score: 2, Insightful

    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.
  15. Potrace plus some stuff by toothfish · · Score: 3, Funny

    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

  16. ImageJ by Sometimes_Rational · · Score: 2, Informative

    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.
  17. Think outside the box by Anomolous+Cowturd · · Score: 2, Interesting

    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.