Home > Source > Bin > apply_noise_to_points.m

apply_noise_to_points

PURPOSE ^

==============================================================

SYNOPSIS ^

function points = apply_perturbation_to_points (points, offset_extent, perturbation_method)

DESCRIPTION ^

 ==============================================================
 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
 ==============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Thu 13-May-2004 18:00:46 by m2html © 2003