Python API

Vision

The Python-visible image, codec, capture, media, and Vulkan Video surface.

Generated from Source/Python55 functions22 classes13 enums
This inventory is generated from symbols registered by OA's nanobind source and public Python facade. It deliberately excludes unbound C++ internals. Signatures show the Python keyword names declared by each binding; follow the source link for ownership, capability, and execution details.

oa.vision

Functions

AdaptiveThresholdGaussian(image, kernel_size, c, max_value, sigma, border)
Source
AdaptiveThresholdMean(image, kernel_size, c, max_value, border)
Source
AlphaBlend(a, b, alpha)
Source
AverageBlur(image, kernel_width, kernel_height, border)
Source
BilateralFilter(image, kernel_size, sigma_color, sigma_space, border)
Source
BrightnessContrast(image, brightness, contrast)
Source
CenterCrop(image, width, height)
Source
ChannelReorder(image, channel0, channel1, channel2, channel3)
Source
Clamp(image, low, high)
Source
ColorTwist(image, transform)
Source
Composite(a, b, mask)
Source
ConvertColor(image, destination)
Source
Convolve2d(image, kernel, border, border_value)
Source
Crop(image, x, y, width, height)
Source
Dilate(image, kernel_width, kernel_height, border, border_value)
Source
Erase(image, x, y, width, height, value)
Source
Erode(image, kernel_width, kernel_height, border, border_value)
Source
Flip(image, horizontal, vertical)
Source
GammaContrast(image, gamma, gain)
Source
GaussianBlur(image, sigma, kernel_size)
Source
GaussianNoise(image, mean, stddev, seed)
Source
Grayscale(image)
Source
InRange(image, low, high, true_value)
Source
Invert(image, max_value)
Source
Laplacian(image, border)
Source
MedianBlur(image, kernel_size, border)
Source
MorphologyBlackHat(image, kernel_width, kernel_height, border, border_value)
Source
MorphologyClose(image, kernel_width, kernel_height, border, border_value)
Source
MorphologyGradient(image, kernel_width, kernel_height, border, border_value)
Source
MorphologyOpen(image, kernel_width, kernel_height, border, border_value)
Source
MorphologyTopHat(image, kernel_width, kernel_height, border, border_value)
Source
Normalize(image, params)
Source
OaImageFormatChannels(format)
Source
Pad(image, left, right, top, bottom, border, border_value)
Source
Posterize(image, levels, low, high)
Source
QueryDecodeCapabilities(codec)
Source
QueryEncodeCapabilities(codec)
Source
Remap(image, map, interpolation, border, border_value)
Source
Resize(image, width, height, interpolation)Resize(image, width, height)
Source
ResizeNormalize(image, width, height, params)
Source
Rotate(image, degrees)
Source
SaltPepperNoise(image, probability, salt_value, pepper_value, seed)
Source
Scharr(image, dx, dy, border)
Source
SeparableConvolve2d(image, kernel_x, kernel_y, border, border_value)
Source
Sharpen(image, amount, border)
Source
Sobel(image, dx, dy, border)
Source
Solarize(image, threshold, max_value)
Source
ThresholdBinary(image, threshold, max_value)
Source
ThresholdBinaryInv(image, threshold, max_value)
Source
ThresholdToZero(image, threshold)
Source
ThresholdToZeroInv(image, threshold)
Source
ThresholdTruncate(image, threshold)
Source
UnsharpMask(image, sigma, amount, kernel_size)
Source
WarpAffine(image, transform, width, height, interpolation, border, border_value)
Source
WarpPerspective(image, transform, width, height, interpolation, border, border_value)
Source

Classes

