Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
464ce1f
Add document enhancement feature and update examples to v9.0
yurii-scanbot Jun 18, 2026
9bfd17c
Remove document classification feature and update usage examples acro…
yurii-scanbot Jun 19, 2026
dffd403
Update SDK version to 0.900.6 in CI workflow and test scripts
yurii-scanbot Jun 19, 2026
a7955f5
Update examples and tests to include 'enhance' command and improve er…
yurii-scanbot Jun 19, 2026
0aaa3a3
Update usage examples to remove '--save' option from 'enhance' command
yurii-scanbot Jun 19, 2026
117c484
include the result in the try-with-resources heade
yurii-scanbot Jun 19, 2026
cf6a31e
removed deprecated property usage for DocumentQualityAnalyzerResult
yurii-scanbot Jun 22, 2026
4c61051
Increase Node.js command timeout in CI tests
Copilot Jun 22, 2026
7968990
Use node 22
aleksei-scanbot Jun 22, 2026
5ebd3b7
Refactor document quality analysis by removing document found checks …
yurii-scanbot Jun 22, 2026
ad9c549
Update .gitignore to include .vscode/ and remove settings.json
yurii-scanbot Jun 22, 2026
da094c9
Update Libraries.txt for SDK version 9.0.0 and update magic_enum copy…
yurii-scanbot Jul 6, 2026
041faf1
Update version to 9.0.0 and documentation
yurii-scanbot Jul 6, 2026
030c868
Initial Dockerfile
aleksei-scanbot Jul 29, 2026
1d2e33d
Initial dockerfile
aleksei-scanbot Jul 29, 2026
0406ad5
Initial ps1 scripts
aleksei-scanbot Jul 29, 2026
e5056c5
Move linux scripts
aleksei-scanbot Jul 29, 2026
0998562
Update c tests
aleksei-scanbot Jul 29, 2026
9438256
java related fixes
aleksei-scanbot Jul 31, 2026
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
5 changes: 3 additions & 2 deletions .github/workflows/run-tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on:

# Global environment variables
env:
SDK_VERSION: '0.810.7'
SDK_VERSION: '9.0.0'

jobs:
test-x86_64:
Expand All @@ -58,10 +58,11 @@ jobs:
- name: Build Docker image (x86_64)
run: |
docker build \
-f test-scripts/linux/Dockerfile \
--build-arg SDK_VERSION=${{ inputs.sdk_version || env.SDK_VERSION }} \
--build-arg ARCH=linux-x86_64 \
--build-arg SCANBOT_LICENSE="${{ secrets.SCANBOT_LICENSE_KEY }}" \
--target all-tests \
--target sdk-verification \
-t scanbot-linux-x86_64:latest .

