Ignore:
Timestamp:
Mar 22, 2018, 9:27:17 PM (7 years ago)
Author:
sommeria
Message:

reading LaVision? images improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_info.m

    r1027 r1032  
    6565             FileInfo.Height=size(Image,2);
    6666             FileInfo.Width=size(Image,1);
     67             FileInfo.TimeName='timestamp';
     68             DateString=Input.Attributes{60}.Value
     69             TimeString=Input.Attributes{59}.Value
    6770        catch ME
    68             msgbox_uvmat('ERROR',ME.message)
     71            msgbox_uvmat('ERROR',[ME.message;'reading image from DaVis is possible only with Matlab version 2013 or earlier'])
    6972            return
    7073        end
     
    8386        FileInfo.Width=BitmapInfoHeader.biWidth;
    8487         FileInfo.BitDepth=BitmapInfoHeader.biBitCount;
     88         FileInfo.TimeName='video';
    8589    otherwise
    8690        if ~isempty(FileExt)% exclude empty extension
     
    149153                            FileInfo.BitDepth=FileInfo.BitsPerPixel/3;
    150154                            FileInfo.ColorType='truecolor';
     155                            FileInfo.TimeName='video';
    151156                            FileInfo.FileName=fileinput;
    152157                            nbfield=numel(fieldnames(FileInfo));
    153                             FileInfo=orderfields(FileInfo,[nbfield nbfield-3 nbfield-1 nbfield-2 (1:nbfield-4)]); %reorder the fields of fileInfo for clarity
     158                            FileInfo=orderfields(FileInfo,[nbfield nbfield-4 nbfield-3 nbfield-1 nbfield-2 (1:nbfield-5)]); %reorder the fields of fileInfo for clarity
    154159                            if ~isfield(FileInfo,'NumberOfFrames')
    155160                                FileInfo.NumberOfFrames=floor(FileInfo.Duration*FileInfo.FrameRate);
Note: See TracChangeset for help on using the changeset viewer.