merge_yuv

static TensorInfo.merge_yuv(y, uv)

Creates a TensorInfo object for a merged YUV tensor with the given tensor information of Y tensor (Y component) and UV tensor (UV component).

This function combines the information of Y and UV tensors into a single TensorInfo object that represents the information of a complete YUV image. Use this function when you have separate Y and UV tensors, and need to create a TensorInfo object for a single merged YUV tensor.

Parameters:
  • y (TensorInfo) -- The TensorInfo object for the Y tensor, representing the Y component of the YUV image.

  • uv (TensorInfo) -- The TensorInfo object for the UV tensor, representing the UV component of the YUV image.

Returns:

tensor_info -- An object representing the information the merged YUV tensor.

Return type:

TensorInfo

Raises:

RuntimeError -- If the YUV tensor merging fails.