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/brief.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ BRIEF is a very simple feature descriptor and does not provide scale or rotation
16
16
17
17
## Example
18
18
19
-
Let us take a look at a simple example where the BRIEF descriptor is used to match two images where one has been translated by `(10, 20)` pixels.
19
+
Let us take a look at a simple example where the BRIEF descriptor is used to match two images where one has been translated by `(10, 20)` pixels. We will use the `lena_gray` image from the [TestImages](https://github.com/timholy/TestImages.jl) package for this example.
20
+
20
21
21
22
First, let us define a warping function to transform the image.
Copy file name to clipboardExpand all lines: docs/src/tutorials/orb.md
+86-1Lines changed: 86 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,89 @@ The vector from the corner’s center to the centroid gives the orientation of t
10
10
11
11
ORB tries to take sampling pairs which are uncorrelated so that each new pair will bring new information to the descriptor, thus maximizing the amount of information the descriptor carries. We also want high variance among the pairs making a feature more discriminative, since it responds differently to inputs. To do this, we consider the sampling pairs over keypoints in standard datasets and then do a greedy evaluation of all the pairs in order of distance from mean till the number of desired pairs are obtained i.e. the size of the descriptor.
12
12
13
-
The descriptor is built using intensity comparisons of the pairs. For each pair if the first point has greater intensity than the second, then 1 is written else 0 is written to the corresponding bit of the descriptor.
13
+
The descriptor is built using intensity comparisons of the pairs. For each pair if the first point has greater intensity than the second, then 1 is written else 0 is written to the corresponding bit of the descriptor.
14
+
15
+
## Example
16
+
17
+
Let us take a look at a simple example where the ORB descriptor is used to match two images where one has been translated by `(50, 40)` pixels and then rotated by an angle of 75 degrees. We will use the `lighthouse` image from the [TestImages](https://github.com/timholy/TestImages.jl) package for this example.
18
+
19
+
First, lets define warping functions to transform and rotate the image.
if checkbounds(Bool, img, i_rot, j_rot) res[i, j] = bilinear_interpolation(img, i_rot, j_rot) end
44
+
end
45
+
end
46
+
res = shareproperties(img, res)
47
+
res
48
+
end
49
+
nothing # hide
50
+
```
51
+
52
+
Now, let us create the two images we will match using ORB.
53
+
54
+
```@example 1
55
+
56
+
using ImageFeatures, TestImages, Images, ImageDraw
57
+
58
+
img = testimage("lighthouse")
59
+
img_temp_2 = _warp(img_array_1, 5 * pi / 6)
60
+
img_array_2 = _warp(img_temp_2, 50, 40)
61
+
62
+
nothing # hide
63
+
```
64
+
65
+
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
+
67
+
```@example 1
68
+
orb_params = ORB(num_keypoints = 1000)
69
+
nothing # hide
70
+
```
71
+
72
+
Now pass the image with the parameters to the [`create_descriptor`](@ref) function.
0 commit comments