function [] = perturb_landmark_points(input_path, output_path, filter, sigma)
% PERTURB_LANDMARK_POINTS: perturn .pts files by taking as input a directory with pts files.
%  -- Overwrite existing files. --
%
%    GENERAL
%
%      [] = perturb_landmark_points(input_path, output_path, filter, sigma)
%
%    INPUT/S
%
%      -Omitted
%
%    OUTPUT/S
%
%      -Omitted
%
%    PENDING WORK
%
%      -
%
%    KNOWN BUG/S
%
%      -None.
%
%    COMMENT/S
%
%      -
%
%    RELATED FUNCTION/S
%
%      
%
%    ABOUT
%
%      -Created:     February 2005
%      -Last update: March 15th, 2005
%      -Revision:    0.0.1
%      -Author:      R. S. Schestowitz, University of Manchester
% ==============================================================


cd(input_path);
listing = dir(filter);

for i=1:size(listing,1),
   if (listing(i).isdir == 0),
      cd(input_path);
      [pts, N_pts]=data_read_pts(listing(i).name);
      pts = pts + randn(N_pts,2) * sigma;
      cd (output_path);
      data_write_pts(listing(i).name,pts);
   end
end