-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathremove_water_column.m
More file actions
47 lines (42 loc) · 1.27 KB
/
remove_water_column.m
File metadata and controls
47 lines (42 loc) · 1.27 KB
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
function img = remove_water_column(img, edge, varargin)
% This function sets the water column to a chosen value, value 0 or 1 are
% best choices
%
% Input-
%
% img: Side scan sonar image, either left or right
% nadir: A structure that contains the nadir edge, first retunrs
%
% Output-
% img: the same image but with the water column set to zero
%
%
% Example:
% left_img = remove_water_column(left_img, nadir, 'value', 1); setting
% the water column to 1
%
%
% Author: Mohammed Al-Rawi [al-rawi@ut.pt]
% Project: SWARMs
% Date: Jan 12, 2017
%
%
%
% License:
%=====================================================================
% This is part of the UNDROIP toolbox, released under
% the GPL. https://github.com/rawi707/UNDROIP/blob/master/LICENSE
%
% The UNDROIP toolbox is available free and
% unsupported to those who might find it useful. We do not
% take any responsibility whatsoever for any problems that
% you have related to the use of the UNDROIP toolbox.
%
% ======================================================================
%%
defaults.value=0;
args = propval(varargin, defaults);
[n_pings, no_points] = size(img);
for ping_idx = 1:n_pings;
img(ping_idx, 1:edge(ping_idx)-1)= args.value;
end