0

in addition to the question asked in How do I break apart scanned letters using Gimp or Inkscape? : is there a way to do this automated, in a sense that I do not need to select every single 'fill-able sign' first and do 'Combine'?

I want to separate the letters of a whole page, so it would be quite a tedious job.

AMEND: I do not intend to do letter recognition. I want to be able to scan/photograph handwritten notes and transform them into a vector graphic svg so I can continue editing the notes with my favorite note taking app "Stylus Write (styluslabs.com)".

To be able to move text around, the letters need to be individual paths. Break apart works fine but having all the filled in letters is quite ugly.

enter image description here enter image description here

1
  • Vaguely related → There's a script for Photoshop that does this: Split to layers.
    – Joonas
    May 3 at 9:08
2

Try Centerline Autotrace. It makes curves, not filled closed paths. An example (its bullshit both in math and physics, but has right looking squiggles):

enter image description here

  1. A bitmap image

  2. Centerline Autotrce is applied with default settings to 1. It's a combined path.

  3. After applying Path > Break Apart and manually moving every separate item a little off to see what splinters are actually generated.

That's not radically better than the method suggested already in another answer, because one must group or combine back the pieces of one symbol if he wants to guarantee they do not drift accidentally apart.

I tried also your screenshot. The result with Centerline Autotrace was a hopeless mess. It became much better when the resolution of the screenshot was lifted with Smilla Enlargener (=no blurry edges) to 300%. Centerline Autotrace still lost a small dot and made one =-symbol to look like a thick minus. Here's the result after Breaking all apart and changing some stroke colors:

enter image description here

The tracing settings were these:

enter image description here

I guess that fully reliable results need pattern matching in a system which knows the intended math symbols. Others have suggested OCR which essentially means the same. Centerline Autotracing can be good enough if you get more diciplined - draw smallest dots big enough.

2
  • Thanks a lot for the answer this looks promising. One question: "Smilla Enlargener (=no blurry edges)" is this a built-in Inkscape function?
    – hveng
    May 3 at 9:07
  • It's a separate free program. It increases the resolution of bitmap images without making borders and 1 px wide lines wider. On1 Resize is a comparable commercial equivalent except it knows also CMYK colors. They make often remarkably good guesses what a low resolution image would be if it had bigger resolution. Scaling to bigger size is useless, but these programs seem to make right guesses.
    – user287001
    May 3 at 9:23
0

TL;DR Not possible (as far as I know).

If these are vectors, then you can't edit them in GIMP. GIMP is a raster image editor. GIMP can use paths, but it's has extremely limited functionality as far as vectors are concerned. It's not the right tool.

If these are vectors, then in Inkscape you would need to recombine the parts of the letters manually after breaking apart. There is no way to do this automatically. Inkscape doesn't know anything about characters. Inkscape has no character recognition functionality. All it sees are paths that are either selected or not. So the answer to your question is basically "No" as far as automation is concerned.

For small jobs, it's not that tedious. Use the Select tool S to surround the pieces you want to combine, then use the Shorcut Ctrl+K to combine. Obviously a whole page is a different matter.

Example

enter image description here

Ultimately, you might be better to look for OCR (Optical Character Recognition)/handwriting recognition software to recognise the handwriting. Then you'd be able to get editable text output instead of vectors.

2
  • Thanks Billy Kerr for the answer. I do not intend to do letter recognition. I want to be able to scan/photograph handwritten notes and transform them into a vector graphic svg so I can continue editing the notes with my favorite note taking app "Stylus Write (styluslabs.com)". To be able to move text around the letters need to be individual paths. Break apart works fine but having all the filled in letters is quite ugly. I thought about writing a scipt for inkscape to search for objects completely inside other objects and perform subtract on them... Not sure if worth the effort.
    – hveng
    May 1 at 16:33
  • @hveng While it may be possible to do it that way, it may take you longer to develop such a script than it would take to do it manually. Is it worth it? Only you can decide. Most coding is way beyond me unfortunately. Good luck anyway.
    – Billy Kerr
    May 1 at 16:50

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.