필터 지우기
필터 지우기

I am using this code to convert .jpg file to maltab .fig but in matlab lab file there is no figure represented and if I want to convert more than one .jpg files to fig how can I. I am attaching two files

조회 수: 3 (최근 30일)
img = imread('~~.jpg');
imshow(img);
savefig('~~~.fig');
  댓글 수: 5

댓글을 달려면 로그인하십시오.

답변 (2개)

KSSV
KSSV 2018년 5월 29일
images = dir('*.jpg') ;
N = length(images) ;
% loop for each image
for i = 1:N
I = imread(images(i).name) ;
[filepath,name,ext] = fileparts(images(i).name) ;
imshow(I) ;
savefig([name,'.fig']);
end
  댓글 수: 6
Walter Roberson
Walter Roberson 2018년 5월 30일
You need to digitize the image like I mentioned. There are a number of File Exchange contributions for this purpose.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2018년 5월 30일
Look in the File Exchange and search for tag:digitize as I have marked a number of routines designed to extract plot information from images.
It would be much easier to extract the data before you wrote them as .jpg files.

카테고리

Help CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by