Visual Search App with Cognitive Services
For a more in-depth discussion of this sample, see the Visual Search mobile app tutorial.
This sample is a Xamarin.Forms application which uses the Computer Vision and Bing Web Search RESTful APIs to parse text from images and then query that text on Bing. It can import photos or capture them with the OS-default camera on Android, iOS, or the Universal Windows Platform.
Build the sample
Ensure that you've installed the Mobile development with .NET package from the Visual Studio Installer.
Start Microsoft Visual Studio 2017 and select
File > Open > Project/Solution.
Navigate to the folder where you cloned this repository.
Open the Visual Studio Solution (.sln) file
VisualSearchApp.sln. It may take a few minutes for the project to initialize.
Open the NuGet Package Manager (right click your solution in the solution explorer, and select
Manage NuGet Packages For Solution)
Install the Xamarin Media Plugin (Xam.Plugin.Media) and Json.NET (Newtonsoft.Json) packages.
Select your target platform from the ribbon menu at the top of your Visual Studio window.
Build and run the sample from this same ribbon menu.
Run the sample
After building the sample, you should be taken to a screen where you are asked to input your Bing Web Search and Computer Vision API Keys. To attain 30-day trial keys to these APIs, see this page. For more information about attaining keys for professional use, see Pricing.
After inputting the keys, you will be taken to a screen where you can import or capture a photo and feed that photo to the relevant OCR endpoint for text extraction.
This will open a table of parsed text, which you can select to query using the Bing Web Search API.
Each of these Bing results can be selected to render the relevant webpage.
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.
Developer Code of Conduct
Developers using Cognitive Services, including this client library & sample, are expected to follow the “Developer Code of Conduct for Microsoft Cognitive Services”, found at http://go.microsoft.com/fwlink/?LinkId=698895.