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
保護

此類文件由以下檔案生成