Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 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
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
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)

50 changes: 38 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,36 @@ 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>]
```

## Example
```bash
./scanbotsdk_example scan barcode --file images/example.jpg --license <KEY>
./scanbotsdk_example analyze analyse_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>
```

# 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