-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP Establishes basic estimation framework
- Loading branch information
1 parent
e053f7c
commit 52eabc3
Showing
5 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
const √ = sqrt | ||
const ∑ = sum | ||
const ⊗ = kron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function moments(entity::FundamentalMatrix, matches...) | ||
# ʹ : CTRL + SHIFT + 02b9 | ||
pts1, pts2 = matches | ||
|
||
𝐀 = fill(0.0,(9,9)) | ||
for correspondence in zip(pts1, pts2) | ||
m , mʹ = correspondence | ||
𝐦 = 𝑛(collect(m.coords)) | ||
𝐦ʹ = 𝑛(collect(mʹ.coords)) | ||
𝐀 = 𝐀 + ⊗(𝐦*transpose(𝐦) , 𝐦ʹ*transpose(𝐦ʹ)) | ||
end | ||
dump(𝐀) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
struct HomogeneousPoint{T <: AbstractFloat,N} | ||
coords::NTuple{N, T} | ||
end | ||
|
||
abstract type ProjectiveEntity end | ||
|
||
type FundamentalMatrix <: ProjectiveEntity | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using MultipleViewGeometry, Base.Test | ||
|
||
pts1 = map(HomogeneousPoint, | ||
[(-10.0, -10.0, 1.0), | ||
(-10.0, 10.0, 1.0), | ||
( 10.0, -10.0, 1.0), | ||
( 10.0, 10.0, 1.0)]) | ||
|
||
pts2 = map(HomogeneousPoint, | ||
[(-20.0, -20.0, 1.0), | ||
(-20.0, 20.0, 1.0), | ||
( 20.0, -20.0, 1.0), | ||
( 20.0, 20.0, 1.0)]) | ||
|
||
moments(FundamentalMatrix(), (pts1,pts2)...) |