本文整理汇总了C++中Mask2DCPtr::ShrinkVertically方法的典型用法代码示例。如果您正苦于以下问题:C++ Mask2DCPtr::ShrinkVertically方法的具体用法?C++ Mask2DCPtr::ShrinkVertically怎么用?C++ Mask2DCPtr::ShrinkVertically使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mask2DCPtr
的用法示例。
在下文中一共展示了Mask2DCPtr::ShrinkVertically方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecreaseFrequency
void ChangeResolutionAction::DecreaseFrequency(TimeFrequencyData &timeFrequencyData)
{
size_t imageCount = timeFrequencyData.ImageCount();
for(size_t i=0;i<imageCount;++i)
{
Image2DCPtr image = timeFrequencyData.GetImage(i);
Image2DPtr newImage = image->ShrinkVertically(_frequencyDecreaseFactor);
timeFrequencyData.SetImage(i, newImage);
}
size_t maskCount = timeFrequencyData.MaskCount();
for(size_t i=0;i<maskCount;++i)
{
Mask2DCPtr mask = timeFrequencyData.GetMask(i);
Mask2DPtr newMask = mask->ShrinkVertically(_frequencyDecreaseFactor);
timeFrequencyData.SetMask(i, newMask);
}
}
示例2: DecreaseFrequency
void ChangeResolutionAction::DecreaseFrequency(TimeFrequencyData& timeFrequencyData)
{
if(_useMaskInAveraging)
{
DecreaseFrequencyWithMask(timeFrequencyData);
}
else {
size_t imageCount = timeFrequencyData.ImageCount();
for(size_t i=0;i<imageCount;++i)
{
Image2DCPtr image = timeFrequencyData.GetImage(i);
Image2DPtr newImage(new Image2D(image->ShrinkVertically(_frequencyDecreaseFactor)));
timeFrequencyData.SetImage(i, std::move(newImage));
}
size_t maskCount = timeFrequencyData.MaskCount();
for(size_t i=0;i<maskCount;++i)
{
Mask2DCPtr mask = timeFrequencyData.GetMask(i);
Mask2DPtr newMask(new Mask2D(mask->ShrinkVertically(_frequencyDecreaseFactor)));
timeFrequencyData.SetMask(i, std::move(newMask));
}
}
}