Discussion:
[Inkscape-user] How to vectorize diagrams
Steffen Glückselig
2005-01-10 14:27:58 UTC
Permalink
Hello,

I'd like to vectorize some diagrams (UML interaction) and plan to use
Inkscapes new 'vectorize'-feature. I couldn't come up with satisfying
results, though.
What do I have to take care of? What settings should I use?


Thanks and best regards
Steffen
Trent Buck
2005-01-10 16:18:00 UTC
Permalink
Post by Steffen Glückselig
I'd like to vectorize some diagrams (UML interaction) and plan to use
Inkscapes new 'vectorize'-feature. I couldn't come up with satisfying
results, though.
Flipping through the CVS changelog, I can't see anything called
`vectorize'. Are you talking about the potrace / autotrace programs,
FRONT-ENDS to which were recently added to Inkscape?

You are right, bitmap tracing isn't currently spectacular. You need to
help the tracer along by e.g. removing shading or decomposing the image
into several parts (in the GIMP). You might also get better results on
the command-line; inkscape's front-end has fewer options to tweak than
the command-line interface.
--
-trent
It was reported long ago, quite probably in this very group, that
someone of the BOFH-nature had taken that [MCSE] exam without studying.
At each question, he checked off the answer that he believed would be
the most beneficial to MS's revenue stream. He passed. -- adb
Steffen Glückselig
2005-01-10 16:35:42 UTC
Permalink
Hello Trent,
Post by Trent Buck
Post by Steffen Glückselig
I'd like to vectorize some diagrams (UML interaction) and plan to use
Inkscapes new 'vectorize'-feature. I couldn't come up with satisfying
results, though.
Flipping through the CVS changelog, I can't see anything called
`vectorize'. Are you talking about the potrace / autotrace programs,
FRONT-ENDS to which were recently added to Inkscape?
Yes, sorry. In the german UI that feature is called 'Bitmap vektorisieren'
which would translate quite well to vectorize, I think. ;-) Anyways, I was
talking about potrace, right.
Post by Trent Buck
You are right, bitmap tracing isn't currently spectacular. You need to
help the tracer along by e.g. removing shading or decomposing the image
into several parts (in the GIMP). You might also get better results on
the command-line; inkscape's front-end has fewer options to tweak than
the command-line interface.
I've already removed the colored background and increased contrast. I
couldn't find settings that would produce a nice result, though.
Any recommendations?



regards
Steffen
Trent Buck
2005-01-10 16:53:28 UTC
Permalink
Post by Steffen Glückselig
Post by Trent Buck
You are right, bitmap tracing isn't currently spectacular. You need to
help the tracer along by e.g. removing shading or decomposing the image
into several parts (in the GIMP). You might also get better results on
the command-line; inkscape's front-end has fewer options to tweak than
the command-line interface.
I've already removed the colored background and increased contrast. I
couldn't find settings that would produce a nice result, though.
Any recommendations?
Other than the above, not really. Can you tell us more about what sort
of images you're tracing, or (if they're small) post a (url to a)
sample?
--
-trent
They accused us of suppressing freedom of expression.
This was a lie and we could not let them publish it.
-- Nelba Blandon, Nicaraguan Interior Ministry Director of Censorship
Steffen Glückselig
2005-01-10 17:06:16 UTC
Permalink
Post by Trent Buck
Post by Steffen Glückselig
I've already removed the colored background and increased contrast. I
couldn't find settings that would produce a nice result, though.
Any recommendations?
Other than the above, not really. Can you tell us more about what sort
of images you're tracing, or (if they're small) post a (url to a)
sample?
Here is a pdf (ca. 400KByte): http://fipa.umbc.edu/18/odell.pdf with some
UML diagrams. I'd like to 'vectorize' the UML on page 8.
I extracted that diagram, removed the blueish background, increased
contrast and played a bit with the settings. Alas, nothing to be proud of
resulted... ;-)

thanks for helping
Steffen
Bryce Harrington
2005-01-10 17:28:04 UTC
Permalink
Post by Trent Buck
Post by Steffen Glückselig
I've already removed the colored background and increased contrast. I
couldn't find settings that would produce a nice result, though.
Any recommendations?
Other than the above, not really. Can you tell us more about what sort
of images you're tracing, or (if they're small) post a (url to a)
sample?
Here is a pdf (ca. 400KByte): http://fipa.umbc.edu/18/odell.pdf with some=
=20
UML diagrams. I'd like to 'vectorize' the UML on page 8.
I extracted that diagram, removed the blueish background, increased =20
contrast and played a bit with the settings. Alas, nothing to be proud of=
=20
resulted... ;-)
Hmm, for line art you'll probably never get decent results from the
bitmap tracer. Even if it could replicate all the shapes correctly, it
wouldn't know to make the white boxes rects, and use arrowheads for the
lines. =20

You can probably achieve your results faster by importing the bitmap
into Inkscape and then manually drawing the vector shapes on top of the
bitmap.

