|
|
|
@ -13,7 +13,7 @@ using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
void ProcessVL(string filePath)
|
|
|
|
void ProcessVL(string filePath)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto stitcher = API_UnderStitch::Create();
|
|
|
|
auto stitcher = API_UnderStitch::Create("F:/cache");
|
|
|
|
stitcher->SetOutput("BT", "google_tiles");
|
|
|
|
stitcher->SetOutput("BT", "google_tiles");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -42,6 +42,8 @@ void ProcessVL(string filePath)
|
|
|
|
std::deque<cv::Mat> MatBuffer;
|
|
|
|
std::deque<cv::Mat> MatBuffer;
|
|
|
|
const int matdelayFrames = 2; // 假设延迟3帧
|
|
|
|
const int matdelayFrames = 2; // 假设延迟3帧
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fseek(file, nVLFrameSize * 80, SEEK_SET);
|
|
|
|
|
|
|
|
|
|
|
|
while (!feof(file))
|
|
|
|
while (!feof(file))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fread(pFrameVL, 1, nVLFrameSize, file);
|
|
|
|
fread(pFrameVL, 1, nVLFrameSize, file);
|
|
|
|
@ -89,9 +91,9 @@ void ProcessVL(string filePath)
|
|
|
|
|
|
|
|
|
|
|
|
cv::cvtColor(bright, bright, cv::COLOR_GRAY2BGR);
|
|
|
|
cv::cvtColor(bright, bright, cv::COLOR_GRAY2BGR);
|
|
|
|
|
|
|
|
|
|
|
|
cv::Mat IMG_show;
|
|
|
|
|
|
|
|
cv::resize(IMG, IMG_show, cv::Size(IMG.cols / 4, IMG.rows / 4));
|
|
|
|
cv::namedWindow("IMG_show", cv::WINDOW_NORMAL);
|
|
|
|
imshow("IMG_show", IMG_show);
|
|
|
|
imshow("IMG_show", IMG);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -123,17 +125,17 @@ void ProcessVL(string filePath)
|
|
|
|
UPanConfig cfg = { 0 };
|
|
|
|
UPanConfig cfg = { 0 };
|
|
|
|
cfg.bOutGoogleTile = 1;
|
|
|
|
cfg.bOutGoogleTile = 1;
|
|
|
|
cfg.bOutFrameTile = 0;
|
|
|
|
cfg.bOutFrameTile = 0;
|
|
|
|
cfg.bUseBA = 1;
|
|
|
|
cfg.bUseBA = 0;
|
|
|
|
stitcher->SetConfig(cfg);
|
|
|
|
stitcher->SetConfig(cfg);
|
|
|
|
|
|
|
|
|
|
|
|
stitcher->SetOutput("baotou","E:/google_tiles");
|
|
|
|
stitcher->SetOutput("baotou","F:/google_tiles");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pan = stitcher->ExportPanAddr();
|
|
|
|
pan = stitcher->ExportPanAddr();
|
|
|
|
|
|
|
|
|
|
|
|
mat_pan = cv::Mat(pan.u32Height, pan.u32Width, CV_8UC4, pan.u64VirAddr[0]);
|
|
|
|
mat_pan = cv::Mat(pan.u32Height, pan.u32Width, CV_8UC4, pan.u64VirAddr[0]);
|
|
|
|
|
|
|
|
|
|
|
|
output.open("E:/output.mp4", VideoWriter::fourcc('M', 'P', '4', 'V'), 25, Size(pan.u32Width / 8, pan.u32Height / 8), true);
|
|
|
|
output.open("output.mp4", VideoWriter::fourcc('M', 'P', '4', 'V'), 50, Size(pan.u32Width / 8, pan.u32Height / 8), true);
|
|
|
|
if (!output.isOpened())
|
|
|
|
if (!output.isOpened())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cout << "打开视频失败" << endl;
|
|
|
|
cout << "打开视频失败" << endl;
|
|
|
|
@ -176,6 +178,8 @@ void ProcessVL(string filePath)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
i = i + 1;
|
|
|
|
i = i + 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//cv::TickMeter tm;
|
|
|
|
//cv::TickMeter tm;
|
|
|
|
@ -200,6 +204,6 @@ void ProcessVL(string filePath)
|
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ProcessVL("D:/S732挂飞1101/20251101_092143724_3.yuv");
|
|
|
|
ProcessVL("F:/包头/20251101/20251101_091550742_2.yuv");
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|