Introducing Google AI Edge Portal: Benchmark Edge AI at scale. Sign-up to request access during private preview.

mp.ImageFormat

An enum describing supported raw image formats.

View aliases

Main aliases

mp.packet_creator.image_frame.ImageFormat, mp.tasks.vision.holistic_landmarker.packet_creator.image_frame.ImageFormat

mp.ImageFormat()

SRGB: sRGB, interleaved: one byte for R, then one byte for G, then one byte for B for each pixel.

SRGBA: sRGBA, interleaved: one byte for R, one byte for G, one byte for B, one byte for alpha or unused.

SBGRA: sBGRA, interleaved: one byte for B, one byte for G, one byte for R, one byte for alpha or unused.

GRAY8: Grayscale, one byte per pixel.

GRAY16: Grayscale, one uint16 per pixel.

SRGB48: sRGB, interleaved, each component is a uint16.

SRGBA64: sRGBA, interleaved, each component is a uint16.

VEC32F1: One float per pixel.

VEC32F2: Two floats per pixel.

Members

SRGB

SRGBA

SBGRA

GRAY8

GRAY16

SRGB48

SRGBA64

VEC32F1

VEC32F2

Attributes

name

value

Methods

__eq__

__eq__()

__ne__

__ne__()

Class Variables

GRAY16 Instance of mp.ImageFormat
GRAY8 Instance of mp.ImageFormat
SBGRA Instance of mp.ImageFormat
SRGB Instance of mp.ImageFormat
SRGB48 Instance of mp.ImageFormat
SRGBA Instance of mp.ImageFormat
SRGBA64 Instance of mp.ImageFormat
VEC32F1 Instance of mp.ImageFormat
VEC32F2 Instance of mp.ImageFormat

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年05月01日 UTC.