Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2bda812
C Wrapper Barcode Live Example
Aug 5, 2025
6086e0d
Use goto in c wrapper example
Aug 6, 2025
51420c7
Readme files c wrapper
Aug 6, 2025
649cd88
Add tensorrt support
Aug 6, 2025
a13b192
Improve FindScanbotSDK.cmake
Aug 6, 2025
e021d63
refactor structure of java example. added new snippets
yurii-scanbot Aug 6, 2025
be1b02b
refactor structure of python example
yurii-scanbot Aug 6, 2025
4ae7a0a
merge c wrapper example
yurii-scanbot Aug 6, 2025
ed2aceb
fixed merge conflics c barcode examples
yurii-scanbot Aug 7, 2025
a4573e2
restructure project and add scan/analyze/classify/parse snippets with…
yurii-scanbot Aug 18, 2025
b88612a
add snippets for nodejs wrapper
yurii-scanbot Aug 21, 2025
5afb93a
Merge pull request #20 from doo/yk/snippets_nodejs
yurii-scanbot Aug 21, 2025
9aed4c2
replace magic constants
yurii-scanbot Aug 21, 2025
14765af
remove function declarations from headers that aren't in use
yurii-scanbot Aug 21, 2025
a155f75
refactor main.c, for early outs always goto cleanup
yurii-scanbot Aug 21, 2025
984e928
refactor snippets cleanups and unnecessary condition under default cr…
yurii-scanbot Aug 21, 2025
01939df
refactored analyse sumcommand and floatin license snippets with clear…
yurii-scanbot Aug 22, 2025
c129240
added optional param for --license in cli
yurii-scanbot Aug 22, 2025
fbc934d
updated nodejs snippets with better way to dispose unmanaged resource…
yurii-scanbot Aug 22, 2025
cd6045b
added --license key flag from cli to java and python examples
yurii-scanbot Aug 22, 2025
70ca861
rename mrz parser snippet java
yurii-scanbot Aug 22, 2025
308eaea
separate live scanners snippets
yurii-scanbot Aug 25, 2025
5c8bd8b
refactor java snippets, improve comments
yurii-scanbot Aug 26, 2025
499dcc4
removed unnecessary license checks inside of code snippets and remove…
yurii-scanbot Aug 26, 2025
da1269d
prepare image processing snippets
yurii-scanbot Aug 28, 2025
db25ae7
awaitPromise function in nodejs example
Sep 2, 2025
bf2780c
python wrapper snippets refactoring
yurii-scanbot Sep 2, 2025
c894030
add missing frame_callback in live example
yurii-scanbot Sep 3, 2025
975be33
revert back description under from_ndarray on_frame
yurii-scanbot Sep 3, 2025
c51202d
update readme python example
yurii-scanbot Sep 3, 2025
76ef3d5
removed release tag from readme manual python
yurii-scanbot Sep 3, 2025
b001d78
add nodejs readme guid
yurii-scanbot Sep 3, 2025
5238d32
update readme for node/java/python
yurii-scanbot Sep 4, 2025
3732884
node wrapper refactoring. split print result for barcode scanners
yurii-scanbot Sep 11, 2025
d2c9cce
updated python example structure
yurii-scanbot Sep 11, 2025
d4fb60d
replaced int status with meaningful string for all cases in C examples
yurii-scanbot Sep 11, 2025
3548e81
update image processing snippets
yurii-scanbot Sep 11, 2025
e8be748
update readmes with esage and example
yurii-scanbot Sep 11, 2025
3402634
refactor live python example and add in addition document scanner
yurii-scanbot Sep 12, 2025
5d9e96f
refactor readme's version exports and minor comment updates
yurii-scanbot Sep 12, 2025
aa8c857
fixed live python examples
yurii-scanbot Sep 12, 2025
de83c39
unify analyze commands and fix imports for analyze_multi_page snippet
yurii-scanbot Sep 22, 2025
083487b
add live command in C example and refactor RandomAccessSource usage i…
yurii-scanbot Sep 30, 2025
3bda823
update readme
yurii-scanbot Oct 2, 2025
bb04ec5
update readme licensing and pricing block
yurii-scanbot Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.DS_Store
statistics.dat
examples/python/__pycache__
examples/c/build/*
examples/nodejs/node_modules
examples/java/libs/*.jar
106 changes: 53 additions & 53 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,80 +5,80 @@
<img src=".images/ScanbotSDKLogo_darkmode.png#gh-dark-mode-only" width="15%" />
</p>

# Example App for the Scanbot Linux Barcode Scanner SDK (Beta)
# Example App for the Scanbot Linux SDK

This example app demonstrates integrating the Scanbot Linux Barcode Scanner SDK into C++ and Python applications.
This example app demonstrates integrating the Scanbot Linux SDK into Python, Java, Node.js, and C applications.

## What is the Scanbot SDK?

The [Scanbot SDK](https://scanbot.io/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) is a set of high-level APIs that integrates barcode, document scanning and data extraction functionalities into mobile apps, websites, and software server for environments, embedded systems, and edge devices. It operates entirely on-device, and no data is transmitted to our or third-party servers.
The [Scanbot SDK](https://scanbot.io/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) is a set of high-level APIs for implementing **barcode scanning**, **document scanning**, and **data extraction** functionalities into mobile and web apps. The Linux SDK extends the range of platforms to **server environments**, **embedded systems**, and **edge devices**. It uses on-device processing without sending any data to third-party servers.

❗Please note that we currently only offer our **Barcode Scanning SDK for Linux through a closed Beta**. However, the SDK and a trial license are available on request. Please [contact us](mailto:[email protected]) to receive your trial license.
The Scanbot Linux SDK is **a pure C library** and comes with wrappers for **Python**, **Java**, and **Node.js**, making it compatible with a wide range of development environments. On devices with **TensorRT support**, like the NVIDIA Jetson, GPU acceleration increases the barcode scanning speed up to 3x.

Refer to the respective README files in the examples' directories for more details.
💡 For more details about the Scanbot SDK, check out the [documentation](https://docs.scanbot.io/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites).

## Barcode Scanner SDK
## Technical requirements

The Scanbot Linux Barcode Scanner SDK extracts barcode data from images. It returns this information as a simple list. The SDK is perfect for deployment on private clouds, drones, robots, and edge devices running Ubuntu, Raspberry Pi OS, or Debian.
- **Supported platforms:**

### Technical requirements
- **Linux systems with glibc ≥ 2.27** (e.g., Ubuntu 18.04 / 20.04 / 22.04 LTS, Debian 11 / 12, Raspberry Pi OS 64-bit)

* **Supported architectures**: ARM64 and x86_64.
* **Camera**: Camera with autofocus and at least 720p resolution.
* **GPU support**: Uses GPU acceleration on platforms with TensorRT, such as NVIDIA Jetson.
- **NVIDIA Jetson devices**

### Performance overview
* **Supported architectures**:
* ARM64 and x86_64
* **Camera**:
* Camera with autofocus and at least 720p resolution
* **GPU support**:
* Uses GPU acceleration on platforms with TensorRT, such as NVIDIA Jetson

Performance with a 1280x720 input image size with NEXT_GEN engine mode:
| Device | Frame-rate |
|---------------------------------------------------|------------|
| Raspberry Pi 4 | ~8.5 FPS |
| NVidia Jetson Orin Nano 8GB | ~40 FPS |
| NVidia Jetson Orin Nano 8GB with GPU acceleration | ~85 FPS |
## Performance overview

### Supported barcodes
Performance with a 1280x720 input image size and using the `NEXT_GEN` engine mode:
| Device | Framerate |
| ------------------------------------------------- | --------- |
| Raspberry Pi 4 | ~8.5 FPS |
| NVidia Jetson Orin Nano 8GB | ~40 FPS |
| NVidia Jetson Orin Nano 8GB with GPU acceleration | ~85 FPS |

The Scanbot Barcode Scanner SDK supports all common 1D- or 2D barcode formats, including:
## Feature overview

| Barcode type | Barcode symbologies |
|:-------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1D Barcodes | [EAN](https://scanbot.io/barcode-scanner-sdk/ean/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [UPC](https://scanbot.io/barcode-scanner-sdk/upc/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [Code 128](https://scanbot.io/barcode-scanner-sdk/code-128/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [GS1-128](https://scanbot.io/barcode-scanner-sdk/gs1-128/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [Code 39](https://scanbot.io/barcode-scanner-sdk/code-39/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [Codabar](https://scanbot.io/barcode-scanner-sdk/codabar/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [ITF](https://scanbot.io/barcode-scanner-sdk/itf-code/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), Code 25, Code 32, Code 93, Code 11, MSI Plessey, Standard 2 of 5, IATA 2 of 5,  Databar (RSS), GS1 Composite |
| 2D Barcodes | [QR Code](https://scanbot.io/glossary/qr-code/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), Micro QR Code, [Aztec Code](https://scanbot.io/barcode-scanner-sdk/aztec-code/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [PDF417 Code](https://scanbot.io/barcode-scanner-sdk/pdf417/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [Data Matrix Code,](https://scanbot.io/barcode-scanner-sdk/data-matrix/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) [GiroCode](https://scanbot.io/glossary/giro-code/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [NTIN Code](https://scanbot.io/glossary/gtin/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [PPN](https://scanbot.io/glossary/ppn/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [UDI](https://scanbot.io/glossary/udi/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), [Royal Mail Mailmark](https://scanbot.io/barcode-scanner-sdk/royal-mail/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites), MaxiCode |
- [Barcode scanning](https://docs.scanbot.io/linux/barcode-scanner-sdk/introduction/)
- [Document scanning](https://docs.scanbot.io/linux/document-scanner-sdk/introduction/)
- [Document quality analysis](https://docs.scanbot.io/linux/document-scanner-sdk/08-document-quality-analyzer/introduction/)
- [OCR (optical character recognition)](https://docs.scanbot.io/linux/data-capture-modules/ocr/introduction/)
- [Text pattern scanning](https://docs.scanbot.io/linux/data-capture-modules/text-pattern-scanner/introduction/)
- [MRZ scanning](https://docs.scanbot.io/linux/data-capture-modules/mrz-scanner/introduction/)
- [Document data extraction](https://docs.scanbot.io/linux/data-capture-modules/document-data-extractor/introduction/)
- [VIN (vehicle identification number) scanning](https://docs.scanbot.io/linux/data-capture-modules/vin-scanner/introduction/)
- [Credit card scanning](https://docs.scanbot.io/linux/data-capture-modules/credit-card-scanner/introduction/)
- [Check (MICR) scanning](https://docs.scanbot.io/linux/data-capture-modules/check-scanner/introduction/)
- [Medical certificate scanning](https://docs.scanbot.io/linux/data-capture-modules/medical-certificate-scanner/introduction/)

## Additional information
## Licensing and pricing

### Guides and Tutorials
A trial license key is required for evaluation or testing. To get a free trial license, please contact us at [email protected].

Integrating the Scanbot Barcode Scanner SDK takes just a few minutes, and our step-by-step guides make the process even easier.
[Contact our team](https://scanbot.io/contact-sales/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) to receive your quote.

💡Please check out our [Linux Tutorial ](https://scanbot.io/techblog/c-plus-plus-barcode-scanner-raspberry-pi-tutorial/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites)for an overview of how to get started.
## Other supported platforms

Alternatively, visit our [developer blog](https://scanbot.io/techblog/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) for a collection of in-depth tutorials, use cases, and best practices for the Scanbot SDK.
The Scanbot SDK is also available on Android, iOS, and most common cross-platform environments, such as React Native, Flutter, and .NET MAUI:

### Free integration support
- [Android](https://github.com/doo/scanbot-sdk-example-android) (native)
- [iOS](https://github.com/doo/scanbot-sdk-example-ios) (native)
- [Web](https://github.com/doo/scanbot-sdk-example-web)
- [React Native](https://github.com/doo/scanbot-sdk-example-react-native)
- [Flutter](https://github.com/doo/scanbot-sdk-example-flutter)
- [Capacitor & Ionic (Angular)](https://github.com/doo/scanbot-sdk-example-capacitor-ionic)
- [Capacitor & Ionic (React)](https://github.com/doo/scanbot-sdk-example-ionic-react)
- [Capacitor & Ionic (Vue.js)](https://github.com/doo/scanbot-sdk-example-ionic-vuejs)
- [.NET MAUI](https://github.com/doo/scanbot-sdk-maui-example)
- [Xamarin](https://github.com/doo/scanbot-sdk-example-xamarin) & [Xamarin.Forms](https://github.com/doo/scanbot-sdk-example-xamarin-forms)
- [Cordova & Ionic](https://github.com/doo/scanbot-sdk-example-ionic)

Need help integrating our barcode scanning software into your Linux apps? We offer [free developer support](https://docs.scanbot.io/support/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) via Slack, MS Teams, or email.

As a customer, you also get access to a dedicated support Slack or Microsoft Teams channel to talk directly to your Customer Success Manager and our engineers.

### Licensing and pricing

A trial license key is required for evaluation or testing. To get a free "no-strings-attached" trial license, please request one [here](mailto:[email protected]).

Our pricing model is simple: Unlimited barcode scanning for a flat annual license fee, full support included. There are no tiers, usage charges, or extra fees. [Contact](https://scanbot.io/contact-sales/?utm_source=github.com&utm_medium=referral&utm_campaign=dev_sites) our team to receive your quote.

### Other supported platforms

Besides Linux, the Scanbot Barcode Scanner SDK is also available on:

* [Android (native)](https://github.com/doo/scanbot-barcode-scanner-sdk-example-android)
* [iOS (native)](https://github.com/doo/scanbot-barcode-scanner-sdk-example-ios)
* [JavaScript (web)](https://github.com/doo/scanbot-barcode-scanner-sdk-example-web)
* [React Native](https://github.com/doo/scanbot-barcode-scanner-sdk-example-react-native)
* [Flutter](https://github.com/doo/scanbot-barcode-scanner-sdk-example-flutter)
* [Capacitor & Ionic](https://github.com/doo/scanbot-barcode-scanner-sdk-example-capacitor-ionic)
* [Cordova & Ionic](https://github.com/doo/scanbot-barcode-scanner-sdk-example-cordova-ionic)
* [.NET MAUI](https://github.com/doo/scanbot-barcode-sdk-maui-example)
* [Xamarin & Xamarin.Forms](https://github.com/doo/scanbot-barcode-scanner-sdk-example-xamarin)
* [Compose Multiplatform / KMP](https://github.com/doo/scanbot-barcode-scanner-sdk-example-kmp)
* [UWP](https://github.com/doo/scanbot-barcode-scanner-sdk-example-windows) (Windows SDK)
- Barcode scanning only:
- [Compose Multiplatform / KMP](https://github.com/doo/scanbot-barcode-scanner-sdk-example-kmp)
- [UWP](https://github.com/doo/scanbot-barcode-scanner-sdk-example-windows) (Windows)
9 changes: 5 additions & 4 deletions examples/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ set(CMAKE_C_STANDARD 99)
if(NOT SCANBOTSDK_VERSION)
message(FATAL_ERROR "SCANBOTSDK_VERSION is not set.")
endif()
if(NOT SCANBOTSDK_API_TOKEN)
message(FATAL_ERROR "SCANBOTSDK_API_TOKEN is not set.")
endif()
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
set(SCANBOTSDK_DIR "${CMAKE_CURRENT_BINARY_DIR}/scanbotsdk")
find_package(ScanbotSDK REQUIRED)

add_subdirectory(barcode)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
add_executable(scanbotsdk_example ${SOURCE_FILES})
target_include_directories(scanbotsdk_example PRIVATE include)
target_link_libraries(scanbotsdk_example PRIVATE scanbotsdk)

53 changes: 41 additions & 12 deletions examples/c/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# API Documentation
The API documentation is accessible here:
* [Scanbot SDK - C API](https://api-docs.scanbot.io/document-scanner-sdk/linux/c-api/index.html)
# Scanbot SDK for Linux – C Example

# Installation

## NVidia Jetson
### NVidia Jetson

> Scanbot SDK requires Jetpack 6.1, CUDA 12.6 and TensorRT 10.3 to run with GPU acceleration.

Expand All @@ -20,11 +16,22 @@ sudo apt install -y cmake build-essential wget
sudo apt install -y nvidia-l4t-cuda libnvinfer10 libnvinfer-plugin10 libnvonnxparsers10
```

### ⚡ Performance notes (Jetson)
To avoid throttling, set max GPU/CPU/memory clocks:
```bash
sudo jetson_clocks --store
sudo jetson_clocks
```
Restore defaults later:
```bash
sudo jetson_clocks --restore
```

* You're now ready to run the examples.

----

## Raspberry Pi OS, Ubuntu, Debian
### Raspberry Pi OS, Ubuntu, Debian

* Install a C compiler, CMake and wget:

Expand All @@ -34,17 +41,39 @@ sudo apt install -y cmake build-essential wget

* You're now ready to build the examples.

# Building the Examples
## Building the Examples

In order to build all examples, run the following commands:

```bash
mkdir build
cd build
cmake -DSCANBOTSDK_VERSION=<SCANBOTSDK_VERSION> -DSCANBOTSDK_API_TOKEN=<SCANBOTSDK_API_TOKEN> ..
# Replace `<SCANBOTSDK_VERSION>` with the actual version number of the SDK you want to install.
cmake -DSCANBOTSDK_VERSION=<SCANBOTSDK_VERSION> ..
make
```

Replace `SCANBOTSDK_VERSION` and `SCANBOTSDK_API_TOKEN` with the values you received from us.
## Usage
The example supports four modes: **scan**, **analyze**, **classify**, and **parse**.
```bash
./scanbotsdk_example scan <subcommand> --file <path/to/file.jpg> [--license <KEY>]
./scanbotsdk_example scan <subcommand> --file <path/to/file.jpg> [--license <KEY>]
./scanbotsdk_example analyze <subcommand> --file <path/to/file.jpg> [--save <out.jpg>] [--license <KEY>]
./scanbotsdk_example analyze <subcommand> --file <path/to/file.jpg> [--save <out.jpg>] [--license <KEY>]
./scanbotsdk_example classify <subcommand> --file <path/to/file.jpg> [--license <KEY>]
./scanbotsdk_example parse <subcommand> --text "<input>" [--license <KEY>]
./scanbotsdk_example live <subcommand> --file <path/to/file.jpg> [--license <KEY>]

```

## Example
```bash
./scanbotsdk_example scan barcode --file images/example.jpg --license <KEY>
./scanbotsdk_example analyze analyze_multi_page --file files/doc.pdf --license <KEY>
./scanbotsdk_example analyze crop_analyze --file images/doc.jpg --save out/crop.jpg --license <KEY>
./scanbotsdk_example parse mrz --text "P<UTOERIKSSON<<ANNA<MARIA<<<<<<" --license <KEY>
./scanbotsdk_example live barcode --file images/example.jpg --license <KEY>
```

# Running the Examples
See the `README.md` files in the individual example directories for instructions on how to run them.
## API References
👉 [Scanbot SDK - C API](https://api-docs.scanbot.io/document-scanner-sdk/linux/c-api/index.html)
2 changes: 0 additions & 2 deletions examples/c/barcode/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions examples/c/barcode/live/CMakeLists.txt

This file was deleted.

17 changes: 0 additions & 17 deletions examples/c/barcode/live/README.md

This file was deleted.

Loading