8
$\begingroup$

I want to print some line drawings on A3, but they aren't very large - around 600x800px.

I tried obvious functions in Gimp, like resize then enhancing with wavelet sharpener or unsharp mask, with selective gausian blur before it, but print results are no good.

They are not easy for vectorization either, but perhaps tweaking some tracing tool can give me better results then resizing bitmap. Before I start exploring this option, I thought to ask for advice:

Can anyone share a recipe, either by using programming algorithms (numpy/scipy or matlab) or by using tools available in Gimp or Photoshop, to accomplish quality resize of line drawing?

$\endgroup$
2
$\begingroup$

I am not sure if this is the best way in your case, but I had success with combination of Gaussian and Median filters.

Here is an example I made entirely in Paint.NET. Original image:

enter image description here

Resize to 400% (Nearest Neighbor):

enter image description here

Gaussian Blur (radius: 6.0 px):

enter image description here

Median filter (radius: 4 px, percentile: 50%):

enter image description here

Levels to enhance contrast:

enter image description here

Curves to cut off blurry shadows (thresholding would work better, but this is not available in Paint.NET by default):

enter image description here

Notice that the thin drawing without aliasing need to be strenghtened. You can achieve this by applying Levels prior to Median filter.

The parameters of filters I used are purely experimental - playing with these may lead to better result. Maybe stairstep zooming this way may improve it as well.

$\endgroup$
  • $\begingroup$ Thanks for your answer, it's good approach which is obvious from your examples. However I did not provide example, as I should, and my line art images include color and even some have gradients. I tested couple of tracing programs, but they all got confused by gradient pattern. I'm now in the middle of doing final touches with Gimp by using edge detect filter with path tool. It's time consuming, but it's interesting experience. Cheers $\endgroup$ – zetah Sep 30 '12 at 21:43
  • $\begingroup$ If you are able to separate colored/textured parts and inked parts, then you can probably resize each one with different method and then put the enlarged line drawing over the color part enlarged with classic method. $\endgroup$ – Libor Sep 30 '12 at 22:49
6
$\begingroup$

Take a look at pixel art scaling algorithms, particularly the hqx algorithms. They're typically limited to a integer scaling factor (i.e. 2x, 3x, 4x) so they aren't completely general purpose but they should do quite well on line drawings.

$\endgroup$
0
$\begingroup$

This is off the top of my head, but assuming you're dealing with images that can be treated as binary (either a pixel belongs to a line of the drawing or not) you might try enlarging your images (with the ensuing blur) then thresholding to binarize the enlarged image, and then performing morphological thinning.

In MATLAB, you'd look at the functions imresize, im2bw and bwmorph.

Hope this helps...

$\endgroup$
0
$\begingroup$

Have you tried converting the image into a similar vectorized version, I know Flash and Inkscape has those:

http://inkscape.org/doc/tracing/tutorial-tracing.html

https://www.google.com/search?q=flash+image+to+vector

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.