# Run the test suite with secure stdin approach
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ examples/nodejs/node_modules
examples/java/libs/*.jar
get-pip.py
.env
.venv
.venv
.vscode/
6 changes: 3 additions & 3 deletions Libraries.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Open Source libraries used in the Scanbot Linux SDK version 8.1.0:
Open Source libraries used in the Scanbot Linux SDK version 9.0.0:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Expand Down Expand Up @@ -1784,12 +1784,12 @@ defined by AIM ITS/04-023 International Technical Standard - Extended Channel In

magic-enum

Version v0.8.1
Version v0.9.7
(https://github.com/Neargye/magic_enum)

MIT License

Copyright (c) 2019 - 2022 Daniil Goncharov
Copyright (c) 2019 - 2024 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
Expand Down
8 changes: 3 additions & 5 deletions examples/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,21 @@ In order to build all examples, run the following commands:


## Usage
The example supports four modes: **scan**, **analyze**, **classify**, and **parse**.
The example supports five modes: **scan**, **analyze**, **enhance**, **parse**, and **live**.
```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 enhance <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>] [--use_tensorrt]

```

## 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 enhance document --file images/doc.jpg --license <KEY>
./scanbotsdk_example parse mrz --text "P<UTOERIKSSON<<ANNA<MARIA<<<<<<" --license <KEY>
./scanbotsdk_example live barcode --file images/example.jpg --license <KEY>
```
Expand Down
8 changes: 0 additions & 8 deletions examples/c/include/snippets/document/document_classifier.h

This file was deleted.

8 changes: 8 additions & 0 deletions examples/c/include/snippets/enhancer/document_enhancer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef DOCUMENT_ENHANCER_H
#define DOCUMENT_ENHANCER_H

#include <ScanbotSDK.h>

scanbotsdk_error_code_t enhance_document(scanbotsdk_image_t *image);

#endif
6 changes: 3 additions & 3 deletions examples/c/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <snippets/document/detect_document.h>
#include <snippets/document/analyze_multi_page.h>
#include <snippets/document/crop_and_analyze.h>
#include <snippets/document/document_classifier.h>
#include <snippets/enhancer/document_enhancer.h>

#include <snippets/live/live_barcode.h>

Expand Down Expand Up @@ -69,13 +69,13 @@ int main(int argc, char *argv[]) {
else if (strcmp(command, "vin") == 0) ec = detect_vin(image);
else { print_usage(argv[0]); ec = SCANBOTSDK_ERROR_INVALID_ARGUMENT; }
}
else if (strcmp(category, "classify") == 0) {
else if (strcmp(category, "enhance") == 0) {
if (!file_path) { print_usage(argv[0]); ec = SCANBOTSDK_ERROR_INVALID_ARGUMENT; goto cleanup; }

ec = load_image_from_path(file_path, &image);
if (ec != SCANBOTSDK_OK) goto cleanup;

if (strcmp(command, "document") == 0) ec = classify_document(image);
if (strcmp(command, "document") == 0) ec = enhance_document(image);
else { print_usage(argv[0]); ec = SCANBOTSDK_ERROR_INVALID_ARGUMENT; }
}
else if (strcmp(category, "analyze") == 0) {
Expand Down
8 changes: 4 additions & 4 deletions examples/c/src/snippets/barcode/detect_barcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ scanbotsdk_error_code_t print_barcodes_result(scanbotsdk_barcode_scanner_result_
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "get_barcodes: %d: %s\n", ec, error_message(ec)); goto cleanup; }

for (size_t i = 0; i < count; ++i) {
const char *text = NULL;
scanbotsdk_u8string_ref_t text_ref = {0};
scanbotsdk_generic_document_t *doc = NULL;

scanbotsdk_barcode_item_get_text(barcodes[i], &text);
fprintf(stdout, " %zu) %s\n", i + 1, text);
scanbotsdk_barcode_item_get_text(barcodes[i], &text_ref);
const char *text = scanbotsdk_u8string_ref_assume_cstring(text_ref);
fprintf(stdout, " %zu) %s\n", i + 1, text ? text : "");

scanbotsdk_barcode_item_get_extracted_document(barcodes[i], &doc);
if(doc != NULL) {
Expand Down
3 changes: 2 additions & 1 deletion examples/c/src/snippets/barcode/parse_barcode_document.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ scanbotsdk_error_code_t parse_barcode_document(const char* raw_string) {
ec = scanbotsdk_barcode_document_parser_create(formats, formats_count, &parser);
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "create_parser: %d: %s\n", ec, error_message(ec)); goto cleanup; }

ec = scanbotsdk_barcode_document_parser_parse(parser, raw_string, &result);
scanbotsdk_u8string_ref_t raw_ref = scanbotsdk_u8string_ref_from_cstring(raw_string);
ec = scanbotsdk_barcode_document_parser_parse(parser, raw_ref, &result);
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "parser_parse: %d: %s\n", ec, error_message(ec)); goto cleanup; }

ec = scanbotsdk_barcode_document_parser_result_get_parsed_document(result, &parsed_doc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ scanbotsdk_error_code_t print_medical_certificate_result(scanbotsdk_medical_cert

for (size_t i = 0; i < count; ++i) {
scanbotsdk_medical_certificate_patient_info_field_type_t type;
const char* value = NULL;
scanbotsdk_u8string_ref_t value_ref = {0};

scanbotsdk_medical_certificate_patient_info_field_get_type(fields[i], &type);
scanbotsdk_medical_certificate_patient_info_field_get_value(fields[i], &value);
scanbotsdk_medical_certificate_patient_info_field_get_value(fields[i], &value_ref);

fprintf(stderr, "Type: %d Value: %s\n", type, value);
const char *value = scanbotsdk_u8string_ref_assume_cstring(value_ref);
fprintf(stderr, "Type: %d Value: %s\n", type, value ? value : "");
}

cleanup:
Expand Down
3 changes: 2 additions & 1 deletion examples/c/src/snippets/datacapture/mrz_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ scanbotsdk_error_code_t parse_mrz(const char* text) {
ec = scanbotsdk_mrz_parser_create(config, &parser);
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "create_parser: %d: %s\n", ec, error_message(ec)); goto cleanup; }

ec = scanbotsdk_mrz_parser_parse(parser, text, &result);
scanbotsdk_u8string_ref_t text_ref = scanbotsdk_u8string_ref_from_cstring(text);
ec = scanbotsdk_mrz_parser_parse(parser, text_ref, &result);
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "parse: %d: %s\n", ec, error_message(ec)); goto cleanup; }

ec = scanbotsdk_mrz_scanner_result_get_document(result, &mrz);
Expand Down
5 changes: 3 additions & 2 deletions examples/c/src/snippets/datacapture/ocr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#include <utils/utils.h>

static void print_ocr_element_text(scanbotsdk_ocr_element_t *el, const char *label, int indent) {
const char *text = NULL;
scanbotsdk_ocr_element_get_text(el, &text);
scanbotsdk_u8string_ref_t text_ref = {0};
scanbotsdk_ocr_element_get_text(el, &text_ref);
const char *text = scanbotsdk_u8string_ref_assume_cstring(text_ref);

for (int i = 0; i < indent; i++) printf(" ");
printf("%s: \"%s\"\n", label, text ? text : "");
Expand Down
7 changes: 4 additions & 3 deletions examples/c/src/snippets/datacapture/text_pattern_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

scanbotsdk_error_code_t print_text_pattern_result(scanbotsdk_text_pattern_scanner_result_t *result) {
scanbotsdk_error_code_t ec;
const char* raw_text;
scanbotsdk_u8string_ref_t raw_text_ref = {0};
const char *raw_text = NULL;

ec = scanbotsdk_text_pattern_scanner_result_get_raw_text(result, &raw_text);
ec = scanbotsdk_text_pattern_scanner_result_get_raw_text(result, &raw_text_ref);
if (ec != SCANBOTSDK_OK) { fprintf(stderr, "get_raw_text: %d\n", ec); return ec; }

raw_text = scanbotsdk_u8string_ref_assume_cstring(raw_text_ref);
printf("Raw Text: %s\n", raw_text);
return ec;
}
Expand Down
5 changes: 3 additions & 2 deletions examples/c/src/snippets/datacapture/vin_scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
scanbotsdk_error_code_t print_vin_result(scanbotsdk_vin_scanner_result_t *result) {
scanbotsdk_error_code_t ec = SCANBOTSDK_OK;
scanbotsdk_text_pattern_scanner_result_t *text_result;
const char* raw_text;
scanbotsdk_u8string_ref_t raw_text_ref = {0};

scanbotsdk_vin_scanner_result_get_text_result(result, &text_result);
scanbotsdk_text_pattern_scanner_result_get_raw_text(text_result, &raw_text);
scanbotsdk_text_pattern_scanner_result_get_raw_text(text_result, &raw_text_ref);
const char* raw_text = scanbotsdk_u8string_ref_assume_cstring(raw_text_ref);

printf("Text: %s\n", raw_text);
return ec;
Expand Down
23 changes: 12 additions & 11 deletions examples/c/src/snippets/document/analyze_multi_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
#include <utils/utils.h>

void print_analyzer_result(scanbotsdk_document_quality_analyzer_result_t *result) {
char* quality_str[] = { "Very poor", "Poor", "Reasonable", "Good", "Excellent"};
const char* quality_str[] = { "ACCEPTABLE", "UNACCEPTABLE", "UNCERTAIN" };
const size_t quality_str_count = sizeof(quality_str) / sizeof(quality_str[0]);

bool document_found;
scanbotsdk_document_quality_t *quality = NULL;
scanbotsdk_document_quality_assessment_t quality;
scanbotsdk_error_code_t ec;

scanbotsdk_document_quality_analyzer_result_get_document_found(result, &document_found);
scanbotsdk_document_quality_analyzer_result_get_quality(result, &quality);

printf("Document detection: %s\n", document_found ? "Found" : "Not found");
ec = scanbotsdk_document_quality_analyzer_result_get_quality(result, &quality);
if (ec != SCANBOTSDK_OK) {
fprintf(stderr, "analyzer_result_get_quality: %d: %s\n", ec, error_message(ec));
return;
}

if (quality)
{
printf("Document quality: %s\n", quality_str[*quality]);
if ((size_t)quality < quality_str_count) {
printf("Document quality: %s\n", quality_str[quality]);
} else {
printf("No document found.\n");
printf("Document quality: UNKNOWN (%d)\n", (int)quality);
}
}

Expand Down
22 changes: 12 additions & 10 deletions examples/c/src/snippets/document/crop_and_analyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,22 @@ scanbotsdk_error_code_t save_cropped_image(
}

void print_result(scanbotsdk_document_quality_analyzer_result_t *result) {
const char* quality_str[] = { "Very poor", "Poor", "Reasonable", "Good", "Excellent" };
const char* quality_str[] = { "ACCEPTABLE", "UNACCEPTABLE", "UNCERTAIN" };
const size_t quality_str_count = sizeof(quality_str) / sizeof(quality_str[0]);

bool document_found = false;
scanbotsdk_document_quality_t *quality = NULL;

scanbotsdk_document_quality_analyzer_result_get_document_found(result, &document_found);
scanbotsdk_document_quality_analyzer_result_get_quality(result, &quality);
scanbotsdk_document_quality_assessment_t quality;
scanbotsdk_error_code_t ec = SCANBOTSDK_OK;

printf("Document detection: %s\n", document_found ? "Found" : "Not found");
ec = scanbotsdk_document_quality_analyzer_result_get_quality(result, &quality);
if (ec != SCANBOTSDK_OK) {
fprintf(stderr, "get_quality: %d: %s\n", ec, error_message(ec));
return;
}

if (quality) {
printf("Document quality: %s (%d)\n", quality_str[*quality], *quality);
if ((size_t)quality < quality_str_count) {
printf("Document quality: %s (%d)\n", quality_str[quality], quality);
} else {
printf("No document found.\n");
printf("Document quality: UNKNOWN (%d)\n", quality);
}
}

Expand Down
45 changes: 0 additions & 45 deletions examples/c/src/snippets/document/document_classifier.c

This file was deleted.

Loading