intrada-alpr 7.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. intrada_alpr-7.7.0/LICENSE +29 -0
  2. intrada_alpr-7.7.0/PKG-INFO +162 -0
  3. intrada_alpr-7.7.0/README.md +134 -0
  4. intrada_alpr-7.7.0/pyproject.toml +99 -0
  5. intrada_alpr-7.7.0/src/intrada_alpr/__init__.py +92 -0
  6. intrada_alpr-7.7.0/src/intrada_alpr/_core/__init__.py +7 -0
  7. intrada_alpr-7.7.0/src/intrada_alpr/_core/context.py +634 -0
  8. intrada_alpr-7.7.0/src/intrada_alpr/_core/errors.py +607 -0
  9. intrada_alpr-7.7.0/src/intrada_alpr/_core/geometry_conversion.py +30 -0
  10. intrada_alpr-7.7.0/src/intrada_alpr/_core/image.py +150 -0
  11. intrada_alpr-7.7.0/src/intrada_alpr/_core/intrada.py +452 -0
  12. intrada_alpr-7.7.0/src/intrada_alpr/_core/logging.py +334 -0
  13. intrada_alpr-7.7.0/src/intrada_alpr/_core/models.py +422 -0
  14. intrada_alpr-7.7.0/src/intrada_alpr/_core/options.py +84 -0
  15. intrada_alpr-7.7.0/src/intrada_alpr/_core/result.py +396 -0
  16. intrada_alpr-7.7.0/src/intrada_alpr/_core/threading/__init__.py +23 -0
  17. intrada_alpr-7.7.0/src/intrada_alpr/_core/threading/events.py +78 -0
  18. intrada_alpr-7.7.0/src/intrada_alpr/_core/threading/results.py +56 -0
  19. intrada_alpr-7.7.0/src/intrada_alpr/_core/threading/tasks.py +152 -0
  20. intrada_alpr-7.7.0/src/intrada_alpr/_core/threading/worker.py +518 -0
  21. intrada_alpr-7.7.0/src/intrada_alpr/_native/__init__.py +7 -0
  22. intrada_alpr-7.7.0/src/intrada_alpr/_native/api.py +911 -0
  23. intrada_alpr-7.7.0/src/intrada_alpr/_native/library.py +305 -0
  24. intrada_alpr-7.7.0/src/intrada_alpr/_native/strings.py +29 -0
  25. intrada_alpr-7.7.0/src/intrada_alpr/_native/structs.py +31 -0
  26. intrada_alpr-7.7.0/src/intrada_alpr/_types/__init__.py +3 -0
  27. intrada_alpr-7.7.0/src/intrada_alpr/_types/enums.py +238 -0
  28. intrada_alpr-7.7.0/src/intrada_alpr/_types/geometry.py +143 -0
