資源簡(jiǎn)介
HOG算法,需要引用庫文件ffmpeg、boost等。

代碼片段和文件信息
#include?“Codec.h“
#include?
namespace?ffpp
{
Codec::Codec(const?AVCodec*?avp):?avp(avp)
{}
Codec::Codec(const?char*?name):?avp(avcodec_find_encoder_by_name(name))
{
????if?(!avp)?throw(std::runtime_error(“Could?not?find?codec“));
}
const?AVCodec*?Codec::get()?const
{
return?avp;
}
boost::tribool?Codec::IsSupportedPixelFormat(enum?PixelFormat?pixelFormat)?const
{
if?(!get()->pix_fmts)?return?boost::logic::indeterminate;
const?enum?PixelFormat?*p;
for?(p?=?get()->pix_fmts;?*p?!=?-1;?++p)
{
if?(*p?==?pixelFormat)?return?true;
}
return?false;
}
enum?PixelFormat?Codec::GetDefaultPixelFormat()?const
{
if?(!get()->pix_fmts)?throw(std::runtime_error(“No?pixel?formats?specified?for?a?codec“));
return?get()->pix_fmts[0];
}
AVRational?Codec::GetSupportedframeRate(const?AVRational&?frame_rate)?const
{
????AVRational?fps(frame_rate);
????while?(get()->id?==?CODEC_ID_MPEG4?&&?fps.num?>?(1<<16)-1)
????{
????????fps.num?/=?2;
????????fps.den?/=?2;
????}
????if?(!get()->supported_framerates)?return?fps;
????
????return?get()->supported_framerates[av_find_nearest_q_idx(fps?get()->supported_framerates)];
}
enum?CodecID?Codec::GetID()?const
{
????return?get()->id;
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????11871??2013-10-27?17:28??3D_HOG_Mine\3D_HOG_Mine.vcxproj
?????文件???????5377??2013-10-27?17:28??3D_HOG_Mine\3D_HOG_Mine.vcxproj.filters
?????文件????????164??2013-08-25?20:44??3D_HOG_Mine\3D_HOG_Mine.vcxproj.user
?????文件???12584960??2011-06-24?02:22??3D_HOG_Mine\avcodec-53.dll
?????文件??????56832??2011-06-24?02:22??3D_HOG_Mine\avdevice-53.dll
?????文件?????837632??2011-06-24?02:22??3D_HOG_Mine\avfilter-2.dll
?????文件????1174016??2011-06-24?02:22??3D_HOG_Mine\avformat-53.dll
?????文件?????133120??2011-06-24?02:22??3D_HOG_Mine\avutil-51.dll
?????文件???????3683??2013-09-05?20:56??3D_HOG_Mine\Box.h
?????文件??????12537??2013-09-05?20:56??3D_HOG_Mine\Box.hpp
?????文件????????341??2013-08-26?19:03??3D_HOG_Mine\Box3D.h
?????文件???????1204??2010-08-19?19:13??3D_HOG_Mine\Codec.cpp
?????文件????????581??2013-08-31?19:43??3D_HOG_Mine\Codec.h
?????文件???????2966??2013-08-31?19:37??3D_HOG_Mine\CodecContext.cpp
?????文件????????995??2013-08-31?19:22??3D_HOG_Mine\CodecContext.h
?????文件??????24299??2013-10-13?19:44??3D_HOG_Mine\extractFeatures.cpp
?????文件??????32933??2013-09-07?11:48??3D_HOG_Mine\extractFeatures1.cpp
?????文件??????15050??2013-08-27?21:58??3D_HOG_Mine\FastHog3DComputer.cpp
?????文件???????5756??2013-08-27?21:58??3D_HOG_Mine\FastHog3DComputer.h
?????文件??????12208??2013-10-13?20:44??3D_HOG_Mine\FastVideoGradientComputer.cpp
?????文件???????2676??2013-09-05?19:46??3D_HOG_Mine\FastVideoGradientComputer.h
?????文件???????4139??2013-09-01?19:21??3D_HOG_Mine\FlipContext.cpp
?????文件????????510??2009-11-04?04:50??3D_HOG_Mine\FlipContext.h
?????文件???????1188??2013-08-31?19:37??3D_HOG_Mine\FormatContext.cpp
?????文件????????579??2013-08-31?17:08??3D_HOG_Mine\FormatContext.h
?????文件????????792??2013-09-02?09:53??3D_HOG_Mine\fr
?????文件????????509??2013-09-02?09:53??3D_HOG_Mine\fr
?????文件??????11428??2013-09-05?20:56??3D_HOG_Mine\functions.cpp
?????文件???????1737??2013-09-05?20:56??3D_HOG_Mine\functions.h
?????文件???????5103??2013-08-31?18:40??3D_HOG_Mine\functions.hpp
............此處省略49個(gè)文件信息
- 上一篇:創(chuàng)宇客戶端
- 下一篇:華南理工大學(xué)人工智能期末考試卷
評(píng)論
共有 條評(píng)論