Scanbot Barcode Scanner SDK for Android

Introduction

The Scanbot Barcode Scanner SDK is a simple to use high level API, providing a collection of classes and functions for scanning and parsing 1D and 2D barcodes from your mobile device’s camera or other image sources like your photo library.

Integrate our Ready-To-Use UI (RTU UI) Components with only a few lines of code. Benefit from a proven user experience, super fast integration time and customizable colors and texts to match your brand. Or dive into our Classical SDK Components and build your fully customized scanning experience.

Supported Barcode Types

1D Barcodes

  • Code 39
  • Code 93
  • Code 128
  • Codabar
  • UPC-E
  • ITF
  • EAN-8
  • EAN-13
  • UPC-A

2D Barcodes

  • QR_CODE
  • DATA_MATRIX
  • AZTEC
  • PDF_417

💡 You might also be interested in an overview in our blog post Types of barcodes.

Data parsers

Following data parsers are currently supported:

  • AAMVA: Parse the AAMVA data format from PDF-417 barcodes on US driver’s licenses. See AAMVADocument.
  • Boarding pass data from PDF-417 barcodes. See BoardingPassDocument.
  • Parser for German Medical Certificates (aka. Disability Certificate or AU-Bescheinigung) coded in a PDF-417 barcode. See DEMedicalPlanDocument.
  • Data from PDF-417 barcodes on ID Cards. See IDCardPDF417Document. Parse and extract data from XML of Data Matrix barcodes on Medical Plans (German Medikationsplan). See SEPADocument.
  • Data parser of QR-Code values printed on SEPA pay forms. See SEPADocument.
  • vCard data from a QR-Code (e.g. on business cards). See VCardDocument.

Requirements

Operating System

  • Android 5.0 (API Level 21) and higher

Hardware

No Internet Connection Required

The Scanbot Barcode Scanner SDK works completely offline. It doesn’t even contain any networking code. This can easily be verified by routing all networking traffic coming from the app through a proxy. All data generated by the Scanbot Barcode Scanner SDK is only stored on the end users device and in absolutely no case ever transferred to a server / cloud service controlled by us. You as the customer will need to take care of uploading the scans / data to your backend, if desired.

Example Apps

👉 Please see our example project on GitHub.

Get in Touch

If you need further information or are interested in licensing Scanbot Barcode Scanner SDK please reach out to our sales experts via sdk@scanbot.io.

Getting Started

Scanbot Barcode Scanner SDK Dependencies

The Scanbot Barcode Scanner SDK for Android is distributed through our private Maven repository which you have to specify in your top-level build.gradle file:

allprojects {
    repositories {
        google()
        jcenter()

        // Scanbot Barcode Scanner SDK maven repos:
        maven {
            url 'https://nexus.scanbot.io/nexus/content/repositories/releases/'
        }
        maven {
            url 'https://nexus.scanbot.io/nexus/content/repositories/snapshots/'
        }
    }
}

Afterwards, you can add a dependency to your project:

implementation "io.scanbot:scanbot-barcode-scanner-sdk:$scanbotBarcodeSdkVersion"

Get the latest $scanbotBarcodeSdkVersion from Release History and Changelog.

Enable Multidex

Make sure you have enabled multidex by setting multiDexEnabled to true in your module-level build.gradle file (e.g. app/build.gradle):

android {
  ...
  defaultConfig {
    ...
    multiDexEnabled true
  }
}

ABI Settings

The Scanbot Barcode Scanner SDK uses native libraries under the hood and supports following ABIs: armeabi-v7a, arm64-v8a, x86 and x86_64.

Please check and add/adjust the abiFilters configuration in your module-level build.gradle file accordingly:

android {
  ...
  defaultConfig {
    ...
    ndk {
      // a typical production configuration:
      abiFilters "armeabi-v7a", "arm64-v8a"
    }
  }
}
  • arm64-v8a: Native libs for the ARM 64-bit architecture (used in most common devices).

  • armeabi-v7a: Native libs for the ARM 32-bit architecture (older devices).

  • x86 and x86_64: In most cases both “x86” architectures can be removed for the release (production) build, since they are only used on emulators and on some rare devices with the Intel Atom architecture.

If you need to support all architectures, we highly recommend to use the new Android App Bundle approach when it comes to publishing apps.

Tuning the Android Manifest

Camera Permission

Declare that your app needs camera permission by listing the permission android.permission.CAMERA in the AndroidManifest.xml file:

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />

Since Android 6.0 (API level 23) you also have to implement a suitable permission requesting and handling at runtime. For more details please see the Android docs “Request App Permissions” as well as our basic example implementation.

