libcvd-cl implements several computer vision algorithms in a simple and extensible framework of standard OpenCL and C++.
It is related to libcvd by the concepts of its algorithms, although the algorithms in libcvd-cl are completely reinvented for highly parallel architectures.
-
- Blur grayscale images (
BlurGrayStep
) - Blur colour images (
BlurRichStep
)
- Blur grayscale images (
-
Remarks:
- OpenCL code is pre-generated with a given convolution kernel.
-
- Convert (x,y) to (u,v) or (u,v,q) for a known camera (
ToUvqUvStep
) - Filter positions by depth (
ClipDepthStep
) - Perform arbitrary pixel->value mappings (
FxyStep
)
- Convert (x,y) to (u,v) or (u,v,q) for a known camera (
-
- Find corners in grayscale images (
PreFastGrayStep
thenFastGrayStep
) - Find corners in colour images (
PreFastRichStep
thenFastRichStep
)
- Find corners in grayscale images (
-
Remarks:
- Tests 16 pixels in a ring, with variable corner ring size and threshold.
- OpenCL on CPU is slow, but OpenCL on a reasonable GPU is faster than C++ on CPU.
- Code is almost entirely branch-free, intended for GPU and not CPU.
-
- Build descriptors for grayscale images (
HipsGrayStep
orHipsBlendGrayStep
) - Build descriptors for colour images (
HipsRichStep
orHipsBlendRichStep
) - Remove descriptors with high bit count (
HipsClipStep
) - Match descriptors by brute force (
HipsFindStep
) - Build balanced tree/forest in C++ (
HipsMakeTreeStep
) - Search balanced tree/forest in C++ (lossy, lossless) and OpenCL (lossy only) (
HipsTreeFindStep
)
- Build descriptors for grayscale images (
-
Remarks:
- Tests 64 pixels in concentric circles.
- Search kernels have optional naive rotational invariance using barrel shift.
- OpenCL on CPU is slow, but OpenCL on a reasonable GPU is faster than C++ on CPU.
-
- Assign matrix identity (
MatIdentStep
) - Randomly select point triples (
RandomIntStep
thenMixUvqUvStep
) - Generate Jacobian matrix (
PoseUvqWlsStep
) - Perform Cholesky decomposition and back-substitution (
CholeskyStep
) - Exponentiate SE3 matrix (
SE3ExpStep
) - Use SE3 matrix for point transforms (
SE3Run1Step
) - Evaluate SE3 matrix for inliers (
SE3ScoreStep
)
- Assign matrix identity (
-
Remarks:
- Basic iterative computation, but does not refine with all inliers.
- OpenCL on CPU is quite fast, OpenCL on GPU is extremely fast.
-
- Compute point radar (
makePointRadar()
) - Match two point radars (
matchPointRadars()
)
- Compute point radar (
-
Remarks:
- Highly experimental, not published in the literature.
- Matches by spatial distribution of points in 2D.
- Conceptually similar to "semi-local constraints".
- Naturally invariant to 2D/3D scale, 2D translation and 2D rotation.
- Intolerant of large shear, 3D translation, and 3D rotation.
- Potentially useful for inter-frame tracking.
-
- Compute point galaxy (
makePointGalaxy()
) - Match two point galaxies (
matchPointGalaxies()
)
- Compute point galaxy (
-
Remarks:
- Very highly experimental, yet to show promise.
- Matches by spatial distribution of points in 3D.
- Conceptually similar to "semi-local constraints".
- Naturally invariant to 3D translation, 3D rotation and 3D scale by a single scalar.
- Requires consistent (x,y,z) scale.
- Potentially useful for inter-frame tracking.
-
In general, where there are fixed-size loops in the OpenCL code, the unrolled code is pre-generated instead. This way, device registers can be used instead of (even implicit) global memory arrays and numeric expressions can be simplified and propagated, making code faster for only slightly higher developer effort.
Not all kernels require code generation, but for consistency, even those that don't still have a Python script which is simply a large
print
. -
Worker
class bundles an OpenCL device, its context, and its command queue.
-
- Camera information per pixel (
CameraState
) - Integer counter (
CountState
) - HIPS balanced tree state (
HipsTreeState
) - Image data of any format (
ImageState
) - Variable-size list data of any type (
ListState
) - Matrix/vector data of small fixed size (
MatrixState
) - (u,v) point cloud (
UvState
) - (u,v,q) point cloud (
UvqState
) - ((u,v,q),(u,v)) point pair cloud (
UvqUvState
)
- Camera information per pixel (
-
Remarks:
- States may be created once and linked by multiple steps.
- Most states have methods to translate data to/from reasonable C++ types.
- Each state is bound to exactly one worker.
-
- See "Included algorithms" above.
-
Remarks:
- Steps may link multiple input and output states.
- Steps may be created once and run repeatedly as part of a pipeline.
- Steps may be timed individually.
- Each step is bound to exactly one worker, inferred from the worker of its states.
-
- Messy; not intended for code reuse.
- May serve as working examples for library consumers.