Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to convert a simple diagram (boxes and arrows) into a Visio chart. There are lots of these boxes and arrows, however, so this will be a pain to do by hand.

Is there a way to convert an image to a Visio diagram?

share|improve this question
up vote 1 down vote accepted

In practice, there are a few tools available to convert an image to a Visio diagram. One of them is Image Converter for Visio, which pretends to even be able to "Add connection points to shapes".

While I haven't personally tested such tools, I would be highly surprised if they would work for something other than the most basic situations. Not because of the reason mentioned by SecurityMatt¹, but because image to vector conversions are known for not working very well. Even Live Trace feature in Adobe Illustrator is not working perfectly well, while Adobe invested a huge amount of effort in this feature.

Images are not rendered perfectly well. For example, if we were exporting the same diagram, the images would not be identical at pixel level, for example because I have slightly changed the Clear Type options for my LCD screen. This makes the OCR of a diagram not obvious, not counting the fact that Visio diagrams can be customized by changing color, size, weight and other visual aspects of elements.

Visio can also embed ordinary images, which makes things even more difficult, especially if those images are acting as shapes (imagine having a network map where network devices are replaced from the ugly default ones available in Visio by some more graphical ones).

Conclusion: feel free to try the tool I referenced or similar tools, but don't expect magic from them.

¹ It seems to me that the case illustrated by SecurityMatt would be extremely rare. If the arrow is joined up behind an element, there is something wrong with the diagram. Why would somebody do that? Isn't the point of a diagram to make it visually clear what is joined where?

share|improve this answer

No. Visio stores objects like rectangles and arrows as separate objects so that when you reload it from a file you can move the rectangles and arrows separately.

An image doesn't store a picture of an arrow as "oh, there's an arrow going from here to there", it stores it as a white pixel followed by a black pixel followed by a white pixel and so on.

In short, information is destroyed when converting from Visio to an image - and that means there isn't enough information to convert it properly back again. The best you can do is import the image into visio, but sadly you won't be able to move the objects on the image independently of one-another.

More generally, attempting to glean information from a picture is an active research topic for artificial intelligence, but sadly there isn't a simple answer for taking a picture and breaking it down into its constituent parts.

share|improve this answer
There's plenty of information to get from a simple image to a simple Visio diagram. If OCR is possible, this functionality is certainly possible to. The question was just whether or not it had been implemented yet in Visio, which it sounds like it has not. – user72923 Mar 7 '12 at 22:40
If a rectangle overlaps an arrow, it is not possible to work out whether the arrow is joined up underneath the rectangle - hence information is lost. OCR can make guesses as to the original, but OCR cannot recover the lost information, regardless of how smart it is. – SecurityMatt Mar 7 '12 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .