Image to Vector
22 ビュー (過去 30 日間)
古いコメントを表示
Hi,
How Can I convert a JPEG image into a vector?
Thanks, Ashish
1 件のコメント
Chandra Kurniawan
2011 年 12 月 18 日
Vectorization??
Did you mean tracing??
Something such converting raster image to vector??
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!