private void OnRecognizeTextPost(TextRecogTopLevelMultiple multipleImages, string customData) { Test(multipleImages != null); if (multipleImages != null) { Log.Debug("TestVisualRecognition", "RecognizeText POST images processed: {0}", multipleImages.images_processed); foreach (TextRecogTopLevelSingle texts in multipleImages.images) { Log.Debug("TestVisualRecognition", "\tRecognizeText POST source_url: {0}, resolved_url: {1}", texts.source_url, texts.resolved_url); Log.Debug("TestVisualRecognition", "\tRecognizeText POST text: {0}", texts.text); // foreach(TextRecogOneWord text in texts.words) // { // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST text location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST Line number: {0}", text.line_number); // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST word: {0}, Score: {1}", text.word, text.score); // } } m_RecognizeTextPOSTTested = true; } else { Log.Debug("ExampleVisualRecognition", "RecognizeText POST failed!"); } }
private void OnRecognizeText(TextRecogTopLevelMultiple multipleImages, string data) { if (multipleImages != null) { foreach (TextRecogTopLevelSingle texts in multipleImages.images) { Debug.Log(texts.text); setText(texts.text); } } else { Debug.Log("ExampleVisualRecognition" + "RecognizeText failed!"); } }
private void OnRecognizeText(TextRecogTopLevelMultiple multipleImages, string data) { if (multipleImages != null) { Log.Debug("ExampleVisualRecognition", "images processed: {0}", multipleImages.images_processed); foreach (TextRecogTopLevelSingle texts in multipleImages.images) { Log.Debug("ExampleVisualRecognition", "\tsource_url: {0}, resolved_url: {1}", texts.source_url, texts.resolved_url); Log.Debug("ExampleVisualRecognition", "\ttext: {0}", texts.text); foreach (TextRecogOneWord text in texts.words) { Log.Debug("ExampleVisulaRecognition", "\t\ttext location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); Log.Debug("ExampleVisulaRecognition", "\t\tLine number: {0}", text.line_number); Log.Debug("ExampleVisulaRecognition", "\t\tword: {0}, Score: {1}", text.word, text.score); } } } else { Log.Debug("ExampleVisualRecognition", "RecognizeText failed!"); } }