@Namespace(value="cv") @NoOffset public static class opencv_imgcodecs.ImageCollection extends Pointer
The ImageCollection class provides iterator API to read multi page images on demand. Create iterator to the collection of the images and iterate over the collection. Decode the necessary page with operator*.
The performance of page decoding is O(1) if collection is increment sequentially. If the user wants to access random page, then the time Complexity is O(n) because the collection has to be reinitialized every time in order to go to the correct page. However, the intermediate pages are not decoded during the process, so typically it's quite fast. This is required because multipage codecs does not support going backwards. After decoding the one page, it is stored inside the collection cache. Hence, trying to get Mat object from already decoded page is O(1). If you need memory, you can use .releaseCache() method to release cached index. The space complexity is O(n) if all pages are decoded into memory. The user is able to decode and release images on demand.
Modifier and Type | Class and Description |
---|---|
static class |
opencv_imgcodecs.ImageCollection.Impl |
static class |
opencv_imgcodecs.ImageCollection.iterator |
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ImageCollection() |
ImageCollection(BytePointer filename,
int flags) |
ImageCollection(long size)
Native array allocator.
|
ImageCollection(Pointer p)
Pointer cast constructor.
|
ImageCollection(String filename,
int flags) |
Modifier and Type | Method and Description |
---|---|
Mat |
at(int index) |
opencv_imgcodecs.ImageCollection.iterator |
begin() |
opencv_imgcodecs.ImageCollection.iterator |
end() |
Mat |
get(int index) |
opencv_imgcodecs.ImageCollection.Impl |
getImpl() |
opencv_imgcodecs.ImageCollection |
getPointer(long i) |
void |
init(BytePointer img,
int flags) |
void |
init(String img,
int flags) |
opencv_imgcodecs.ImageCollection |
position(long position) |
void |
releaseCache(int index) |
long |
size() |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public ImageCollection(Pointer p)
Pointer(Pointer)
.public ImageCollection(long size)
Pointer.position(long)
.public ImageCollection()
public ImageCollection(@opencv_core.Str BytePointer filename, int flags)
public ImageCollection(@opencv_core.Str String filename, int flags)
public opencv_imgcodecs.ImageCollection position(long position)
public opencv_imgcodecs.ImageCollection getPointer(long i)
getPointer
in class Pointer
public void init(@opencv_core.Str BytePointer img, int flags)
public void init(@opencv_core.Str String img, int flags)
public void releaseCache(int index)
@ByVal public opencv_imgcodecs.ImageCollection.iterator begin()
@ByVal public opencv_imgcodecs.ImageCollection.iterator end()
@opencv_core.Ptr public opencv_imgcodecs.ImageCollection.Impl getImpl()
Copyright © 2024. All rights reserved.