Initialize the SDK

The Scanbot Barcode Scanner SDK must be initialized before usage. Add the following code snippets to your Application class:

import io.scanbot.sdk.barcode_scanner.ScanbotBarcodeScannerSDKInitializer

class ExampleApplication : Application() {

    override fun onCreate() {
        super.onCreate()

        // Initialize the Scanbot Barcode Scanner SDK: 
        ScanbotBarcodeScannerSDKInitializer().initialize(this)
    }
}

License Key

Use the method license(application, "YOUR_SCANBOT_BARCODE_SCANNER_SDK_LICENSE_KEY") on initialization of the Scanbot Barcode Scanner SDK to set your license key:

// This is an expired license key. Used only for demo code purposes!
val LICENSE_KEY =
    "MiKudIf/IFGnwk/0ZQAhx58IGEV8/L" +
    "d6dF/F/j2TyLNNb+TCaIsQLOf2+/Ih" +
    "LRRPvRsHESA/b0KFqnxYl4briv3kzQ" +
    "tSTrvDJ9mE15rxU/Pob4XRnjTSc9B7" +
    "P/CpM0HDkmM02U8ljt0kKwpQSRZkiz" +
    "rBe+qttmA0b00ZEcyfn9t2xP4zRdaD" +
    "ayjWAdZi82oP3UST3bLIV8I90Qordf" +
    "s+u23JKL52bQY+HB1HNW7Ow8rA4+Mg" +
    "Lr/wE2N+UBElHPOZLtQBTHYUvbVwVU" +
    "KZDWOEv8VfrTmn2XA0tKVSDaxL6z7B" +
    "1s2g83XWYaxXrf4A3q/fkSNvDN1oic" +
    "Dvs0gbD1Lf0w==\nU2NhbmJvdFNESw" +
    "ppby5zY2FuYm90LmV4YW1wbGUuc2Rr" +
    "LmFuZHJvaWQKMTQ3ODA0NDc5OQoyCj" +
    "I=\n";

    ScanbotBarcodeScannerSDKInitializer()
        .withLogging(true)
        .license(this, LICENSE_KEY)
        .initialize(this)

Please make sure that you have inserted the exact key as it is stated in the license file - with all encoded line breaks \n.

License Checks in Production Apps

⚠️ If your Scanbot Barcode Scanner SDK license has expired, calls to the Scanbot Barcode Scanner SDK API will return empty results. To prevent this you should always check for license expiration during the runtime via licenseInfo.isValid. If this property returns false, you should disable any usage of the Scanbot Barcode Scanner SDK (functions, UI components, etc).

To handle License errors properly the IScanbotSDKLicenseErrorHandler might be used. The callback will be triggered if any license error has occurred. Use the following snippet to initialize Scanbot Barcode SDK with a callback.

ScanbotBarcodeScannerSDKInitializer()
    .withLogging(true)
    .license(this, LICENSE_KEY)
    .licenceErrorHandler(IScanbotSDKLicenseErrorHandler { status, feature ->
        // Handle license errors here:
        LoggerProvider.getLogger().d("ExampleApplication", "License status: ${status.name}")
        if (feature != SdkFeature.NoSdkFeature) {
            LoggerProvider.getLogger().d("ExampleApplication", "Missing SDK feature in license: ${feature.name}")
        }
    })
    .initialize(this)

We highly recommend to implement a suitable handling of this case in your app!

Example code for checking the license status:

import io.scanbot.sdk.barcode_scanner.ScanbotBarcodeScannerSDK

// Check the license status:
val licenseInfo = ScanbotBarcodeScannerSDK(activity).licenseInfo
LoggerProvider.getLogger().d("ExampleApplication", "License status: ${licenseInfo.status}")
LoggerProvider.getLogger().d("ExampleApplication", "License isValid: ${licenseInfo.isValid}")

if (licenseInfo.isValid) {
    // Making your call into ScanbotBarcodeScannerSDK API is safe now.
    // e.g. start barcode scanner
}

Ready To Use UI Components

The Ready-To-Use UI (RTU UI) is a set of easy to integrate and customize high-level UI components (Activities) for the most common tasks in Scanbot Barcode Scanner SDK:

  • Barcode and QR-Code Scanner - BarcodeScannerActivity

The design and behavior of these ready-to-use Activities are based on our long years of experience as well as the feedback from our SDK customers.

Customization of RTU UI

  • UI: All colors and text resources (localization).
  • Behavior: Enable or disable features like Flash Light, Barcode Filter, Image Snapping.

