public void add_samples(HObject ho_Regions, HTuple hv_GMMHandle, HTuple hv_Class) { // Local iconic variables HObject ho_ConnectedRegions = null, ho_SelectedRegions = null; HObject ho_Region = null; // Local control variables HTuple hv_Number = null, hv_J = null, hv_Features = new HTuple(); // Initialize local and output iconic variables HOperatorSet.GenEmptyObj(out ho_ConnectedRegions); HOperatorSet.GenEmptyObj(out ho_SelectedRegions); HOperatorSet.GenEmptyObj(out ho_Region); HOperatorSet.CountObj(ho_Regions, out hv_Number); HTuple end_val1 = hv_Number; HTuple step_val1 = 1; for (hv_J = 1; hv_J.Continue(end_val1, step_val1); hv_J = hv_J.TupleAdd(step_val1)) { ho_ConnectedRegions.Dispose(); HOperatorSet.Connection(ho_Regions, out ho_ConnectedRegions); ho_SelectedRegions.Dispose(); HOperatorSet.SelectShape(ho_ConnectedRegions, out ho_SelectedRegions, "area", "and", 1000, 100000); ho_Region.Dispose(); HOperatorSet.SelectObj(ho_SelectedRegions, out ho_Region, hv_J); get_features(ho_Region, out hv_Features); HOperatorSet.AddSampleClassGmm(hv_GMMHandle, hv_Features, hv_Class, 0); } ho_ConnectedRegions.Dispose(); ho_SelectedRegions.Dispose(); ho_Region.Dispose(); return; }