Skip to content

Commit efae1be

Browse files
committed
Updates for julia-0.6
1 parent 2f4cc66 commit efae1be

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ ColorTypes
33
Images 0.6
44
Distributions 0.12
55
FixedPointNumbers 0.3
6+
Compat 0.17

src/ImageFeatures.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module ImageFeatures
44

55
# package code goes here
66
using Images, ColorTypes, FixedPointNumbers, Distributions
7+
using Compat
78

89
include("core.jl")
910
include("const.jl")

src/core.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
abstract Params
1+
@compat abstract type Params end
22

33
"""
44
```
@@ -8,7 +8,7 @@ keypoint = Keypoint(feature)
88
99
A `Keypoint` may be created by passing the coordinates of the point or from a feature.
1010
"""
11-
typealias Keypoint CartesianIndex{2}
11+
const Keypoint = CartesianIndex{2}
1212

1313
"""
1414
```
@@ -18,7 +18,7 @@ keypoints = Keypoints(features)
1818
1919
Creates a `Vector{Keypoint}` of the `true` values in a boolean image or from a list of features.
2020
"""
21-
typealias Keypoints Vector{CartesianIndex{2}}
21+
const Keypoints = Vector{CartesianIndex{2}}
2222

2323
"""
2424
```
@@ -42,7 +42,7 @@ features = Features(keypoints)
4242
Returns a `Vector{Feature}` of features generated from the `true` values in a boolean image or from a
4343
list of keypoints.
4444
"""
45-
typealias Features Vector{Feature}
45+
const Features = Vector{Feature}
4646

4747
Feature(k::Keypoint) = Feature(k, 0.0, 0.0)
4848

@@ -61,9 +61,9 @@ end
6161

6262
Keypoints(features::Features) = map(f -> f.keypoint, features)
6363

64-
typealias OrientationPair Tuple{Int16, Int16}
65-
typealias OrientationWeights Tuple{Float16, Float16}
66-
typealias SamplePair Tuple{Float16, Float16}
64+
const OrientationPair = Tuple{Int16, Int16}
65+
const OrientationWeights = Tuple{Float16, Float16}
66+
const SamplePair = Tuple{Float16, Float16}
6767

6868
"""
6969
```
@@ -72,7 +72,7 @@ distance = hamming_distance(desc_1, desc_2)
7272
7373
Calculates the hamming distance between two descriptors.
7474
"""
75-
hamming_distance(desc_1, desc_2) = mean(desc_1 $ desc_2)
75+
hamming_distance(desc_1, desc_2) = mean(xor.(desc_1, desc_2))
7676

7777
"""
7878
```

0 commit comments

Comments
 (0)