資源簡介
基于opencv實現的圖像拼接,比Stitcher詳細,有中間過程有部分中文注釋

代碼片段和文件信息
#include???
#include???
#include???
#include?“opencv2/opencv_modules.hpp“??
#include?“opencv2/highgui/highgui.hpp“??
#include?“opencv2/stitching/detail/autocalib.hpp“??
#include?“opencv2/stitching/detail/blenders.hpp“??
#include?“opencv2/stitching/detail/camera.hpp“??
#include?“opencv2/stitching/detail/exposure_compensate.hpp“??
#include?“opencv2/stitching/detail/matchers.hpp“??
#include?“opencv2/stitching/detail/motion_estimators.hpp“??
#include?“opencv2/stitching/detail/seam_finders.hpp“??
#include?“opencv2/stitching/detail/util.hpp“??
#include?“opencv2/stitching/detail/warpers.hpp“??
#include?“opencv2/stitching/warpers.hpp“??
??
??
using?namespace?std;??
using?namespace?cv;??
using?namespace?cv::detail;??
??
??
//?Default?command?line?args??
vector?img_names;??
bool?preview?=?false;??
bool?try_gpu?=?false;??
double?work_megapix?=?0.6;??
double?seam_megapix?=?0.1;??
double?compose_megapix?=?0.6;??
float?conf_thresh?=?1.f;??
string?features_type?=?“surf“;//or“orb“??
string?ba_cost_func?=?“ray“;??
string?ba_refine_mask?=?“xxxxx“;??
bool?do_wave_correct?=?true;??
WaveCorrectKind?wave_correct?=?detail::WAVE_CORRECT_HORIZ;??//水平方向
bool?save_graph?=?false;??
std::string?save_graph_to;??
string?warp_type?=?“spherical“;??
int?expos_comp_type?=?ExposureCompensator::GAIN_BLOCKS;??
float?match_conf?=?0.3f;??
string?seam_find_type?=?“gc_color“;??
int?blend_type?=?Blender::MULTI_BAND;??
float?blend_strength?=?5;??
string?result_name?=?“result.jpg“;??
??
??
??
??
??
??
int?main(/*int?argc?char*?argv[]*/)??
{??
int?argc?=?3;??
char*?argv[]?=?{“parliament1.jpg“?“parliament2.jpg“?“parliament3.jpg“
//int?argc?=?10;
//char*?argv[]?=?{“1.jpg“?“2.jpg“?“3.jpg“?“4.jpg“?“5.jpg“?“6.jpg“?“7.jpg“?“8.jpg“?“9.jpg“???
//“10.jpg“
//?“--preview“??
//“--try_gpu““no“??
//“--work_megapix““0.6“??
////“--features““orb“??
//“--wave_correct““no“??
//“--wave_correct“??
//“--warp_type“//?“plane“?“cylindrical““spherical““plane““cylindrical““spherical““fisheye““stereographic“??
//??“plane“?//“compressedPlaneA2B1“?“compressedPlaneA1.5B1““compressedPlanePortraitA2B1“??
////???“compressedPlanePortraitA1.5B1“?“paniniA2B1““paniniA1.5B1“?“paniniPortraitA2B1““paniniPortraitA1.5B1“??
//?//??“mercator“?“transverseMercator“??
//?“--expos_comp““no“??
//?“--seam““no““--blend““no“??
};??
for?(int?i?=?0;?i? img_names.push_back(argv[i]);??
//?Check?if?have?enough?images??
int?num_images?=?static_cast(img_names.size());??//拼接圖片的數量
double?work_scale?=?1?seam_scale?=?1?compose_scale?=?1;??
bool?is_work_scale_set?=?false?is_seam_scale_set?=?false?is_compose_scale_set?=?false;??
cout<<“Finding?features...“<
Ptr?finder;??
#if?defined(HAVE_OPENCV_NONFREE)?&&?defined(HAVE_OPENCV_GPU)?&&?!defined(ANDROID)??
if?(try_gpu?&&?gpu::getCudaEnabledDeviceCou
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-09-02?17:37??opencvstitch\
?????目錄???????????0??2016-09-02?17:37??opencvstitch\opencvstitch\
?????文件???????14113??2016-09-02?17:37??opencvstitch\opencvstitch\opencvstitch.cpp
?????文件????????4020??2016-09-02?17:37??opencvstitch\opencvstitch\opencvstitch.vcxproj
?????文件?????????950??2016-09-02?17:37??opencvstitch\opencvstitch\opencvstitch.vcxproj.filters
?????文件??????150854??2016-07-20?15:00??opencvstitch\opencvstitch\parliament1.jpg
?????文件??????149259??2016-07-20?14:50??opencvstitch\opencvstitch\parliament2.jpg
?????文件??????147176??2016-07-20?14:57??opencvstitch\opencvstitch\parliament3.jpg
?????文件?????7274496??2016-09-02?17:37??opencvstitch\opencvstitch.sdf
?????文件?????????903??2016-09-02?17:36??opencvstitch\opencvstitch.sln
?????文件???????18432??2016-09-02?17:37??opencvstitch\opencvstitch.v11.suo
- 上一篇:A-PDF Page Cut 3.5
- 下一篇:《工廠物理學》中文譯稿 2.rar
評論
共有 條評論