EVAL_MSD_CPS_WARP: get similarity score between CPS warped image and reference. (Evaluare the clamped-plate spline warp using mean-squared-difference) Code written by Katherine Smith, 2003 GENERAL score = eval_msd_cps_warp(params, start_points_vec, ref_image_vec) INPUT/S -params: The paramters of the warps. params(1): warp centre params(2): r params(3): d -start_points_vector: Points to be warped? -ref_image_vec: The reference image vector. (Reference image vector to be compared to warped image). OUTPUT/S -score: The similarity score w.r.t. the reference image. (Mean-squared difference score) PENDING WORK - KNOWN BUG/S -None. COMMENT/S - RELATED FUNCTION/S LINEAR_WARP, POOR_LINEAR_WARP, CPS_WARP_1D, MSD, EVAL_MSD, EVAL_MODEL_MULTI_WARP ABOUT -Created: November 23rd, 2003 -Last update: Novermber 27th, 2003 -Revision: 0.0.4 -Author: R. S. Schestowitz, University of Manchester ==============================================================
0001 function score = eval_msd_cps_warp(params, start_points_vec, ref_image_vec) 0002 % EVAL_MSD_CPS_WARP: get similarity score between CPS warped image and 0003 % reference. (Evaluare the clamped-plate spline warp using 0004 % mean-squared-difference) 0005 % 0006 % Code written by Katherine Smith, 2003 0007 % 0008 % GENERAL 0009 % 0010 % score = eval_msd_cps_warp(params, start_points_vec, ref_image_vec) 0011 % 0012 % INPUT/S 0013 % 0014 % -params: 0015 % The paramters of the warps. 0016 % 0017 % params(1): warp centre 0018 % params(2): r 0019 % params(3): d 0020 % 0021 % -start_points_vector: 0022 % Points to be warped? 0023 % 0024 % -ref_image_vec: 0025 % The reference image vector. 0026 % (Reference image vector to be compared to warped image). 0027 % 0028 % OUTPUT/S 0029 % 0030 % -score: 0031 % The similarity score w.r.t. the reference image. 0032 % (Mean-squared difference score) 0033 % 0034 % PENDING WORK 0035 % 0036 % - 0037 % 0038 % KNOWN BUG/S 0039 % 0040 % -None. 0041 % 0042 % COMMENT/S 0043 % 0044 % - 0045 % 0046 % RELATED FUNCTION/S 0047 % 0048 % LINEAR_WARP, POOR_LINEAR_WARP, CPS_WARP_1D, MSD, EVAL_MSD, 0049 % EVAL_MODEL_MULTI_WARP 0050 % 0051 % ABOUT 0052 % 0053 % -Created: November 23rd, 2003 0054 % -Last update: Novermber 27th, 2003 0055 % -Revision: 0.0.4 0056 % -Author: R. S. Schestowitz, University of Manchester 0057 % ============================================================== 0058 0059 warped_points = cps_warp_1d(start_points_vec,params(1),params(2),params(3)); 0060 % warp the points 0061 warped_image = interp1(start_points_vec,ref_image_vec,warped_points); 0062 % interploate image to apply warp 0063 % warp image (rather use the warped points to interpolate the image) 0064 score = msd(ref_image_vec, warped_image); 0065 % evaluate mean squared difference between reference and warped image