


APPLY_PERTURBATION_TO_POINTS: Apply noise to (correct) warp
GENERAL
points= apply_perturbation_to_points (points, offset_extent)
INPUT/S
-points
The points defining the CPS warp
-offset entent
Defines the amount of noise/distortion
-perturbation_method
The method of applying the change
OUTPUT/S
-points
The points after offset application
PENDING WORK
-
KNOWN BUG/S
-
COMMENT/S
-
RELATED FUNCTION/S
ABOUT
-Created: March 10th, 2004
-Last update: March 11th, 2004
-Revision: 0.0.3
-Author: R. S. Schestowitz, University of Manchester
==============================================================

0001 function points = apply_perturbation_to_points (points, offset_extent, perturbation_method) 0002 % APPLY_PERTURBATION_TO_POINTS: Apply noise to (correct) warp 0003 % 0004 % 0005 % GENERAL 0006 % 0007 % points= apply_perturbation_to_points (points, offset_extent) 0008 % 0009 % INPUT/S 0010 % 0011 % -points 0012 % The points defining the CPS warp 0013 % 0014 % -offset entent 0015 % Defines the amount of noise/distortion 0016 % 0017 % -perturbation_method 0018 % The method of applying the change 0019 % 0020 % OUTPUT/S 0021 % 0022 % -points 0023 % The points after offset application 0024 % 0025 % PENDING WORK 0026 % 0027 % - 0028 % 0029 % KNOWN BUG/S 0030 % 0031 % - 0032 % 0033 % COMMENT/S 0034 % 0035 % - 0036 % 0037 % RELATED FUNCTION/S 0038 % 0039 % 0040 % 0041 % ABOUT 0042 % 0043 % -Created: March 10th, 2004 0044 % -Last update: March 11th, 2004 0045 % -Revision: 0.0.3 0046 % -Author: R. S. Schestowitz, University of Manchester 0047 % ============================================================== 0048 0049 0050 if (strcmp(perturbation_method, 'random noise')), 0051 for i=1:size(points,2), 0052 points(i) = points(i) + offset_extent * (rand - 0.5) * 0.1; 0053 % points = average_smooth(points,5); 0054 end 0055 elseif (strcmp(perturbation_method, 'CPS warp')), 0056 % to be implemented 0057 end