============================================================== MAKE_COMBINED_MODEL: Creates a combined model of shape and intensity using principal component analysis. Code written by Katherine Smith, 2003 GENERAL [c_pcs, c_variances, c_params, c_mean, c_total_var, c_impdata] = make_combined_model(shape_model, intensity_model, shape_weight); INPUT/S -shape_model: The shape model for the combined model. -intensity_model: The intensity model for the combined model. -shape_weight: The weight W assigned to shape in the aggregation. OUTPUT/S -c_pcs: -c_variances: -c_params: -c_mean: -c_total_var: -c_impdata: PENDING WORK -Complete the meaning of the outputs. See st_pca for details. KNOWN BUG/S -None. COMMENT/S - RELATED FUNCTION/S SHOW_SHAPE_MODEL, SHOW_INTENSITY_MODEL, SHOW_COMBINED_MODEL, ST_PCA ABOUT -Created: November 23rd, 2003 -Last update: Novermber 27th, 2003 -Revision: 0.0.2 -Author: R. S. Schestowitz, University of Manchester ==============================================================
0001 function [c_pcs, c_variances, c_params, c_mean, c_total_var, c_impdata] = ... 0002 make_combined_model(shape_model, intensity_model, shape_weight); 0003 % ============================================================== 0004 % MAKE_COMBINED_MODEL: Creates a combined model of shape and intensity 0005 % using principal component analysis. 0006 % 0007 % Code written by Katherine Smith, 2003 0008 % 0009 % GENERAL 0010 % 0011 % [c_pcs, c_variances, c_params, c_mean, c_total_var, c_impdata] = 0012 % make_combined_model(shape_model, intensity_model, shape_weight); 0013 % 0014 % INPUT/S 0015 % 0016 % -shape_model: 0017 % The shape model for the combined model. 0018 % 0019 % -intensity_model: 0020 % The intensity model for the combined model. 0021 % 0022 % -shape_weight: 0023 % The weight W assigned to shape in the aggregation. 0024 % 0025 % OUTPUT/S 0026 % 0027 % -c_pcs: 0028 % 0029 % -c_variances: 0030 % 0031 % -c_params: 0032 % 0033 % -c_mean: 0034 % 0035 % -c_total_var: 0036 % 0037 % -c_impdata: 0038 % 0039 % PENDING WORK 0040 % 0041 % -Complete the meaning of the outputs. See st_pca for details. 0042 % 0043 % KNOWN BUG/S 0044 % 0045 % -None. 0046 % 0047 % COMMENT/S 0048 % 0049 % - 0050 % 0051 % RELATED FUNCTION/S 0052 % 0053 % SHOW_SHAPE_MODEL, SHOW_INTENSITY_MODEL, SHOW_COMBINED_MODEL, ST_PCA 0054 % 0055 % ABOUT 0056 % 0057 % -Created: November 23rd, 2003 0058 % -Last update: Novermber 27th, 2003 0059 % -Revision: 0.0.2 0060 % -Author: R. S. Schestowitz, University of Manchester 0061 % ============================================================== 0062 0063 shape_weight = repmat(shape_weight, size(shape_model.params,1),1); 0064 % create weighing vector as long as the shape model paramaters 0065 weighted_shape_params = shape_model.params .* shape_weight; 0066 % apply some weighing 0067 %weighted_shape_params = shape_params .* repmat(shape_weight,size(shape_params,1),1); 0068 combined_data = [weighted_shape_params intensity_model.params]; 0069 % append weight and intensity (aggregate) 0070 [c_pcs,c_variances,c_params, c_mean, c_total_var, c_impdata] = st_pca(combined_data, 0.999999); 0071 % use principal component analysis to get outputs