Local Mapping

Feature Extraction

1

main() Creates system object reads images, passes them to Tracking

Loop closing

System

Spawns all necessary threads

p p

LocalMapping::Run()

LoopClosing::Run()

1

Tracking

6 1

3

4

5

2 2

1

State = NO_IMAGES_YET

Frame::ExtractORB()

Frame::UndistortKeyPoints()

ORBExtractor::operator()()

cv::undistortPoints()

2

3

LocalMapping:: SetAcceptKeyFrames(false)

LocalMapping:: ResetIfRequested() If reset signal was given deletes all Keyframes and MapPoints

Tells tracking thread that currently no KeyFrames are accepted

LocalMapping:: SetAcceptKeyFrames(true)

usleep(3000)

Tells tracking thread that KeyFrames are accepted

Sleep for 3 ms

[newKeyFramesAvailable] 4

4

ORBExtractor::ComputePyramid()

ORBExtractor:: ComputeKeyPointsOctTree()

cv::GaussianBlur()

Creates a pyramid of images of different scale

Computes FAST corners and their orientation in a grid for every level on scale pyramid

Smoothes all images in the scale pyramid with gaussian filter

2

ORBExtractor:: computeDescriptors()

1

Undistorts all features using given camera calibration

2

3

6 4

Computes ORB descriptor for each FAST corner

2

ORBExtractor:: DistrubuteKeyPointsOctTree()

LocalMapping:: ProcessNewKeyFrames()

LocalMapping:: MapPointCulling()

LocalMapping:: CreateNewMapPoints()

Takes a new KeyFrame and goes through all steps necessary to integrate it into the existing map

Removes MapPoints which haven't been observed for too long or are considered to be outliers too often

Creates new MapPoints by triangulating matches acquired using epipolar constraints on current Keyframe and others closeby

LoopClosing:: InsertKeyFrame() [!newKeyFramesAvailable]

Pass the new KeyFrame to LoopClosing thread

[newKeyFramesAvailable]

1

usleep(5000) Sleep for 5 ms

1 2

Grab image

~MapPoints

Distributes FAST corners over the using an oct tree approach

1

System::TrackMonocular()

2

3

1

KeyFrame::ComputeBoW()

KeyFrame:: UpdateConnections()

Map::AddKeyFrame()

Converts all features in frame to bag of words representation

Updates all links in covisibility graph

Adds Keyframe to Map

2

3

[amountKeyFramesInMap > 2]

4

KeyFrame:: GetBestCovisibilityKeyFrames()

LocalMapping:: ComputeF12()

ORBMatcher:: SearchForTriangulation()

Finds KeyFrames that share the most Map Points with current KeyFrame

Computes a fundamental matrix

Finds matches using epipolar constraints

MapPoints

Convert image to grayscale and create a new Frame object

1

LoopClosing:: DetectLoop() 2

LocalMapping:: SearchInNeighbors()

Optimizer:: LocalBundleAdjustment()

LocalMapping:: KeyFrameCulling()

Updates links in neighborhood of current KeyFrame

Optimize KeyFrames and MapPoints in local map using g2o library

Removes KeyFrames which share at least 90 % of their observed MapPoints with at least 3 other KeyFrames

Tracking::GrabImageMonocular()

Initialization

LoopClosing:: ResetIfRequested() If reset signal was given deletes all Keyframes and MapPoints

5

[!newKeyFramesAvailable]

3

1

2

3

Finds candidate KeyFrames for loop closure, checks whether candidates are consistent, declares a loop as detected when 3 KeyFrames were consistent in a row

[loopDetected]

1

LoopClosing:: ComputeSim3() 1

2 3

KeyFrame:: GetBestCovisibilityKeyFrames() Finds KeyFrames that share the most Map Points with current KeyFrame

Frame

ORBMatcher::Fuse()

KeyFrame:: UpdateConnections()

Fuses point duplications

Updates all links in covisibility graph

~KeyFrames

KeyFrame:: GetVectorCovisibleKeyFrames()

DBoW2::TemplatedVocabulary:: score()

Returns all KeyFrames which are connected to current KeyFrame in the covisibility graph

