OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::ImageCollection 类参考

用于按需读取多页图像。更多...

#include <opencv2/imgcodecs.hpp>

cv::ImageCollection 的协作图

结构体  迭代器
 

公共成员函数

 ImageCollection ()
 
 ImageCollection (const String &filename, int flags)
 
const Matat (int index)
 
iterator begin ()
 
iterator end ()
 
Ptr< Impl > getImpl ()
 
void init (const String &img, int flags)
 
const Matoperator[] (int index)
 
void releaseCache (int index)
 
size_t size () const
 

保护属性

Ptr< Impl > pImpl
 

详细描述

用于按需读取多页图像。

ImageCollection 类提供了迭代器 API 来按需读取多页图像。创建图像集合的迭代器并迭代集合。使用 operator* 解码必要的页面。

如果集合按顺序递增,则页面解码的性能为 O(1)。如果用户想要访问随机页面,则时间复杂度为 O(n),因为必须每次重新初始化集合才能转到正确的页面。但是,在此过程中不会解码中间页,因此通常速度非常快。这是必需的,因为多页编解码器不支持向后移动。解码一页后,它会存储在集合缓存中。因此,尝试从已解码的页面获取 Mat 对象为 O(1)。如果需要内存,可以使用 .releaseCache() 方法来释放缓存的索引。如果所有页面都解码到内存中,则空间复杂度为 O(n)。用户可以按需解码和释放图像。

构造函数 & 析构函数文档

◆ ImageCollection() [1/2]

cv::ImageCollection::ImageCollection ( )

◆ ImageCollection() [2/2]

cv::ImageCollection::ImageCollection ( const String & filename,
int flags )

成员函数文档

◆ at()

const Mat & cv::ImageCollection::at ( int index)

◆ begin()

iterator cv::ImageCollection::begin ( )

◆ end()

iterator cv::ImageCollection::end ( )

◆ getImpl()

Ptr< Impl > cv::ImageCollection::getImpl ( )

◆ init()

void cv::ImageCollection::init ( const String & img,
int flags )

◆ operator[]()

const Mat & cv::ImageCollection::operator[] ( int index)

◆ releaseCache()

void cv::ImageCollection::releaseCache ( int index)

◆ size()

size_t cv::ImageCollection::size ( ) const

成员数据文档

◆ pImpl

Ptr<Impl> cv::ImageCollection::pImpl
保护

此类文档由以下文件生成