MATLAB Answers

How to convert raw FLIR thermal images(.jpg) into .txt files?

14 ビュー (過去 30 日間)
Jubin Mathai
Jubin Mathai 2019 年 7 月 12 日
Commented: Jubin Mathai 2019 年 7 月 25 日
I needed to convert Raw thermal images from FLIR camera which is in .jpg format to be converted to text files, extracting its meta data!

  0 件のコメント

サインイン to comment.

件の回答 (1)

Ganesh Regoti
Ganesh Regoti 2019 年 7 月 17 日
Assuming that you need the meta data of the file into the text format. You can do the following
k = imfinfo('flir.jpg'); %Get the meta data of the image
T = NestedStruct2table(k); %Convert the struct to table format
T = T(1,:); %As the function produces multiple rows of data, pick up only the first row where
%actual data about image resides.
FileName = 'test.txt'; %Name of the file in which the meta data must be stored.
writetable(T,FileName, 'Delimiter', ','); %Write the data into the file placing ’,’ as delimiter
You can refer this to get NestedStruct2table function
In NestedStruct2table function, you need to make small change. In convertCellsToTable function, ignore the case when cell is empty to make it work for your case. Remove the following code
if ~isvector(FieldValuesCells{i})
error('Field dimension is > 1')

  7 件のコメント

表示 4 件の古いコメント
Stephen Cobeldick
Stephen Cobeldick 2019 年 7 月 24 日
@Ganesh Regoti: note that NestedStruct2table.m is copyright code, and must be distributed together with its license. I do not see the licence file attached here, but I presume that this is a temporary oversight that you will fix shortly.
Ganesh Regoti
Ganesh Regoti 2019 年 7 月 24 日
Stephen Cobeldick , Thank you for your catch. I have made appropriate updates.
Jubin Mathai
Jubin Mathai 2019 年 7 月 25 日
Hi Ganesh,
Could you please share the way you executed the code. I am still getting the same error.

サインイン to comment.

サインイン してこの質問に回答します。


Translated by