Skip to content

Commit

Permalink
replace tabs and remove training whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Evizero committed Apr 1, 2017
1 parent 0bda89b commit a6378fc
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 271 deletions.
78 changes: 39 additions & 39 deletions src/ImageFeatures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,50 @@ include("houghtransform.jl")

export Keypoint, Keypoints, Feature, Features, Params, BRIEF, ORB, FREAK, BRISK

export
#Core
create_descriptor,
hamming_distance,
match_keypoints,
grade_matches,
export
#Core
create_descriptor,
hamming_distance,
match_keypoints,
grade_matches,

#Local Binary Patterns
lbp,
modified_lbp,
direction_coded_lbp,
lbp_original,
lbp_uniform,
lbp_rotation_invariant,
multi_block_lbp,
lbp,
modified_lbp,
direction_coded_lbp,
lbp_original,
lbp_uniform,
lbp_rotation_invariant,
multi_block_lbp,

#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_neighbour,
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_neighbour,

#Corners
corner_orientations,
#Corners
corner_orientations,

#BRIEF
random_uniform,
random_coarse,
gaussian,
gaussian_local,
center_sample,
#BRIEF
random_uniform,
random_coarse,
gaussian,
gaussian_local,
center_sample,

#Lines and Ellipses
hough_transform_standard
#Lines and Ellipses
hough_transform_standard
end
10 changes: 5 additions & 5 deletions src/brief.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ brief_params = BRIEF([size = 128], [window = 9], [sigma = 2 ^ 0.5], [sampling_ty
| 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 |
| **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](#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. |
| **seed** | Int | Random seed used for generating the sampling pairs. For matching two descriptors, the seed used to build both should be same. |
"""
type BRIEF{F} <: Params
Expand Down Expand Up @@ -101,7 +101,7 @@ end
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
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`
"""
function gaussian_local(size::Int, window::Int, seed::Int)
Expand Down Expand Up @@ -164,4 +164,4 @@ function create_descriptor{T<:Gray}(img::AbstractArray{T, 2}, keypoints::Keypoin
push!(ret_keypoints, k)
end
descriptors, ret_keypoints
end
end
12 changes: 6 additions & 6 deletions src/brisk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ brisk_params = BRISK([pattern_scale = 1.0])
| Argument | Type | Description |
|----------|------|-------------|
| `pattern_scale` | `Float64` | Scaling factor for the sampling window |
| `pattern_scale` | `Float64` | Scaling factor for the sampling window |
"""
type BRISK <: Params
threshold::Float64
Expand Down Expand Up @@ -41,7 +41,7 @@ function BRISK(; threshold::Float64 = 0.25, octaves::Int = 4, pattern_scale = 1.
BRISK(threshold, octaves, pattern_scale, pattern_table, smoothing_table, orientation_weights, short_pairs, long_pairs)
end

function _brisk_orientation{T<:Gray}(int_img::AbstractArray{T, 2}, keypoint::Keypoint, pattern::Array{SamplePair},
function _brisk_orientation{T<:Gray}(int_img::AbstractArray{T, 2}, keypoint::Keypoint, pattern::Array{SamplePair},
orientation_weights::Array{OrientationWeights}, sigmas::Array{Float16}, long_pairs::Array{OrientationPair})
direction_sum_y = 0.0
direction_sum_x = 0.0
Expand All @@ -61,14 +61,14 @@ function _brisk_tables(pattern_scale::Float64)
pattern_table = Vector{SamplePair}[]
smoothing_table = Vector{Float16}[]
for ori in 0:brisk_orientation_steps - 1
theta = ori * 2 * pi / brisk_orientation_steps
theta = ori * 2 * pi / brisk_orientation_steps
pattern = SamplePair[]
sigmas = Float16[]
for (i, n) in enumerate(brisk_num_circular_pattern)
for circle_number in 0:n - 1
angle = (circle_number * 2 * pi / n) + theta

push!(pattern, SamplePair((brisk_radii[i] * sin(angle) * pattern_scale * 0.85,
push!(pattern, SamplePair((brisk_radii[i] * sin(angle) * pattern_scale * 0.85,
brisk_radii[i] * cos(angle) * pattern_scale * 0.85)))
push!(sigmas, brisk_sigma[i] * pattern_scale * 0.85)
end
Expand Down Expand Up @@ -102,5 +102,5 @@ function create_descriptor{T<:Gray}(img::AbstractArray{T, 2}, features::Features
push!(descriptors, descriptor)
push!(ret_features, Feature(keypoint, orientation))
end
descriptors, ret_features
end
descriptors, ret_features
end
Loading

0 comments on commit a6378fc

Please sign in to comment.