Home > Source > Evaluation > eval_model_multi_warp.m

eval_model_multi_warp

PURPOSE ^

EVAL_MODEL_MULTI_WARP: apply a composite (multi-point) warp and evaluate model

SYNOPSIS ^

function [score, warped_points] = eval_model_multi_warp(knot_displacements, init_knots, unwarped_image_vec, unwarped_points_vec, image_set, points_set, n_modes, start_points_vec, warp_params, model_evaluation_method, weighting_normalisation_method, shape_weight, variation_kept, show_warps_while_optimising)

DESCRIPTION ^

 EVAL_MODEL_MULTI_WARP: apply a composite (multi-point) warp and evaluate model

 Code written by Katherine Smith, 2003

    GENERAL

      

    INPUT/S

      -
           
    OUTPUT/S

      -
           

    PENDING WORK

      -

    KNOWN BUG/S

      -None.

    COMMENT/S

      -

    RELATED FUNCTION/S

      P

    ABOUT

      -Created:     November 2003
      -Last update: March 26th, 2004
      -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 [score, warped_points] = eval_model_multi_warp(knot_displacements, init_knots, unwarped_image_vec, unwarped_points_vec, image_set, points_set, n_modes, start_points_vec, warp_params, model_evaluation_method, weighting_normalisation_method, shape_weight, variation_kept, show_warps_while_optimising)
0002 % EVAL_MODEL_MULTI_WARP: apply a composite (multi-point) warp and evaluate model
0003 %
0004 % Code written by Katherine Smith, 2003
0005 %
0006 %    GENERAL
0007 %
0008 %
0009 %
0010 %    INPUT/S
0011 %
0012 %      -
0013 %
0014 %    OUTPUT/S
0015 %
0016 %      -
0017 %
0018 %
0019 %    PENDING WORK
0020 %
0021 %      -
0022 %
0023 %    KNOWN BUG/S
0024 %
0025 %      -None.
0026 %
0027 %    COMMENT/S
0028 %
0029 %      -
0030 %
0031 %    RELATED FUNCTION/S
0032 %
0033 %      P
0034 %
0035 %    ABOUT
0036 %
0037 %      -Created:     November 2003
0038 %      -Last update: March 26th, 2004
0039 %      -Revision:    0.0.2
0040 %      -Author:      R. S. Schestowitz, University of Manchester
0041 % ==============================================================
0042 
0043 
0044 % scale it all down to try and get it to move more!
0045 %init_knots = init_knots*0.01;
0046 %start_points_vec = start_points_vec*0.01;
0047 
0048 warped_points = nrr_trans_1d(start_points_vec, init_knots, init_knots + knot_displacements, warp_params, []);
0049 
0050 if (show_warps_while_optimising == 1),
0051    figure(40);
0052    plot(warped_points);
0053    axis([0 size(unwarped_image_vec,1) -1 1]);
0054 end 
0055  
0056 warped_image = interp1(unwarped_points_vec,unwarped_image_vec,warped_points, 'linear',0);
0057 image_set(:,size(image_set,2)+1) = warped_image;
0058 points_set(:,size(points_set,2)+1) = warped_points;
0059 
0060 c_model = build_model(image_set, points_set, variation_kept, '', weighting_normalisation_method, shape_weight);
0061 score = measure_model(c_model.variances, n_modes, model_evaluation_method, c_model);

Generated on Fri 14-May-2004 10:05:30 by m2html © 2003