<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172060</link>
    <title>MATLAB Central Newsreader - Converting raster graphics into vector graphics in matlab</title>
    <description>Feed for thread: Converting raster graphics into vector graphics in matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 04 Jul 2008 19:24:47 -0400</pubDate>
      <title>Converting raster graphics into vector graphics in matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172060#441237</link>
      <author>abe.cool@gmail.com</author>
      <description>Hi Guys,&lt;br&gt;
&lt;br&gt;
I just want to convert bitmap image in to vector format by using&lt;br&gt;
MATLAB, If u knw pls reply me with the answer&lt;br&gt;
&lt;br&gt;
Thank You&lt;br&gt;
&lt;br&gt;
Abethan</description>
    </item>
    <item>
      <pubDate>Fri, 04 Jul 2008 20:32:00 -0400</pubDate>
      <title>Re: Converting raster graphics into vector graphics in matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172060#441246</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;557f2ef2-62a8-422a-8468-5d766fd1ff78@k37g2000hsf.googlegroups.com&amp;gt;,&lt;br&gt;
&amp;nbsp;&amp;lt;abe.cool@gmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;I just want to convert bitmap image in to vector format by using&lt;br&gt;
&amp;gt;MATLAB, If u knw pls reply me with the answer&lt;br&gt;
&lt;br&gt;
Yeh, I've done that, in Fortran years ago, and more recently&lt;br&gt;
in Maple and in Matlab. It isn't a difficult process, but it is&lt;br&gt;
common for the fine details to get messed up in the first few&lt;br&gt;
iterations of writing the code, at least if you write it iteratively&lt;br&gt;
instead of recursively.&lt;br&gt;
&lt;br&gt;
Probably the easiest way to do it iteratively is to use the &quot;left-hand&lt;br&gt;
rule&quot; (or the &quot;right-hand rule&quot;) for maze-solving: find an edge and&lt;br&gt;
follow it around, always checking for possible turns in counter-clockwise&lt;br&gt;
(or clockwise) sequence. Each time you proceed in the same direction&lt;br&gt;
you were already going, just keep track of where you started this&lt;br&gt;
segment and where you are now; each time you change direction,&lt;br&gt;
write out the vector between the old starting point and the current&lt;br&gt;
location and record the current location as the new base of movement.&lt;br&gt;
Oh yes, and as you pass through a point, mark that point has having&lt;br&gt;
been travelled through in an auxillary matrix. When you complete a&lt;br&gt;
circuit (get back to where you started the current trip), scan&lt;br&gt;
through the auxillary matrix to find another location that is&lt;br&gt;
beside one that has been already visitied, but which hasn't been&lt;br&gt;
visited yet.&lt;br&gt;
&lt;br&gt;
The logic can, if you prefer, be divided into two parts, one part&lt;br&gt;
where you track pixel locations on the path, and the other part&lt;br&gt;
that analyzes the completed path to minimize the turns.&lt;br&gt;
&lt;br&gt;
I haven't described here the logic for dealing with blobs of&lt;br&gt;
colour; the extension of the logic is not very difficult.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;Okay, buzzwords only. Two syllables, tops.&quot;  -- Laurie Anderson</description>
    </item>
    <item>
      <pubDate>Thu, 28 Aug 2008 16:42:04 -0400</pubDate>
      <title>Re: Converting raster graphics into vector graphics in matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172060#597798</link>
      <author>Walter Roberson</author>
      <description>abe.cool@gmail.com wrote:&lt;br&gt;
&amp;gt; Well, we have tried another algorithm.and we did it.thank you for your&lt;br&gt;
&amp;gt; interest.But it is getting 3 seconds to vectorize an image.I just want&lt;br&gt;
&amp;gt; to know how efficient your algorithm is and please let me know the&lt;br&gt;
&amp;gt; time it's taking for converting a raster image to the vector image.&lt;br&gt;
&lt;br&gt;
Sorry, I did not do any timing tests. My machine spent far more time&lt;br&gt;
-displaying- the vectorized image than computing the vectorized image.&lt;br&gt;
&lt;br&gt;
I have looked around my files a bit, and it appears I might have been&lt;br&gt;
mistaken about having implemented the code in Matlab; at the time&lt;br&gt;
I wrote the posting, I thought that I had done a Matlab port. The port&lt;br&gt;
I have for sure is in Maple, and uses enough Maple features that Maple 11&lt;br&gt;
is not happy to convert the code to Matlab code automatically&lt;br&gt;
(in particular, it has a hard time converting the Matrix constructor&lt;br&gt;
that I compute the array limits for.) It would not be very difficult&lt;br&gt;
to port the code to Matlab (everything it uses in Maple has Matlab&lt;br&gt;
analogs), but it appears I did not have a reason to do so. I do have&lt;br&gt;
Maple 12 available on a different machine and the conversion of Maple&lt;br&gt;
to Matlab is said to be noticeably better in Maple 12, but I haven't had&lt;br&gt;
a chance to give it a trial whirl (and for whatever reason the network&lt;br&gt;
between the two machines was very slow yesterday.)&lt;br&gt;
&lt;br&gt;
&amp;gt; And&lt;br&gt;
&amp;gt; please tell me does Matlab support something like threads in othe&lt;br&gt;
&amp;gt; languages(eg: Java,C#).&lt;br&gt;
&lt;br&gt;
With the Distributed Computing Toolbox or Distributed Computing Engine&lt;br&gt;
it does. I have not investigated the extent to which one can get&lt;br&gt;
meaningful access to Java threads from Matlab. Based upon what I have&lt;br&gt;
read before in this newsgroup about Java threads, there are significant&lt;br&gt;
restrictions on rendering (must all be done by one specific Java thread)&lt;br&gt;
and on synchronizing data structures between java threads and Matlab.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Q = quotation(rand);&lt;br&gt;
if isempty(Q); error('Quotation server filesystem problems')&lt;br&gt;
else sprintf('%s',Q), end</description>
    </item>
    <item>
      <pubDate>Wed, 27 Aug 2008 18:46:09 -0400</pubDate>
      <title>Re: Converting raster graphics into vector graphics in matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/172060#597639</link>
      <author>abe.cool@gmail.com</author>
      <description>Well, we have tried another algorithm.and we did it.thank you for your&lt;br&gt;
interest.But it is getting 3 seconds to vectorize an image.I just want&lt;br&gt;
to know how efficient your algorithm is and please let me know the&lt;br&gt;
time it's taking for converting a raster image to the vector image.And&lt;br&gt;
please tell me does Matlab support something like threads in othe&lt;br&gt;
languages(eg: Java,C#).&lt;br&gt;
Thank you</description>
    </item>
  </channel>
</rss>