Computes a score which describes how well the current KeyFrame matches another in terms of the bag of words approach

Tracking::Track()

Tries to find a Sim3 transformation with which it decides whether the loop can be accepted or is discarded

[amountKeyFramesInMap < 10 || amountKeyFramesSinceLoop < 10]

loopDetected = false

[amountKeyFramesInMap >= 10 || amountKeyFramesSinceLoop >= 10]

1

1 2

3

ORBMatcher::SearchByBoW() ~Initializer

State = NOT_INITIALIZED

[State == NO_IMAGES_YET]

1 2

KeyFrameDatabase:: DetectLoopCandidates()

Initializer ORBMatcher::SearchForInitialization() [initializerExists && amountFeaturesInFrame < 100]

Looks for matches between initial and current frame by comparing distances between features 1

Finds all KeyFrames that share visual words with the current KeyFrame and achieve a minimum similarity score

[!initializerExists && amountFeaturesInFrame >= 100]

[amountMatches < 100] 2

2

1

Tracking::MonocularInitialization()

3

Frame::GetFeaturesInArea()

ORBMatcher::DescriptorDistance()

ORBMatcher::ComputeThreeMaxima()

Collects features which lie in a certain area around a point

Bitwise distance calculation for ORB descriptors

Find 3 most common rotation value ranges between features

[amountMatches >= 100]

1

[State == NOT_INITIALIZED]

[initializerExists && amountFeaturesInFrame >= 100]

2

[candidatesAreConsistent]

[amountCandidates == 0]

[!candidatesAreConsistent]

amountMatches--

loopIsOK = false [amountMatches + amountAdditionalMatches < 40]

loopIsOK = false

1 2

consecutiveConsistentKeyFrameCount = 0

consecutiveConsistentKeyFrameCount++

[consecutiveConsistentKey FrameCount < 3]

[initialization Successful]

Finds more matches between MapPoints and KeyFrame using the Sim3 transformation

[!matchFound]

[!sim3Found]

Sim3Solver::iterate() Tries to find a Sim3 transformation between candidate and currentFrame using a RANSAC approach

loopDetected = false [State != NOT_INITIALIZED]

2

[amountCandidates > 0]

[amountCandidates > 0 && matchesWithCandidate >= 20]

Finds matches between all consistent candidate KeyFrames and the current one using BoW

1

2

ORBMatcher:: SearchByProjection()

[matchFound]

[amountMatches + amountAdditionalMatches >= 40]

[sim3Found]

[consecutiveConsistentKey FrameCount >= 3]

2

loopDetected = true

1

2

[amountInliers < 20]

[loopIsOK]

3

2

Initializer::Initialize() Computes homography and fundamental matrix in parallel, picks result based on scores

[scoreHomography / (scoreHomography + scoreFundamental) <= 0.4]

Tracking::createInitialMapMonocular()

ORBMatcher::SearchBySim3()

Optimizer::OptimizeSim3()

Runs all necessary functions to implement the 2 initial KeyFrames and their MapPoints in a initial map

Looks for matches between 2 KeyFrames using a Sim3 transformation

Optimize the Sim3 transformation using g2o library

[scoreHomography / (scoreHomography + scoreFundamental) > 0.4]

1

3

5

6

Map::AddKeyFrame()

KeyFrame:: UpdateConnections()

Adds Keyframe to Map

Updates all links in covisibility graph

KeyFrame::ComputeBoW()

p

7

LoopClosing:: RunGlobalBundleAdjustment()

[medianDepth >= 0 || pointsInMap >= 100]

Initializer::FindFundamental()

Normalizes features, performs RANZAC for homography search, saves highest score 3

Initializer::CheckHomography() Calculates score based on reprojection error in both frames

2

Initializer::ComputeH21() Computes a homography

Normalizes features, performs RANZAC for fundamental search, saves highest score 1

1

Initializer::Normalize() Normalizes all features

2

Initializer::ComputeF21() Computes a fundamental matrix

3

Initializer::CheckFundamental() Calculates score based on reprojection error in both frames

Initializer::ReconstructH()

Initializer::ReconstructF()

