soil-align

API

Package soil-align/preprocessing:

clahe(image &key (bin-dimensions (default-bin-dimensions image)) (clip-limit 0.015))
Perform contrast limited adaptive histogram equalization (constrast enhancement) of an image. The parameter BIN-DIMENSIONS controls dimensions of a single histogram.

Package soil-align/sift3d:

descriptors(array)
Take an image (3D array of single-floats) and return an array of keypoint coordinates and their descriptors.

Package soil-align/pca:

fit-pca(descriptors explained-variance)
Return a matrix which projects vectors from the descriptor space to a PCA space of lesser dimensionality. The parameter EXPLAINED-VARIANCE controls dimensionality of that space.
transform-pca(descriptors vt means)
Apply a transform to the PCA space to descriptors. VT and MEANS are obtained from FIT-PCA.
invert-pca(pca vt means)
This is a (lossy) inversion of TRANSFORM-PCA, i.e. it converts vectors in the PCA space back into the descriptor space.

Package soil-align/db:

descriptors-cached(array db-pathname)

Calculate image descriptors using 3D SIFT and cache them in a database. The next time the descriptors are calculated for this particular array the results are read from the database. The database uses SHA256 hash of the array as a key into the database. Unlike SOIL-ALIGN/SIFT3D:DESCRIPTORS function, this function accepts an (original) array of octets which is later converted to an array of single floats using CLAHE algorithm. DB-PATHNAME argument is a path to the database.

Return four values: Coordinates of keypoints, descriptors in the PCA space, a transform from the descriptor space to the PCA space, descriptor component means.

Package soil-align/match:

match-descriptors(c1 c2 d1 d2 &optional (c 1.2))
Find matches between two sets of descriptors. The parameter C controls what we treat as a match. Bigger values result in a lesser number of more stable matches. \(C_i\) is an array of keypoint coordinates and \(D_i\) is an array of corresponding descriptors.

Package soil-align/transform:

rigid-transform-fit(&optional scalingp rotation-constraint)
Return a function which finds a rigid transform which fits the matches. The parameter rotation-constraint controls what rotations are allowed and can be nil or a number 0, 1 or 2. If it's nil rotation is unconstrained. If it's a number, only rotation around that axis is allowed. The parameter scaling, if non-nil, also enables uniform scaling of the coordinates.
ransac(f matches &key (iterations 500) (seed-points 15) (err 100.0))
Find an affine transform which transforms the first keypoint in each pair of matches to the second keypoint. Keypoint parameters are related to the RANSAC algorithm: ITERATIONS is the number of iterations, SEED-POINTS is an initial number of points to make a fit. A point is well-fit if \(\| y - Ax \|\) is less than ERR, (\(A\) is a candidate for the found fit). The function F fits a subset of MATCHES and controls the type of transform (e.g. rigid, translation, etc.).

Package soil-align/array-transform:

apply-transform(array m shape &key (background 0))
Apply affine transform M(in the form of 4x4 matrix) to an image. The result has the shape shape.