Image to Vector

조회 수: 21 (최근 30일)
Ashish Bhatt
Ashish Bhatt 2011년 12월 18일
댓글: juveria fatima 2018년 3월 30일
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