Creates and evaluates motion hypotheses based on homography

Creates and evaluates motion hypotheses based on fundamental matrix

2

Initializer::CheckRT() Checks hypotheses quality by triangulation and checking reprojection errors, parallax and depth of matches

Converts all features in frame to bag of words representation 2

[medianDepth < 0 || pointsInMap < 100]

4 1

KeyFrames

MapPoints

2

Optimizer:: GlobalBundleAdjustemnt()

Update and correct all KeyFrames and MapPoints that were optimized by the global BA

Starts bundle adjustment using all KeyFrames and all MapPoints

1

Initializer::DecomposeE() Recovers 4 motion hypotheses from essential matrix

Tracking::Reset() Resets and deletes everything

State = OK

Tracking

Optimizer:: BundleAdjustment()

2

KeyFrame:: UpdateConnections()

KeyFrame:: GetVectorCovisibleKeyFrames()

Tells the local mapping thread that no new KeyFrames should be accepted

Updates all links in covisibility graph

Returns all KeyFrames which are connected to current KeyFrame in the covisibility graph

2

3

4

[!trackOK]

1

2

Tracking::UpdateLocalMap()

[trackOK]

State = OK

1

2

Tracking::SearchLocalPoints()

Optimizer::PoseOptimization()

Finds MapPoints which correspond with features in current frame

Optimize pose using g2o library

[keyframeNeeded]

Decides whether a new KeyFrame should be created

Resets and deletes everything

4

Tracking::UpdateLocalKeyFrames() [State != LOST]

Updates which keyframes are part of the local map by checking which keyframes share MapPoints with current frame, also chooses current reference KeyFrame

Relocalization

[recentlyRelocated && amountMatchedMapPoints < 50]

ORBMatcher:: SearchByProjection()

Tracking::UpdateLocalPoints() Updates which MapPoints are part of the local map by checking which MapPoints are seen by local KeyFrames

Finds matches between MapPoints projected into current frame and current frame's features

State = NOT_INITIALIZED

[!recentlyRelocated || amountMatchedMapPoints >= 50]

KeyFrame

trackOK = false [amountMatchedMapPoints < 30]

[amountMatchedMapPoints >= 30]

trackOK = false

[motionModelExists]

LocalMapping::InsertKeyFrame()

trackOK = true

1 2

[!motionModelExists]

Tracking::Relocalization()

[!trackOK]

Tracking::TrackReferenceKeyframe()

Find KeyFrame that corresponds with current frame and can be used for relocalization

Tracking::TrackWithMotionModel()

Find matches between last KeyFrame and current frame, will take last known pose as initial guess and optimize it with matches

2 [amountCandidates == 0]

trackOK = false

[amountMatchedPoints < 15]

3

[amountMatchedPoints >= 15]

trackOK = false

Find matches between last Frame and current frame, will take constant velocity motion model as initial guess and optimize pose with matches

[amountMatchedPoints < 10]

[amountMatchedPoints < 15]

2 3

1 [amountCandidates > 0]

KeyFrame::ComputeBoW()

amountCandidates--

1 2

ORBMatcher::SearchByBoW()

[amountMatches < 15]

Tries to find matches with KeyFrame using BoW

Converts all features in frame to bag of words representation

[amountMatchedPoints >= 15]

trackOK = false

Information: - only monocular case - no localization mode - only most important variables and functions - no drawing related functions - no explaning used libraries - variable names here and in code not always the same

[amountMatchedPoints < 10] 2

2 1

ORBMatcher::SearchByBoW() Tries to find matches with last KeyFrame using BoW

Optimizer::PoseOptimization() Optimize pose using g2o library

1 [amountMatchedPoints >= 10]

trackOK = true

Tracking::UpdateLastFrame()

2

ORBMatcher:: SearchByProjection() Finds matches between MapPoints tracked in last frame projected into current frame and current frame's features

1

Optimizer::PoseOptimization() Optimize pose using g2o library

[amountMatchedPoints >= 10]

Entry point

main()

trackOK = true Calls Dashed indicates called from constructor. Solid line means called from a function.

[amountMatches >= 15]

