added handling of camera parameters estimation errors (#3122)

This commit is contained in:
Alexey Spizhevoy
2013-07-03 15:20:14 +04:00
parent 70deda354a
commit 37ea872204
5 changed files with 65 additions and 22 deletions

View File

@@ -59,7 +59,13 @@ class CV_EXPORTS Stitcher
{
public:
enum { ORIG_RESOL = -1 };
enum Status { OK, ERR_NEED_MORE_IMGS };
enum Status
{
OK = 0,
ERR_NEED_MORE_IMGS = 1,
ERR_HOMOGRAPHY_EST_FAIL = 2,
ERR_CAMERA_PARAMS_ADJUST_FAIL = 3
};
// Creates stitcher with default parameters
static Stitcher createDefault(bool try_use_gpu = false);
@@ -138,7 +144,7 @@ private:
Stitcher() {}
Status matchImages();
void estimateCameraParams();
Status estimateCameraParams();
double registr_resol_;
double seam_est_resol_;