Commit b8304ce7 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

Updated stitcher a little bit

parent 4685f0e9
......@@ -64,9 +64,14 @@ public:
// Creates stitcher with default parameters
static Stitcher createDefault(bool try_use_gpu = false);
// Stitches the biggest found pano. Returns status code.
Status stitch(InputArray imgs, OutputArray pano);
Status stitch(InputArray imgs, const std::vector<std::vector<cv::Rect> > &rois, OutputArray pano);
Status estimateTransform(InputArray images);
Status estimateTransform(InputArray images, const std::vector<std::vector<Rect> > &rois);
Status composePanorama(OutputArray pano);
Status composePanorama(InputArray images, OutputArray pano);
Status stitch(InputArray images, OutputArray pano);
Status stitch(InputArray images, const std::vector<std::vector<Rect> > &rois, OutputArray pano);
double registrationResol() const { return registr_resol_; }
void setRegistrationResol(double resol_mpx) { registr_resol_ = resol_mpx; }
......@@ -130,7 +135,6 @@ private:
Status matchImages();
void estimateCameraParams();
Status composePanorama(cv::Mat &pano);
double registr_resol_;
double seam_est_resol_;
......
......@@ -132,7 +132,7 @@ void HomographyBasedEstimator::estimate(const vector<ImageFeatures> &features, c
// Estimate focal length and set it for all cameras
vector<double> focals;
estimateFocal(features, pairwise_matches, focals);
cameras.resize(num_images);
cameras.assign(num_images, CameraParams());
for (int i = 0; i < num_images; ++i)
cameras[i].focal = focals[i];
......@@ -612,7 +612,6 @@ void waveCorrect(vector<Mat> &rmats, WaveCorrectKind kind)
{
for (size_t i = 0; i < rmats.size(); ++i)
conf -= rg1.dot(rmats[i].col(0));
cout << conf << endl;
if (conf < 0)
{
rg0 *= -1;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment