Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dot-tracking-package/calculate_displacement_gradients_scattered.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
27 lines (22 sloc)
1011 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [X_grid, Y_grid, dU_dx, dU_dy, dV_dx, dV_dy] = calculate_displacement_gradients_scattered(X, Y, U, V, grid_spacing) | |
% Function to calculate displacement gradients from scattered data | |
% | |
% INPUTS: | |
% X, Y: co-ordinates of the scattered points [pix.] | |
% U, V: displacements at the scattered points [pix.] | |
% grid_spacing: desired pixel grid spacing [pix.] | |
% | |
% OUTPUTS: | |
% X_grid, Y_grid: co-ordinates on the grid [pix.] | |
% dU_dx, dV_dy: displacement gradients [pix./pix.] | |
% | |
% AUTHORS: | |
% Lalit Rajendran (lrajendr@purdue.edu) | |
%% interpolate tracks | |
[X_grid, Y_grid, U_grid, V_grid] = interpolate_tracks(X, Y, U, V, grid_spacing); | |
%% calculate displacements gradients | |
dU_dx = gradient_dudxdvdy_compact_rich_modified(U_grid, grid_spacing, 2); | |
dU_dy = gradient_dudxdvdy_compact_rich_modified(U_grid, grid_spacing, 1); | |
dV_dx = gradient_dudxdvdy_compact_rich_modified(V_grid, grid_spacing, 2); | |
dV_dy = gradient_dudxdvdy_compact_rich_modified(V_grid, grid_spacing, 1); | |
end |