Ignore:
Timestamp:
Jul 2, 2014, 9:30:32 AM (10 years ago)
Author:
sommeria
Message:

read_rdvision corrected to get both cameras

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r788 r790  
    4848%% get input root name and nomenclature type
    4949fullfileinput=fullfile(FilePath,fileinput);% input file name with path
    50 [RootPath,SubDir,RootFile,i1_input,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fullfileinput);
    51 
     50[FileInfo,MovieObject]=get_file_info(fullfileinput);
    5251
    5352%% check for particular file types: images, movies, civ data
    54 i1_series=zeros(1,1,1);
    55 i2_series=zeros(1,1,1);
    56 j1_series=zeros(1,1,1);
    57 j2_series=zeros(1,1,1);
    58 [FileInfo,MovieObject]=get_file_info(fullfileinput);
     53checkfileindexing=0;
     54if isfield(FileInfo,'FileIndexing') && strcmp(FileInfo.FileIndexing,'on')
     55    [RootPath,SubDir,RootFile,i1_input,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fullfileinput);
     56    i1_series=zeros(1,1,1);
     57    i2_series=zeros(1,1,1);
     58    j1_series=zeros(1,1,1);
     59    j2_series=zeros(1,1,1);
     60    checkfileindexing=1;
     61else % no file indexing
     62    [PathDir,RootFile]=fileparts(fullfileinput);
     63    [RootPath,SubDir,DirExt]=fileparts(PathDir);
     64    SubDir=[SubDir DirExt];% include part after . in the name (considered as a file extension)
     65    NomType='*';
     66    i1_series=[];i2_series=[];j1_series=[];j2_series=[];
     67    i1_input=1;i2_input=[];j1_input=[];j2_input=[];
     68end
    5969if ~exist(FilePath,'dir')
    6070    return % don't go further if the dir path does not exist
    6171end
     72if checkfileindexing
    6273NomTypePref='';
    6374if isempty(NomType)
     
    251262if isequal(j1_series,0), j1_series=[]; end
    252263if isequal(j2_series,0), j2_series=[]; end
    253 
    254 %% detect rdvision format
    255 if strcmp(FileExt,'.bin')
    256     if exist(fullfile(RootPath,SubDir,[RootFile '.seq']),'file')
    257         FileInfo.FileType='rdvision';
    258         FileInfo.SeqFile=[RootFile '.seq'];
    259     end
    260 end
     264end
     265% %% detect rdvision format
     266% if strcmp(FileExt,'.bin')
     267%     if exist(fullfile(RootPath,SubDir,[RootFile '.seq']),'file')
     268%         FileInfo.FileType='rdvision';
     269%         FileInfo.SeqFile=[RootFile '.seq'];
     270%     end
     271% end
    261272
    262273%% introduce the frame index in case of movies or multimage type
Note: See TracChangeset for help on using the changeset viewer.