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

조회 수: 5 (최근 30일)
Jubin Mathai
Jubin Mathai 2019년 7월 12일
댓글: 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!

답변 (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')
end
  댓글 수: 7
Ganesh Regoti
Ganesh Regoti 2019년 7월 24일
편집: 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.

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

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by