Repository Summary
Checkout URI | https://github.com/srv/libhaloc.git |
VCS Type | git |
VCS Version | indigo |
Last Updated | 2016-01-21 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
libhaloc | 0.0.1 |
README
libhaloc
ROS library for HAsh-based LOop Closure detection. This library provides the tools for loop closing detection based on image hashing. Image hashing consists of representing every image with a small vector (hash). Then the hash of image A can be compared with the hash of image B in a super fast way in order to determine if images are similar.
The image hashing implemented in this library is based on SIFT features so, since SIFT is invariant to scale and rotation, the image hashing will be also invariant to these properties.
The library works for both mono and stereo cameras and provides a transformation (2d for mono and 3d for stereo) when loop closures are found.
Related paper
[Autonomous Robots][paper]
CITATION:
@Article{Negre Carrasco2015,
author="Negre Carrasco, Pep Lluis
and Bonin-Font, Francisco
and Oliver-Codina, Gabriel",
title="Global image signature for visual loop-closure detection",
journal="Autonomous Robots",
year="2015",
pages="1--15",
issn="1573-7527",
doi="10.1007/s10514-015-9522-4",
url="http://dx.doi.org/10.1007/s10514-015-9522-4"
}
How to prepare your SLAM node
Modify your CMakeLists.txt as follows:
# Add this line before catkin_package()
find_package(libhaloc REQUIRED)
# Include the libhaloc directories
include_directories(
${catkin_INCLUDE_DIRS}
${libhaloc_INCLUDE_DIRS}
...
)
# Link your executable with libhaloc
target_link_libraries(your_executable_here
${catkin_LIBRARIES}
${libhaloc_LIBRARIES}
...
)
Include the header in your .cpp file:
#include <libhaloc/lc.h>
How to call the library
You can use libhaloc in two different ways:
- To generate the image hashes and then, use your own techniques to compare this hashes and retrieve the best candidates to close loop.
- To use the full power of libhaloc to search loop closing candidates and compute the homogeneous transformation (if any).
To use libhaloc as the first option:
- Declare your haloc object:
haloc::Hash haloc_;
- Init your haloc object (only once):
if (!hash_.isInitialized())
hash_.init(c_cluster_.getSift());
- Then, for every new image you process, extract its descriptor matrix (SIFT)
cv::Mat sift;
// Use opencv to extract the SIFT matrix and then:
vector<float> current_hash = hash_.getHash(sift);
- Now, you can store all the hashes into a table and compare it:
std::vector<float> matches;
for (uint i=0; i<my_table.size(); i++)
{
float m = hash_.match(current_hash, my_table[i]);
matches.push_back(matches);
}
- Finally, sort the vector of matches from smallest to largest. Take the first 1, 2, 3 or 4 smallest values as candidates to close loop.
To use libhaloc as the second option:
File truncated at 100 lines see the full file
CONTRIBUTING
Repository Summary
Checkout URI | https://github.com/srv/libhaloc.git |
VCS Type | git |
VCS Version | indigo |
Last Updated | 2016-01-21 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
libhaloc | 0.0.1 |
README
libhaloc
ROS library for HAsh-based LOop Closure detection. This library provides the tools for loop closing detection based on image hashing. Image hashing consists of representing every image with a small vector (hash). Then the hash of image A can be compared with the hash of image B in a super fast way in order to determine if images are similar.
The image hashing implemented in this library is based on SIFT features so, since SIFT is invariant to scale and rotation, the image hashing will be also invariant to these properties.
The library works for both mono and stereo cameras and provides a transformation (2d for mono and 3d for stereo) when loop closures are found.
Related paper
[Autonomous Robots][paper]
CITATION:
@Article{Negre Carrasco2015,
author="Negre Carrasco, Pep Lluis
and Bonin-Font, Francisco
and Oliver-Codina, Gabriel",
title="Global image signature for visual loop-closure detection",
journal="Autonomous Robots",
year="2015",
pages="1--15",
issn="1573-7527",
doi="10.1007/s10514-015-9522-4",
url="http://dx.doi.org/10.1007/s10514-015-9522-4"
}
How to prepare your SLAM node
Modify your CMakeLists.txt as follows:
# Add this line before catkin_package()
find_package(libhaloc REQUIRED)
# Include the libhaloc directories
include_directories(
${catkin_INCLUDE_DIRS}
${libhaloc_INCLUDE_DIRS}
...
)
# Link your executable with libhaloc
target_link_libraries(your_executable_here
${catkin_LIBRARIES}
${libhaloc_LIBRARIES}
...
)
Include the header in your .cpp file:
#include <libhaloc/lc.h>
How to call the library
You can use libhaloc in two different ways:
- To generate the image hashes and then, use your own techniques to compare this hashes and retrieve the best candidates to close loop.
- To use the full power of libhaloc to search loop closing candidates and compute the homogeneous transformation (if any).
To use libhaloc as the first option:
- Declare your haloc object:
haloc::Hash haloc_;
- Init your haloc object (only once):
if (!hash_.isInitialized())
hash_.init(c_cluster_.getSift());
- Then, for every new image you process, extract its descriptor matrix (SIFT)
cv::Mat sift;
// Use opencv to extract the SIFT matrix and then:
vector<float> current_hash = hash_.getHash(sift);
- Now, you can store all the hashes into a table and compare it:
std::vector<float> matches;
for (uint i=0; i<my_table.size(); i++)
{
float m = hash_.match(current_hash, my_table[i]);
matches.push_back(matches);
}
- Finally, sort the vector of matches from smallest to largest. Take the first 1, 2, 3 or 4 smallest values as candidates to close loop.
To use libhaloc as the second option:
File truncated at 100 lines see the full file