Bryce
Trent Buck
2005-01-10 18:58:36 UTC
Permalink
A mail hub rejected my reply, so I've sent it to Steffen directly. If
anyone else was following this thread, mail me (***@gmail.com) and
I'll send it to you.
--
-trent
Tetris is so unrealistic.
Helge Hielscher
2005-01-09 20:01:57 UTC
Permalink
Post by Steffen Glückselig
Here is a pdf (ca. 400KByte): http://fipa.umbc.edu/18/odell.pdf with some
UML diagrams. I'd like to 'vectorize' the UML on page 8.
I extracted that diagram, removed the blueish background, increased
contrast and played a bit with the settings. Alas, nothing to be proud of
resulted... ;-)
I guess redrawing with a dedicated tool like Umbrello
(http://uml.sourceforge.net) would be faster and give better results

Regards,
Helge
Ted Gould
2005-01-10 22:06:58 UTC
Permalink
Post by Steffen Glückselig
Here is a pdf (ca. 400KByte): http://fipa.umbc.edu/18/odell.pdf with some
UML diagrams. I'd like to 'vectorize' the UML on page 8.
I extracted that diagram, removed the blueish background, increased
contrast and played a bit with the settings. Alas, nothing to be proud of
resulted... ;-)
http://freshmeat.net/projects/pdf2svg/

Well, depending if the diagram is still vectors in the PDF, that might
help you in getting the actual image out as a vectored image.

--Ted
Trent Buck
2005-01-11 01:24:16 UTC
Permalink
Post by Ted Gould
http://freshmeat.net/projects/pdf2svg/
Well, depending if the diagram is still vectors in the PDF, that might
help you in getting the actual image out as a vectored image.
Cool, although the project clearly has a long way to go. I'll be
interested to see how it's doing in about six months.

----

I noticed Inkscape refuses to read their example SVGs; it appears
Inkscape *needs* the xmlns attribute in the <svg> tag. Without an xmlns
attribute, Inkscape brings up an error dialog ("Failed to load the
requested file foo.svg"), but prints nothing to stdout or stderr.

Identical symptoms are described in #1008829, #1008822. They have been
closed.

I experience this issue with a CVS build from yesterday (2005-01-10),
opening the files from the command line (inkscape foo.svg). Perhaps this
was fixed and has been broken again?
--
-trent
<foo> I'm off the hard liquor for a while. I gave it up for lent.
<bar> What does lent do to you? Does it fuck you up?
bulia byak
2005-01-11 01:43:57 UTC
Permalink
Post by Trent Buck
I noticed Inkscape refuses to read their example SVGs; it appears
Inkscape *needs* the xmlns attribute in the <svg> tag. Without an xmlns
attribute, Inkscape brings up an error dialog ("Failed to load the
requested file foo.svg"), but prints nothing to stdout or stderr.
Mental, this seems to be a rather urgent problem. I'm not likely to be
working on it in the near future, so if you can fix it, please do.
MenTaLguY
2005-01-12 05:30:00 UTC
Permalink
Post by bulia byak
Post by Trent Buck
I noticed Inkscape refuses to read their example SVGs; it appears
Inkscape *needs* the xmlns attribute in the <svg> tag. Without an xmlns
attribute, Inkscape brings up an error dialog ("Failed to load the
requested file foo.svg"), but prints nothing to stdout or stderr.
Mental, this seems to be a rather urgent problem. I'm not likely to be
working on it in the near future, so if you can fix it, please do.
I can try, but with present work demands I can't promise quick progress.

I would like to see it fixed before the release; a high-priority bug
ought to be filed if one has not been already.

-mental
Trent Buck
2005-01-12 06:07:43 UTC
Permalink
Post by MenTaLguY
I would like to see it fixed before the release; a high-priority bug
ought to be filed if one has not been already.
Done, #1100675.
MenTaLguY
2005-01-12 07:08:15 UTC
Permalink
Post by bulia byak
Post by Trent Buck
I noticed Inkscape refuses to read their example SVGs; it appears
Inkscape *needs* the xmlns attribute in the <svg> tag. Without an xmlns
attribute, Inkscape brings up an error dialog ("Failed to load the
requested file foo.svg"), but prints nothing to stdout or stderr.
Mental, this seems to be a rather urgent problem. I'm not likely to be
working on it in the near future, so if you can fix it, please do.
I think the quick and dirty fix I just commited should do the trick.
Everyone please test.

-mental
Trent Buck
2005-01-12 07:16:16 UTC
Permalink
Post by MenTaLguY
I think the quick and dirty fix I just commited should do the trick.
Everyone please test.
sf's anoncvs is still 24hrs behind the devel server, right? Therefore I
shall test it tomorrow.
--
-trent
Post by MenTaLguY
Every time someone calls Java a programming language a fairy dies?
Ted Gould
2005-01-11 04:57:00 UTC
Permalink
Post by Trent Buck
Post by Ted Gould
http://freshmeat.net/projects/pdf2svg/
Well, depending if the diagram is still vectors in the PDF, that might
help you in getting the actual image out as a vectored image.
Cool, although the project clearly has a long way to go. I'll be
interested to see how it's doing in about six months.
Unfortunately I think that it is unmaintained :( It is been in the same
state for a year or two.

--Ted
Loading...