Please note: The main idea of the RTU UI is to provide a simple-to-integrate and simple-to-customize Activity components. Due to this idea there are some limitations with the possibilities of customization. If you need more customization options you have to implement custom Activities using our “Classical SDK UI Components”.

Integration of RTU UI

Dependencies

The RTU UI components are distributed as a separate package scanbot-barcode-scanner-sdk-ui. Add it as dependency to your project:

implementation "io.scanbot:scanbot-barcode-scanner-sdk-ui:$scanbotSdkVersion"

Get the latest $scanbotBarcodeSdkVersion from Release History and Changelog.

Start RTU UI Activity

// Create the configuration (customization):
val barcodeCameraConfiguration = BarcodeScannerConfiguration()
barcodeCameraConfiguration.setFlashEnabled(true)
barcodeCameraConfiguration.setCancelButtonTitle("Cancel")
barcodeCameraConfiguration.setFinderLineColor(Color.GREEN)
barcodeCameraConfiguration.setBarcodeFormatsFilter(...)
// set further config properties ...

// Create an Intent for the BarcodeScannerActivity with the configuaration and start it:
val intent = BarcodeScannerActivity.newIntent(this@MainActivity, barcodeCameraConfiguration)
startActivityForResult(intent, MY_BARCODE_UI_REQUEST_CODE)

Receive Activity Result

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    ...
    if (requestCode == MY_BARCODE_UI_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
        val barcodeScanningResult = data?.getParcelableExtra<BarcodeScanningResult>(BaseBarcodeScannerActivity.SCANNED_BARCODE_EXTRA)
        // handle the result:
        barcodeScanningResult.barcodeItems ...
    }
}

Full Example of the RTU UI Activity

Please see this full example implementation in our demo:

👉 MainActivity.kt

Classical SDK Components

Our Classical SDK Components allows you to build your custom UI Activities which are very flexible and fully customizable. It is a set of easy to integrate and customize Views, Handlers, Controllers, etc. which can be used in your Activities to implement the most common tasks in Scanbot Barcode Scanner SDK.

Customization

  • UI: Fully customizable
  • Behavior: Fully customizable

Integration of Classical SDK Components

Use the classes ScanbotCameraView, BarcodeDetectorFrameHandler, ScanbotBarcodeDetector, and BarcodeAutoSnappingController to build a custom scanner UI for Barcode and QR-Code scanning.

ScanbotCameraView

The Android camera API might seem to be very tricky and far from being developer-friendly (in fact, very far). To help you avoid the same issues which we have encountered while developing Scanbot SDK, we created the ScanbotCameraView.

Add it to your layout, which is as simple as:

<net.doo.snap.camera.ScanbotCameraView
        android:id="@+id/camera"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

Delegate the methods onResume and onPause in your Activity class (or Fragment) to ScanbotCameraView:

class MyActivity : AppCompatActivity() {

    ...

    override fun onResume() {
        super.onResume()
        cameraView?.onResume()
    }

    override fun onPause() {
        super.onPause()
        cameraView?.onPause()
    }
}

That is it! You can start your app and you should see the camera preview.

Preview Mode

The ScanbotCameraView supports 2 preview modes:

  • CameraPreviewMode.FIT_IN - in this mode camera preview frames will be downscaled to the layout view size. Full preview frame content will be visible, but unused edges could be appeared in the preview layout.
  • CameraPreviewMode.FILL_IN - in this mode camera preview frames fill the layout view. The preview frames may contain additional content on the edges that was not visible in the preview layout.

By default, ScanbotCameraView uses FILL_IN mode. You can change it using cameraView.setPreviewMode(CameraPreviewMode mode) method.

Auto-focus Sound and Shutter Sound

You can enable/disable auto-focus event system and shutter sounds using setters in ScanbotCameraView.

cameraView.setCameraOpenCallback(new CameraOpenCallback() {
        @Override
        public void onCameraOpened() {
            cameraView.postDelayed(new Runnable() {
                @Override
                public void run() {
                    cameraView.setAutoFocusSound(false);
                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
                        cameraView.setShutterSound(false);
                    }
                }
            }, 700);
        }
    });

cameraView.setShutterSound(boolean enabled) set the camera shutter sound state. By default - true, the camera plays the system-defined camera shutter sound when takePicture() is called.

Note that devices may not always allow disabling the camera shutter sound. If the shutter sound state cannot be set to the desired value, this method will be ignored. https://developer.android.com/reference/android/hardware/Camera.html#enableShutterSound(boolean)

Also, it is supported only with Android API 17+.