Frame::GetFeaturesInArea()

1 2

[!poseFound]

PnPSolver::iterate()

Collects features which lie in a certain area around a point

Recover pose using PnP algorithm, iterate until pose found or max iterations reached

Function description Class::Function()

The function is found in the "Class" namespace or class, which corresponds to it's .h and .cc file in most cases.

[poseFound]

Description

1

[amountInliers >= 50] 2

3

4

Optimizer::PoseOptimization()

Process description

trackOK = true Description

Optimize pose using g2o library, return amount of inlier map points after optimization

Description of a process inside the parent function.

[amountInliers < 50]

[amountInliers < 10]

[amountInliers < 50]

amountCandidates--

Class Instantiation and destruction of an object of a class. 1

~Class

2

ORBMatcher:: SearchByProjection() Finds matches between MapPoints tracked in KeyFrame projected into current frame and current frame's features

[additionalMatches + amountInliers >= 50]

variable = value

Manipulation of a variable

1 [additionalMatches + amountInliers < 50]

2

Optimizer::PoseOptimization() Shortcut Optimize pose using g2o library, return amount of inlier map points after optimization

[amountInliers > 30 && amountInliers < 50]

[amountInliers < 30] [!condition]

1

2

Conditional branching

ORBMatcher:: SearchByProjection() Finds matches between MapPoints tracked in KeyFrame projected into current frame and current frame's features (here more restricted)

Optimizer:: OptimizeEssentialGraph()

[condition]

Flow moves in the direction of fulfilled condition.

[amountInliers + additionalMatches >= 50]

Optimizer::PoseOptimization() Optimize pose using g2o library, return amount of inlier map points after optimization

Class::Function() 1

Other::First()

2p

Other::second()

Call order Numbers indicate the call order. A "p" sympolizes function running in separate thread.

9

LoopClosing:: RunGlobalBundleAdjustment()

Optimizes the essential graph using g2o library

Optimizer:: GlobalBundleAdjustemnt() Starts bundle adjustment using all KeyFrames and all MapPoints

Bundle adjustment using g2o library

Tracking::Reset()

Tracking::NeedNewKeyFrame()

3

2

8p

Optimizer:: BundleAdjustment()

[State == LOST && keyFramesInMap <= 5]

Tracking::CreateNewKeyFrame() [State == LOST]

Creates new links in covisibility graph which link the two sides of the loop

7

5

1

Determines KeyFrames which could be candidates for relocalization

Project MapPoints in the neighborhood of current KeyFrame into it and get rid of duplicates

6

[trackOK]

State = LOST

Tracking::TrackLocalMap()

Converts all features in frame to bag of words representation

LoopClosing:: SearchAndFuse()

ORBMatcher::Fuse()

Initializer::Triangulate()

KeyFrame::computeBoW()

Corrects all covisible KeyFrames, all MapPoints visible from these and the loop KeyFrame itself using the Sim3 transformation

5

1

[trackOK]

3

4

Fuses point duplications 1

KeyFrameDatabase:: DetectRelocalizationCandidates()

3

LocalMapping:: RequestStop()

Bundle adjustment using g2o library

1

Implements the detected loop, updates all connected MapPoints and KeyFrames and starts off all optimizations made possible by loop closure

LocalMapping::InsertKeyFrame() 1

Initializer::FindHomography()

[amountInliers >= 20]

matchFound = true

8 p

LoopClosing:: CorrectLoop()

LocalMapping:: Release() Tells local mapping thread that it can accept new KeyFrames again

2

Update and correct all KeyFrames and MapPoints that were optimized by the global BA

only monocular case - no localization mode - only most ... - GitHub

Computes a homography. Initializer::ComputeH21(). Initializer::FindFundamental(). Initializer::FindHomography(). Find 3 most common rotation value ranges between features. ORBMatcher::ComputeThreeMaxima(). Bitwise distance calculation for ORB descriptors. Collects features which lie in a certain area around a point.

54KB Sizes 4 Downloads 260 Views

Recommend Documents