@@ -0,0 +1,29 @@
1
+ intrada-py
2
+
3
+ Copyright 2026 by Q-Free Netherlands BV.
4
+
5
+ All Rights Reserved
6
+
7
+ All Q-Free Netherlands BV. source code software programs, object code software
8
+ programs, documentation and copies thereof shall contain the copyright notice
9
+ above and this permission notice. Q-Free Netherlands BV. BV. reserves all
10
+ rights, title and interest with respect to copying, modification or the
11
+ distribution of such software programs and associated documentation, except
12
+ those rights specifically granted by Q-Free Netherlands BV. in a Product
13
+ Software Program License or Source Code License between Q-Free Netherlands BV.
14
+ and Licensee. Without this License, such software programs may not be used,
15
+ copied, modified or distributed in source or object code form. Further, the
16
+ copyright notice must appear on the media, the supporting documentation and
17
+ packaging. A Source Code License does not grant any rights to use Q-Free
18
+ Netherlands BV.'s name or trademarks in advertising or publicity, with respect
19
+ to the distribution of the software programs without the specific prior written
20
+ permission of Q-Free Netherlands BV.. Trademark agreements may be obtained in a
21
+ separate Trademark License Agreement.
22
+
23
+ Q-Free disclaims all warranties, express or implied, with respect to the
24
+ Software Programs including the implied warranties of merchantability and
25
+ fitness, for a particular purpose. In no event shall Q-Free Netherlands BV. be
26
+ liable for any special, indirect or consequential damages or any damages
27
+ whatsoever resulting from loss of use, data or profits whether in an action of
28
+ contract or tort, arising out of or in connection with the use or performance of
29
+ such software program.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: intrada-alpr
3
+ Version: 7.7.0
4
+ Summary: A Python SDK for using Intrada 7
5
+ Keywords: alpr,lpr,license plate recognition,computer vision,sdk
6
+ Author: Q-Free Netherlands BV
7
+ Author-email: Q-Free Netherlands BV <info.nl@q-free.com>
8
+ License-Expression: LicenseRef-Proprietary
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
24
+ Requires-Python: >=3.10
25
+ Project-URL: Homepage, https://intrada.q-free.com
26
+ Project-URL: Documentation, https://intrada.q-free.com/docs
27
+ Description-Content-Type: text/markdown
28
+
29
+ # intrada_alpr
30
+
31
+ intrada_alpr is a Python library that provides functionality to use the
32
+ [Intrada ALPR](https://intrada.q-free.com/) software in Python.
33
+
34
+ More detailed documentation is available on the [Intrada documentation website](https://intrada.q-free.com/docs)
35
+ (login is required).
36
+
37
+ ## Requirements
38
+
39
+ To use this library, you need to have the following files present in the same
40
+ directory as your application:
41
+
42
+ 1. The Intrada library:
43
+ `intrada.dll` for Windows or `libintrada.so` for Linux
44
+ 2. One or more country modules:
45
+ `intrada_cm_*.dll` for Windows or `libintrada_cm_*.so` for Linux
46
+ 3. The `intrada.lic` file
47
+
48
+ If these files are in another directory, you can specify the path using the
49
+ `IntradaOptions.path` option.
50
+
51
+ ## How to use
52
+
53
+ ### Single-threaded
54
+
55
+ This example shows how to use the `intrada-alpr` library in a single-threaded
56
+ environment.
57
+
58
+ ```python
59
+ from intrada_alpr import IntradaAlpr, IntradaOptions
60
+
61
+ # Initialize Intrada
62
+ with IntradaAlpr.create(
63
+ IntradaOptions(
64
+ company_name="[Your company name]",
65
+ license_key="[Your company key]",
66
+ )
67
+ ) as intrada:
68
+ # Create a new processing context
69
+ with intrada.create_processing_context() as processing_context:
70
+ # Load an image
71
+ with intrada.load_image("path/to/image.jpg") as image:
72
+ # Process the image
73
+ result = processing_context.process(image)
74
+
75
+ print(
76
+ f"Registration number: "
77
+ f"{result.primary_plate.registration_number if result.primary_plate else 'Unknown'}"
78
+ )
79
+ print(
80
+ f"Jurisdiction: "
81
+ f"{result.primary_plate.jurisdiction if result.primary_plate else 'Unknown'}"
82
+ )
83
+ ```
84
+
85
+ ### Multithreaded
86
+
87
+ This example shows how to use the `intrada-alpr` library in a multithreaded
88
+ environment. It makes use of `ThreadedWorker` to efficiently process multiple
89
+ images in parallel.
90
+
91
+ ```python
92
+ import asyncio
93
+
94
+ from intrada_alpr import IntradaAlpr, IntradaOptions
95
+
96
+
97
+ async def main() -> None:
98
+ # Initialize Intrada
99
+ with IntradaAlpr.create(
100
+ IntradaOptions(
101
+ company_name="[Your company name]",
102
+ license_key="[Your company key]",
103
+ )
104
+ ) as intrada:
105
+ # Create a new threaded worker
106
+ with intrada.create_threaded_worker() as threaded_worker:
107
+ await threaded_worker.enqueue_async("path/to/image.jpg")
108
+ await threaded_worker.enqueue_async("path/to/image2.jpg")
109
+ # etc.
110
+
111
+ # Signal to the worker that no more tasks will be enqueued.
112
+ # This is not required, but by doing this, the worker will stop
113
+ # after all the tasks have been processed instead of waiting for
114
+ # more tasks to process.
115
+ threaded_worker.complete_enqueuing()
116
+
117
+ # Get the results
118
+ async for task_result in threaded_worker.get_results_async():
119
+ if not task_result.is_success:
120
+ print(f"Error processing image: {task_result.exception}")
121
+ continue
122
+
123
+ result = task_result.result
124
+ print(
125
+ f"Registration number: "
126
+ f"{result.primary_plate.registration_number if result and result.primary_plate else 'Unknown'}"
127
+ )
128
+ print(
129
+ f"Jurisdiction: "
130
+ f"{result.primary_plate.jurisdiction if result and result.primary_plate else 'Unknown'}"
131
+ )
132
+
133
+
134
+ asyncio.run(main())
135
+ ```
136
+
137
+ ## Support
138
+
139
+ If you have any questions or need help, please contact us at
140
+ [info.nl@q-free.com](mailto:info.nl@q-free.com).
141
+
142
+ ## License
143
+ Copyright 2026 by Q-Free Netherlands BV.
144
+
145
+ All Rights Reserved
146
+
147
+ All Q-Free Netherlands BV. source code software programs, object code software programs, documentation and copies
148
+ thereof shall contain the copyright notice above and this permission notice. Q-Free Netherlands BV. BV. reserves all
149
+ rights, title and interest with respect to copying, modification or the distribution of such software programs and
150
+ associated documentation, except those rights specifically granted by Q-Free Netherlands BV. in a Product Software
151
+ Program License or Source Code License between Q-Free Netherlands BV. and Licensee. Without this License, such software
152
+ programs may not be used, copied, modified or distributed in source or object code form. Further, the copyright notice
153
+ must appear on the media, the supporting documentation and packaging. A Source Code License does not grant any rights
154
+ to use Q-Free Netherlands BV.'s name or trademarks in advertising or publicity, with respect to the distribution of the
155
+ software programs without the specific prior written permission of Q-Free Netherlands B.V. Trademark agreements may be
156
+ obtained in a separate Trademark License Agreement.
157
+
158
+ Q-Free disclaims all warranties, express or implied, with respect to the Software Programs including the implied
159
+ warranties of merchantability and fitness, for a particular purpose. In no event shall Q-Free Netherlands BV. be
160
+ liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or
161
+ profits whether in an action of contract or tort, arising out of or in connection with the use or performance of such
162
+ software program.
@@ -0,0 +1,134 @@
1
+ # intrada_alpr
2
+
3
+ intrada_alpr is a Python library that provides functionality to use the
4
+ [Intrada ALPR](https://intrada.q-free.com/) software in Python.
5
+
6
+ More detailed documentation is available on the [Intrada documentation website](https://intrada.q-free.com/docs)
7
+ (login is required).
8
+
9
+ ## Requirements
10
+
11
+ To use this library, you need to have the following files present in the same
12
+ directory as your application:
13
+
14
+ 1. The Intrada library:
15
+ `intrada.dll` for Windows or `libintrada.so` for Linux
16
+ 2. One or more country modules:
17
+ `intrada_cm_*.dll` for Windows or `libintrada_cm_*.so` for Linux
18
+ 3. The `intrada.lic` file
19
+
20
+ If these files are in another directory, you can specify the path using the
21
+ `IntradaOptions.path` option.
22
+
23
+ ## How to use
24
+
25
+ ### Single-threaded
26
+
27
+ This example shows how to use the `intrada-alpr` library in a single-threaded
28
+ environment.
29
+
30
+ ```python
31
+ from intrada_alpr import IntradaAlpr, IntradaOptions
32
+
33
+ # Initialize Intrada
34
+ with IntradaAlpr.create(
35
+ IntradaOptions(
36
+ company_name="[Your company name]",
37
+ license_key="[Your company key]",
38
+ )
39
+ ) as intrada:
40
+ # Create a new processing context
41
+ with intrada.create_processing_context() as processing_context:
42
+ # Load an image
43
+ with intrada.load_image("path/to/image.jpg") as image:
44
+ # Process the image
45
+ result = processing_context.process(image)
46
+
47
+ print(
48
+ f"Registration number: "
49
+ f"{result.primary_plate.registration_number if result.primary_plate else 'Unknown'}"
50
+ )
51
+ print(
52
+ f"Jurisdiction: "
53
+ f"{result.primary_plate.jurisdiction if result.primary_plate else 'Unknown'}"
54
+ )
55
+ ```
56
+
57
+ ### Multithreaded
58
+
59
+ This example shows how to use the `intrada-alpr` library in a multithreaded
60
+ environment. It makes use of `ThreadedWorker` to efficiently process multiple
61
+ images in parallel.
62
+
63
+ ```python
64
+ import asyncio
65
+
66
+ from intrada_alpr import IntradaAlpr, IntradaOptions
67
+
68
+
69
+ async def main() -> None:
70
+ # Initialize Intrada
71
+ with IntradaAlpr.create(
72
+ IntradaOptions(
73
+ company_name="[Your company name]",
74
+ license_key="[Your company key]",
75
+ )
76
+ ) as intrada:
77
+ # Create a new threaded worker
78
+ with intrada.create_threaded_worker() as threaded_worker:
79
+ await threaded_worker.enqueue_async("path/to/image.jpg")
80
+ await threaded_worker.enqueue_async("path/to/image2.jpg")
81
+ # etc.
82
+
83
+ # Signal to the worker that no more tasks will be enqueued.
84
+ # This is not required, but by doing this, the worker will stop
85
+ # after all the tasks have been processed instead of waiting for
86
+ # more tasks to process.
87
+ threaded_worker.complete_enqueuing()
88
+
89
+ # Get the results
90
+ async for task_result in threaded_worker.get_results_async():
91
+ if not task_result.is_success:
92
+ print(f"Error processing image: {task_result.exception}")
93
+ continue
94
+
95
+ result = task_result.result
96
+ print(
97
+ f"Registration number: "
98
+ f"{result.primary_plate.registration_number if result and result.primary_plate else 'Unknown'}"
99
+ )
100
+ print(
101
+ f"Jurisdiction: "
102
+ f"{result.primary_plate.jurisdiction if result and result.primary_plate else 'Unknown'}"
103
+ )
104
+
105
+
106
+ asyncio.run(main())
107
+ ```
108
+
109
+ ## Support
110
+
111
+ If you have any questions or need help, please contact us at
112
+ [info.nl@q-free.com](mailto:info.nl@q-free.com).
113
+
114
+ ## License
115
+ Copyright 2026 by Q-Free Netherlands BV.
116
+
117
+ All Rights Reserved
118
+
119
+ All Q-Free Netherlands BV. source code software programs, object code software programs, documentation and copies
120
+ thereof shall contain the copyright notice above and this permission notice. Q-Free Netherlands BV. BV. reserves all
121
+ rights, title and interest with respect to copying, modification or the distribution of such software programs and
122
+ associated documentation, except those rights specifically granted by Q-Free Netherlands BV. in a Product Software
123
+ Program License or Source Code License between Q-Free Netherlands BV. and Licensee. Without this License, such software
124
+ programs may not be used, copied, modified or distributed in source or object code form. Further, the copyright notice
125
+ must appear on the media, the supporting documentation and packaging. A Source Code License does not grant any rights
126
+ to use Q-Free Netherlands BV.'s name or trademarks in advertising or publicity, with respect to the distribution of the
127
+ software programs without the specific prior written permission of Q-Free Netherlands B.V. Trademark agreements may be
128
+ obtained in a separate Trademark License Agreement.
129
+
130
+ Q-Free disclaims all warranties, express or implied, with respect to the Software Programs including the implied
131
+ warranties of merchantability and fitness, for a particular purpose. In no event shall Q-Free Netherlands BV. be
132
+ liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or
133
+ profits whether in an action of contract or tort, arising out of or in connection with the use or performance of such
134
+ software program.
@@ -0,0 +1,99 @@
1
+ [build-system]
2
+ requires = ["uv_build>=0.11.2,<0.12"]
3
+ build-backend = "uv_build"
4
+
5
+ [project]
6
+ name = "intrada-alpr"
7
+ version = "7.7.0"
8
+ description = "A Python SDK for using Intrada 7"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [
12
+ { name = "Q-Free Netherlands BV", email = "info.nl@q-free.com" }
13
+ ]
14
+ license = "LicenseRef-Proprietary"
15
+ license-files = ["LICENSE"]
16
+ keywords = ["alpr", "lpr", "license plate recognition", "computer vision", "sdk"]
17
+ classifiers = [
18
+ "Development Status :: 5 - Production/Stable",
19
+ "Intended Audience :: Developers",
20
+ "Operating System :: Microsoft :: Windows",
21
+ "Operating System :: POSIX :: Linux",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
29
+ "Programming Language :: Python :: Implementation :: CPython",
30
+ "Topic :: Software Development :: Libraries",
31
+ "Topic :: Scientific/Engineering :: Image Recognition",
32
+ ]
33
+
34
+ [project.urls]
35
+ "Homepage" = "https://intrada.q-free.com"
36
+ "Documentation" = "https://intrada.q-free.com/docs"
37
+
38
+ [dependency-groups]
39
+ dev = [
40
+ "mypy>=1.14.1",
41
+ "pytest>=8.3.5",
42
+ "pytest-benchmark>=4.0.0",
43
+ "pytest-cov>=5.0.0",
44
+ "ruff>=0.14.0",
45
+ "junitparser>=5.0.0",
46
+ "pylint>=4.0.5"
47
+ ]
48
+
49
+ [tool.pytest.ini_options]
50
+ addopts = "--maxfail=1 --strict-markers --strict-config --cov=intrada_alpr --cov-report=term-missing"
51
+ markers = [
52
+ "unit: Fast isolated tests that do not require real native resources.",
53
+ "integration: Tests that execute against a real Intrada runtime.",
54
+ "benchmark: Performance benchmark tests that require real Intrada runtime resources.",
55
+ ]
56
+
57
+ [tool.ruff]
58
+ target-version = "py310"
59
+ fix = true
60
+ line-length = 120
61
+
62
+ [tool.ruff.lint]
63
+ select = ["E", "F", "I", "UP", "ANN", "TCH"]
64
+
65
+ [tool.ruff.lint.per-file-ignores]
66
+ "tests/*" = ["ANN"]
67
+
68
+ [tool.mypy]
69
+ python_version = "3.10"
70
+ strict = true
71
+ ignore_missing_imports = true
72
+ warn_unused_ignores = true
73
+ warn_return_any = true
74
+ disallow_untyped_defs = true
75
+ disallow_incomplete_defs = true
76
+ show_error_codes = true
77
+ pretty = true
78
+ exclude = "tests/.*"
79
+
80
+ [tool.uv_build]
81
+ include = [
82
+ "src/intrada_alpr",
83
+ "README.md",
84
+ "LICENSE",
85
+ "pyproject.toml",
86
+ ]
87
+ exclude = [
88
+ "tests/**",
89
+ "resources/**",
90
+ "output/**",
91
+ "demo.py",
92
+ "azure-pipelines.yml",
93
+ ".github/**",
94
+ ".gitignore",
95
+ "**/.DS_Store",
96
+ "**/__pycache__/**",
97
+ "**/*.py[cod]",
98
+ ]
99
+
@@ -0,0 +1,92 @@
1
+ """
2
+ The Intrada ALPR library.
3
+
4
+ The Intrada Automatic License Plate Recognition (ALPR) API provides robust
5
+ tools for detecting, recognizing, and analyzing license plates in images.
6
+ It is designed for flexibility and performance, supporting a variety of
7
+ configurations and use cases, including traffic management, security
8
+ systems, and more.
9
+
10
+ The main workflow is:
11
+
12
+ 1. Create an Intrada ALPR instance
13
+ 2. Create a processing context.
14
+ 3. Load or create an image.
15
+ 4. Process the image.
16
+ 5. Inspect the returned result.
17
+
18
+ It can also create a threaded worker for processing multiple images in
19
+ parallel.
20
+
21
+ Features include:
22
+ - License Plate Recognition: Detect and recognize license plates in images.
23
+ - Vehicle detection and classification: Detect vehicles and classify
24
+ them based on predefined categories.
25
+ - Configurable parameters: Adjust settings like jurisdictions,
26
+ recognition tasks, and processing constraints.
27
+ - Multi-threading support: Efficient context management for concurrent
28
+ processing.
29
+ - Broad input support: Compatible with a variety of image formats and
30
+ resolutions.
31
+ """
32
+
33
+ from __future__ import annotations
34
+
35
+ from ._core.errors import IntradaException
36
+ from ._core.intrada import IntradaAlpr
37
+ from ._core.models import PlateResult, Result, SymbolResult, VehicleMakeModel, VehicleResult
38
+ from ._core.options import IntradaOptions
39
+ from ._core.result import INTRADA_UNKNOWN
40
+ from ._core.threading import (
41
+ ProcessingContextCreatedEventArgs,
42
+ TaskFailedEventArgs,
43
+ TaskProcessedEventArgs,
44
+ TaskProcessingEventArgs,
45
+ TaskResult,
46
+ ThreadedTask,
47
+ ThreadedWorker,
48
+ )
49
+ from ._types.enums import (
50
+ CameraPosition,
51
+ DetectionMode,
52
+ ImageCaptureType,
53
+ ImageColorFilterArrayPattern,
54
+ ImageFormat,
55
+ ProcessingTask,
56
+ VehicleColor,
57
+ VehicleSide,
58
+ VehicleType,
59
+ )
60
+ from ._types.geometry import Point, Quadrangle, Rectangle, ReferenceFrame
61
+
62
+ __all__ = [
63
+ "IntradaAlpr",
64
+ "IntradaOptions",
65
+ "Result",
66
+ "VehicleResult",
67
+ "VehicleMakeModel",
68
+ "PlateResult",
69
+ "SymbolResult",
70
+ "ThreadedWorker",
71
+ "ThreadedTask",
72
+ "TaskResult",
73
+ "ProcessingContextCreatedEventArgs",
74
+ "TaskProcessingEventArgs",
75
+ "TaskProcessedEventArgs",
76
+ "TaskFailedEventArgs",
77
+ "IntradaException",
78
+ "DetectionMode",
79
+ "ProcessingTask",
80
+ "ImageFormat",
81
+ "ImageCaptureType",
82
+ "ImageColorFilterArrayPattern",
83
+ "CameraPosition",
84
+ "VehicleType",
85
+ "VehicleColor",
86
+ "VehicleSide",
87
+ "Point",
88
+ "Rectangle",
89
+ "Quadrangle",
90
+ "ReferenceFrame",
91
+ "INTRADA_UNKNOWN",
92
+ ]
@@ -0,0 +1,7 @@
1
+ """Core SDK implementation layer.
2
+
3
+ This package contains lifecycle management, processing logic, result models,
4
+ logging, and error mapping used by the public :mod:`intrada_alpr` API.
5
+ """
6
+
7
+ from __future__ import annotations