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

  • 大小: 83KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-08-06
  • 語言: 其他
  • 標簽:

資源簡介

基于GPU的klt跟蹤算法,現在比較流行的基于光流分析的視頻跟蹤算法

資源截圖

代碼片段和文件信息

/*
Copyright?(c)?2008-2010?UNC-Chapel?Hill?&?ETH?Zurich

This?file?is?part?of?GPU-KLT+FLOW.

GPU-KLT+FLOW?is?free?software:?you?can?redistribute?it?and/or?modify?it?under
the?terms?of?the?GNU?Lesser?General?Public?License?as?published?by?the?Free
Software?Foundation?either?version?3?of?the?License?or?(at?your?option)?any
later?version.

GPU-KLT+FLOW?is?distributed?in?the?hope?that?it?will?be?useful?but?WITHOUT
ANY?WARRANTY;?without?even?the?implied?warranty?of?MERCHANTABILITY?or?FITNESS
FOR?A?PARTICULAR?PURPOSE.??See?the?GNU?Lesser?General?Public?License?for?more
details.

You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public?License?along
with?GPU-KLT+FLOW.?If?not?see?.
*/

#include?“GL/v3d_gpupyramid.h“
#include?“GL/v3d_gpuklt.h“

#include?
#include?

#include?
#include?
#include?

#include?
#include?
#include?

#include?
#include?

using?namespace?std;
using?namespace?V3D_GPU;

//#define?PREFETCH_VIDEO?1

namespace
{

???struct?PointTrack
???{
?????????PointTrack()?:?len(0)?{?}

?????????void?add(float?X?float?Y)
?????????{
????????????pos[len][0]?=?X;
????????????pos[len][1]?=?Y;
????????????++len;
?????????}

?????????void?clear()
?????????{
????????????len?=?0;
?????????}

?????????bool?isValid()?const?{?return?pos[len-1][0]?>=?0;?}

?????????int?len;
?????????float?pos[4096][2];
???};?//?end?struct?PointTrack

???CvCapture?*?capture?=?0;
???int?width?height;

???bool??????trackWithGain?=?false;
???int?const?featuresWidth?=?32;
???int?const?featuresHeight?=?32;
???unsigned?int?const?nFeatures?=?featuresWidth*featuresHeight;
???int?const?nTrackedframes?=?10;
???int?const?nTimedframes?=?400;
???int?const?nLevels?=?4;
???int?const?pointListWidth?=?64;
???int?const?pointListHeight?=?64;

???int?win?scrwidth?scrheight;
???bool?initialized?=?false;

???KLT_SequenceTracker?*?tracker?=?0;
???vector????allframes;
???vector?????????trueGains;

???void
???reshape(int?width?int?height)
???{
??????cout?<
??????scrwidth?=?width;
??????scrheight?=?height;
??????glViewport(0?0?(GLint)?width?(GLint)?height);
??????glMatrixMode(GL_PROJECTION);
??????glLoadIdentity();
??????gluOrtho2D(-10?1010?10?1010);
??????glMatrixMode(GL_MODELVIEW);
??????glLoadIdentity();
???}

???void?done();

???void
???drawscene()
???{
??????static?int?frameNo?=?0;

??????static?int?nDetectedFeatures?=?0;
??????static?IplImage?*?videoframe;
??????static?PointTrack?*?tracks;
??????static?KLT_TrackedFeature?*?features?=?0;

??????if?(!initialized)
??????{
?????????CvSize?sz?=?cvSize(width?height);
?????????videoframe?=?cvCreateImage(sz?8?1);

?????????features?=?new?KLT_TrackedFeature[nFeatures];
?????????tracks?=?new?PointTrack[nFeatures];

?????????glewInit();
?????????Cg_Programbase::initializeCg();

?????????KLT_SequenceTrackerConfig?cfg;
?????????cfg.nIterations?=?10;
?????????cf

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-01-10?17:51??GPU-KLT+FLOW-1.0\
?????目錄???????????0??2008-05-02?14:14??GPU-KLT+FLOW-1.0\Config\
?????文件????????1119??2008-05-02?14:14??GPU-KLT+FLOW-1.0\Config\v3d_macros.cmake
?????目錄???????????0??2010-01-10?17:55??GPU-KLT+FLOW-1.0\base\
?????文件???????29869??2009-10-20?15:51??GPU-KLT+FLOW-1.0\base\v3d_serialization.h
?????文件????????2438??2010-01-10?17:55??GPU-KLT+FLOW-1.0\base\v3d_exception.h
?????文件???????27205??2009-09-21?12:53??GPU-KLT+FLOW-1.0\base\v3d_image.cpp
?????文件????????9163??2010-01-10?17:30??GPU-KLT+FLOW-1.0\base\v3d_image.h
?????文件????????3860??2010-01-10?17:32??GPU-KLT+FLOW-1.0\base\v3d_utilities.h
?????文件????????3951??2009-09-22?09:56??GPU-KLT+FLOW-1.0\base\v3d_timer.h
?????文件????????2962??2010-01-10?17:51??GPU-KLT+FLOW-1.0\README.TXT
?????文件????????1114??2010-01-10?17:29??GPU-KLT+FLOW-1.0\CMakeLists.txt
?????目錄???????????0??2010-01-10?17:37??GPU-KLT+FLOW-1.0\GL\
?????文件???????46158??2009-09-22?09:53??GPU-KLT+FLOW-1.0\GL\v3d_gpubase.cpp
?????文件????????3004??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\v3d_gpuundistort.h
?????文件???????10555??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\v3d_gpuklt.h
?????文件???????19307??2010-01-10?17:37??GPU-KLT+FLOW-1.0\GL\v3d_gpuflow.cpp
?????文件???????29921??2010-01-10?17:14??GPU-KLT+FLOW-1.0\GL\v3d_gpuklt.cpp
?????文件????????3806??2010-01-10?17:36??GPU-KLT+FLOW-1.0\GL\v3d_gpuflow.h
?????文件???????13911??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\v3d_gpubase.h
?????文件????????8243??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\v3d_gpuundistort.cpp
?????目錄???????????0??2010-01-10?17:24??GPU-KLT+FLOW-1.0\GL\Shaders\
?????文件????????4127??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\klt_tracker_with_gain.cg
?????目錄???????????0??2010-01-10?17:24??GPU-KLT+FLOW-1.0\GL\Shaders\OpticalFlow\
?????文件????????1068??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\OpticalFlow\tvl1_flow_relaxed_update_p.cg
?????文件????????2088??2010-01-10?17:19??GPU-KLT+FLOW-1.0\GL\Shaders\OpticalFlow\tvl1_flow_relaxed_update_uv.cg
?????文件????????1047??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\OpticalFlow\tvl1_flow_relaxed_compute_UV.cg
?????文件????????5945??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\pyramid_with_derivative_pass1h.cg
?????文件?????????811??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\klt_detector_nonmax.cg
?????文件?????????904??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\klt_detector_pass1.cg
?????文件?????????577??2009-09-21?12:39??GPU-KLT+FLOW-1.0\GL\Shaders\pyramid_with_derivative_pass2.cg
............此處省略24個文件信息

評論

共有 條評論

相關資源