Attention: This MediaPipe Solutions Preview is an early release. Learn more.


get_matrix(arg0: mediapipe.python._framework_bindings.packet.Packet) -> numpy.ndarray[numpy.float32[m, n], flags.f_contiguous]

Get the content of a MediaPipe Matrix Packet as a numpy 2d float ndarray.

Args: packet: A MediaPipe Matrix Packet.

Returns: A numpy 2d float ndarray.

Raises: ValueError: If the Packet doesn't contain matrix data.

Examples: packet = mp.packet_creator.create_matrix(2d_array) data = mp.packet_getter.get_matrix(packet)