18 #ifndef PIC_COMPUTER_VISION_IMAGE_ALIGNMENT_HPP 19 #define PIC_COMPUTER_VISION_IMAGE_ALIGNMENT_HPP 23 #include "../base.hpp" 24 #include "../image.hpp" 25 #include "../features_matching/orb_descriptor.hpp" 26 #include "../features_matching/harris_corner_detector.hpp" 27 #include "../features_matching/binary_feature_brute_force_matcher.hpp" 28 #include "../computer_vision/homography_matrix.hpp" 29 #include "../filtering/filter_gaussian_2d.hpp" 30 #include "../filtering/filter_warp_2d.hpp" 32 #ifndef PIC_DISABLE_EIGEN 33 #ifndef PIC_EIGEN_NOT_BUNDLED 34 #include "../externals/Eigen/Dense" 36 #include <Eigen/Dense> 42 #ifndef PIC_DISABLE_EIGEN 53 std::vector< Eigen::Vector2f > corners_from_img0;
54 std::vector< Eigen::Vector2f > corners_from_img1;
58 hcd.
execute(img0, &corners_from_img0);
59 hcd.
execute(img1, &corners_from_img1);
64 std::vector< pic::uint* > descs0;
65 b_desc.
getAll(img0, corners_from_img0, descs0);
67 std::vector< pic::uint* > descs1;
68 b_desc.
getAll(img1, corners_from_img1, descs1);
74 std::vector< Eigen::Vector3i > matches;
78 std::vector< Eigen::Vector2f > m0, m1;
82 std::vector< uint > inliers;
110 #endif // PIC_COMPUTER_VISION_IMAGE_ALIGNMENT_HPP PIC_INLINE Eigen::Matrix3d estimateHomographyWithNonLinearRefinement(std::vector< Eigen::Vector2f > &points0, std::vector< Eigen::Vector2f > &points1, std::vector< unsigned int > &inliers, unsigned int maxIterationsRansac=10000, double thresholdRansac=2.5, unsigned int seedRansac=1, unsigned int maxIterationsNonLinear=10000, float thresholdNonLinear=1e-5f)
estimateHomographyRansac computes the homography such that: points1 = H * points0 ...
Definition: homography_matrix.hpp:231
void execute(Image *img, std::vector< Eigen::Vector2f > *corners)
execute
Definition: harris_corner_detector.hpp:137
virtual Image * Process(ImageVec imgIn, Image *imgOut)
Process.
Definition: filter.hpp:390
The HarrisCornerDetector class.
Definition: harris_corner_detector.hpp:54
Image * imageAlignmentWithORB(Image *img0, Image *img1, Image *imgOut)
imageAlignmentWithORB
Definition: image_alignment.hpp:95
PIC_INLINE Matrix3x3 MatrixConvert(Eigen::Matrix3f &mat)
MatrixConvert converts a matrix from a Eigen::Matrix3f representation into a Matrix3x3 representation...
Definition: eigen_util.hpp:356
void getAllMatches(std::vector< unsigned int *> &descs0, std::vector< Eigen::Vector3i > &matches)
Definition: feature_matcher.hpp:81
The Image class stores an image as buffer of float.
Definition: image.hpp:60
void update(Matrix3x3 h, bool bSameSize, bool bCentroid=false)
update
Definition: filter_warp_2d.hpp:199
void getAll(Image *img, std::vector< Eigen::Vector2f > &corners, std::vector< uint * > &descs)
getAll
Definition: brief_descriptor.hpp:226
The ORBDescriptor class.
Definition: orb_descriptor.hpp:34
PIC_INLINE ImageVec Single(Image *img)
Single creates an std::vector which contains img; this is for filters input.
Definition: image_vec.hpp:36
static void filterMatches(std::vector< Eigen::Vector2f > &c0, std::vector< Eigen::Vector2f > &c1, std::vector< Eigen::Vector3i > &matches, std::vector< Eigen::Vector2f > &p0, std::vector< Eigen::Vector2f > &p1)
filterMatches
Definition: feature_matcher.hpp:103
Definition: bilateral_separation.hpp:25
int getDescriptorSize()
getDescriptorSize returns the descriptor size.
Definition: brief_descriptor.hpp:244
The BinaryFeatureBruteForceMatcher class.
Definition: binary_feature_brute_force_matcher.hpp:32
Eigen::Matrix3d getHomographyMatrixFromTwoImage(Image *img0, Image *img1)
getHomographyMatrixFromTwoImage
Definition: image_alignment.hpp:50
The FilterWarp2D class.
Definition: filter_warp_2d.hpp:31