I just want to convert bitmap image in to vector format by using
MATLAB, If u knw pls reply me with the answer
Thank You
Abethan
>I just want to convert bitmap image in to vector format by using
>MATLAB, If u knw pls reply me with the answer
Yeh, I've done that, in Fortran years ago, and more recently
in Maple and in Matlab. It isn't a difficult process, but it is
common for the fine details to get messed up in the first few
iterations of writing the code, at least if you write it iteratively
instead of recursively.
Probably the easiest way to do it iteratively is to use the "left-hand
rule" (or the "right-hand rule") for maze-solving: find an edge and
follow it around, always checking for possible turns in counter-clockwise
(or clockwise) sequence. Each time you proceed in the same direction
you were already going, just keep track of where you started this
segment and where you are now; each time you change direction,
write out the vector between the old starting point and the current
location and record the current location as the new base of movement.
Oh yes, and as you pass through a point, mark that point has having
been travelled through in an auxillary matrix. When you complete a
circuit (get back to where you started the current trip), scan
through the auxillary matrix to find another location that is
beside one that has been already visitied, but which hasn't been
visited yet.
The logic can, if you prefer, be divided into two parts, one part
where you track pixel locations on the path, and the other part
that analyzes the completed path to minimize the turns.
I haven't described here the logic for dealing with blobs of
colour; the extension of the logic is not very difficult.
--
"Okay, buzzwords only. Two syllables, tops." -- Laurie Anderson
Please do not post your replies above the material you are commenting
on: it makes it more difficult to have a discussion.
> Walter Roberson wrote:
>> In article <557f2ef2-62a8-422a...@k37g2000hsf.googlegroups.com>,
>> <abe....@gmail.com> wrote:
>>> I just want to convert bitmap image in to vector format by using
>>> MATLAB,
>> Yeh, I've done that, in Fortran years ago, and more recently
>> in Maple and in Matlab. It isn't a difficult process,
> Thank u sir,but if u have got any codes or tutorials please let me
> know...
I advise you to cut out the text-messaging abbreviations such as "u".
It marks you as a student who thinks he is talking to other students
when the appearance you want to present is one of a budding young
professional.
I haven't thrown away my code, so Yes, I still have it. But you
probably did not mean to inquire merely about whether I -have- the
code: you probably meant to inquire about whether I could or would
allow you to have a copy of my existing code. And the answer to that
is "Sorry, no". I wrote the code for my job, and none of the projects
involved are "open-source", so in order for me to pass along the code
to you, you would have to enter into a technology agreement with
the organization I work for ("lease" rights for the code.) I don't
work for our technology commercialization wing, but I have worked -with-
them enough that I would be able to estimate that a simple one-time
copy of the existing Matlab routine(s) with no support and no rights to
commercialize the code, would probably cost $5000 -- more if you
want non-trivial documentation (because I would have to spend time
writing that.) [Why so much? Answer: cost of processing the transaction,
since we'd have to run the code by our legal team to check that we
weren't releasing something we might want to patent, and so on. And
if you were not paying by cash, we'd need to run a credit check. Etc..]
> or tutorials
I already gave you a tutorial! It was the part of my posting that started:
>> Probably the easiest way to do it iteratively is to use the "left-hand
>> rule" (or the "right-hand rule") for maze-solving:
--
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end
Sorry, I did not do any timing tests. My machine spent far more time
-displaying- the vectorized image than computing the vectorized image.
I have looked around my files a bit, and it appears I might have been
mistaken about having implemented the code in Matlab; at the time
I wrote the posting, I thought that I had done a Matlab port. The port
I have for sure is in Maple, and uses enough Maple features that Maple 11
is not happy to convert the code to Matlab code automatically
(in particular, it has a hard time converting the Matrix constructor
that I compute the array limits for.) It would not be very difficult
to port the code to Matlab (everything it uses in Maple has Matlab
analogs), but it appears I did not have a reason to do so. I do have
Maple 12 available on a different machine and the conversion of Maple
to Matlab is said to be noticeably better in Maple 12, but I haven't had
a chance to give it a trial whirl (and for whatever reason the network
between the two machines was very slow yesterday.)
> And
> please tell me does Matlab support something like threads in othe
> languages(eg: Java,C#).
With the Distributed Computing Toolbox or Distributed Computing Engine
it does. I have not investigated the extent to which one can get
meaningful access to Java threads from Matlab. Based upon what I have
read before in this newsgroup about Java threads, there are significant
restrictions on rendering (must all be done by one specific Java thread)
and on synchronizing data structures between java threads and Matlab.