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
4 ビュー (過去 30 日間)
古いコメントを表示
img = imread('~~.jpg');
imshow(img);
savefig('~~~.fig');
5 件のコメント
Walter Roberson
2018 年 5 月 30 日
Duplicated by later https://www.mathworks.com/matlabcentral/answers/403123-i-have-matlab-figures-in-jpg-file-how-can-i-export-data-points-of-the-graph-in-excel which also has answers.
回答 (2 件)
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
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
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!