Home > Source > Evaluation > eval_groupwise_single_point.m

eval_groupwise_single_point

PURPOSE ^

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

SYNOPSIS ^

function [score, warped_points] = eval_groupwise_single_point (params, warp_centre, r, unwarped_image_vec, unwarped_points_vec, image_set, points_set, n_modes, start_points_vec, model_evaluation_method, weighting_normalisation_method, shape_weight, variation_kept, pdf_evaluation_method, kernel)

DESCRIPTION ^

 ==============================================================
 OPTIMISE_GROUPWISE_SINGLE_POINT: Uses PDF's to minimise group-wise complexity

    GENERAL

      function [score, warped_points] = 
       eval_groupwise_single_point(params, warp_centre, r, unwarped_image_vec,
       unwarped_points_vec, image_set, points_set, n_modes, start_points_vec,
       model_evaluation_method, weighting_normalisation_method, shape_weight,
       variation_kept)

 
    INPUT/S

      -X:
          X
           
    OUTPUT/S

      -X:
           X

    PENDING WORK
      
      

    KNOWN BUG/S

      

    COMMENT/S

      

    RELATED FUNCTION/S

      

    ABOUT
      -Created:     February 9th, 2004
      -Last update: February 2004
      -Revision:    0.1.0
      -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_groupwise_single_point (params, warp_centre, r, unwarped_image_vec, unwarped_points_vec, image_set, points_set, n_modes, start_points_vec, model_evaluation_method, weighting_normalisation_method, shape_weight, variation_kept, pdf_evaluation_method, kernel)
0002 % ==============================================================
0003 % OPTIMISE_GROUPWISE_SINGLE_POINT: Uses PDF's to minimise group-wise complexity
0004 %
0005 %    GENERAL
0006 %
0007 %      function [score, warped_points] =
0008 %       eval_groupwise_single_point(params, warp_centre, r, unwarped_image_vec,
0009 %       unwarped_points_vec, image_set, points_set, n_modes, start_points_vec,
0010 %       model_evaluation_method, weighting_normalisation_method, shape_weight,
0011 %       variation_kept)
0012 %
0013 %
0014 %    INPUT/S
0015 %
0016 %      -X:
0017 %          X
0018 %
0019 %    OUTPUT/S
0020 %
0021 %      -X:
0022 %           X
0023 %
0024 %    PENDING WORK
0025 %
0026 %
0027 %
0028 %    KNOWN BUG/S
0029 %
0030 %
0031 %
0032 %    COMMENT/S
0033 %
0034 %
0035 %
0036 %    RELATED FUNCTION/S
0037 %
0038 %
0039 %
0040 %    ABOUT
0041 %      -Created:     February 9th, 2004
0042 %      -Last update: February 2004
0043 %      -Revision:    0.1.0
0044 %      -Author:      R. S. Schestowitz, University of Manchester
0045 % ==============================================================
0046 
0047 %d = params(1);
0048 start_points = unwarped_points_vec;
0049 max_d = 0.67;
0050 
0051 if (any((abs(params) > max_d)) | any(warp_centre-r <-1) | any(warp_centre+r > 1))
0052   score = realmax;
0053   warped_points = unwarped_points_vec;
0054 else
0055   for i=1:size(params,2)
0056     warped_points = cps_warp_1d(start_points_vec,warp_centre(i),r(i),params(i));
0057     start_points = warped_points;
0058   end
0059   warped_image = interp1(unwarped_points_vec,unwarped_image_vec,warped_points, 'linear',0);
0060   image_set(:,size(image_set,2)+1) = warped_image;
0061   points_set(:,size(points_set,2)+1) = warped_points;
0062 
0063   
0064   % Note RSS: compute pdf of the intensities
0065   % evaluate using log(pdf) to return a score
0066   groupwise_pdf = compute_pdf(image_set, points_set, kernel, shape_weight);
0067   score = measure_pdf(groupwise_pdf, pdf_evaluation_method, warped_image);
0068   % Chnage above: addition of warped_points -- needs to be added to
0069   % multi_point too
0070 end

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