OaCameraCapture12 members
__init__(...)
constructor
Init(config)
method
Poll(...)
method
Release(frame)
method
Destroy(...)
method
Width(...)
method
Height(...)
method
Fps(...)
method
IsStreaming(...)
method
UsesDmaBuf(...)
method
FormatGeneration(...)
method
ReconnectCount(...)
method
Source
OaCameraCaptureConfig10 members
__init__(...)
constructor
DeviceIndex(...)
rw
Width(...)
rw
Height(...)
rw
Fps(...)
rw
RingFrames(...)
rw
DevicePath(...)
prop_rw
PreferDmaBuf(...)
rw
ReconnectAttempts(...)
rw
ReconnectBackoffMs(...)
rw
Source
OaContainerInfo10 members
__init__(...)
constructor
Kind(...)
rw
Codec(...)
rw
Width(...)
rw
Height(...)
rw
FrameRate(...)
rw
Duration(...)
rw
TimebaseNum(...)
rw
TimebaseDen(...)
rw
TrackCount(...)
rw
Source
OaImage11 members
__init__(data, layout, format)
method
AsMatrix(...)
method
Width(...)
method
Height(...)
method
Channels(...)
method
BatchSize(...)
method
Layout(...)
method
Format(...)
method
Dtype(...)
method
IsEmpty(...)
method
Validate(...)
method
Source
OaImageBatch11 members
__init__(data, layout, format)
method
AsMatrix(...)
method
BatchSize(...)
method
Width(...)
method
Height(...)
method
Channels(...)
method
Layout(...)
method
Format(...)
method
Dtype(...)
method
IsEmpty(...)
method
Validate(...)
method
Source
OaJpegDecoder4 members
Decode(data)
static
DecodeFile(path)
static
DecodeToGpu(data, width, height, normalize_imagenet)
static
DecodeFileToGpu(path, width, height, normalize_imagenet)
static
Source
OaJpegDecodeResult4 members
Pixels(...)
prop_ro
Width(...)
ro
Height(...)
ro
Channels(...)
ro
Source
OaNormalizationParams3 members
__init__(...)
constructor
Mean(...)

Mean must contain exactly 3 values

prop_rw
Std(...)

Std must contain exactly 3 values

