-
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.
Adds demonstration of fundamental matrix estimation
- Loading branch information
1 parent
c366e34
commit 624da40
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,58 @@ | ||
using MultipleViewGeometry, Images, ImageFeatures, ImageView | ||
using BenchmarkTools, Compat | ||
using StaticArrays, MAT, Plots, PyPlot | ||
|
||
file = matopen("./data/sene-adelaideRMF.mat") | ||
# img1 = read(file,"img1") | ||
# img2 = read(file,"img2") | ||
img1 = colorview(RGB, normedview(permutedims(read(file,"img1"),[3,1,2]))) | ||
img2 = colorview(RGB, normedview(permutedims(read(file,"img2"),[3,1,2]))) | ||
inlier_pts1 = read(file,"inlierPts1") | ||
inlier_pts2 = read(file,"inlierPts2") | ||
close(file) | ||
|
||
img1g = Gray.(img1) | ||
img2g = Gray.(img2) | ||
|
||
x = 1:10; y = rand(10); # These are the plotting data | ||
plot(x,y) | ||
#pyplot() | ||
plotly() | ||
|
||
p = Plots.plot(img1g) | ||
Plots.plot!(inlier_pts1[1,:],inlier_pts1[2,:],seriestype=:scatter,w=5) | ||
|
||
p2 = Plots.plot(img2g) | ||
Plots.plot!(inlier_pts2[1,:],inlier_pts2[2,:],seriestype=:scatter,w=5) | ||
|
||
#Plots.plot(img1g) | ||
#Plots.plot!(x->200sin(.05x)+300, 0, 700, seriestype=:scatter,w=5) | ||
|
||
#img = reinterpret(N0f8, img1) | ||
# test = permutedims(img1,[3,1,2]) | ||
# img_l = colorview(RGB, normedview(test)) | ||
# img_r = colorview(RGB, normedview(test)) | ||
# img1 = Gray.(img1) | ||
# | ||
# img = colorview(Gray,img1) | ||
# | ||
# colorview(RGB,img1) | ||
# | ||
# img = reinterpret(N0f8, img1) | ||
# test = colorview(RGB,img,size(img)) | ||
# | ||
# test = channelview(img) | ||
# | ||
# Gray.(test) | ||
# | ||
# test = permutedims(img,[3,1,2]) | ||
# Gray.(channelview(test)) | ||
# Gray.(test) | ||
# | ||
# colorview(RGB, normedview(test)) | ||
|
||
|
||
# using PyPlot | ||
# x = linspace(0,2*pi,1000); y = sin.(3 * x + 4 * cos.(2 * x)); | ||
# plot(x, y, color="red", linewidth=2.0, linestyle="--") | ||
# title("A sinusoidally modulated sinusoid") |