<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/234816</link>
    <title>MATLAB Central Newsreader - Re: Converting raster graphics into vector graphics in matlab</title>
    <description>Feed for thread: Re: 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>Tue, 19 Aug 2008 12:58:07 -0400</pubDate>
      <title>Re: Converting raster graphics into vector graphics in matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/234816#596319</link>
      <author>abe.cool@gmail.com</author>
      <description>Thank u sir,but if u have got any codes or tutorials please let me&lt;br&gt;
know...&lt;br&gt;
&lt;br&gt;
Walter Roberson wrote:&lt;br&gt;
&amp;gt; In article &amp;lt;557f2ef2-62a8-422a-8468-5d766fd1ff78@k37g2000hsf.googlegroups.com&amp;gt;,&lt;br&gt;
&amp;gt;  &amp;lt;abe.cool@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;I just want to convert bitmap image in to vector format by using&lt;br&gt;
&amp;gt; &amp;gt;MATLAB, If u knw pls reply me with the answer&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yeh, I've done that, in Fortran years ago, and more recently&lt;br&gt;
&amp;gt; in Maple and in Matlab. It isn't a difficult process, but it is&lt;br&gt;
&amp;gt; common for the fine details to get messed up in the first few&lt;br&gt;
&amp;gt; iterations of writing the code, at least if you write it iteratively&lt;br&gt;
&amp;gt; instead of recursively.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Probably the easiest way to do it iteratively is to use the &quot;left-hand&lt;br&gt;
&amp;gt; rule&quot; (or the &quot;right-hand rule&quot;) for maze-solving: find an edge and&lt;br&gt;
&amp;gt; follow it around, always checking for possible turns in counter-clockwise&lt;br&gt;
&amp;gt; (or clockwise) sequence. Each time you proceed in the same direction&lt;br&gt;
&amp;gt; you were already going, just keep track of where you started this&lt;br&gt;
&amp;gt; segment and where you are now; each time you change direction,&lt;br&gt;
&amp;gt; write out the vector between the old starting point and the current&lt;br&gt;
&amp;gt; location and record the current location as the new base of movement.&lt;br&gt;
&amp;gt; Oh yes, and as you pass through a point, mark that point has having&lt;br&gt;
&amp;gt; been travelled through in an auxillary matrix. When you complete a&lt;br&gt;
&amp;gt; circuit (get back to where you started the current trip), scan&lt;br&gt;
&amp;gt; through the auxillary matrix to find another location that is&lt;br&gt;
&amp;gt; beside one that has been already visitied, but which hasn't been&lt;br&gt;
&amp;gt; visited yet.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The logic can, if you prefer, be divided into two parts, one part&lt;br&gt;
&amp;gt; where you track pixel locations on the path, and the other part&lt;br&gt;
&amp;gt; that analyzes the completed path to minimize the turns.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I haven't described here the logic for dealing with blobs of&lt;br&gt;
&amp;gt; colour; the extension of the logic is not very difficult.&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt;    &quot;Okay, buzzwords only. Two syllables, tops.&quot;  -- Laurie Anderson</description>
    </item>
  </channel>
</rss>

