Improved Digital Image Correlation (DIC)
14 Aug 2013
15 Aug 2013)
Calculate full-field displacements and strains from a set of images with a random speckle pattern.
%This function uses the smoothing algorithm that the user decides to smooth
%the displacement data
function [dispx_smooth,dispy_smooth,smooth_setup] = smooth_disp(...
%Get the smoothing algorithm from the smooth setup structure
smoothing_algorithm = smooth_setup.smoothing_algorithm;
if strcmp(smoothing_algorithm,'no smoothing'); %No smoothing is requested
if isempty(dispx_smooth_prev) %No previous smoothing
%Set the raw data as the smoothed data
dispx_smooth = dispx;
dispy_smooth = dispy;
else %dispx_smooth_prev is NOT empty-->Previous smoothing
%Set the previously smoothed data as the current smoothed data
dispx_smooth = dispx_smooth_prev;
dispy_smooth = dispy_smooth_prev;
elseif strcmp(smoothing_algorithm,'moving average') %Use my code for moving average
[dispx_smooth,dispy_smooth] = smooth_moving_average(smooth_setup,...