Exemple #1
0
 public List <UKI_DataMovement> getDataMove()
 {
     if (this.data_movement_adj.Count == 0)
     {
         UKI_Offline uki = new UKI_Offline();
         uki.UKI_OfflineProcessing(getDataRaw(true), -1);//previously use -1
         this.data_movement_adj = TheUKI.adjustMovementData(uki.data.data_movement);
     }
     return(this.data_movement_adj);
 }
Exemple #2
0
 public void offline_process(UKI_Offline mr)
 {
     offline_skel_current = mr.current_data;
     offline_updateSkel(offline_skel_current);
     //if (ready)
     //{
     offline_calMove();
     calSum();
     calSumAvg();
     //}
 }
Exemple #3
0
 //Motion Recognition
 private void butMR_test_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         String path_RawData;
         foreach (DataRow r in dataTable.Rows)
         {
             try
             {
                 path_RawData = r[col_path].ToString();
                 string      folderName = TheTool.getFileName_byPath(path_RawData);
                 UKI_Offline mr         = new UKI_Offline();
                 mr.UKI_OfflineProcessing(TheUKI.csv_loadFileTo_DataRaw(path_RawData, 0), 1);
                 mr.data.exportFile(folderName, "UKI_", true, true, false);
             }
             catch (Exception ex) { TheSys.showError(r[col_path].ToString() + " : " + ex.ToString()); }
         }
         System.Windows.MessageBox.Show(@"Save to file", "Export Data");
     }
     catch (Exception ex) { TheSys.showError(ex); }
 }
Exemple #4
0
        //Motion Analysis on 1 File
        //All Data (Whole Sequence) - All Motion
        //Output: Matrix
        static public string motionAnalysis(String path_load, String path_save, List <m_Motion> list_motions)
        {
            string              currentFileName = TheTool.getFileName_byPath(path_load);
            string              matrix_data     = currentFileName;
            List <UKI_DataRaw>  list_raw        = TheUKI.csv_loadFileTo_DataRaw(path_load, 0);
            List <logDetection> log_list        = new List <logDetection>();//keep output summary
            //--- Preprocess to obtain BasePosture Data
            UKI_Offline mr = new UKI_Offline();

            mr.UKI_OfflineProcessing(list_raw, 0);
            List <UKI_Data_AnalysisForm> data = TheUKI.getData_AnalysisForm(mr.data.data_raw, mr.data.data_bp);

            //--- Analysis Motion by Motion
            foreach (m_Motion motion in list_motions)
            {
                Boolean      detected = TheRuleTester.testDetectMotion(data, motion.inputs);
                logDetection log      = TheRuleTester.temp_log;
                //
                log.info = motion.name + " ( " + log.info + " )";
                if (detected)
                {
                    log.info = "[" + log.detectAt + "] " + log.info;
                }
                else
                {
                    log.info = "[X] " + log.info;
                }
                log_list.Add(log);
                matrix_data += "," + TheTool.convertBoolean_01(detected);
            }
            //--------------------------------
            TheSys.showError("File: " + currentFileName);
            foreach (logDetection s in log_list.OrderBy(o => o.detectAt).ThenBy(o => o.num_pose))
            {
                TheSys.showError(s.info);
            }
            TheSys.showError("---------------------");
            return(matrix_data);
        }