資源簡介
實現三個功能:Video2Img:視頻轉圖片序列;Img2Video:序列圖片轉視頻;Img2VideoRect:圖片轉視頻,并指定區域。
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
vector?split(const?string&?str?const?string&?delim);
int?Video2Img(const?std::string?videoName?const?std::string?imgPath?int?stepframeNum);
int?Img2Video(const?std::string?imgPath?const?std::string?videoName);
int?Img2VideoRect(const?std::string?imgPath?const?std::string?filePath?const?std::string?videoName);
int?main(int?argc?char?*argv[])
{
/*int?model?=?stoi(argv[1]);
if(model?==?0)
{
string?videoName?=?argv[2];
string?imgPath?=?argv[3];
int?stepframeNum?=?stoi(argv[4]);
Video2Img(videoName?imgPath?stepframeNum);
}
if(model?==?1)
{
string?imgPath?=?argv[2];
string?filePath?=?argv
評論
共有 條評論