Home > Source > Evaluation > eval_model_multi_warp.m

eval_model_multi_warp

PURPOSE ^

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

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

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