Software Architecture - robocortex/openrox GitHub Wiki
Please find here a description of the software architecture:
The sdk is separated in several levels to enhance reusability. Like a pyramid, higher levels are supported by lower levels, but lower levels should not use higher level functions.
**--- LOW LEVELS --- **
Level 0 : System. Very low level functions and defines. Mainly used to handle system specific operations (such as memory and file management, timers, errors). Per compiler or architecture macros/defines are also defined in this level. In System/Memory, various templates of in-memory containers are defined (such as vector, double linked list, etc). Those templates are parsed and used by cmake to define a container for specific data types at compilation time. Do not modify the files generated by cmake, as they will be recreated on rebuild.
Level 1 : Baseproc. Contains low level functions which performs primitive operations (most of them do not rely on other functions to work) heavily used in computer vision algorithms.
- Array operations : For matrices, images and vectors. From simple numerical operands to more complex linear algebra on matrices.
- Image operations : Filters, transforms (e.g. : remapping of pixels), input/output, convolutions, etc.
- Maths operations : Base macros for mathematics, Polynomial equation solvers, Kernels computation for image convolution, etc.
- Geometric operations : Defines geometric primitives (and associated containers, operands, etc.). Defines a lot of functions for management of 3D transformation (Homography, Solid transformation, Essential matrices, etc.). Also manage creations of pixel maps for warping.
Organization of function in low level
In low levels, every function may be written for different data types and/or using different optimizations. Each function (functionality) is defined in a separate file (.h and .c) containing all the datatype specialization (in the same file, transpose_uchar, transpose_double, transpose_objectx). If some function need to be optimized (let say using SSE intrinsics), copy the whole C file and rename it by appending _sse before the extension (You will have to specify to CMake which file to use in which case, see existing cmakefiles for example).
**--- HIGHER LEVELS --- **
Level 2 : Core : Intermediate level. Contains primitive and small logic blocks dedicated to computer vision. Linear Algebra functions, jacobian computation, point detectors, point descriptors and other region matching are all defined in this level. This level also contains the logic blocks (Plane tracking, template detection, slam, etc.) and objects. all parameters, constants, etc. should be defined at this level inside the objects.
Level 3 : User : High Level : This level is dedicated to final users. It should only be a concatenation or simplification of objects found in the previous level. Applied to more specific needs but still general enough to be used as building blocks for more complex applications.