[Read-Only] [Compatibility Mode].pdf
Page 1 of 12. Copernicus services. • Demo (hands-on ) for access to Copernicus data and. info. • P f li Portfoli. o C i Si Copern. icus Services. Page 1 of 12 ...

[Read-Only] [Compatibility Mode].pdf
5-1 Bamps 1_RIGA19052015_part2_demo [Read-Only] [Compatibility Mode].pdf. 5-1 Bamps 1_RIGA19052015_part2_demo [Read-Only] [Compatibility Mode].

A review of C++ 11/14 only Boost libraries - GitHub
1. 1. 1. Boost.Hana. Louis Dionne. 14 none. 2015-04. 1. 0.9. 0.6 header only. 1. 1 ... standalone ASIO the Networking TS reference impl ..... service design and .

proof only
vance, and make a call for other social scientists to utilize their method- ological tools ..... and include the provision of health services (preventive and curative), family planning ..... Conference of the Society for Human Ecology, Rio de Janeiro

PDF only - arXiv
The data initially stored in the tree nodes of a path representing motif ACT. (A). (B). Fig. 3. (A) An example ... pass currently stored data to next node(s) down. (2) if tick count ≤ m set x=d+1 else set x=0 input x to the ..... M. C. Herbordt, J.

PDF only - arXiv
Abstract—A technique using a systolic array structure is proposed for solving the common approximate substring (CAS) ... be implemented on a FPGA in a design spe- cifically targetted for this DNA string. In other works this may be referred to as th

PDF only - arXiv
system, an existing software with components that can run over the Grid (at the moment for .... management of this considerable quantity of data represents a problem: ... accounting methods and protected data access only by users owning a ...

PDF only - arXiv
JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 1, ISSUE 1, MAY 2010. 99. Fuzzy Modeling and Natural Language. Processing for ...

PDF only - arXiv
He did Post Graduate degree in. Applied Mathematics with Computer Programming as Spe- cilization during 1984-86. He did his Post Graduation Diplo-.

There are no incurable diseases, only incurable people ... - Rob Robb
peppered with the occasional blast of Noo Yawk. Why, I ask him, is the focus on spirit when he's prima- rily concerned with healing the body? “Well,” he says, “the Chinese medical classics say that all diseases involve the spirit, so to heal th

Monocular Navigation for Long-Term Autonomy - GitHub
computationally efficient, needs off-the-shelf equipment only and does not require any additional infrastructure like radio beacons or GPS. Contrary to traditional ...

Monocular Navigation for Long-Term Autonomy - GitHub
Taking into account that the time t to traverse a segment of length s is t = s/vk we can calculate the robot position (bx,by) after it traverses the entire segment as:.

ACT-Ohio Principals.ppt [Read-Only]
Professional Systems for Program Improvement. High Schools. Argued in ..... Program. Improvement. Data Analysis. PROCESS. 5. McMackin 2008. TIER ONE ...

Uncorrected Proofs for Review Only
Jan 24, 2011 - 16.1 Introduction. VARIATION IN PREDATOR abundance is one of ... hypothesis posits that prey optimize the trade-off between predation risk ...

For personal use only - ASX
Feb 27, 2017 - security. Interim Dividend – Current reporting period. Nil. Nil ... Net Tangible Assets per security (before tax) .... Joint Company Secretary.

For Review Only
monetary value (Study 1), and made participants consider fair decision-making procedures to be ..... obtain an overall index of monetary value in cent. ... ratings in the domain of money because monetary value is sometimes determined by.

IP-Only Server
UDP checksum for data correctness go-back-N for delivery correctness .... I'd like to have one at home (monitor in the living room,. CPU, disks, fans in a closet).

For personal use only - ASX
Oct 8, 2009 - In March 2008, the Company entered into a five year performance option agreement with Go Daddy to sell the Company's domain names.

For personal use only - ASX
Dec 11, 2009 - Dalgleish is the Managing Director of Photon Group's Internet & E-Commerce division and the Executive Chairman and founder of Photon ...

For personal use only - ASX
Dec 11, 2009 - Dark Blue Sea Limited (DBS) wishes to announce a number of changes to its board. Vernon Wills, Joseph Ganim and Richard Moore have ...