Class FrameReader
- java.lang.Object
-
- com.azure.android.ai.vision.common.FrameReader
-
- All Implemented Interfaces:
AutoCloseable
public final class FrameReader extends Object implements AutoCloseable
FrameReader class Represents the ability to read image frame data for input Vision AI scenarios. Note: close() must be called in order to release underlying resources held by the object.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Explicitly frees any external resource attached to the objectstatic FrameReader
fromResult(SafeHandle resultHandle)
Creates FrameReader from the resultstatic FrameReader
fromVisionSource(VisionSource source)
Creates FrameReader from vision sourceFrameFormat
getFrameFormat()
Gets the frame format associated to frame readerFrame
readFrame(long position)
Reads a single frame of image data from the underlying frame.
-
-
-
Method Detail
-
fromVisionSource
public static FrameReader fromVisionSource(VisionSource source)
Creates FrameReader from vision source- Parameters:
source
- The vision source- Returns:
- A FrameReader instance
-
fromResult
public static FrameReader fromResult(SafeHandle resultHandle)
Creates FrameReader from the result- Parameters:
resultHandle
- SafeHandle to the result- Returns:
- A FrameReader instance
-
readFrame
public Frame readFrame(long position)
Reads a single frame of image data from the underlying frame.- Parameters:
position
- The position of the frame in frames- Returns:
- A Frame instance
-
getFrameFormat
public FrameFormat getFrameFormat()
Gets the frame format associated to frame reader- Returns:
- A FrameFormat instance
-
close
public void close()
Explicitly frees any external resource attached to the object- Specified by:
close
in interfaceAutoCloseable
-
-