Continuous Focus Mode

For most use cases it is recommended to enable the “Continuous Focus Mode” of the Camera. Use the continuousFocus() method of ScanbotCameraView for this. It should be called from the main thread and only when camera is opened (CameraOpenCallback):

cameraView = (ScanbotCameraView) findViewById(R.id.camera);
cameraView.setCameraOpenCallback(new CameraOpenCallback() {
    @Override
    public void onCameraOpened() {
        cameraView.postDelayed(new Runnable() {
            @Override
            public void run() {
                cameraView.continuousFocus();
            }
        }, 700);
    }
});

Please note: The Continuous Focus Mode will be automatically disabled

  • after the autoFocus method call,
  • after a tap on the ScanbotCameraView to perform the autoFocus,
  • or after the takePicture event.

In these cases you have to call the continuousFocus() method again to re-enable the Continuous Focus Mode.

Orientation Lock

By default the ScanbotCameraView will create pictures with orientation based on the current device orientation. It is important to understand that the orientation of the taken picture is independent of the locked orientation mode of the Activity!

For example: if you just lock the Activity to portrait mode, the orientation of the taken image will still be based on the current device orientation!

To apply a real orientation lock in ScanbotCameraView, you can use the following methods: cameraView.lockToLandscape(boolean lockPicture) or cameraView.lockToPortrait(boolean lockPicture) to lock the Activity and the taken picture to a desired orientation:

@Override
protected void onCreate(Bundle savedInstanceState) {
    // ...

    cameraView = (ScanbotCameraView) findViewById(R.id.camera);

    // Lock the orientation of the Activity as well as the orientation of the taken picture to portrait:
    cameraView.lockToPortrait(true);

    // ...
}

Full Example of a Custom Activity

As a final step, you have to connect the ScanbotCameraView with BarcodeDetectorFrameHandler and BarcodeAutoSnappingController. The ScanbotBarcodeDetector can be used to detect and parse barcodes from still images (Bitmap), e.g. JPG files from photo library or other sources.

Please see this example implementation of a fully customizable Activity in our demo:

👉 QRScanCameraViewActivity.kt

ProGuard

If you use ProGuard for your release builds, please add the following ProGuard rules for all Scanbot Barcode Scanner SDK Packages:

-keep public class net.doo.snap.ui.** { *; }
-keep public class io.scanbot.sdk.ui.** { *; }

-keep public class io.scanbot.sap.SapManager { *; }

-keeppackagenames io.scanbot.barcodescanner.**
-keep public class io.scanbot.barcodescanner.**{ *; }

# Gson
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-dontwarn sun.misc.**
-keep class com.google.gson.stream.** { *; }

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
  @com.google.gson.annotations.SerializedName <fields>;
}

Release History and Changelog

Version 1.1.1 (8 Apr 2020):

  • 🚀 Improvements:
    • Updated ProGuard config
    • Improved detection from still images
    • Minor bugfixes and improvements

Version 1.1.0 (11 Mar 2020):

  • 🚀 Improvements:
    • Updated minimum Android API level to 21 (Android 5.0)
    • Updated ProGuard config
    • Minor bugfixes and improvements

Version 1.0.0 (31 Jan 2020):

  • 🎉 First release.

Libraries and Licenses

The following Open Source libraries are used in the Scanbot Barcode Scanner SDK for Android:


CWAC-Camera

