Image to Vector

13 次查看(过去 30 天)
Ashish Bhatt
Ashish Bhatt 2011-12-18
Hi,
How Can I convert a JPEG image into a vector?
Thanks, Ashish
  1 个评论
Chandra Kurniawan
Chandra Kurniawan 2011-12-18
Vectorization??
Did you mean tracing??
Something such converting raster image to vector??

请先登录,再进行评论。

采纳的回答

Jan
Jan 2011-12-18
It depends.
You cannot convert a "JPEG image". JPEG is a file format and files are stored sequentially always. Therefore it is a kind of vector already.
The contents of the JPEG file can be imported as array using imread:
Img = imread(FileName);
For gray-scale images this is a 2D-matrix, for RGB-JPEGs this is a [Width x Height x 3] array. You can convert both to a vector by:
ImgVector = Img(:);
% Or:
ImgVector = rehsape(Img, 1, []);
But I cannot imagine how this could be useful.
  9 个评论
Ashish Bhatt
Ashish Bhatt 2011-12-20
Thank you Walter. That helps.
juveria fatima
juveria fatima 2018-3-30
how to get back image from vector

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by