public void ComputeResults(AlgoStep step, string inputPath, string outputPath, string outputPathTxt) { var hdLog = Program.Path(Subfolder.none, $"result_hausdorff_{ao.name}_{step.qualityStr}", Ext.txt); if (File.Exists(hdLog)) { File.Delete(hdLog); } var hd = MeshlabWorkspace.Instance.RunFilter_HausdorffDistance(inputPath, outputPath, hdLog); if (File.Exists(outputPathTxt)) { hd.time = long.Parse(File.ReadAllText(outputPathTxt)); } Results.Result res = new Results.Result() { path = outputPath, step = step, hd = hd }; results.bboxDiag = res.hd.bboxDiag; results.AddResult(res); if (File.Exists(hdLog)) { File.Delete(hdLog); } }
/** * /// Performs the recognition for the given number of frames. * * /// @param nFrames the number of frames to recognize * /// @return the current result */ override public Results.Result recognize(int nFrames) { Boolean done = false; Results.Result result = null; streamEnd = false; for (int i = 0; i < nFrames && !done; i++) { done = recognize(); } if (!streamEnd) { result = new Results.Result(loserManager, activeList, resultList, currentFrameNumber, done, linguist.getSearchGraph().getWordTokenFirst()); } // tokenTypeTracker.show(); if (_showTokenCount) { showTokenCount(); } return(result); }
/** * /// Performs the recognition for the given number of frames. * * /// @param nFrames the number of frames to recognize * /// @return the current result or null if there is no Result (due to the lack of frames to recognize) */ override public Result recognize(int nFrames) { bool done = false; Result result = null; streamEnd = false; for (int i = 0; i < nFrames && !done; i++) { done = recognize(); } // generate a new temporary result if the current token is based on a final search state // remark: the first check for not null is necessary in cases that the search space does not contain scoreable tokens. if (activeList.getBestToken() != null) { // to make the current result as correct as possible we undo the last search graph expansion here ActiveList fixedList = undoLastGrowStep(); // Now create the result using the fixed active-list. if (!streamEnd) { result = new Results.Result(fixedList, resultList, currentFrameNumber, done); } } if (_showTokenCount) { showTokenCount(); } return(result); }
private void toResults() { //set active: ContainerResult.SetActive(true); ContainerTests.SetActive(false); ContainerMenu.SetActive(false); //fill text: int type = TestCase.getType(); Results.Result r = Results.getResult(type); string title = r.title; string[] description = r.description.Split(new string[] { "Советы: " }, System.StringSplitOptions.None); string desc = description[0]; string adv = description[1]; UnityEngine.Object o = GameObject.Find("TextTitle"); o = GameObject.Find("TextTitle").GetComponent <Text>(); GameObject.Find("TextTitle").GetComponent <Text>().text = "Ваш результат: " + title; GameObject.Find("TextDescription").GetComponent <Text>().text = desc; GameObject.Find("TextAdvise").GetComponent <Text>().text = "Советы: " + adv; //clear counters: TestCase.clearResult(); // inMainMenu = false; }
/// <summary> /// Fires new results as soon as they become available. /// </summary> /// <param name="result">the new result</param> protected void fireResultListeners(Results.Result result) { if (fireNonFinalResults || result.isFinal()) { foreach (IResultListener resultListener in resultListeners) { resultListener.newResult(result); } } else { Trace.WriteLine("skipping non-final result " + result); } }
public void testFill(int number) { ContainerResult.SetActive(true); ContainerTests.SetActive(false); ContainerMenu.SetActive(false); //fill text: Results.Result r = Results.getResult(number); string title = r.title; string[] description = r.description.Split(new string[] { "Советы: " }, System.StringSplitOptions.None); string desc = description[0]; string adv = description[1]; UnityEngine.Object o = GameObject.Find("TextTitle"); o = GameObject.Find("TextTitle").GetComponent <Text>(); GameObject.Find("TextTitle").GetComponent <Text>().text = "Ваш результат: " + title; GameObject.Find("TextDescription").GetComponent <Text>().text = desc; GameObject.Find("TextAdvise").GetComponent <Text>().text = "Советы: " + adv; }
public IData getData() { IData d = getPredecessor().getData(); if (isRecognizing && (d is FloatData || d is DoubleData || d is SpeechEndSignal)) { result = decode(null); if (result != null) { fireResultListeners(result); result = null; } } // we also trigger recogntion on a DataEndSignal to allow threaded scorers to shut down correctly if (d is DataEndSignal) { searchManager.stopRecognition(); } if (d is SpeechStartSignal) { searchManager.startRecognition(); isRecognizing = true; result = null; } if (d is SpeechEndSignal) { searchManager.stopRecognition(); //fire results which were not yet final if (result != null) { fireResultListeners(result); } isRecognizing = false; } return(d); }