prop_rw
Source
OaScreenCapture8 members
IsSupported(...)
static
Open(config)
static
Poll(...)
method
Release(frame)
method
Destroy(...)
method
IsStreaming(...)
method
Width(...)
method
Height(...)
method
Source
OaScreenCaptureConfig7 members
__init__(...)
constructor
Target(...)
rw
Cursor(...)
rw
PreferredWidth(...)
rw
PreferredHeight(...)
rw
PreferredFps(...)
rw
RingFrames(...)
rw
Source
OaVideo27 members
Open(config)
static
Next(...)
method
Reset(...)
method
Play(...)
method
Pause(...)
method
TogglePlay(...)
method
IsPlaying(...)
method
IsDone(...)
method
IsEos(...)
method
HasAudio(...)
method
StepForward(...)
method
StepBackward(...)
method
StepFrames(count)
method
Seek(timestamp)
method
Flush(...)
method
Tick(delta_ms)
method
CurrentFrame(...)
method
CurrentFrameToMatrix(normalize_imagenet)
method
CurrentFrameToImage(normalize_imagenet)
method
ReadbackCurrentRgba(...)
method
Index(...)
method
Width(...)
method
Height(...)
method
FrameRate(...)
method
FrameCount(...)
method
FrameIntervalMs(...)
method
Destroy(...)
method
Source
OaVideoConfig12 members
__init__(...)
constructor
Uri(...)
prop_rw
Path(...)
prop_rw
MaxDpbSlots(...)
rw
Loop(...)
rw
PreferHardwareYCbCr(...)
rw
FrameRateOverride(...)
rw
StartPlaying(...)
rw
Audio(...)
rw
StreamOptions(...)
rw
ReorderDepth(...)
rw
Filter(...)
rw
Source
OaVideoDecodeCapabilities10 members
Supported(...)
ro
SupportsDpbAndOutputCoincide(...)
ro
SupportsDpbAndOutputDistinct(...)
ro
SupportsNv12Dpb(...)
ro
MaxWidth(...)
ro
MaxHeight(...)
ro
MinWidth(...)
ro
MinHeight(...)
ro
MaxDpbSlots(...)
ro
MaxActiveReferencePictures(...)
ro
Source
OaVideoEncodeCapabilities13 members
Supported(...)
ro
MaxWidth(...)
ro
MaxHeight(...)
ro
MinWidth(...)
ro
MinHeight(...)
ro
MaxDpbSlots(...)
ro
MaxActiveReferencePictures(...)
ro
MaxBitrate(...)
ro
MaxQualityLevels(...)
ro
MaxH264SliceCount(...)
ro
MaxH265SliceSegmentCount(...)
ro
MinH265Qp(...)
ro
MaxH265Qp(...)
ro
Source
OaVideoEncodeProfile14 members
__init__(...)
constructor
Codec(...)
rw
Width(...)
rw
Height(...)
rw
RateControl(...)
rw
Bitrate(...)
rw
MaxBitrate(...)
rw
ConstantQp(...)
rw
FrameRate(...)
rw
GopSize(...)
rw
MaxBFrames(...)
rw
MaxDpbSlots(...)
rw
QualityLevel(...)
rw
AsyncDepth(...)
rw
Source
OaVideoFrame11 members
__init__(...)
constructor
Resource(...)
ro
Width(...)
ro
Height(...)
ro
PresentationTimestamp(...)
ro
Duration(...)
ro
IsRgb(...)
ro
ColorSpace(...)
ro
FullRange(...)
ro
ArrayLayer(...)
ro
Shown(...)
ro
Source
OaVideoPacket5 members
Data(...)
prop_ro
PresentationTimestamp(...)
ro
DecodeTimestamp(...)
ro
IsKeyframe(...)
ro
TrackIndex(...)
ro
Source
OaVideoRecorder7 members
Create(config)
static
Write(frame)
method
Finalize(...)
method
Destroy(...)
method
IsOpen(...)
method
FrameCount(...)
method
Config(...)
method
Source
OaVideoRecorderConfig6 members
__init__(...)
constructor
OutputPath(...)
prop_rw
Encode(...)
rw
ColorSpace(...)
rw
FullRange(...)
rw
AudioEnabled(...)
rw
Source
OaVideoStream11 members
Open(uri, options)
static
Probe(path)
static
ReadNextPacket(...)
method
Seek(timestamp)
method
Info(...)
method
Stats(...)
method
IsEos(...)
method
IsLive(...)
method
IsSeekable(...)
method
FormatGeneration(...)
method
Destroy(...)
method
Source
OaVideoStreamOptions9 members
__init__(...)
constructor
Reconnect(...)
rw
MaxReconnectAttempts(...)
rw
ReconnectBackoffMs(...)
rw
ReadTimeoutMs(...)
rw
JitterBufferMs(...)
rw
ReorderQueuePackets(...)
rw
MaxTimestampDiscontinuityMs(...)
rw
RtspTransport(...)
prop_rw
Source
OaVideoStreamStats3 members
ReconnectCount(...)
ro
TimestampDiscontinuities(...)
ro
FormatGeneration(...)
ro
Source

Enums

OaBorderModeSource

Constant · Replicate · Reflect · Reflect101 · Wrap

OaContainerKindSource

Unknown · Mp4 · WebM · MpegTs · Matroska

OaFilterSource

Nearest · Linear

OaImageFormatSource

Gray · GrayAlpha · Rgb · Rgba · Bgr · Bgra

OaImageLayoutSource

Nchw · Nhwc · Chw · Hwc · Hw

OaInterpolationModeSource

Nearest · Bilinear · Bicubic

OaPixelFormatSource

NV12 · RGB8 · RGBA8 · BF16 · F32

OaScreenCaptureCursorSource

Hidden · Embedded

OaScreenCaptureTargetSource

MonitorOrWindow · Monitor · Window

OaVideoCodecSource

H264 · H265 · AV1 · VP9

OaVideoFrameResourceSource

Image · Buffer

OaVideoRateControlSource

ConstantQp · Cbr · Vbr

OaYCbCrModelSource

Auto · BT709 · BT2020