Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVWDV committed Jun 6, 2021
2 parents 16fb4d2 + f7a1618 commit ccd7be0
Show file tree
Hide file tree
Showing 9 changed files with 1,970 additions and 445 deletions.
1,258 changes: 1,258 additions & 0 deletions GIV_GUI_initialize.m

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions functions/image cross correlation/GIVcore.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
inputs.realresolution = ceil(inputs.idealresolution/mean_resolution)*8;
%

%Check if cell size is at least 32 (needs to be at least 8*4)
if inputs.realresolution < 32
inputs.realresolution = 32;
end

%Initialize some parameters
newcol1 = {}; %import to external (new) array in order to be parralelized
newcol2 = {};
Expand Down
231 changes: 0 additions & 231 deletions functions/image cross correlation/GIVtrackmultifinal.asv

This file was deleted.

2 changes: 1 addition & 1 deletion functions/image cross correlation/GIVtrackmultifinal.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
% or parabolic fit
[x0, y0]=GIVtrackmultipeak(max_x1,max_y1,R(max_y1,max_x1),...
R(max_y1,max_x1-1),R(max_y1,max_x1+1),...
R(max_y1-1,max_x1),R(max_y1+1,max_x1),3,[M,winsize]);
R(max_y1-1,max_x1),R(max_y1+1,max_x1),2,[M,winsize]);


% Find the signal to Noise ratio
Expand Down
1 change: 1 addition & 0 deletions functions/image cross correlation/GIVtrackmultifirst.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
else
[max_y1,max_x1]=find(R==max(max(R(0.5*winsize+2:1.5*winsize-3,0.5*M+2:1.5*M-3))));
end


if length(max_x1)>1
max_x1=round(sum(max_x1.*(1:length(max_x1))')./sum(max_x1));
Expand Down
4 changes: 2 additions & 2 deletions functions/image processing and filters/cropmask.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
rightsizex = min(size_matrix(:,2));

if size(mask_0_1,1) ~= rightsizey || size(mask_0_1,2) ~=rightsizex
mask_0_1 = interp2(mask_0_1, linspace(1, size(mask_0_1,2), rightsizex).', linspace(1, size(mask_0_1,1), rightsizey));
mask_0_1 = interp2(double(mask_0_1), linspace(1, size(mask_0_1,2), rightsizex).', linspace(1, size(mask_0_1,1), rightsizey));
end

for i = 2:size(images,1)
if size(images{i,3},1) ~= rightsizey || size(images{i,3},2) ~=rightsizex
images{i,3} = interp2(images{i,3}, (linspace(1, size(images{i,3},2), rightsizex).'), linspace(1, size(images{i,3},1), rightsizey));
images{i,3} = interp2(double(images{i,3}), (linspace(1, size(images{i,3},2), rightsizex).'), linspace(1, size(images{i,3},1), rightsizey));
end
end
end
Expand Down
48 changes: 48 additions & 0 deletions functions/post-processing/fd_outlier_filter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
function [out_limits_fd] = fd_outlier_filter(full_fd,mean_fd,std_fd,num_stand_dev)
%Input = multi-array of flow directions
% mean flow direction
% stv of flow direction
%Output = binary array with location of outliers
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% GLACIER IMAGE VELOCIMETRY (GIV) %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %Code written by Max Van Wyk de Vries @ University of Minnesota
% %Credit to Ben Popken and Andrew Wickert for portions of the toolbox.
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %Portions of this toolbox are based on a number of codes written by
% %previous authors, including matPIV, IMGRAFT, PIVLAB, M_Map and more.
% %Credit and thanks are due to the authors of these toolboxes, and for
% %sharing their codes online. See the user manual for a full list of third
% %party codes used here. Accordingly, you are free to share, edit and
% %add to this GIV code. Please give us credit if you do, and share your code
% %with the same conditions as this.
%
% % Read the associated paper here:
% % doi.org/10.5194/tc-15-2115-2021
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %Version 1.0, Spring-Summer 2021%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %Feel free to contact me at [email protected]%



%Calculate the radial distance between each measurement and the mean flow
%direction

fd_dist = min(abs(full_fd-mean_fd),360-abs(full_fd-mean_fd));

% Create stv outlier detection matrix

fd_detection = (repmat(std_fd,size(full_fd,1),1)*num_stand_dev);


%Identify regions where the radial distance is larger than XX times the stv

out_limits_fd = double(fd_dist>fd_detection);

%Remove any pixels with a stv*num_stand_dev larger than 180 (in this case,
%there are no outliers

out_limits_fd = out_limits_fd-double(fd_detection>=180);

Loading

0 comments on commit ccd7be0

Please sign in to comment.