private void btnProcess_Click(object sender, EventArgs e) { switch (lbMethods.SelectedIndex) { case (int)Methods.none: break; case (int)Methods.Susan: SusanCornerProperties sp = ControlPanel.Controls[0] as SusanCornerProperties; processing = new FrmProcessing("Conducting Susan Edge Detection"); processing.Show(); Log("Conducting Susan Edge Detection"); SetStatus("Please wait for edge detection"); Susan s = new Susan(CurrentImage); s.ImageComplete += s_ImageComplete; Task t = new Task(() => s.GetCorners(sp.DifferenceThreshold, sp.GeometricalThreshold)); t.Start(); break; default: break; } }
private void SusanCornerDetection() { swSusan.Reset(); // Used for timing functions. (good for testing changes in optimisation) swSusan.Start(); SusanCornerProperties sp = ControlPanel.Controls[0] as SusanCornerProperties; processing = new FrmProcessing("Conducting Susan Corner Detection"); processing.Show(); Log("Conducting Susan Corner Detection"); SetStatus("Please wait for corner detection"); Susan s = new Susan(CurrentImage); s.ImageComplete += s_ImageComplete; Task st = new Task(() => s.GetCorners(sp.DifferenceThreshold, sp.GeometricalThreshold)); st.Start(); }
private void SusanCornerDetection() { swSusan.Reset(); // Used for timing functions. (good for testing changes in optimisation) swSusan.Start(); if (ModificationPropertiesLog != null) { ModificationPropertiesLog("Conducting Susan Corner Detection"); } Susan s = new Susan(CurrentImage); s.ImageComplete += s_ImageComplete; Task st = new Task(() => s.GetCorners(sp.DifferenceThreshold, sp.GeometricalThreshold)); st.Start(); }
private void btnProcess_Click(object sender, EventArgs e) { switch (lbMethods.SelectedIndex) { case (int)Methods.none: break; case (int)Methods.Susan: ssw = new Stopwatch(); // Used for timing functions. (good for testing changes in optimisation) SusanCornerProperties sp = ControlPanel.Controls[0] as SusanCornerProperties; processing = new FrmProcessing("Conducting Susan Corner Detection"); processing.Show(); Log("Conducting Susan Corner Detection"); SetStatus("Please wait for corner detection"); Susan s = new Susan(CurrentImage); s.ImageComplete += s_ImageComplete; Task st = new Task(() => s.GetCorners(sp.DifferenceThreshold, sp.GeometricalThreshold)); ssw.Start(); st.Start(); break; case (int)Methods.Moravec: smw = new Stopwatch(); // Used for timing functions. (good for testing changes in optimisation) MoravecCornerProperties mp = ControlPanel.Controls[0] as MoravecCornerProperties; processing = new FrmProcessing("Conducting Moravec Corner Detection"); processing.Show(); Log("Conducting Moravec Corner Detection"); SetStatus("Please wait for corner detection"); Moravec m = new Moravec(CurrentImage); m.ImageComplete += m_ImageComplete; m.LogMessage += m_LogMessage; Task mt = new Task(() => m.GetCorners(mp.Threshold, mp.Window)); smw.Start(); mt.Start(); break; default: break; } }
IEnumerator PlayVideo(Susan s) { CombatController.instance.SetEnemies(s.startBattle); GameManager.instance.currEnemy = this.gameObject; StartCoroutine(GameManager.instance.SetEnemyDialogue(s.preBattleDialogue)); yield return(new WaitUntil(() => GameManager.instance.dialogueOver && !GameManager.instance.dialogueInProgress)); yield return(new WaitForEndOfFrame()); yield return(StartCoroutine(GameManager.instance.PlaySusanVideo())); yield return(new WaitForEndOfFrame()); GameManager.instance.anim.CrossFade("Fade_Out", 1); yield return(new WaitForSecondsRealtime(2f)); GameManager.instance.susanVideo.SetActive(false); StartCoroutine(StartBattle()); }