dito

dito is yet another toolbox for the daily work with OpenCV under Python.

It provides convenience wrappers for frequently used image-related functionalities in OpenCV and NumPy, as well as additional functionality built on top of them.

The module follows the data conventions of OpenCV under Python, namely:

  • images are represented as numpy.ndarrays with shape (?, ?) or (?, ?, 1) (grayscale) or (?, ?, 3) (color)
  • the color channel order is BGR
  • the value range for float images is (0.0, 1.0)
  • point coordinates are given in (x, y[, z]) order
  • images sizes (not shapes--these have the same meaning as in NumPy) are given in (width, height) order
  • arguments such as line_type, interpolation, etc. expect values defined by OpenCV (e.g., cv2.LINE_AA, cv2.INTER_LINEAR, etc.)

All submodules are imported and can be accessed directly through the dito namespace. For example, dito.io.load can be accessed as dito.load.

The code is structured into the following submodules:

Submodule Description Example
dito.analysis higher-level image analysis tasks dito.analysis.PcaTextureModel
dito.conversion conversion of images represented as NumPy images to other formats dito.conversion.to_PySide6_QPixmap
dito.core core image-related functionality dito.core.normalize
dito.data pre-defined images and other data (colormaps, fonts, etc.) dito.data.pm5544
dito.draw basic image drawing dito.draw.draw_symbol
dito.exceptions exception classes used within dito dito.exceptions.ConversionError
dito.highgui extensions for OpenCV's built-in highgui module dito.highgui.FloatSlider
dito.inspection functions for inspecting images and their properties dito.inspection.pinfo
dito.io low-level image input/output functions dito.io.load
dito.parallel functions for parallelizing image processing dito.parallel.mp_starmap
dito.processing basic image processing dito.processing.contours
dito.utils utility functions used throughout dito dito.utils.now_str
dito.visual functions for visualizing images dito.visual.text
 1"""
 2`dito` is yet another toolbox for the daily work with OpenCV under Python.
 3
 4* Code: https://github.com/dhaase-de/dito
 5* PyPI: https://pypi.org/project/dito/
 6* Documentation: https://dhaase-de.github.io/dito/dito.html
 7
 8It provides convenience wrappers for frequently used image-related
 9functionalities in OpenCV and NumPy, as well as additional functionality built
10on top of them.
11
12The module follows the data conventions of OpenCV under Python, namely:
13* images are represented as `numpy.ndarray`s with shape `(?, ?)` or `(?, ?, 1)`
14  (grayscale) or `(?, ?, 3)` (color)
15* the color channel order is BGR
16* the value range for float images is `(0.0, 1.0)`
17* point coordinates are given in `(x, y[, z])` order
18* images sizes (not shapes--these have the same meaning as in NumPy) are given
19  in `(width, height)` order
20* arguments such as `line_type`, `interpolation`, etc. expect values defined by
21  OpenCV (e.g., `cv2.LINE_AA`, `cv2.INTER_LINEAR`, etc.)
22
23All submodules are imported and can be accessed directly through the `dito`
24namespace. For example, `dito.io.load` can be accessed as `dito.load`.
25
26The code is structured into the following submodules:
27
28Submodule         | Description                                                       | Example
29------------------|-------------------------------------------------------------------|--------------------------------
30`dito.analysis`   | higher-level image analysis tasks                                 | `dito.analysis.PcaTextureModel`
31`dito.conversion` | conversion of images represented as NumPy images to other formats | `dito.conversion.to_PySide6_QPixmap`
32`dito.core`       | core image-related functionality                                  | `dito.core.normalize`
33`dito.data`       | pre-defined images and other data (colormaps, fonts, etc.)        | `dito.data.pm5544`
34`dito.draw`       | basic image drawing                                               | `dito.draw.draw_symbol`
35`dito.exceptions` | exception classes used within `dito`                              | `dito.exceptions.ConversionError`
36`dito.highgui`    | extensions for OpenCV's built-in `highgui` module                 | `dito.highgui.FloatSlider`
37`dito.inspection` | functions for inspecting images and their properties              | `dito.inspection.pinfo`
38`dito.io`         | low-level image input/output functions                            | `dito.io.load`
39`dito.parallel`   | functions for parallelizing image processing                      | `dito.parallel.mp_starmap`
40`dito.processing` | basic image processing                                            | `dito.processing.contours`
41`dito.utils`      | utility functions used throughout `dito`                          | `dito.utils.now_str`
42`dito.visual`     | functions for visualizing images                                  | `dito.visual.text`
43"""
44
45__version__ = "2.13.1.dev0"
46
47
48from dito.analysis import *
49from dito.conversion import *
50from dito.core import *
51from dito.data import *
52from dito.draw import *
53from dito.exceptions import *
54from dito.highgui import *
55from dito.inspection import *
56from dito.io import *
57from dito.parallel import *
58from dito.processing import *
59from dito.utils import *
60from dito.visual import *