Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "rt_nonfinite.h"
00012 #include "Optimal_affine_tracking_3d16_fast_realtime.h"
00013 #include "compute_prob1.h"
00014 #include "LoadKinectMesh_realtime.h"
00015 #include "init_variables.h"
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 void Optimal_affine_tracking_3d16_fast_realtime(const real_T pty[4], const
00029 real_T ptx[4], real_T p[12])
00030 {
00031 static real_T Irgb[504063];
00032 static real_T Ixyz[504063];
00033 real_T center_y;
00034 real_T center_x;
00035 real_T corner_p[12];
00036 static real_T mean_img[3888];
00037 static real_T point_matrix[3888];
00038 static real_T AR_velocity[2250000];
00039 static real_T X_par[2250000];
00040 static real_T dw_dp[15552];
00041 static real_T tracked_images[38880000];
00042 static real_T X_par_pred[2250000];
00043 int32_T t;
00044 real_T centroid[3];
00045 real_T Aff_matrix[9];
00046 int32_T i0;
00047 int32_T i1;
00048 int32_T i2;
00049
00050
00051
00052 LoadKinectMesh_realtime(Ixyz, Irgb);
00053
00054
00055 init_variables(Ixyz, ptx, pty, X_par_pred, tracked_images, dw_dp, X_par,
00056 AR_velocity, point_matrix, mean_img, corner_p, ¢er_x,
00057 ¢er_y);
00058
00059
00060 for (t = 0; t < 9999; t++) {
00061 LoadKinectMesh_realtime(Ixyz, Irgb);
00062
00063
00064
00065 compute_prob1(X_par, X_par_pred, AR_velocity, dw_dp, (real_T)t + 2.0,
00066 center_x, center_y, Ixyz, point_matrix, mean_img,
00067 tracked_images, Aff_matrix, centroid);
00068
00069
00070
00071
00072 for (i0 = 0; i0 < 3; i0++) {
00073 for (i1 = 0; i1 < 4; i1++) {
00074 p[i0 + 3 * i1] = 0.0;
00075 for (i2 = 0; i2 < 3; i2++) {
00076 p[i0 + 3 * i1] += Aff_matrix[i0 + 3 * i2] * corner_p[i2 + 3 * i1];
00077 }
00078 }
00079 }
00080
00081
00082
00083
00084
00085
00086
00087 }
00088 }
00089
00090