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
# `BRIEF` (Binary Robust Independent Elementary Features) is an efficient feature point descriptor.
10
+
# It is highly discriminative even when using relatively few bits and is computed using simple
11
+
# intensity difference tests. BRIEF does not have a sampling pattern thus pairs can be chosen
12
+
# at any point on the `SxS` patch.
13
+
14
+
# To build a BRIEF descriptor of length `n`, we need to determine `n` pairs `(Xi,Yi)`.
15
+
# Denote by `X` and `Y` the vectors of point `Xi` and `Yi`, respectively.
16
+
17
+
# In ImageFeatures.jl we have five methods to determine the vectors `X` and `Y` :
18
+
19
+
# - [`random_uniform`](@ref) : `X` and `Y` are randomly uniformly sampled
20
+
# - [`gaussian`](@ref) : `X` and `Y` are randomly sampled using a Gaussian distribution, meaning that locations that are closer to the center of the patch are preferred
21
+
# - [`gaussian_local`](@ref) : `X` and `Y` 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`
22
+
# - [`random_coarse`](@ref) : `X` and `Y` are randomly sampled from discrete location of a coarse polar grid
23
+
# - [`center_sample`](@ref) : For each `i`, `Xi` is `(0, 0)` and `Yi` takes all possible values on a coarse polar grid
24
+
25
+
# As with all the binary descriptors, BRIEF’s distance measure is the number of
26
+
# different bits between two binary strings which can also be computed as the sum
27
+
# of the XOR operation between the strings.
28
+
29
+
# BRIEF is a very simple feature descriptor and does not provide scale or rotation
30
+
# invariance (only translation invariance). To achieve those, see [ORB](orb.md),
31
+
# [BRISK](brisk.md) and [FREAK](freak.md).
32
+
33
+
# ## Example
34
+
35
+
# Let us take a look at a simple example where the BRIEF descriptor is used to match
36
+
# two images where one has been translated by `(100, 200)` pixels. We will use the
37
+
# `lighthouse` image from the [TestImages](https://github.com/timholy/TestImages.jl)
38
+
# package for this example.
39
+
40
+
41
+
# Now, let us create the two images we will match using BRIEF.
42
+
43
+
using ImageFeatures, TestImages, Images, ImageDraw, CoordinateTransformations
44
+
45
+
img =testimage("sudoku")
46
+
img1 =Gray.(img)
47
+
trans =Translation(-50, -50)
48
+
img2 =warp(img1, trans, axes(img1))
49
+
50
+
# To calculate the descriptors, we first need to get the keypoints. For this tutorial,
51
+
# we will use the FAST corners to generate keypoints (see [`fastcorners`](@ref)).
0 commit comments