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

  • 大小: 23.79MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-08-07
  • 語言: 其他
  • 標簽:

資源簡介

利用OpenCV3.0,將多張圖片合成一個視頻。代碼加可執行程序加樣例圖片。
圖片合成視頻OpenCV代碼加執行程序加樣例圖片。

資源截圖

代碼片段和文件信息

#include???
#include???
#include???
#include?
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
using?namespace?cv;??


string?GetFilePosfix(const?char*?path);
void?demoTest();
vector?getImagePathes(string?folderPath);
bool?IsSupportPos(const?std::string&?posfixconst?std::string&?support);
wstring?s2ws(const?std::string&?s);
void?dfsFolder(string&?folderPathvector&?vecFilePathint&?errFileCount);

struct?Author?
{
string?name;
string?studentID;
};
struct?Paramsj
{
string?imageFolder;
string?videoName;
float?showTime;

};
Paramsj?getParams();
Author?inputAuthorInfo();

int?main(int?argc?char?*argv[])
{
//get?author?info
Author?au;
Paramsj?para;
if?(argc>1)
{
au.name=“Tom?and?Jerry“;
au.studentID?=?“123456789“;
para.imageFolder=argv[1];
para.videoName?=?argv[3];
para.showTime?=?atof(argv[2]);

}else{
au?=?inputAuthorInfo();
para?=?getParams();
}


vector?imagePathes;
//get?parameters;
//string?imageFolder?=?“D:\\StudyFile\\2014\\CV\\test1\\Debug“;
//string?videoName?=?“vi.avi“;
//float?showTime=1.0;
float?fps;
fps?=?1/para.showTime;

//?init?video?writer
Size?videoSize?=?Size(1024?1024);
//VideoWriter::fourcc(‘P‘‘I‘‘M‘‘1‘)
//VideoWriter?writer?=?VideoWriter(videoName?VideoWriter::fourcc(‘P‘‘I‘‘M‘‘4‘)?fps?videoSize);
//VideoWriter?writer?=?VideoWriter(videoName?-1?fps?videoSize);
VideoWriter?writer?=?VideoWriter(para.videoName?VideoWriter::fourcc(‘M‘‘J‘‘P‘‘G‘)?fps?videoSize);
//?get?image?names;
imagePathes?=?getImagePathes(para.imageFolder);

Mat?authorInfo?=?Mat::eye(1024?1024?CV_8UC3);
Point?firstP(200256);
Point?secondP(256512);
//“AuthroName:?“+
//“StudentID:?“+?
string?name?=?“AuthorName:?“+au.name;
string?id?=?“StudentID:?“+au.studentID;
putText(authorInfo?name?firstP?FONT_ITALIC?2?Scalar(255255255)?5);
putText(authorInfo?id?secondP?FONT_ITALIC?2?Scalar(255255255)?5);
Mat?blank;
blank?=?Mat::eye(1024?1024?CV_8UC3);
Mat?image;
Mat?im1;
//blank.create(10241024CV_8UC(15));
writer.write(blank);
writer.write(authorInfo);
writer.write(authorInfo);

vector::iterator?it;
for?(it=imagePathes.begin();it!=imagePathes.end();it++)
{
image?=?imread(*it);
resize(image?im1?videoSize);
writer.write(im1);
}
writer.write(blank);
writer.release();
//system(“pause“);
return?0;

}

Author?inputAuthorInfo()
{
Author?au;
string?name;
cout?< getline(cinname);
if?(name.length()>3)
{
au.name?=?name;
}else{
au.name?=?“Tom?and?Jerry“;
}
au.studentID?=?“123456789“;
return?au;
}

Paramsj?getParams()
{
string?inString;
Paramsj?para;

para.showTime?=?1.0;
c

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-04-29?22:08??作業1_11321051_宋駿\
?????文件???????47021??2008-01-18?04:30??作業1_11321051_宋駿\2008000010.jpg
?????文件??????114777??2008-01-17?11:13??作業1_11321051_宋駿\2008_000001.jpg
?????文件???????85537??2008-01-18?05:39??作業1_11321051_宋駿\2008_000004.jpg
?????文件??????107807??2008-01-19?12:32??作業1_11321051_宋駿\2008_000005.jpg
?????文件???????79397??2008-01-18?03:47??作業1_11321051_宋駿\2008_000006.jpg
?????文件???????52538??2008-01-17?16:22??作業1_11321051_宋駿\2008_000011.jpg
?????文件???????76708??2008-01-17?13:47??作業1_11321051_宋駿\2008_000012.jpg
?????文件??????170910??2008-01-18?01:11??作業1_11321051_宋駿\2008_000013.jpg
?????文件??????140054??2008-01-17?13:43??作業1_11321051_宋駿\2008_000014.jpg
?????文件????????6168??2015-04-29?22:09??作業1_11321051_宋駿\main.cpp
?????文件??????743248??2010-03-18?09:15??作業1_11321051_宋駿\msvcp100d.dll
?????文件?????1498960??2010-03-18?09:15??作業1_11321051_宋駿\msvcr100d.dll
?????文件????10535057??2013-12-02?08:12??作業1_11321051_宋駿\opencv_ffmpeg300.dll
?????文件????27294208??2014-11-08?01:20??作業1_11321051_宋駿\opencv_world300.dll
?????文件????38912512??2014-11-08?01:26??作業1_11321051_宋駿\opencv_world300d.dll
?????文件???????30720??2014-12-26?12:48??作業1_11321051_宋駿\run.exe

評論

共有 條評論

相關資源