This repository has been archived by the owner on May 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
printAndSaveImageProducts.m
74 lines (64 loc) · 2.53 KB
/
printAndSaveImageProducts.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
function printAndSaveImageProducts(finalImages, cxPn, info)
% printAndSaveImageProducts(finalImages, cxPn, info)
%
% print snap, timex, bright and dark images to figures 10: 13. Then save
% them in the normal Argus format and save finalImages as a mat file
% info contains information about the argus station and camera
e0 = matlab2Epoch(finalImages.dn);
info.time = e0+1; % put images 1 second after stacks for ease of order.
figure(10); clf
imagesc(finalImages.snap);
xlabel('x (m)'); ylabel('y (m)'); title(['Snap for ' datestr(finalImages.dn)])
axis image; grid on
info.type = 'snap';
info.format = 'png';
fn = argusFilename(info);
eval(['print -dpng ' cxPn fn])
% and save the image products
info.type = 'imageProducts';
info.format = 'mat';
imageFn = argusFilename(info);
eval(['save ' cxPn imageFn ' finalImages']) % matlab version
figure(11); clf
imagesc(finalImages.x,finalImages.y,finalImages.timex);
xlabel('x (m)'); ylabel('y (m)'); title(['Timex for ' datestr(finalImages.dn)])
axis xy;axis image; grid on
info.type = 'timex';
info.format = 'png';
fn = argusFilename(info);
eval(['print -dpng ' cxPn fn])
figure(12); clf
imagesc(finalImages.x,finalImages.y,finalImages.bright);
xlabel('x (m)'); ylabel('y (m)'); title(['Bright for ' datestr(finalImages.dn)])
axis xy;axis image; grid on
info.type = 'bright';
info.format = 'png';
fn = argusFilename(info);
eval(['print -dpng ' cxPn fn])
figure(13); clf
imagesc(finalImages.x,finalImages.y,finalImages.dark);
xlabel('x (m)'); ylabel('y (m)'); title(['Dark for ' datestr(finalImages.dn)])
axis xy;axis image; grid on
info.type = 'dark';
info.format = 'png';
fn = argusFilename(info);
eval(['print -dpng ' cxPn fn])
%
% Copyright (C) 2017 Coastal Imaging Research Network
% and Oregon State University
% This program is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation, version 3 of the
% License.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with this program. If not, see
% <http://www.gnu.org/licenses/>.
% CIRN: https://coastal-imaging-research-network.github.io/
% CIL: http://cil-www.coas.oregonstate.edu
%
%key UAVProcessingToolbox
%