11abstract Params
22
3+ """
4+ ```
5+ keypoint = Keypoint(y, x)
6+ keypoint = Keypoint(feature)
7+ ```
8+
9+ A `Keypoint` may be created by passing the coordinates of the point or from a feature.
10+ """
11+ typealias Keypoint CartesianIndex{2 }
12+
13+ """
14+ ```
15+ keypoints = Keypoints(boolean_img)
16+ keypoints = Keypoints(features)
17+ ```
18+
19+ Creates a `Vector{Keypoint}` of the `true` values in a boolean image or from a list of features.
20+ """
21+ typealias Keypoints Vector{CartesianIndex{2 }}
22+
323"""
424```
525feature = Feature(keypoint, orientation = 0.0, scale = 0.0)
@@ -13,10 +33,6 @@ immutable Feature
1333 scale:: Float64
1434end
1535
16- Feature (k:: Keypoint ) = Feature (k, 0.0 , 0.0 )
17-
18- Feature (k:: Keypoint , ori:: Float64 ) = Feature (k, ori, 0.0 )
19-
2036"""
2137```
2238features = Features(boolean_img)
@@ -28,29 +44,15 @@ list of keypoints.
2844"""
2945typealias Features Vector{Feature}
3046
31- Features (keypoints:: Keypoints ) = map (k -> Feature (k), keypoints)
32-
33- Features (img:: AbstractArray ) = Features (Keypoints (img))
47+ Feature (k:: Keypoint ) = Feature (k, 0.0 , 0.0 )
3448
35- """
36- ```
37- keypoint = Keypoint(y, x)
38- keypoint = Keypoint(feature)
39- ```
49+ Feature (k:: Keypoint , ori:: Number ) = Feature (k, ori, 0.0 )
4050
41- A `Keypoint` may be created by passing the coordinates of the point or from a feature.
42- """
43- typealias Keypoint CartesianIndex{2 }
51+ Features (keypoints:: Keypoints ) = map (k -> Feature (k), keypoints)
4452
45- """
46- ```
47- keypoints = Keypoints(boolean_img)
48- keypoints = Keypoints(features)
49- ```
53+ Features (img:: AbstractArray ) = Features (Keypoints (img))
5054
51- Creates a `Vector{Keypoint}` of the `true` values in a boolean image or from a list of features.
52- """
53- typealias Keypoints Vector{CartesianIndex{2 }}
55+ Keypoint (feature:: Feature ) = feature. keypoint
5456
5557function Keypoints (img:: AbstractArray )
5658 r, c, _ = findnz (img)
5961
6062Keypoints (features:: Features ) = map (f -> f. keypoint, features)
6163
62- Keypoint (feature:: Feature ) = feature. keypoint
63-
6464"""
6565```
6666distance = hamming_distance(desc_1, desc_2)
0 commit comments