91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5.86MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-17
  • 語言: C/C++
  • 標簽:

資源簡介

經典的APAP論文描述的拼接方法源代碼,C++語言,編譯通過,有助于論文閱讀。

資源截圖

代碼片段和文件信息

#include?“APAP_Processor.h“
#include?“MathUtils.h“
/*
?*?\param?points?特征點集
?*?\param?x?y?x*的坐標
?*/
using?namespace?cv;
using?namespace?std;
using?namespace?Eigen;
vector?points;
MatrixXd?calculate_Wi_forPoint(double?x?double?y)
{
const?double?sigma_squared?=?sigma?*?sigma;
MatrixXd?Wi(2?*?points.size()?2?*?points.size());
Wi.setZero();
for?(size_t?i?=?0;?i? {
double?u?=?(double)points[i].x?v?=?(double)points[i].y;
double?sqr_dist?=?getSqrDist(x?y?u?v);
double?candidate?=?exp(-sqr_dist?/?sigma_squared);
double?omega_i?=?max(candidate?gamma);
Wi(i?*?2?i?*?2)?=?omega_i;
Wi(i?*?2?+?1?i?*?2?+?1)?=?omega_i;
}
return?Wi;
}

//計算每一個x*對應的*i
void?calculate_Wi_Matrices(Mat?img?vector&?obj?vector&?vec)
{
points?=?obj;
int?Width?=?img.size().width?Height?=?img.size().height;
ArrayXd?heightArray?=?ArrayXd::LinSpaced(C1?+?1?0?Height?-?1)
widthArray?=?ArrayXd::LinSpaced(C2?+?1?0?Width?-?1);//分割
ofstream?fout(“Wi.txt“);
int?count?=?0;
for?(int?i?=?0;?i? double?y?=?(heightArray(i)?+?heightArray(i?+?1))?/?2;
for?(int?j?=?0;?j? // cout?< double?x?=?(widthArray(j)?+?widthArray(j?+?1))?/?2;
MatrixXd?Wi?=?calculate_Wi_forPoint(x?y);
vec.push_back(Wi);
}
}

}

//每個分塊的H*
vector?calculate_CellHomography(vector&?matrices?MatrixXd&?A)
{
vector?H_vec;
for?(size_t?i?=?0;?i? {
MatrixXd?WA?=?matrices[i]?*?A;
Matrix3d?H;
JacobiSVD?svd(WA?ComputeThinU?|?ComputeThinV);
MatrixXd?V?=?svd.matrixV();
VectorXd?h?=?V.col(V.cols()?-?1);
H?< h[3]?h[4]?h[5]
h[6]?h[7]?h[8];
H_vec.push_back(H);
}
return?H_vec;
}


GridBox**?getIndex(const?Mat&?img?int?C1?int?C2?int?offset_x?int?offset_y?vector?H_vec)
{
GridBox**?a?=?new?GridBox*[C2?+?1];
for?(int?i?=?0;?i? a[i]?=?new?GridBox[C1?+?1];

ArrayXf?widthArray?=?ArrayXf::LinSpaced(C2?+?1?0?img.size().width)
heightArray?=?ArrayXf::LinSpaced(C1?+?1?0?img.size().height);?//?0?~?C1?-?1?0?~?C2?-?1
double?min_x?min_y;
for?(int?gy?=?0;?gy? for?(int?gx?=?0;?gx? {
int?H_index?=?gy?*?C2?+?gx;
double?topleftx?toplefty
toprightx?toprighty
bottomleftx?bottomlefty
bottomrightx?bottomrighty;
ConvertCoordinates(widthArray[gx]?heightArray[gy]?topleftx?toplefty?H_vec[H_index]);
ConvertCoordinates(widthArray[gx?+?1]?heightArray[gy]?toprightx?toprighty?H_vec[H_index]);
ConvertCoordinates(widthArray[gx]?heightArray[gy?+?1]?bottomleftx?bottomlefty?H_vec[H_index]);
ConvertCoordinates(widthArray[gx?+?1]?heightArray[gy?+?1]?bottomrightx?bottomrighty?H_vec[H_index]);
GridBox?gbox?=?GridBox(Point2d(topleftx?+?offset_x?toplefty?+?offset_y)
Point2d(toprightx?+?offset_x?toprighty?+?offset_y)
Point2d(bottomleftx?+?offset_x?bottomlefty?+?offset_y)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-05-13?08:24??APAP-Processor-master\
?????文件????????6001??2018-05-13?08:24??APAP-Processor-master\APAP_Processor.cpp
?????文件?????????372??2018-05-13?08:24??APAP-Processor-master\APAP_Processor.h
?????目錄???????????0??2018-05-13?08:24??APAP-Processor-master\Debug\
?????文件?????7574890??2018-05-13?08:24??APAP-Processor-master\Debug\APAP_Processor.obj
?????文件??????348812??2018-05-13?08:24??APAP-Processor-master\Debug\FeatureMatcher.obj
?????文件??????317936??2018-05-13?08:24??APAP-Processor-master\Debug\GridBox.obj
?????文件?????6404936??2018-05-13?08:24??APAP-Processor-master\Debug\Homography.obj
?????文件??????840296??2018-05-13?08:24??APAP-Processor-master\Debug\Main.obj
?????文件??????649859??2018-05-13?08:24??APAP-Processor-master\Debug\MathUtils.obj
?????文件??????519010??2018-05-13?08:24??APAP-Processor-master\Debug\Mesh2D.obj
?????文件??????657635??2018-05-13?08:24??APAP-Processor-master\Debug\RANSAC_Processor.obj
?????文件?????1932555??2018-05-13?08:24??APAP-Processor-master\Debug\SIFT_Matcher.obj
?????文件??????465484??2018-05-13?08:24??APAP-Processor-master\Debug\Transform.obj
?????文件????????1707??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.Build.CppClean.log
?????文件????????3181??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.log
?????目錄???????????0??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\
?????文件????????7306??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\CL.command.1.tlog
?????文件??????507202??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\CL.read.1.tlog
?????文件???????12376??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\CL.write.1.tlog
?????文件????????4366??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\link.command.1.tlog
?????文件???????11308??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\link.read.1.tlog
?????文件????????1310??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\link.write.1.tlog
?????文件?????????209??2018-05-13?08:24??APAP-Processor-master\Debug\opencvTest.tlog\opencvTest.lastbuildstate
?????文件?????4164608??2018-05-13?08:24??APAP-Processor-master\Debug\vc141.idb
?????文件????16027648??2018-05-13?08:24??APAP-Processor-master\Debug\vc141.pdb
?????文件?????????722??2018-05-13?08:24??APAP-Processor-master\GridBox.cpp
?????文件?????????208??2018-05-13?08:24??APAP-Processor-master\GridBox.h
?????文件????????1040??2018-05-13?08:24??APAP-Processor-master\Homography.cpp
?????文件?????????182??2018-05-13?08:24??APAP-Processor-master\Homography.h
?????文件????????2059??2018-05-13?08:24??APAP-Processor-master\Main.cpp
............此處省略25個文件信息

評論

共有 條評論

相關資源