removeOutliers.cpp
Go to the documentation of this file.
00001 /*
00002  * removeOutliers.cpp
00003  *
00004  * Code generation for function 'removeOutliers'
00005  *
00006  * C source code generated on: Wed Jul 24 16:11:35 2013
00007  *
00008  */
00009 
00010 /* Include files */
00011 #include "rt_nonfinite.h"
00012 #include "Optimal_affine_tracking_3d16_fast_realtime.h"
00013 #include "removeOutliers.h"
00014 #include "compute_prob1.h"
00015 #include "abs.h"
00016 #include "std.h"
00017 #include "mean.h"
00018 
00019 /* Type Definitions */
00020 
00021 /* Named Constants */
00022 
00023 /* Variable Declarations */
00024 
00025 /* Variable Definitions */
00026 
00027 /* Function Declarations */
00028 
00029 /* Function Definitions */
00030 void removeOutliers(real_T XYZ_mat[3888])
00031 {
00032   real_T mu[3];
00033   real_T sigma[3];
00034   real_T y;
00035   real_T b_y;
00036   real_T c_y;
00037   real_T b_XYZ_mat[1296];
00038   int32_T i;
00039   real_T dv16[1296];
00040   real_T dv17[1296];
00041   real_T dv18[1296];
00042   boolean_T outliers[1296];
00043   int32_T tmp_size[1];
00044   int32_T tmp_data[1296];
00045   int32_T b_tmp_data[1296];
00046   int32_T loop_ub;
00047   c_mean(XYZ_mat, mu);
00048   b_std(XYZ_mat, sigma);
00049   y = 1.5 * sigma[0];
00050   b_y = 1.5 * sigma[1];
00051   c_y = 1.5 * sigma[2];
00052   for (i = 0; i < 1296; i++) {
00053     b_XYZ_mat[i] = XYZ_mat[2592 + i] - mu[2];
00054   }
00055 
00056   b_abs(b_XYZ_mat, dv16);
00057   for (i = 0; i < 1296; i++) {
00058     b_XYZ_mat[i] = XYZ_mat[i] - mu[0];
00059   }
00060 
00061   b_abs(b_XYZ_mat, dv17);
00062   for (i = 0; i < 1296; i++) {
00063     b_XYZ_mat[i] = XYZ_mat[1296 + i] - mu[1];
00064   }
00065 
00066   b_abs(b_XYZ_mat, dv18);
00067   for (i = 0; i < 1296; i++) {
00068     outliers[i] = ((dv17[i] > y) && (dv18[i] > b_y) && (dv16[i] > c_y));
00069   }
00070 
00071   eml_li_find(outliers, tmp_data, tmp_size);
00072   loop_ub = tmp_size[0] - 1;
00073   for (i = 0; i <= loop_ub; i++) {
00074     b_tmp_data[i] = tmp_data[i] - 1;
00075   }
00076 
00077   loop_ub = tmp_size[0] - 1;
00078   for (i = 0; i <= loop_ub; i++) {
00079     XYZ_mat[b_tmp_data[i]] = mu[0];
00080   }
00081 
00082   eml_li_find(outliers, tmp_data, tmp_size);
00083   loop_ub = tmp_size[0] - 1;
00084   for (i = 0; i <= loop_ub; i++) {
00085     b_tmp_data[i] = tmp_data[i] - 1;
00086   }
00087 
00088   loop_ub = tmp_size[0] - 1;
00089   for (i = 0; i <= loop_ub; i++) {
00090     XYZ_mat[1296 + b_tmp_data[i]] = mu[1];
00091   }
00092 
00093   eml_li_find(outliers, tmp_data, tmp_size);
00094   loop_ub = tmp_size[0] - 1;
00095   for (i = 0; i <= loop_ub; i++) {
00096     b_tmp_data[i] = tmp_data[i] - 1;
00097   }
00098 
00099   loop_ub = tmp_size[0] - 1;
00100   for (i = 0; i <= loop_ub; i++) {
00101     XYZ_mat[2592 + b_tmp_data[i]] = mu[2];
00102   }
00103 }
00104 
00105 /* End of code generation (removeOutliers.cpp) */


depth_tracker_ros_vr8
Author(s): shusain
autogenerated on Fri Dec 6 2013 20:45:47