# License Plate Recognition-Flutter

`KBY-AI`'s `LPR` on-premise `Flutter SDK` utilizes artificial intelligence and machine learning to greatly surpass legacy solutions. Now, in real-time, users can receive a `vehicle's license plate number` on `Android` or `iOS` device.

`Automatic license-plate recognition (ALPR)` is a technology that uses `OCR(optical character recognition)` on images to read `vehicle registration plates`. It can use existing closed-circuit television, road-rule enforcement cameras, or cameras specifically designed for the task. `ALPR` can be used by police forces around the world for law enforcement purposes, including to check if a vehicle is registered or licensed. It is also used for electronic toll collection on `pay-per-use` roads and as a method of cataloguing the movements of traffic, for example by highways agencies.

## Features

* [x] Vehicle License Plate Reader
* [x] OCR Based License Number Parser
* [x] Vehicle Detection & Tracking
* [x] Export License Plate Coordinate
* [x] Support Car, Truck, Bus, etc
* [x] Support Various License Plates From 180+ Counrtries
* [x] Support Android & iOS
* [x] On-Premise, Fully Offine Work

## License

We offer `lifetime license(perpetual license)` tied to each  `application ID`.&#x20;

The license is available with a `one-time payment`—meaning once you purchase it, you can use our `SDK` indefinitely without any recurring fees.

To request a license, please contact us:

> **Email:** <contact@kby-ai.com>&#x20;

{% embed url="<https://wa.me/+19092802609>" %}

{% embed url="<https://t.me/kbyaisupport>" %}

{% embed url="<https://discord.gg/6wm383re2s>" %}

{% embed url="<https://teams.live.com/l/invite/FAAYGB1-IlXkuQM3AQ>" %}

## Screenshots

<div><figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FWAji1LqYDnn9CjIdQG4p%2F370971177-34be1181-fe83-4be0-b955-7c174961410b.png?alt=media&#x26;token=9efdfcb0-31f0-49a5-b242-bea01ccc5463" alt="" width="212"><figcaption></figcaption></figure> <figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FcJghjRw6UztklhO47lJN%2F370971732-23645cc7-2f79-4deb-becd-2d88cb32c983.png?alt=media&#x26;token=c239290f-0dfc-4e83-93a5-756f232d6e56" alt="" width="212"><figcaption></figcaption></figure> <figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2F0BmxlQCyQqMwaHp3k5Q2%2F370971315-4d17e31e-d1e0-492a-98bd-c34ed68c3a6a.png?alt=media&#x26;token=33231342-d257-4be7-8b90-8a35e90c0089" alt="" width="212"><figcaption></figcaption></figure></div>

## How To Run

#### 1. Flutter Setup

Make sure you have `Flutter` installed.\
This repo has been built with Flutter version `3.22.3`.\
If you don't get `Flutter` installed, please follow the instructions provided in the official `Flutter` documentation [here](https://docs.flutter.dev/get-started/install).

#### 2. Running the App

Try to build this repo to make sure that SDK works fine by linking real `Android` phone, not `simulator`. Once it works fine, you are ready to integrate our SDK to your project.\
Run the following commands:

```bash
flutter clean
flutter pub get
flutter run
```

If you plan to run the iOS app, please refer to the following [link](https://docs.flutter.dev/deployment/ios) for detailed instructions.

## About SDK

#### 1. Set up

**1.1 Setting Up ALPR SDK**

> Android

* Copy the SDK(folder `libttvalpr`) to the folder `android` in your project.
* Add SDK to the project in `settings.gradle`.

```gradle
include ':libttvalpr'
```

**1.2 Setting Up ALPR SDK Plugin**

* Copy the folder `alprsdk_plugin` to the `root` folder of your project.
* Add the dependency in your `pubspec.yaml` file.

```yaml
  alprsdk_plugin:
    path: ./alprsdk_plugin
```

* Import the `alprsdk_plugin` package.

```dart
  import 'package:alprsdk_plugin/alprsdk_plugin.dart';
```

#### 2 API Usages

**2.1 ALPRsdk Plugin**

* Activate the `AlprsdkPlugin` by calling the `setActivation` method:

```dart
  final _alprsdkPlugin = AlprsdkPlugin();
  ...
   await _alprsdkPlugin
          .setActivation(
              "o3AfDW+0LAb55qW354xp9ef/Twg1WumIcKaBQLydx+o7+8nuZSo4aL4vVGro3mNCLvo8C2OPNDjZ"
              "/8k+bvgbf8+QszGqG5ubjZOaREXO0Iw8pSepERy4HrWrS6I9ObjuttMUIRHBFNjIsT3RKH57mNv6"
              "1IXxewXlIA2oe5Vak/zaddoKKKcSW+iWJWqIa1MxGn8PpUD1riQS9RrO/cwZsiAJU+5+ekkkyP3C"
              "7eNZGzFfpmkLM55p2F98IMqWHjaMmX0klsNlxE/bdSJD8c2cS/+9DGLqiWb2FHz8FpR6sXjc+eGM"
              "bNtBd0YxqfAy+oeTVdPyw0E17lj+Hilw4L4C6Q==")
          .then((value) => facepluginState = value ?? -1);
```

* Initialize the `AlprsdkPlugin`:

```dart
await _alprsdkPlugin
          .init()
          .then((value) => alprpluginState = value ?? -1)
```

* Extract plates using the `extractFaces` method:

```dart
final plates = await _alprsdkPlugin.extractFaces(path: image.path)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kby-ai.com/help/product/automatic-license-plate-number-recognition-sdk/license-plate-recognition-flutter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
