Feature Extraction and Descriptors
Below [] in an argument list means an optional argument.
Types
ImageFeatures.Feature — Type.feature = Feature(keypoint, orientation = 0.0, scale = 0.0)The Feature type has the keypoint, its orientation and its scale.
ImageFeatures.Features — Type.features = Features(boolean_img)
features = Features(keypoints)Returns a Vector{Feature} of features generated from the true values in a boolean image or from a list of keypoints.
ImageFeatures.Keypoint — Type.keypoint = Keypoint(y, x)
keypoint = Keypoint(feature)A Keypoint may be created by passing the coordinates of the point or from a feature.
ImageFeatures.Keypoints — Type.keypoints = Keypoints(boolean_img)
keypoints = Keypoints(features)Creates a Vector{Keypoint} of the true values in a boolean image or from a list of features.
ImageFeatures.BRIEF — Type.brief_params = BRIEF([size = 128], [window = 9], [sigma = 2 ^ 0.5], [sampling_type = gaussian], [seed = 123])| Argument | Type | Description |
|---|---|---|
| size | Int | Size of the descriptor |
| window | Int | Size of sampling window |
| sigma | Float64 | Value of sigma used for inital gaussian smoothing of image |
| sampling_type | Function | Type of sampling used for building the descriptor (See BRIEF Sampling Patterns) |
| seed | Int | Random seed used for generating the sampling pairs. For matching two descriptors, the seed used to build both should be same. |
ImageFeatures.ORB — Type.orb_params = ORB([num_keypoints = 500], [n_fast = 12], [threshold = 0.25], [harris_factor = 0.04], [downsample = 1.3], [levels = 8], [sigma = 1.2])| Argument | Type | Description |
|---|---|---|
| num_keypoints | Int | Number of keypoints to extract and size of the descriptor calculated |
| n_fast | Int | Number of consecutive pixels used for finding corners with FAST. See [fastcorners] |
| threshold | Float64 | Threshold used to find corners in FAST. See [fastcorners] |
| harris_factor | Float64 | Harris factor k used to rank keypoints by harris responses and extract the best ones |
| downsample | Float64 | Downsampling parameter used while building the gaussian pyramid. See [gaussian_pyramid] in Images.jl |
| levels | Int | Number of levels in the gaussian pyramid. See [gaussian_pyramid] in Images.jl |
| sigma | Float64 | Used for gaussian smoothing in each level of the gaussian pyramid. See [gaussian_pyramid] in Images.jl |
ImageFeatures.FREAK — Type.freak_params = FREAK([pattern_scale = 22.0])| Argument | Type | Description |
|---|---|---|
| pattern_scale | Float64 | Scaling factor for the sampling window |
ImageFeatures.BRISK — Type.brisk_params = BRISK([pattern_scale = 1.0])| Argument | Type | Description |
|---|---|---|
pattern_scale | Float64 | Scaling factor for the sampling window |
Corners
ImageFeatures.corner_orientations — Function.orientations = corner_orientations(img)
orientations = corner_orientations(img, corners)
orientations = corner_orientations(img, corners, kernel)Returns the orientations of corner patches in an image. The orientation of a corner patch is denoted by the orientation of the vector between intensity centroid and the corner. The intensity centroid can be calculated as C = (m01/m00, m10/m00) where mpq is defined as -
`mpq = (x^p)(y^q)I(y, x) for each p, q in the corner patch`The kernel used for the patch can be given through the kernel argument. The default kernel used is a gaussian kernel of size 5x5.
BRIEF Sampling Patterns
ImageFeatures.random_uniform — Function.sample_one, sample_two = random_uniform(size, window, seed)Builds sampling pairs using random uniform sampling.
ImageFeatures.random_coarse — Function.sample_one, sample_two = random_coarse(size, window, seed)Builds sampling pairs using random sampling over a coarse grid.
ImageFeatures.gaussian — Function.sample_one, sample_two = gaussian(size, window, seed)Builds sampling pairs using gaussian sampling.
ImageFeatures.gaussian_local — Function.sample_one, sample_two = gaussian_local(size, window, seed)Pairs (Xi, Yi) are randomly sampled using a Gaussian distribution where first X is sampled with a standard deviation of 0.04*S^2 and then the Yi’s are sampled using a Gaussian distribution – Each Yi is sampled with mean Xi and standard deviation of 0.01 * S^2
ImageFeatures.center_sample — Function.sample_one, sample_two = center_sample(size, window, seed)Builds sampling pairs (Xi, Yi) where Xi is (0, 0) and Yi is sampled uniformly from the window.
Feature Extraction
Feature Description
ImageFeatures.create_descriptor — Function.desc, keypoints = create_descriptor(img, keypoints, params)
desc, keypoints = create_descriptor(img, params)Create a descriptor for each entry in keypoints from the image img. params specifies the parameters for any of several descriptors:
Some descriptors support discovery of the keypoints from fastcorners.
Feature Matching
ImageFeatures.hamming_distance — Function.distance = hamming_distance(desc_1, desc_2)Calculates the hamming distance between two descriptors.
ImageFeatures.match_keypoints — Function.matches = match_keypoints(keypoints_1, keypoints_2, desc_1, desc_2, threshold = 0.1)Finds matched keypoints using the hamming_distance function having distance value less than threshold.
Texture Matching
Gray Level Co-occurence Matrix
glcm
glcm_symmetric
glcm_norm
glcm_prop
max_prob
contrast
ASM
IDM
glcm_entropy
energy
dissimilarity
correlation
glcm_mean_ref
glcm_mean_neighbour
glcm_var_ref
glcm_var_neighbourLocal Binary Patterns
lbp
modified_lbp
direction_coded_lbp
lbp_original
lbp_uniform
lbp_rotation_invariant
multi_block_lbp