added saving of matches graph into opencv_stitching (in DOT format)
This commit is contained in:
parent
7820c343eb
commit
f95e71ea3a
@ -48,6 +48,7 @@
|
|||||||
// 3) Automatic Panoramic Image Stitching using Invariant Features.
|
// 3) Automatic Panoramic Image Stitching using Invariant Features.
|
||||||
// Matthew Brown and David G. Lowe. 2007.
|
// Matthew Brown and David G. Lowe. 2007.
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
#include "warpers.hpp"
|
#include "warpers.hpp"
|
||||||
@ -83,6 +84,10 @@ void printUsage()
|
|||||||
" Bundle adjustment cost function. The default is 'focal_ray'.\n"
|
" Bundle adjustment cost function. The default is 'focal_ray'.\n"
|
||||||
" --wave_correct (no|yes)\n"
|
" --wave_correct (no|yes)\n"
|
||||||
" Perform wave effect correction. The default is 'yes'.\n"
|
" Perform wave effect correction. The default is 'yes'.\n"
|
||||||
|
" --save_graph <file_name>\n"
|
||||||
|
" Save matches graph represented in DOT language to <file_name> file.\n"
|
||||||
|
" Labels description: Nm is number of matches, Ni is number of inliers,\n"
|
||||||
|
" C is confidence.\n"
|
||||||
"\nCompositing Flags:\n"
|
"\nCompositing Flags:\n"
|
||||||
" --warp (plane|cylindrical|spherical)\n"
|
" --warp (plane|cylindrical|spherical)\n"
|
||||||
" Warp surface type. The default is 'spherical'.\n"
|
" Warp surface type. The default is 'spherical'.\n"
|
||||||
@ -114,6 +119,8 @@ double compose_megapix = -1;
|
|||||||
int ba_space = BundleAdjuster::FOCAL_RAY_SPACE;
|
int ba_space = BundleAdjuster::FOCAL_RAY_SPACE;
|
||||||
float conf_thresh = 1.f;
|
float conf_thresh = 1.f;
|
||||||
bool wave_correct = true;
|
bool wave_correct = true;
|
||||||
|
bool save_graph = false;
|
||||||
|
std::string save_graph_to;
|
||||||
int warp_type = Warper::SPHERICAL;
|
int warp_type = Warper::SPHERICAL;
|
||||||
int expos_comp_type = ExposureCompensator::GAIN_BLOCKS;
|
int expos_comp_type = ExposureCompensator::GAIN_BLOCKS;
|
||||||
float match_conf = 0.65f;
|
float match_conf = 0.65f;
|
||||||
@ -209,6 +216,12 @@ int parseCmdArgs(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
else if (string(argv[i]) == "--save_graph")
|
||||||
|
{
|
||||||
|
save_graph = true;
|
||||||
|
save_graph_to = argv[i + 1];
|
||||||
|
i++;
|
||||||
|
}
|
||||||
else if (string(argv[i]) == "--warp")
|
else if (string(argv[i]) == "--warp")
|
||||||
{
|
{
|
||||||
if (string(argv[i + 1]) == "plane")
|
if (string(argv[i + 1]) == "plane")
|
||||||
@ -378,6 +391,14 @@ int main(int argc, char* argv[])
|
|||||||
matcher.releaseMemory();
|
matcher.releaseMemory();
|
||||||
LOGLN("Pairwise matching, time: " << ((getTickCount() - t) / getTickFrequency()) << " sec");
|
LOGLN("Pairwise matching, time: " << ((getTickCount() - t) / getTickFrequency()) << " sec");
|
||||||
|
|
||||||
|
// Check if we should save matches graph
|
||||||
|
if (save_graph)
|
||||||
|
{
|
||||||
|
LOGLN("Saving matches graph...");
|
||||||
|
ofstream f(save_graph_to.c_str());
|
||||||
|
f << matchesGraphAsString(img_names, pairwise_matches, conf_thresh);
|
||||||
|
}
|
||||||
|
|
||||||
// Leave only images we are sure are from the same panorama
|
// Leave only images we are sure are from the same panorama
|
||||||
vector<int> indices = leaveBiggestComponent(features, pairwise_matches, conf_thresh);
|
vector<int> indices = leaveBiggestComponent(features, pairwise_matches, conf_thresh);
|
||||||
vector<Mat> img_subset;
|
vector<Mat> img_subset;
|
||||||
|
@ -38,102 +38,102 @@
|
|||||||
// or tort (including negligence or otherwise) arising in any way out of
|
// or tort (including negligence or otherwise) arising in any way out of
|
||||||
// the use of this software, even if advised of the possibility of such damage.
|
// the use of this software, even if advised of the possibility of such damage.
|
||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
#ifndef __OPENCV_MATCHERS_HPP__
|
#ifndef __OPENCV_MATCHERS_HPP__
|
||||||
#define __OPENCV_MATCHERS_HPP__
|
#define __OPENCV_MATCHERS_HPP__
|
||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
struct ImageFeatures
|
struct ImageFeatures
|
||||||
{
|
{
|
||||||
int img_idx;
|
int img_idx;
|
||||||
cv::Size img_size;
|
cv::Size img_size;
|
||||||
std::vector<cv::KeyPoint> keypoints;
|
std::vector<cv::KeyPoint> keypoints;
|
||||||
cv::Mat descriptors;
|
cv::Mat descriptors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class FeaturesFinder
|
class FeaturesFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~FeaturesFinder() {}
|
virtual ~FeaturesFinder() {}
|
||||||
void operator ()(const cv::Mat &image, ImageFeatures &features);
|
void operator ()(const cv::Mat &image, ImageFeatures &features);
|
||||||
|
|
||||||
virtual void releaseMemory() {}
|
virtual void releaseMemory() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void find(const cv::Mat &image, ImageFeatures &features) = 0;
|
virtual void find(const cv::Mat &image, ImageFeatures &features) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class SurfFeaturesFinder : public FeaturesFinder
|
class SurfFeaturesFinder : public FeaturesFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SurfFeaturesFinder(bool try_use_gpu = true, double hess_thresh = 300.0,
|
SurfFeaturesFinder(bool try_use_gpu = true, double hess_thresh = 300.0,
|
||||||
int num_octaves = 3, int num_layers = 4,
|
int num_octaves = 3, int num_layers = 4,
|
||||||
int num_octaves_descr = 4, int num_layers_descr = 2);
|
int num_octaves_descr = 4, int num_layers_descr = 2);
|
||||||
|
|
||||||
void releaseMemory();
|
void releaseMemory();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void find(const cv::Mat &image, ImageFeatures &features);
|
void find(const cv::Mat &image, ImageFeatures &features);
|
||||||
|
|
||||||
cv::Ptr<FeaturesFinder> impl_;
|
cv::Ptr<FeaturesFinder> impl_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct MatchesInfo
|
struct MatchesInfo
|
||||||
{
|
{
|
||||||
MatchesInfo();
|
MatchesInfo();
|
||||||
MatchesInfo(const MatchesInfo &other);
|
MatchesInfo(const MatchesInfo &other);
|
||||||
const MatchesInfo& operator =(const MatchesInfo &other);
|
const MatchesInfo& operator =(const MatchesInfo &other);
|
||||||
|
|
||||||
int src_img_idx, dst_img_idx; // Images indices (optional)
|
int src_img_idx, dst_img_idx; // Images indices (optional)
|
||||||
std::vector<cv::DMatch> matches;
|
std::vector<cv::DMatch> matches;
|
||||||
std::vector<uchar> inliers_mask; // Geometrically consistent matches mask
|
std::vector<uchar> inliers_mask; // Geometrically consistent matches mask
|
||||||
int num_inliers; // Number of geometrically consistent matches
|
int num_inliers; // Number of geometrically consistent matches
|
||||||
cv::Mat H; // Estimated homography
|
cv::Mat H; // Estimated homography
|
||||||
double confidence; // Confidence two images are from the same panorama
|
double confidence; // Confidence two images are from the same panorama
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class FeaturesMatcher
|
class FeaturesMatcher
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~FeaturesMatcher() {}
|
virtual ~FeaturesMatcher() {}
|
||||||
|
|
||||||
void operator ()(const ImageFeatures &features1, const ImageFeatures &features2,
|
void operator ()(const ImageFeatures &features1, const ImageFeatures &features2,
|
||||||
MatchesInfo& matches_info) { match(features1, features2, matches_info); }
|
MatchesInfo& matches_info) { match(features1, features2, matches_info); }
|
||||||
void operator ()(const std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches);
|
void operator ()(const std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches);
|
||||||
|
|
||||||
bool isThreadSafe() const { return is_thread_safe_; }
|
bool isThreadSafe() const { return is_thread_safe_; }
|
||||||
|
|
||||||
virtual void releaseMemory() {}
|
virtual void releaseMemory() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FeaturesMatcher(bool is_thread_safe = false) : is_thread_safe_(is_thread_safe) {}
|
FeaturesMatcher(bool is_thread_safe = false) : is_thread_safe_(is_thread_safe) {}
|
||||||
|
|
||||||
virtual void match(const ImageFeatures &features1, const ImageFeatures &features2,
|
virtual void match(const ImageFeatures &features1, const ImageFeatures &features2,
|
||||||
MatchesInfo& matches_info) = 0;
|
MatchesInfo& matches_info) = 0;
|
||||||
|
|
||||||
bool is_thread_safe_;
|
bool is_thread_safe_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class BestOf2NearestMatcher : public FeaturesMatcher
|
class BestOf2NearestMatcher : public FeaturesMatcher
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BestOf2NearestMatcher(bool try_use_gpu = true, float match_conf = 0.55f, int num_matches_thresh1 = 6,
|
BestOf2NearestMatcher(bool try_use_gpu = true, float match_conf = 0.55f, int num_matches_thresh1 = 6,
|
||||||
int num_matches_thresh2 = 6);
|
int num_matches_thresh2 = 6);
|
||||||
|
|
||||||
void releaseMemory();
|
void releaseMemory();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info);
|
void match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info);
|
||||||
|
|
||||||
int num_matches_thresh1_;
|
int num_matches_thresh1_;
|
||||||
int num_matches_thresh2_;
|
int num_matches_thresh2_;
|
||||||
cv::Ptr<FeaturesMatcher> impl_;
|
cv::Ptr<FeaturesMatcher> impl_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __OPENCV_MATCHERS_HPP__
|
#endif // __OPENCV_MATCHERS_HPP__
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <sstream>
|
||||||
#include "autocalib.hpp"
|
#include "autocalib.hpp"
|
||||||
#include "motion_estimators.hpp"
|
#include "motion_estimators.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
@ -407,6 +408,70 @@ void waveCorrect(vector<Mat> &rmats)
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
string matchesGraphAsString(vector<string> &pathes, vector<MatchesInfo> &pairwise_matches,
|
||||||
|
float conf_threshold)
|
||||||
|
{
|
||||||
|
stringstream str;
|
||||||
|
str << "graph matches_graph{\n";
|
||||||
|
|
||||||
|
set<int> added_imgs;
|
||||||
|
|
||||||
|
// Add matches
|
||||||
|
for (size_t i = 0; i < pairwise_matches.size(); ++i)
|
||||||
|
{
|
||||||
|
if (pairwise_matches[i].src_img_idx < pairwise_matches[i].dst_img_idx &&
|
||||||
|
pairwise_matches[i].confidence > conf_threshold)
|
||||||
|
{
|
||||||
|
string name_src = pathes[pairwise_matches[i].src_img_idx];
|
||||||
|
size_t prefix_len = name_src.find_last_of("/\\");
|
||||||
|
if (prefix_len != string::npos) prefix_len++; else prefix_len = 0;
|
||||||
|
name_src = name_src.substr(prefix_len, name_src.size() - prefix_len);
|
||||||
|
|
||||||
|
string name_dst = pathes[pairwise_matches[i].dst_img_idx];
|
||||||
|
prefix_len = name_dst.find_last_of("/\\");
|
||||||
|
if (prefix_len != string::npos) prefix_len++; else prefix_len = 0;
|
||||||
|
name_dst = name_dst.substr(prefix_len, name_dst.size() - prefix_len);
|
||||||
|
|
||||||
|
added_imgs.insert(pairwise_matches[i].src_img_idx);
|
||||||
|
added_imgs.insert(pairwise_matches[i].dst_img_idx);
|
||||||
|
|
||||||
|
str << "\"" << name_src << "\" -- \"" << name_dst << "\""
|
||||||
|
<< "[label=\"Nm=" << pairwise_matches[i].matches.size()
|
||||||
|
<< ", Ni=" << pairwise_matches[i].num_inliers
|
||||||
|
<< ", C=" << pairwise_matches[i].confidence << "\"];\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add unmatched images
|
||||||
|
for (size_t i = 0; i < pairwise_matches.size(); ++i)
|
||||||
|
{
|
||||||
|
if (pairwise_matches[i].src_img_idx < pairwise_matches[i].dst_img_idx)
|
||||||
|
{
|
||||||
|
if (added_imgs.find(pairwise_matches[i].src_img_idx) == added_imgs.end())
|
||||||
|
{
|
||||||
|
added_imgs.insert(pairwise_matches[i].src_img_idx);
|
||||||
|
string name = pathes[pairwise_matches[i].src_img_idx];
|
||||||
|
size_t prefix_len = name.find_last_of("/\\");
|
||||||
|
if (prefix_len != string::npos) prefix_len++; else prefix_len = 0;
|
||||||
|
name = name.substr(prefix_len, name.size() - prefix_len);
|
||||||
|
str << "\"" << name << "\";\n";
|
||||||
|
}
|
||||||
|
if (added_imgs.find(pairwise_matches[i].dst_img_idx) == added_imgs.end())
|
||||||
|
{
|
||||||
|
added_imgs.insert(pairwise_matches[i].dst_img_idx);
|
||||||
|
string name = pathes[pairwise_matches[i].dst_img_idx];
|
||||||
|
size_t prefix_len = name.find_last_of("/\\");
|
||||||
|
if (prefix_len != string::npos) prefix_len++; else prefix_len = 0;
|
||||||
|
name = name.substr(prefix_len, name.size() - prefix_len);
|
||||||
|
str << "\"" << name << "\";\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
str << "}";
|
||||||
|
return str.str();
|
||||||
|
}
|
||||||
|
|
||||||
vector<int> leaveBiggestComponent(vector<ImageFeatures> &features, vector<MatchesInfo> &pairwise_matches,
|
vector<int> leaveBiggestComponent(vector<ImageFeatures> &features, vector<MatchesInfo> &pairwise_matches,
|
||||||
float conf_threshold)
|
float conf_threshold)
|
||||||
{
|
{
|
||||||
|
@ -38,94 +38,98 @@
|
|||||||
// or tort (including negligence or otherwise) arising in any way out of
|
// or tort (including negligence or otherwise) arising in any way out of
|
||||||
// the use of this software, even if advised of the possibility of such damage.
|
// the use of this software, even if advised of the possibility of such damage.
|
||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
#ifndef __OPENCV_MOTION_ESTIMATORS_HPP__
|
#ifndef __OPENCV_MOTION_ESTIMATORS_HPP__
|
||||||
#define __OPENCV_MOTION_ESTIMATORS_HPP__
|
#define __OPENCV_MOTION_ESTIMATORS_HPP__
|
||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "matchers.hpp"
|
#include "matchers.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
|
||||||
struct CameraParams
|
struct CameraParams
|
||||||
{
|
{
|
||||||
CameraParams();
|
CameraParams();
|
||||||
CameraParams(const CameraParams& other);
|
CameraParams(const CameraParams& other);
|
||||||
const CameraParams& operator =(const CameraParams& other);
|
const CameraParams& operator =(const CameraParams& other);
|
||||||
|
|
||||||
double focal; // Focal length
|
double focal; // Focal length
|
||||||
cv::Mat R; // Rotation
|
cv::Mat R; // Rotation
|
||||||
cv::Mat t; // Translation
|
cv::Mat t; // Translation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Estimator
|
class Estimator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void operator ()(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
void operator ()(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
||||||
std::vector<CameraParams> &cameras)
|
std::vector<CameraParams> &cameras)
|
||||||
{
|
{
|
||||||
estimate(features, pairwise_matches, cameras);
|
estimate(features, pairwise_matches, cameras);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
virtual void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
||||||
std::vector<CameraParams> &cameras) = 0;
|
std::vector<CameraParams> &cameras) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class HomographyBasedEstimator : public Estimator
|
class HomographyBasedEstimator : public Estimator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HomographyBasedEstimator() : is_focals_estimated_(false) {}
|
HomographyBasedEstimator() : is_focals_estimated_(false) {}
|
||||||
bool isFocalsEstimated() const { return is_focals_estimated_; }
|
bool isFocalsEstimated() const { return is_focals_estimated_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
||||||
std::vector<CameraParams> &cameras);
|
std::vector<CameraParams> &cameras);
|
||||||
|
|
||||||
bool is_focals_estimated_;
|
bool is_focals_estimated_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class BundleAdjuster : public Estimator
|
class BundleAdjuster : public Estimator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum { RAY_SPACE, FOCAL_RAY_SPACE };
|
enum { RAY_SPACE, FOCAL_RAY_SPACE };
|
||||||
|
|
||||||
BundleAdjuster(int cost_space = FOCAL_RAY_SPACE, float conf_thresh = 1.f)
|
BundleAdjuster(int cost_space = FOCAL_RAY_SPACE, float conf_thresh = 1.f)
|
||||||
: cost_space_(cost_space), conf_thresh_(conf_thresh) {}
|
: cost_space_(cost_space), conf_thresh_(conf_thresh) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
void estimate(const std::vector<ImageFeatures> &features, const std::vector<MatchesInfo> &pairwise_matches,
|
||||||
std::vector<CameraParams> &cameras);
|
std::vector<CameraParams> &cameras);
|
||||||
|
|
||||||
void calcError(cv::Mat &err);
|
void calcError(cv::Mat &err);
|
||||||
void calcJacobian();
|
void calcJacobian();
|
||||||
|
|
||||||
int num_images_;
|
int num_images_;
|
||||||
int total_num_matches_;
|
int total_num_matches_;
|
||||||
const ImageFeatures *features_;
|
const ImageFeatures *features_;
|
||||||
const MatchesInfo *pairwise_matches_;
|
const MatchesInfo *pairwise_matches_;
|
||||||
cv::Mat cameras_;
|
cv::Mat cameras_;
|
||||||
std::vector<std::pair<int,int> > edges_;
|
std::vector<std::pair<int,int> > edges_;
|
||||||
|
|
||||||
int cost_space_;
|
int cost_space_;
|
||||||
float conf_thresh_;
|
float conf_thresh_;
|
||||||
cv::Mat err_, err1_, err2_;
|
cv::Mat err_, err1_, err2_;
|
||||||
cv::Mat J_;
|
cv::Mat J_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void waveCorrect(std::vector<cv::Mat> &rmats);
|
void waveCorrect(std::vector<cv::Mat> &rmats);
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Auxiliary functions
|
// Auxiliary functions
|
||||||
|
|
||||||
std::vector<int> leaveBiggestComponent(std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches,
|
// Returns matches graph representation in DOT language
|
||||||
float conf_threshold);
|
std::string matchesGraphAsString(std::vector<std::string> &pathes, std::vector<MatchesInfo> &pairwise_matches,
|
||||||
|
float conf_threshold);
|
||||||
void findMaxSpanningTree(int num_images, const std::vector<MatchesInfo> &pairwise_matches,
|
|
||||||
Graph &span_tree, std::vector<int> ¢ers);
|
std::vector<int> leaveBiggestComponent(std::vector<ImageFeatures> &features, std::vector<MatchesInfo> &pairwise_matches,
|
||||||
|
float conf_threshold);
|
||||||
#endif // __OPENCV_MOTION_ESTIMATORS_HPP__
|
|
||||||
|
void findMaxSpanningTree(int num_images, const std::vector<MatchesInfo> &pairwise_matches,
|
||||||
|
Graph &span_tree, std::vector<int> ¢ers);
|
||||||
|
|
||||||
|
#endif // __OPENCV_MOTION_ESTIMATORS_HPP__
|
||||||
|
@ -108,8 +108,9 @@ bool overlapRoi(cv::Point tl1, cv::Point tl2, cv::Size sz1, cv::Size sz2, cv::Re
|
|||||||
cv::Rect resultRoi(const std::vector<cv::Point> &corners, const std::vector<cv::Mat> &images);
|
cv::Rect resultRoi(const std::vector<cv::Point> &corners, const std::vector<cv::Mat> &images);
|
||||||
cv::Rect resultRoi(const std::vector<cv::Point> &corners, const std::vector<cv::Size> &sizes);
|
cv::Rect resultRoi(const std::vector<cv::Point> &corners, const std::vector<cv::Size> &sizes);
|
||||||
cv::Point resultTl(const std::vector<cv::Point> &corners);
|
cv::Point resultTl(const std::vector<cv::Point> &corners);
|
||||||
void selectRandomSubset(int count, int size, std::vector<int> &subset);
|
|
||||||
|
|
||||||
|
// Returns random 'count' element subset of the {0,1,...,size-1} set
|
||||||
|
void selectRandomSubset(int count, int size, std::vector<int> &subset);
|
||||||
|
|
||||||
#include "util_inl.hpp"
|
#include "util_inl.hpp"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user