defining a line

Asked by genecavanaugh on 2011-11-07

I often have a drawing in which the lines are blurred and have very small breaks. In a bitmap, or preferably a vector image, I would like to be able to "stroke" the line along its main axis and have some type of snap connect the contiguous pixels (or preferably vectors), thus creating a solid line out of a somewhat intermittent line.
I assume I can then use pixelsnap to take away any blurring effects, and end up with a constant weight line on my drawing; which will normally be straight, but might be curved (straight is the most important).

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
2011-11-08
Last query:
2011-11-08
Last reply:
2011-11-07
Best mycae (mycae) said : #1

It depends on the exact nature of the image. What you really want to do is image analysis, which is an incredibly complex topic. (think computers not being able to read captchas).

If your image data is straight line dominated, you can use something called a hough transform to do what you want -- however this would be a program-your-own solution problem.

Now, more usefully, you can try to use the automatic tracing tool poedit, which is built into inkscape as the "trace bitmap" function.

What you might also be able to do is preprocess your image using gimp or imageJ, eg, by dilating, then skeletonising the line segments to construct an unbroken linear segment that will be better handled by poedit.

genecavanaugh (genecavanaugh) said : #2

Sounds great. I will follow your suggestions, and thank you.

Gene Cavanaugh