Stippling /dotting / halftone plugin?

Hello,

I'm trying to create a single line drawing from pictures. This can be done with with a mathematical procedure that connects x,y points on a grid, so that no line intersects another, this is a result of choosing the shortest possible pathway . This has been done before and is called TSP (Traveling Salesman Problem) art.

What I need is a method of producing the discrete points from a picture. Possibilities are some sort of stippling or halftone plugin. After making the dotted picture I will program a method of converting these points to a coordinate file, then the TSP problem will be solved and the solution will be converted to a SVG file that draws the solution ( the single line drawing)

Does anyone know a plugin that produces dots or points from a picture, or something similar?

with kind regards,
John

Message for johanmark.

Should have read this thread more closely. It was the reason that I actually started my other thead. Have you actually started coding a method that turns spots to coordinates to feed that into Concorde by chance John? If you need a beta tester, let me know. :)

Found this handy plug-in

I found that applying a dither before using the Paint Bucket pattern fills, actually improves the quality of the "hedcut" look. I found the Ximagic Gray Dither plugin located here:

http://www.ximagic.com/g_index.html

Download at:

http://www.ximagic.com/g_download.html

Filters/Distortion/Newspaper

You should prepare the image to limit the dots and the levels of gray at your needs... 1) Image/gray tones 2) Colors/Posterize (number of colors in gray to have) lowest: 3 white,gray,black 3) Filters/Distortion/Newspaper Is similar to the old technique of achieving a number of gray tones by using only black ink. The tiny dots can be reduced by diminishing the value of the size of each cell. And increased in number by using a higher value in anti aliasing. Hope it helps! Good luck & happy new year! alberto

Even Easier

Here is an even easier method... Starting with an image like the one on this page. - Scale it to 50% - Change the levels so the "black" output level is about 220. You will have a really washed out image. - Change the mode to Indexed, 1-bit, using floyd-steinberg dithering. - Change the mode back to greyscale. - Scale the image back up 200%, using Linear Interpolation. - Threshold the image. Here is a result: Playing with both the scale and levels will adjust the dither density. -Rob A>

Density map plugin

I wrote a plugin posted at Gimp Talk that might do what you want. It will paint dots (the current brush) based on the intensity of another image. It is based on a grid pattern but has a randomization parameter. Try it out. -Rob A>

Density map pluging

Wow this is a nice plugin, it produces a result very close to what I want. I need single pixel black dots. This script uses the current brush, thus no single pixels and not pure black. I've tried to alter the script a little bit by replacing the gimp-brush part with gimp-pencil. Sadly this doesn't work. If anyone knows how to do this I would really like to hear about it. Still this script is useful to some extent.

small change?

Should it just require a change from: (gimp-paintbrush-default inLayer 2 *randompoint*) to (gimp-pencil inLayer 2 *randompoint*) Also - I have changed this script so it paints a (optionally jittered) grid, rather than a fixed number of points: http://ffaat.pointclark.net/incoming/scripts/random_density_map.scm (file name and function are the same, so you will have to change one if you want both) I quickly threw in an option to choose paintbrush or pencil, and it seems to work fine. -Rob A>

random density map, newsprint, fill resythesized

Random density map is slow for large images.

The other technique, of scale down, levels, mode change and then the reverse, is satisfactory (but almost too slow for the huge image I have.) (I am still trying to understand why that works.) I think it should be scripted and released. Unless there is something more general.

There is an interesting rendering technique called hedcut. There is a recipe for it at http://www.alleba.com/blog/2006/12/20/photoshop-tutorial-the-hedcut-effect/
Basically, it uses a pattern as a mask for the image. The hedcut effect is (merely?) a combination of stippling and crosshatching (two patterns.) The recipe only uses one pattern, and is approximate compared to manual artistry.

Couldn't you use a random fill of dots masked by an image to get the same effect as random density map, but faster? More generally, couldn't you use any filled pattern masked by an image to get patterning or rendering effects such as random density, Distort..Newsprint, and others.

And generally, if a user is choosing a pattern (just a set of pixels), shouldn't they be able to choose from brushes and any other image, not matter where it is (selection, layer, buffer, other image, brush, pattern, etc.)

Can Fill Resynthesized Pattern create a random pattern of dots? (I finally read that script and am amazed at its creative simplicity.) Should resynthesis be an optional step in such rendering scripts?

plashless, off banks of noon

Not Quite

The difference between that hedcut technique and the density map technique is that the hedcut will create partial brush strokes, whereas the random density map will paint a full brush stroke depending on the value at every spot it checks.

It is simple enough to replicate the ps tutorial in gimp, just paste a copy of the putin layer as a layer mask to the dots (you will have to invert it before you apply curves).

Interestingly, I found a nifty feature of the paintbucket tool. Start with a greyscale image (like the Putin example image) that has distinct black and white areas.
Create a new layer above this that is filled with white and set to multiply.
With the bucket fill tool, Pick Pattern Fill, Fill Similar Colours, Check Sample Merged and set the threshold up around 165.

Select the white layer, then click with the fill tool on any black area. You will end up with a result very similar to the PS tutorial.

