MATLAB Answers

I have multiple jpeg or tiff images with timestamps as their names from a high frame rate camera. I want to extract their time stamps in an the list format without the .tiff or .jpeg extension. Kindly help

2 views (last 30 days)
Adwait Gaikwad
Adwait Gaikwad on 2 Jan 2020
I have multiple jpeg or tiff images with timestamps as their names from a high frame rate camera. I want to extract their time stamps in an the list format without the .tiff or .jpeg extension.
So far the following code has helped me to get the the numbers in cell but I am not able to remove the extension from those cell.
% folderPath1 = actualFile folder
clear all;
clc;
files1 = dir('filepath');
dinfo = dir('filepath');
names_cell = {dinfo.name};
%names_cell= names_cell';
X = cell2table(names_cell);
Y = table2array(X);
Z=Y';

  0 Comments

Sign in to comment.

Answers (1)

Delprat Sebastien
Delprat Sebastien on 3 Jan 2020
You may use fileparts to retrieve the name and extention:
[filepath,name,ext] = fileparts(filename)
probably that a loop will be needed, I'm not sure if it support cell array.
Last but not least look at the following to convert the string into a date
t = datetime(DateStrings,'InputFormat',infmt)

  0 Comments

Sign in to comment.

Sign in to answer this question.