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