"Impact of front-end architecture on development cost", Viktor Turskyi
Preemptive RANSAC by David Nister.
1. Preemptive RANSAC for Live
Structure and Motion Estimation
by David Nister,
Machine vision and applications(J) in 2005, 261citations.
2nd/June/2011
presented Inkyu.Sa
3. What is RANSAC ?
Random sample consensus.
Observation Estimate model
Source from wikipedia
Outliers
LO-RANSAC
Preemptive RANSAC Inliers
DEGENSAC
PROSAC
MLESAC, NAPSAC etc.
4. What is RANSAC ?
Random sample consensus.
Observation Estimate model
Source from wikipedia
Outliers
Inliers
Source from AFMR, Machine Learning
Reinforcement learning
Use rewards and interaction with the environment to learn
5. Why do we use RANSAC ?
It is possible estimate robust parameters of model.
There are many noise in out real environments.
What are disadvantages of RANSAC?
It takes long time to calculate parameters without
boundary condition.
Therefore, threshold and max iteration are required.
7. How does RANSAC work?
We have this observation data set. Randomly choose any two points
and create a hypothesis.
8. How does RANSAC work?
Randomly choose any two points
and create a hypothesis.
9. How does RANSAC work?
Randomly choose any two points Calculate distances between a
and create a hypothesis. hypothesis and all observations.
This hypothesis has a huge distance value.
This process is called “Scoring”.
“
“ Because wewhich ahas theknowledgeintegration
hypothesis
have prior
minimum
that the
value of distance could be our model.
10. How does RANSAC work?
Calculate distances between a Again randomly choose two points and
hypothesis and all observations. create another hypothesis.
This one has a smaller distance value than
previous.
11. How does RANSAC work?
Again randomly choose two points and How many hypothesis can be created?
create another hypothesis.
This one has a smaller distance value than
previous. Number of lines = 100 C2 = 4,950
Number of lines =999 C2 = 498,501
Total calculation=498,501× 997 = 497,005,497
12. How does RANSAC work?
Set a threshold to prevent calculation
from all observation.
ld
ho
If a hypothesis meet our condition, this
s
re
hypothesis is going to be our best model.
Th
In addition set a maxim iterations or maxim time period.
13. How does RANSAC work?
What happens if we have this observation?
14. How does RANSAC work?
What happens if we have this observation?
Maybe we can’t get a right answer.
This implies that we need a decent observation data set to get a right
model unless RANSAC process takes more time and less accurate.
15. How does RANSAC work?
What happens if we have these observations?
Inlier noise Near degeneracies
Near degeneracies can be dealt with by sampling non-randomly.
16. How can we apply RANSAC
to our applications?
RANSAC can be used refine essential matrix.
Example) A 3D point registration.
pi R,T
Assume that we already create a hypothesis pi
using any methods such as 5 point, 8points
and svd algorithm and so on.
i=N
e2 = pi − Rpi − T 2 These two are our model.
i=1
pi = Current frame a 3D point in world coordinate.
pi = Previous frame a 3D world point in world coordinate.
17. Preemptive RANSAC
Based on breadth-first preemption.
Using time budget and threshold.
Source from ICCV2005 tutorial.
18. Preemptive RANSAC
Based on breadth-first preemption.
Source from ICCV2005 tutorial.
22. Preemptive RANSAC
log-likelihood, L
Cauchy distribution to model the errors = −ln(1 + u)
2
where ui = pi − Rpi − T
Squared magnitude of a reprojection error
10
robust log-likelihood = −ln (1 + ui )
i=1
N where
ρ = scoring function,
L(h) = ρ(o, h) o = observation index,
h = hypothesis index.
o=1
ρ function return a scalar value representing the log-likelihood given o,h
23. Preemptive RANSAC
Algorithm
1. Randomly permute the observations.
2. Generate all the hypotheses indexed by h= 1,..., f(1) using 5 points algorithm.
f (i) = preemption function indicates how many hypotheses
are to be kept at ith stage.
24. Preemptive RANSAC
Algorithm
1. Randomly permute the observations.
2. Generate all the hypotheses indexed by h= 1,..., f(1) using 5 points algorithm.
3. Compute the scores. L1 (h) = ρ(1, h) for h=1,...,f(1). set i=2
25. Preemptive RANSAC
Algorithm
1. Randomly permute the observations.
2. Generate all the hypotheses indexed by h= 1,..., f(1) using 5 points algorithm.
3. Compute the scores. L1 (h) = ρ(1, h) for h=1,...,f(1). set i=2
4. Reorder the hypotheses. The range h=1,...,f(i) contains the best f(i)
5. If i>N of f(i)=1, quit with the best hypothesis. Otherwise, compute
Li (h) = ρ(i, h) + Li−1 (h) for h=1,...,f(1). increase i and go to Step 4.
26. Preemptive RANSAC
Sequences Generate all the hypotheses
Scoring and find the best
hypotheses at each stage.
27. Preemptive RANSAC
Advantages of breath-first RANSAC
The breath-first RANSAC can spend a lot of time on bad
observation.
Only compare the previous hypothesis and it takes long time to get the
best one. (Depth-first RANSAC)
Disadvantages of breath-first RANSAC
can spend a lot of time on bad observation.
Author argues that depth-first RANSAC can also waste time on
bad hypothesis.
28. Preemptive RANSAC
Disadvantages of breath-first RANSAC
The breath-first RANSAC can spend a lot of time on bad
observation.
The depth-first RANSAC can also waste time on bad hypothesis.
29. Preemptive RANSAC
Disadvantages of breath-first RANSAC
The breath-first RANSAC can spend a lot of time on bad
observation.
The depth-first RANSAC can also waste time on bad hypothesis.
Typically a hypothesis is consist of multiple observations.
If this hypothesis contains outliers so that it is meaningless.
The good observations are much larger than the good hypothesis in
typical RANSAC settings.
32. Issues
Dead depth pixel
About 25% of a kinect point clouds are dead depth pixel, that
has NaN(Not a Number) depth value.
320x240=76800, and valid number of point cloud = 57365
2D image plane 3D depth data
33. VO procedures
1. Obtain features using gpuSurf at t-1 and t
Output: featureA(t-1), featureB(t)
2. CrossMatching Using L2
Output: MatchedFeaturesList
3. Find depth for each matched feature (Nr=160~200)
Output: KeypointA(t-1), KeypointB(t) in 3D world coordinate
4. Compute R,t using ICP (iteration 250, threshold..)
5. Find the current pose of camera by multiply homogeneous
transformation matrix.
R i ti
ξc = o ξt−3 t−3 ξt−2 t−2 ξt−1 t−1 ξt where ξi =
01X3 1
6. Draw x,y,z using
40. SBC status
1. Ubuntu 10.10 64Bit installed,
2. ROS Diamondback installed
PCL, Openni_kinect stack
3. CUDA Driver V3.2,
41. Plans
Cut down 54.28% size of original data.(rgb+point cloud).
(320x240 rgb+point cloud)=2,688,000Bytes => (320x240 rgb+point
cloud)=1,228,800Bytes.
Generate 3D features using surf and a kinect.
Visualization 3D matched features using PCL but has some bugs.
Using ICP on ROS(PointCloudLibrary) to get a transformation matrix.
Visualization camera pose using PCL.
Recording data with MikroKopter and SBC. (10th/June)
Put on the MikroKopter and testing.(13th/June)
Refine pose with RANSAC or EKF.... etc.
42. Plans
Cut down 54.28% size of original data.(rgb+point cloud).
(320x240 rgb+point cloud)=2,688,000Bytes => (320x240 rgb+point
cloud)=1,228,800Bytes.
Generate 3D features using surf and a kinect.
Visualization 3D matched features using PCL but has some bugs.
Using ICP on ROS(PointCloudLibrary) to get a transformation matrix.
Visualization camera pose using PCL.
Recording data with MikroKopter and SBC. (10th/June)
Put on the MikroKopter and testing.(13th/June)
Refine pose with RANSAC or EKF.... etc.