| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef IMAGESTITCHER_H
- #define IMAGESTITCHER_H
- #include <QObject>
- #include <QImage>
- #include <opencv2/core/core.hpp>
- #include <opencv2/highgui/highgui.hpp>
- #include <opencv2/calib3d.hpp>
- #include <opencv2/stitching.hpp>
- #include <opencv2/xfeatures2d.hpp>
- #include <opencv2/features2d/features2d.hpp>
- #include <opencv2/xfeatures2d/nonfree.hpp>
- #include <main.h>
- class param;
- using namespace std;
- using namespace cv;
- int curl_upload(const QString filename);
- class ImageStitcher : public QObject
- {
- Q_OBJECT
- Q_PROPERTY(QStringList p_list READ p_listGet WRITE p_listSet NOTIFY p_listChanged ) //图片路径
- Q_PROPERTY(QStringList info_list READ info_listGet WRITE info_listSet NOTIFY info_listChanged ) //拼接信息
- signals:
- void stitchSuccess(QString result_path);
- void stitchFailed();
- void pathChanged(QStringList imagepath);
- void process(QString log_info);
- void p_listChanged();
- void info_listChanged();
- public:
- ImageStitcher();
- void optimizeSeam(cv::Mat leftImage, cv::Mat leftImageTransform, cv::Mat rightImageTransform, cv::Mat &dstImage, std::vector<cv::Point2f> sceneCorners);
- int stitch_default();
- Q_INVOKABLE void stitch_thread();
- QStringList p_listGet() const
- {
- return param::ptlist;
- }
- QStringList info_listGet() const{
- QStringList stitch_info;
- stitch_info.append(param::stitch_mode);
- stitch_info.append(param::stitch_photonum);
- stitch_info.append(param::photo_width);
- stitch_info.append(param::photo_height);
- return s
- }
- void p_listSet(QStringList n_list)
- {
- param::ptlist = n_list;
- emit p_listChanged();
- }
- void merge_pic(vector<Mat>& images);
- private:
- QString m_resultPath;
- QStringList m_imagepath;
- QFuture<int> future_stitch;
- };
- #endif // IMAGESTITCHER_H
|