本文整理汇总了C++中Video::copy方法的典型用法代码示例。如果您正苦于以下问题:C++ Video::copy方法的具体用法?C++ Video::copy怎么用?C++ Video::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: warpedB
void STWarp<T>::computePartialDerivatives( const WarpingField<T> &warpField,
Video<T> &Bx,
Video<T> &By,
Video<T> &Bt,
Video<T> &C) {
VideoProcessing::dx(*videoB,Bx,true);
VideoProcessing::dy(*videoB,By,true);
VideoProcessing::dt(*videoB,Bt,true);
Video<stwarp_video_t> warpedB(videoA->size());
C.copy(*videoA);
VideoProcessing::backwardWarp(*videoB,warpField,warpedB);
C.subtract(warpedB);
// TODO: out of bounds set to 0
Video<T> temp(videoA->size());
VideoProcessing::backwardWarp(Bx,warpField,temp);
Bx.copy(temp);
temp.reset(0);
VideoProcessing::backwardWarp(By,warpField,temp);
By.copy(temp);
temp.reset(0);
if( !params.bypassTimeWarp ){
VideoProcessing::backwardWarp(Bt,warpField,temp);
}
Bt.copy(temp);
}
示例2: printf
void STWarp<T>::buildPyramid(vector<vector<int> > pyrSizes,
vector<Video<stwarp_video_t>*> &pyramidA,
vector<Video<stwarp_video_t>*> &pyramidB
) const{
int n = pyrSizes.size();
if(params.verbosity > 0) {
printf("+ Building ST-pyramids with %d levels...",n);
}
pyramidA[0] = videoA;
pyramidB[0] = videoB;
Video<stwarp_video_t> copy;
for (int i = 1; i < n; ++i) {
pyramidA[i] =
new Video<stwarp_video_t>(pyrSizes[i][0],
pyrSizes[i][1],pyrSizes[i][2],dimensions[3]);
pyramidB[i] =
new Video<stwarp_video_t>(pyrSizes[i][0],
pyrSizes[i][1],pyrSizes[i][2],dimensions[3]);
// Lowpass and downsample
copy.copy(*pyramidA[i-1]);
VideoProcessing::resize(copy,pyramidA[i]);
copy.copy(*pyramidB[i-1]);
VideoProcessing::resize(copy,pyramidB[i]);
}
if(params.verbosity >0) {
printf("done.\n");
}
}