本文整理汇总了C++中FloatImage::dim方法的典型用法代码示例。如果您正苦于以下问题:C++ FloatImage::dim方法的具体用法?C++ FloatImage::dim怎么用?C++ FloatImage::dim使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FloatImage
的用法示例。
在下文中一共展示了FloatImage::dim方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
bool SemiglobalLabMatcher::update()
{
WriteGuard<ReadWritePipe<FloatImage, FloatImage> > wguard(m_wpipe);
FloatImage leftImg, rightImg;
if ( m_lrpipe->read(&leftImg) && m_rrpipe->read(&rightImg) )
{
Dim dsiDim(leftImg.dim().width(), leftImg.dim().height(),
m_maxDisparity);
float *leftImg_d = leftImg.devMem();
float *rightImg_d = rightImg.devMem();
FloatImage dispImage = FloatImage::CreateDev(
Dim(dsiDim.width(), dsiDim.height()));
cudaPitchedPtr aggregDSI = m_aggregDSI.mem(dsiDim);
SGPath *paths = m_sgPaths.getDescDev(dispImage.dim());
SemiGlobalLabDevRun(dsiDim, paths, m_sgPaths.pathCount(),
leftImg_d, rightImg_d,
aggregDSI, dispImage.devMem(), m_zeroAggregDSI);
m_zeroAggregDSI = false;
dispImage.cpuMem();
wguard.write(dispImage);
}
return wguard.wasWrite();
}
示例2: updateImpl
TDV_NAMESPACE_BEGIN
FloatImage MedianFilterCPU::updateImpl(FloatImage input)
{
const Dim dim = input.dim();
CvMat *image = input.cpuMem();
FloatImage output = FloatImage::CreateCPU(dim);
CvMat *img_output = output.cpuMem();
cvSmooth(image, img_output, CV_GAUSSIAN, 5);
return output;
}