You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/tutorials/freak.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Let us take a look at a simple example where the FREAK descriptor is used to mat
13
13
14
14
First, lets define warping functions to transform and rotate the image.
15
15
16
-
```@example1
16
+
```@example3
17
17
function _warp(img, transx, transy)
18
18
res = zeros(eltype(img), size(img))
19
19
for i in 1:size(img, 1) - transx
@@ -46,56 +46,56 @@ nothing # hide
46
46
47
47
Now, let us create the two images we will match using FREAK.
48
48
49
-
```@example1
49
+
```@example3
50
50
51
51
using ImageFeatures, TestImages, Images, ImageDraw
52
52
53
53
img = testimage("lighthouse")
54
-
img_array_1 = convert(Array{Gray}, img)
54
+
img_array_1 = convert(Array{Images.Gray}, img)
55
55
img_temp_2 = _warp(img_array_1, 5 * pi / 6)
56
56
img_array_2 = _warp(img_temp_2, 50, 40)
57
57
nothing # hide
58
58
```
59
59
60
60
To calculate the descriptors, we first need to get the keypoints. For this tutorial, we will use the FAST corners to generate keypoints (see [`fastcorners`](@ref).
@@ -18,7 +19,7 @@ Let us take a look at a simple example where the ORB descriptor is used to match
18
19
19
20
First, lets define warping functions to transform and rotate the image.
20
21
21
-
```@example1
22
+
```@example2
22
23
function _warp(img, transx, transy)
23
24
res = zeros(eltype(img), size(img))
24
25
for i in 1:size(img, 1) - transx
@@ -51,11 +52,12 @@ nothing # hide
51
52
52
53
Now, let us create the two images we will match using ORB.
53
54
54
-
```@example1
55
+
```@example2
55
56
56
57
using ImageFeatures, TestImages, Images, ImageDraw
57
58
58
59
img = testimage("lighthouse")
60
+
img_array_1 = convert(Array{Images.Gray}, img)
59
61
img_temp_2 = _warp(img_array_1, 5 * pi / 6)
60
62
img_array_2 = _warp(img_temp_2, 50, 40)
61
63
@@ -64,29 +66,29 @@ nothing # hide
64
66
65
67
The ORB descriptor calculates the keypoints as well as the descriptor, unlike [BRIEF](brief). To create the ORB descriptor, we first need to define the parameters by calling the [`ORB`](@ref) constructor.
66
68
67
-
```@example1
69
+
```@example2
68
70
orb_params = ORB(num_keypoints = 1000)
69
71
nothing # hide
70
72
```
71
73
72
74
Now pass the image with the parameters to the [`create_descriptor`](@ref) function.
0 commit comments