I created a seamless pattern of distorted dots and copied it to use as a pattern from the clipboard:

The layer that was created by the fill:

And the results with the dots layer in multiply mode:

This is significantly different from the random density map which more approaches an actual dither.

And regarding the question of choosing a pattern, the pattern picker will only use patterns. You can however copy something then use "Clipboard" (the first entry) as a pattern choice, though it is limited to 512x512px I believe.

It would probably be worth converting the density script to a C plugin for speed improvements, but that is not my skill set.

-Rob A>

"You can however copy

"You can however copy something then use "Clipboard" (the first entry) as a pattern choice"

As side note that did not worked for me (last stable gimp on xp):
i copied the image, then pasted as/pattern
I get the dialog everything apparently went fine ,except that the new pattern did not show up..no even reloading gimp

To use it i had to open the image again,save as pat, in a pattern folder and reload gimp..only then showed up

Not sure if is a commune issues,

Just copy, no paste?

""You can however copy something then use "Clipboard" (the first entry) as a pattern choice" As side note that did not worked for me (last stable gimp on xp): i copied the image, then pasted as/pattern" If I copy, then paste as pattern, it saves it in my user .gimp-2.6/patterns/ folder and I can access it without refreshing the pattern or anything. Check your permissions in the pattern folder, maybe? (Or is that folder even liste in your folder prefs as a pattern source?) But without saving, it should be available as the "Clipboard" pattern (and brush for that matter)! (click for full size image) and I can then just fill with it like any pattern: (click for full size image) -Rob A>

Solved

Dumb Windows OS sneakily added a "thumbs.db" file to my pattern folder

That file made impossible paste new pattern there delete the thumbs.db file solved

As side note Win always try to add a thumbs file to image's folder
and even worse default setting on Windows search will hide the presence of that file ( because is seen a a "system file" to be hidden)

thumbs.db are created to display thumbnails of the images, brush (and other pattern folders) were not afflicted by the issue because Windows don't recognize gbr and pat as images files.

BUT gimp may use also jpg and png as pattern and in the writable pattern folder were several jpg pattern,

so Windows automatically added there that cursed thumbs.db file

No was no any clipboard

No was no any clipboard pattern available, and that was the weirdest thing... i never had this problem for brushes.

And sure i did not only copied but i pasted as pattern too, i am sure because was that making a "save pattern " dialog pop out

hedcut, patterns, random density

Thanks. Once again amazed at your solution.

But it shows: if you are an expert user and understand all the tools fully and have creatively experimented, then you can do amazing things easily with the fundamental tools, otherwise you need plugins (scripts, recipes, presets, simplifications, whatever you want to call them) or a better way to find posts like yours. Maybe Gimp should have more structure on simplifications, should have a better framework to organize the chaos of plugins. For example, if I am a rookie greyscale artist, I want a package (of or including plugins) that configures Gimp that way. (I know this is not a novel dream, and hard to fulfill.)

About choosing a pattern: a user ought to be able to fill (or for some other drawing operations) from any bitmap (brush, pattern, buffer, layer, color) from any image. I have been studying a GUI for choosing from all those possible bitmaps. Note that for some of these bitmaps, there is an ACTIVE (but Gimp has no ACTIVE buffer, only named buffers, and there is no procedure for getting the ACTIVE buffer.) So a user could choose from the kind of bitmap (brush, pattern, layer, buffer, color) and then the ACTIVE one would be used for the operation. Otherwise, a user might start a plugin, only to find that the plugin requires the source to be in a certain kind of bitmap, say a pattern, whereas a good source already exists, say in brushes or in a selection from another layer of even another image. I think PDB procedures exist to support such a general 'source chooser', except for buffers. (And I don't mean choosing from lists for each kind of bitmap.)

Isn't random density map an array operation to decide a bitmap of where to apply stamps? I am guessing you are looping over pixels, which makes it slow. Even if you could decide the bitmap in an array operation (fast), I suppose there is no way to apply stamps in an array operation. I know I am oversimplifying.

Random density map is different from masking a screen with a greyscale image, for most screens and parameters. I am supposing that if the screen is random one pixel dots, and the final operation is mode change to indexed B&W, it would be nearly the same.

plashless, off banks of noon

Thank for the tip

Thank for the tip, and for that cool pattern

we had some fun using it

http://www.gimptalk.com/forum/please-don%CA%B9t-panic-t46615.html

Wow, nice little feature there

Thanks for sharing that, Rob.

This image at 640 x 480, 300 dpi (using anisotropic smoothing PC preset): 

 Putin - hedcut

 Then again at 1600 x 1200, 300 dpi (same method as above):

Hedcut high res. 

dottingscript works like a dream

Cool changing from paintbrush to pencil works like a dream. Your site is down for now but I'll check out the jittered grid as soon as its up again. I've noticed that using the pencil dots uses a lot!! less memory, which is also nice. Thanks for helping me out. John.

Over limit

Yeah - I ran over my ISP limit this month. I'll be back up in a couple of days (Sept.) -Rob A>
Syndicate content