Android SDK for the Microsoft Computer Vision API, part of Cognitive Services.
Перейти к файлу
microsoft-github-policy-service[bot] 8f15760b24
Auto merge mandatory file pr
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
2022-11-28 19:12:58 +00:00
ClientLibrary Fix issue in aapt2 (#34) 2018-07-09 18:28:11 -07:00
Sample Update to version 394 (#24) 2018-01-05 11:32:19 -08:00
SampleScreenshots Initial commit moving Vision to new repo 2016-06-08 15:59:15 -07:00
.gitignore Initial commit moving Vision to new repo 2016-06-08 15:59:15 -07:00
CONTRIBUTING.md Updated ReadMe & Contributing (#1) 2016-07-06 11:34:15 -07:00
LICENSE-IMAGE.md Add contributing & license files 2016-06-15 11:52:28 -07:00
LICENSE.md Add contributing & license files 2016-06-15 11:52:28 -07:00
README.md Update to version 394 (#24) 2018-01-05 11:32:19 -08:00
SECURITY.md Microsoft mandatory file 2022-09-08 15:19:09 +00:00
ThirdPartyNotices.txt Add ThirdPartyNotices.txt 2016-07-06 10:53:43 -07:00

README.md

Microsoft Computer Vision API: Android Client Library & Sample

This repo contains the Android client library & sample for the Microsoft Computer Vision API, an offering within Microsoft Cognitive Services, formerly known as Project Oxford.

The Client Library

The client library is a thin Java client wrapper for the Computer Vision API.

The easiest way to consume the client library is to add com.microsoft.projectoxford.vision package from Maven Central Repository. To find the latest version of client library, go to http://search.maven.org, and search for "com.microsoft.projectoxford".

To add the client library dependency from build.gradle file, add the following line in dependencies.

dependencies {
    //
    // Use the following line to include client library from Maven Central Repository
    // Change the version number from the search.maven.org result
    //
    compile 'com.microsoft.projectoxford:vision:1.0.394'

    // Your other Dependencies...
}

To do add the client library dependency from Android Studio:

  1. From Menu, Choose File > Project Structure

  2. Click on your app module

  3. Click on Dependencies tab

  4. Click "+" sign to add new dependency

  5. Pick "Library dependency" from the drop down list

  6. Type "com.microsoft.projectoxford" and hit the search icon from "Choose Library Dependency" dialog

  7. Pick the Project Oxford client library that you intend to use.

  8. Click "OK" to add the new dependency

The Sample

This sample is an Android application to demonstrate the use of the Computer Vision API. It demonstrates image analysis, Optical Character Recognition (OCR), and smart thumbnail generation.

Requirements

Android OS must be Android 4.1 or higher (API Level 16 or higher)

Build the Sample

  1. First, you must obtain a Computer Vision API key by following the instructions on our website.

  2. Start Android Studio and open project from Vision > Android > Sample folder.

  3. In Android Studio -> "Project" panel -> "Android" view, open file "app/res/values/strings.xml", and find the keys subscription_key and subscription_apiroot. Replace the placeholder values with those obtained in step 1 above. If you cannot find the file "strings.xml", it is in folder "Sample\app\src\main\res\values\string.xml".

  4. In Android Studio, select menu "Build > Make Project" to build the sample, and "Run" to launch this sample app.

Run the Sample

In Android Studio, select menu "Run", and "Run app" to launch this sample app.

Once the app is launched, click on buttons to use samples of between different scenarios, and follow the instructions on screen.

Microsoft will receive the images you upload and may use them to improve the Computer Vision API and related services. By submitting an image, you confirm you have consent from everyone in it.

Contributing

We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.

You can reach out to us anytime with questions and suggestions using our communities below:

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.

Sample images are licensed separately, please refer to LICENSE-IMAGE.

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.