source: trunk/src/script_lavision2png.m @ 1134

Last change on this file since 1134 was 1128, checked in by sommeria, 10 months ago

script_lavision added

File size: 2.4 KB
Line 
1Project='/.fsnet/project/meige/2023/23ADDUP'
2ProjectPNG=fullfile(Project,'PNG');
3%% calibration images
4%calib_file='B368_cal.im7';
5% calib_file='B382_cal.im7';
6% calib_file='B388_cal.im7';
7% InputFile=fullfile(ProjectPNG,'0_REF_FILES',calib_file);
8%  Input=readimx(InputFile);
9%                A=Input.Frames{1}.Components{1}.Planes{1}';
10% OutputFile_1=fullfile(ProjectPNG,'0_REF_FILES',regexprep(calib_file,'im7','png'));
11%                imwrite(A,OutputFile_1,'png');
12           
13%% data series       
14
15%Series='PIV_AddUp_2023_10_plan_dessus_buses_max_hauteur_plateau415mm';%mauvais
16     % Exp='11_Cam_Date=231019_Time=161858_dt10000micros';
17%Series='PIV_AddUp_2023_10_plan_dessus_buses_hauteur_plateau388mm';
18      % Exp='14_Cam_Date=231020_Time=093149_dt2500micros'
19Series='/PIV_AddUp_2023_10_plan_buses_hauteur_plateau382mm';
20       %Exp='10_Cam_Date=231019_Time=151513_2500micros';
21       %Exp='3_Cam_Date=231018_Time=143914_ens_avec_argon_dt2500micros';
22       %Exp='2_Cam_Date=231018_Time=113731_tuyau_int_inj_avec_argon_dt2500micros'
23      % Exp='5_Cam_Date=231018_Time=163728'
24       Exp='7_Cam_Date=231019_Time=111953_dt2000micros'
25      % Exp='1_Cam_Date=231018_Time=101459'
26       
27       
28%Series='PIV_AddUp_2023_10_plan_dessous_buses_hauteur_plateau368mm';%meilleur
29       %Exp='Cam_Date=231020_Time=112942';
30
31       Davies=fullfile(Project,Series,Exp);
32       if ~exist(Davies,'dir')
33           'Davies does not exist'
34       else
35           PNG=regexprep(fullfile(ProjectPNG,Series),'=','');
36           if ~exist(PNG,'dir')
37               succes=mkdir(ProjectPNG,Series)
38           end
39           DataDir=fullfile(Project,Series,Exp);
40           PNGDataDir=regexprep(fullfile(ProjectPNG,Series,Exp),'=','');%remove '='
41           if ~exist(PNGDataDir,'dir')
42               succes=mkdir(fullfile(ProjectPNG,Series),regexprep(Exp,'=',''));
43           end
44           for ilist=1870:2000%4000
45               ilist
46               InputFile=fullfile(DataDir,['B' num2str(ilist,'%05d') '.im7']);
47               Input=readimx(InputFile);
48               A=Input.Frames{1}.Components{1}.Planes{1}';
49               B=Input.Frames{2}.Components{1}.Planes{1}';
50               OutputFile_1=fullfile(PNGDataDir,['B' num2str(ilist,'%05d') 'a.png']);
51               imwrite(A,OutputFile_1,'png');
52               OutputFile_2=fullfile(PNGDataDir,['B' num2str(ilist,'%05d') 'b.png']);
53               imwrite(B,OutputFile_2,'png');
54           end
55       end
Note: See TracBrowser for help on using the repository browser.