Version 0.6.33
(https://github.com/doo/cwac-camera)
(https://github.com/commonsguy/cwac-camera/)

Copyright © CommonsWare

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Apache Commons IO

Version 2.4
(https://github.com/apache/commons-io)

Copyright (c) The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



JetBrains Java Annotations (Annotations for JVM-based languages)

Version 13.0
(https://github.com/JetBrains/java-annotations)

Copyright 2000-2016 JetBrains s.r.o.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Kotlin Standard Library

Version 1.3.50
(https://github.com/JetBrains/kotlin)

Copyright 2010-2018 JetBrains s.r.o.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Kotlin Standard Library JDK

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



google-gson
Version 2.8.5
(https://github.com/google/gson/blob/gson-parent-2.8.5/LICENSE)

Copyright 2008 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Dagger

Version 2.16
(https://github.com/google/dagger)

Copyright 2012 The Dagger Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Dagger Compiler

Copyright 2012 The Dagger Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



RxJava

Version 2.1.5
(https://github.com/ReactiveX/RxJava)

Copyright (c) 2016-present, RxJava Contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



RxAndroid

Version 2.0.1
(https://github.com/ReactiveX/RxAndroid)

Copyright 2015 The RxAndroid authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Nameof C++

Version 0.8.3
(https://github.com/Neargye/nameof)

MIT License

Copyright (c) 2016, 2018 - 2019 Daniil Goncharov

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



ZXing-C++, C++ port of ZXing

(https://github.com/nu-book/zxing-cpp)

Copyright 2016 Nu-book Inc.
Copyright 2016 ZXing authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



TensorFlow 2.0.0
Copyright 2017 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



BOOST C++ Libraries

Version 1.68
(https://github.com/boostorg/boost)

This library is distributed under the terms of the following license: https://www.boost.org/LICENSE_1_0.txt

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization obtaining
a copy of the software and accompanying documentation covered by this license
(the "Software") to use, reproduce, display, distribute, execute, and transmit
the Software, and to prepare derivative works of the Software, and to permit third-parties
to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above
license grant, this restriction and the following disclaimer, must be included in
all copies of the Software, in whole or in part, and all derivative works of the
Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by a source
language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



BoringSSL

https://github.com/google/boringssl

Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
Original SSLeay License. Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.
Copyright (c) 2015, Google Inc.
Some files from Intel carry the following license: Copyright (c) 2012, Intel Corporation.

BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL licensing. Files that are completely new have a Google copyright and an ISC license. This library is distributed under the terms of the following license: https://github.com/google/boringssl/blob/master/LICENSE

OpenSSL License
---------------

====================================================================
Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"

4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.

5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.

6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"

THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================

This product includes cryptographic software written by Eric Young (eay@cryptsoft.com).
This product includes software written by Tim Hudson (tjh@cryptsoft.com).

Original SSLeay License
-----------------------

Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
All rights reserved.

This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). The implementation was written so as to conform with Netscapes SSL.

This library is free for commercial and non-commercial use as long as the following conditions are aheared to. The following conditions apply to all code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code.  The SSL documentation included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com).

Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution
as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation (online or textual) provided with the package.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgement:
"This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)"
The word 'cryptographic' can be left out if the rouines from the library being used are not cryptographic related :-).
4. If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement:
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"

THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The licence and distribution terms for any publically available version or derivative of this code cannot be changed.  i.e. this code cannot simply be copied and put under another distribution licence [including the GNU Public Licence.]

ISC license used for completely new code in BoringSSL:

Copyright (c) 2015, Google Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */

Some files from Intel carry the following license

Copyright (c) 2012, Intel Corporation

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

*  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

*  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

*  Neither the name of the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



Filesystem.hpp

(https://github.com/bin-build/filesystem)
Copyright (c) 2015-2017, Wenzel Jakob
Copyright (c) 2017, Josh Junon
All rights reserved.
This library is distributed under the terms of a BSD 2-Clause License (https://github.com/bin-build/filesystem/blob/master/LICENSE)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



JSON for Modern C++

Version 3.1.0
(https://github.com/nlohmann/json)
Copyright (c) 2013-2018 Niels Lohmann <http://nlohmann.me>.
This library is distributed under the terms of a MIT License (https://github.com/nlohmann/json/blob/develop/LICENSE.MIT)

Permission is hereby  granted, free of charge, to any  person obtaining a copy of this software and associated  documentation files (the "Software"), to deal in the Software  without restriction, including without  limitation the rights to  use, copy,  modify, merge,  publish, distribute,  sublicense, and/or  sell copies  of  the Software,  and  to  permit persons  to  whom  the Software  is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE  IS PROVIDED "AS  IS", WITHOUT WARRANTY  OF ANY KIND,  EXPRESS OR IMPLIED,  INCLUDING BUT  NOT  LIMITED TO  THE  WARRANTIES OF MERCHANTABILITY, FITNESS FOR  A PARTICULAR PURPOSE AND  NONINFRINGEMENT. IN NO EVENT  SHALL THE AUTHORS  OR COPYRIGHT  HOLDERS  BE  LIABLE FOR  ANY  CLAIM,  DAMAGES OR  OTHER LIABILITY, WHETHER IN AN ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE  OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



OpenCV

Version 3.4.7
(https://github.com/opencv/opencv)

By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.

License Agreement
For Open Source Computer Vision Library
(3-clause BSD License)

Copyright (C) 2000-2019, Intel Corporation, all rights reserved.
Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.
Copyright (C) 2015-2016, Itseez Inc., all rights reserved.
Third party copyrights are property of their respective owners.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

  * Neither the names of the copyright holders nor the names of the contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and
any express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are disclaimed.
In no event shall copyright holders or contributors be liable for any direct,
indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.