Skip to content
Snippets Groups Projects
Commit 4201f9bc authored by PierreGtch's avatar PierreGtch
Browse files

ProcessorLoopClosureBase : computeFeatures returns a bool

parent b9b18869
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
......@@ -89,8 +89,10 @@ protected:
*
* In this method you should add the capture to the keyframe if necessary
* and add the features to the capture
*
* Returns a bool that tells if features were successfully created
*/
virtual void computeFeatures(std::pair<FrameBasePtr,CaptureBasePtr>) = 0;
virtual bool computeFeatures(std::pair<FrameBasePtr,CaptureBasePtr>) = 0;
/** \brief Find a KF that would be a good candidate to close a loop
* if validateLoop is not overwritten, a loop will be closed with the returned candidate
......
......@@ -28,9 +28,9 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
{
std::pair<FrameBasePtr,CaptureBasePtr> pairKC = selectPairKC();
if (pairKC.first==nullptr || pairKC.second==nullptr) return;
computeFeatures(pairKC);
bool success_computeFeatures = computeFeatures(pairKC);
if (voteSearchLoopClosure(_incoming_ptr))
if (success_computeFeatures && voteSearchLoopClosure(_incoming_ptr))
{
CaptureBasePtr capture_1 = pairKC.second;
CaptureBasePtr capture_2 = findLoopCandidate(capture_1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment