Ignore:
Timestamp:
May 9, 2024, 6:51:30 PM (5 months ago)
Author:
sommeria
Message:

new display of false vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/extract_rdvision.m

    r1134 r1143  
    308308%             m.Data=data;
    309309    %%%%%%%
    310         timestamp=zeros(1,numel(m.Data));
    311         for ii=1: numel(m.Data)
    312             timestamp(ii)=m.Data(ii).timestamp;
    313         end
    314         if isequal(Param.IndexRange.first_i,1)
     310    timestamp=zeros(1,numel(m.Data));
     311    for ii=1: numel(m.Data)
     312        timestamp(ii)=m.Data(ii).timestamp;
     313    end
     314    if isequal(Param.IndexRange.first_i,1)
    315315        [nbfield1,nbfield2,msg]=copyfile_modif(filexml,timestamp,newxml); %copy the xml file in the upper folder
    316316        [XmlData,errormsg]=imadoc2struct(newxml);% check reading of the new xml file
     
    319319            return
    320320        end
    321         timestamp=timestamp(1:nbfield1*nbfield2);
    322         timestamp=reshape(timestamp,nbfield2,nbfield1);
    323         difftime=XmlData.Time(2:end,2:end)'-timestamp;
    324         disp(['time from xml and timestamp differ by ' num2str(max(max(abs(difftime))))])
    325         if max(abs(difftime))>0.01
    326             checkpreserve=1;% will not erase the initial files, possibility of error
    327         end     
    328         % checking consistency with the xml file
    329         %     if ~isequal(SeqData.nb_frames,numel(timestamp))
    330         %         disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str(numel(timestamp))] ,checkrun);
    331         %         return
    332         %     end
     321        if numel(timestamp)~=nbfield1*nbfield2
     322            disp('WARNING: total image number defined by the xml file differs from  the number of frames ')
     323        else
     324            timestamp=reshape(timestamp,nbfield2,nbfield1);
     325            difftime=XmlData.Time(2:end,2:end)'-timestamp;
     326            disp(['time from xml and timestamp differ by ' num2str(max(max(abs(difftime))))])
     327            if max(abs(difftime))>0.01
     328                checkpreserve=1;% will not erase the initial files, possibility of error
     329            end
     330        end
    333331    else
    334332       [nbfield1,nbfield2,msg]=copyfile_modif(filexml,timestamp,'');
Note: See TracChangeset for help on using the changeset viewer.