Home > Source > Helper > find_linear_warp.m

find_linear_warp

PURPOSE ^

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

SYNOPSIS ^

function points = find_linear_warp(ref_points_vec, ref_image_vec, image_width)

DESCRIPTION ^

 ==============================================================
 FIND_LINEAR_WARP: Performs a linear warp on the data.

 Code written by Katherine Smith, 2003

    GENERAL

      points = find_linear_warp(ref_points_vec, ref_image_vec, image_width)

    INPUT/S

      -ref_points_vec:
           Referecne points before warp is applied.

      -ref_image_vec:
           Image vector.

      -image_width:
           Image width (in 1-D).
           
    OUTPUT/S

      -points:
           The points after warp is applied.

    PENDING WORK

      -

    KNOWN BUG/S

      -None.

    COMMENT/S

      -

    RELATED FUNCTION/S

      LINEAR_WARP

    ABOUT

      -Created:     November 23rd, 2003
      -Last update: Novermber 26th, 2003
      -Revision:    0.0.2
      -Author:      R. S. Schestowitz, University of Manchester
 ==============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function points = find_linear_warp(ref_points_vec, ref_image_vec, image_width)
0002 % ==============================================================
0003 % FIND_LINEAR_WARP: Performs a linear warp on the data.
0004 %
0005 % Code written by Katherine Smith, 2003
0006 %
0007 %    GENERAL
0008 %
0009 %      points = find_linear_warp(ref_points_vec, ref_image_vec, image_width)
0010 %
0011 %    INPUT/S
0012 %
0013 %      -ref_points_vec:
0014 %           Referecne points before warp is applied.
0015 %
0016 %      -ref_image_vec:
0017 %           Image vector.
0018 %
0019 %      -image_width:
0020 %           Image width (in 1-D).
0021 %
0022 %    OUTPUT/S
0023 %
0024 %      -points:
0025 %           The points after warp is applied.
0026 %
0027 %    PENDING WORK
0028 %
0029 %      -
0030 %
0031 %    KNOWN BUG/S
0032 %
0033 %      -None.
0034 %
0035 %    COMMENT/S
0036 %
0037 %      -
0038 %
0039 %    RELATED FUNCTION/S
0040 %
0041 %      LINEAR_WARP
0042 %
0043 %    ABOUT
0044 %
0045 %      -Created:     November 23rd, 2003
0046 %      -Last update: Novermber 26th, 2003
0047 %      -Revision:    0.0.2
0048 %      -Author:      R. S. Schestowitz, University of Manchester
0049 % ==============================================================
0050 
0051 % Smith: need to find the right hi, lo, new_hi and new_lo to make correct warp
0052 [params, result] = fminsearch(@eval_msd_linear_warp, [max(ref_points_vec)/4,max(ref_points_vec)*3/4,max(ref_points_vec)/4,max(ref_points_vec)*3/4],optimset('Display','off','TolX',0.001,'TolFun',0.001),ref_points_vec, ref_image_vec);
0053 points = linear_warp(points, params(1),params(2),params(3),params(4));

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