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)AdaptiveThresholdMean(image, kernel_size, c, max_value, border)AlphaBlend(a, b, alpha)AverageBlur(image, kernel_width, kernel_height, border)BilateralFilter(image, kernel_size, sigma_color, sigma_space, border)BrightnessContrast(image, brightness, contrast)CenterCrop(image, width, height)ChannelReorder(image, channel0, channel1, channel2, channel3)Clamp(image, low, high)ColorTwist(image, transform)Composite(a, b, mask)ConvertColor(image, destination)Convolve2d(image, kernel, border, border_value)Crop(image, x, y, width, height)Dilate(image, kernel_width, kernel_height, border, border_value)Erase(image, x, y, width, height, value)Erode(image, kernel_width, kernel_height, border, border_value)Flip(image, horizontal, vertical)GammaContrast(image, gamma, gain)GaussianBlur(image, sigma, kernel_size)GaussianNoise(image, mean, stddev, seed)Grayscale(image)InRange(image, low, high, true_value)Invert(image, max_value)Laplacian(image, border)MedianBlur(image, kernel_size, border)MorphologyBlackHat(image, kernel_width, kernel_height, border, border_value)MorphologyClose(image, kernel_width, kernel_height, border, border_value)MorphologyGradient(image, kernel_width, kernel_height, border, border_value)MorphologyOpen(image, kernel_width, kernel_height, border, border_value)MorphologyTopHat(image, kernel_width, kernel_height, border, border_value)Normalize(image, params)OaImageFormatChannels(format)Pad(image, left, right, top, bottom, border, border_value)Posterize(image, levels, low, high)QueryDecodeCapabilities(codec)QueryEncodeCapabilities(codec)Remap(image, map, interpolation, border, border_value)Resize(image, width, height, interpolation)Resize(image, width, height)ResizeNormalize(image, width, height, params)Rotate(image, degrees)SaltPepperNoise(image, probability, salt_value, pepper_value, seed)Scharr(image, dx, dy, border)SeparableConvolve2d(image, kernel_x, kernel_y, border, border_value)Sharpen(image, amount, border)Sobel(image, dx, dy, border)Solarize(image, threshold, max_value)ThresholdBinary(image, threshold, max_value)ThresholdBinaryInv(image, threshold, max_value)ThresholdToZero(image, threshold)ThresholdToZeroInv(image, threshold)ThresholdTruncate(image, threshold)UnsharpMask(image, sigma, amount, kernel_size)WarpAffine(image, transform, width, height, interpolation, border, border_value)WarpPerspective(image, transform, width, height, interpolation, border, border_value)Classes
OaCameraCapture12 members
__init__(...)Init(config)Poll(...)Release(frame)Destroy(...)Width(...)Height(...)Fps(...)IsStreaming(...)UsesDmaBuf(...)FormatGeneration(...)ReconnectCount(...)OaCameraCaptureConfig10 members
__init__(...)DeviceIndex(...)Width(...)Height(...)Fps(...)RingFrames(...)DevicePath(...)PreferDmaBuf(...)ReconnectAttempts(...)ReconnectBackoffMs(...)OaContainerInfo10 members
__init__(...)Kind(...)Codec(...)Width(...)Height(...)FrameRate(...)Duration(...)TimebaseNum(...)TimebaseDen(...)TrackCount(...)OaImage11 members
__init__(data, layout, format)AsMatrix(...)Width(...)Height(...)Channels(...)BatchSize(...)Layout(...)Format(...)Dtype(...)IsEmpty(...)Validate(...)OaImageBatch11 members
__init__(data, layout, format)AsMatrix(...)BatchSize(...)Width(...)Height(...)Channels(...)Layout(...)Format(...)Dtype(...)IsEmpty(...)Validate(...)OaJpegDecoder4 members
Decode(data)DecodeFile(path)DecodeToGpu(data, width, height, normalize_imagenet)DecodeFileToGpu(path, width, height, normalize_imagenet)OaJpegDecodeResult4 members
Pixels(...)Width(...)Height(...)Channels(...)OaNormalizationParams3 members
__init__(...)Mean(...)Mean must contain exactly 3 values
Std(...)Std must contain exactly 3 values
OaScreenCapture8 members
IsSupported(...)Open(config)Poll(...)Release(frame)Destroy(...)IsStreaming(...)Width(...)Height(...)OaScreenCaptureConfig7 members
__init__(...)Target(...)Cursor(...)PreferredWidth(...)PreferredHeight(...)PreferredFps(...)RingFrames(...)OaVideo27 members
Open(config)Next(...)Reset(...)Play(...)Pause(...)TogglePlay(...)IsPlaying(...)IsDone(...)IsEos(...)HasAudio(...)StepForward(...)StepBackward(...)StepFrames(count)Seek(timestamp)Flush(...)Tick(delta_ms)CurrentFrame(...)CurrentFrameToMatrix(normalize_imagenet)CurrentFrameToImage(normalize_imagenet)ReadbackCurrentRgba(...)Index(...)Width(...)Height(...)FrameRate(...)FrameCount(...)FrameIntervalMs(...)Destroy(...)OaVideoConfig12 members
__init__(...)Uri(...)Path(...)MaxDpbSlots(...)Loop(...)PreferHardwareYCbCr(...)FrameRateOverride(...)StartPlaying(...)Audio(...)StreamOptions(...)ReorderDepth(...)Filter(...)OaVideoDecodeCapabilities10 members
Supported(...)SupportsDpbAndOutputCoincide(...)SupportsDpbAndOutputDistinct(...)SupportsNv12Dpb(...)MaxWidth(...)MaxHeight(...)MinWidth(...)MinHeight(...)MaxDpbSlots(...)MaxActiveReferencePictures(...)OaVideoEncodeCapabilities13 members
Supported(...)MaxWidth(...)MaxHeight(...)MinWidth(...)MinHeight(...)MaxDpbSlots(...)MaxActiveReferencePictures(...)MaxBitrate(...)MaxQualityLevels(...)MaxH264SliceCount(...)MaxH265SliceSegmentCount(...)MinH265Qp(...)MaxH265Qp(...)OaVideoEncodeProfile14 members
__init__(...)Codec(...)Width(...)Height(...)RateControl(...)Bitrate(...)MaxBitrate(...)ConstantQp(...)FrameRate(...)GopSize(...)MaxBFrames(...)MaxDpbSlots(...)QualityLevel(...)AsyncDepth(...)OaVideoFrame11 members
__init__(...)Resource(...)Width(...)Height(...)PresentationTimestamp(...)Duration(...)IsRgb(...)ColorSpace(...)FullRange(...)ArrayLayer(...)Shown(...)OaVideoPacket5 members
Data(...)PresentationTimestamp(...)DecodeTimestamp(...)IsKeyframe(...)TrackIndex(...)OaVideoRecorder7 members
Create(config)Write(frame)Finalize(...)Destroy(...)IsOpen(...)FrameCount(...)Config(...)OaVideoRecorderConfig6 members
__init__(...)OutputPath(...)Encode(...)ColorSpace(...)FullRange(...)AudioEnabled(...)OaVideoStream11 members
Open(uri, options)Probe(path)ReadNextPacket(...)Seek(timestamp)Info(...)Stats(...)IsEos(...)IsLive(...)IsSeekable(...)FormatGeneration(...)Destroy(...)OaVideoStreamOptions9 members
__init__(...)Reconnect(...)MaxReconnectAttempts(...)ReconnectBackoffMs(...)ReadTimeoutMs(...)JitterBufferMs(...)ReorderQueuePackets(...)MaxTimestampDiscontinuityMs(...)RtspTransport(...)OaVideoStreamStats3 members
ReconnectCount(...)TimestampDiscontinuities(...)FormatGeneration(...)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