write_azure_kinect_mkv_metadata是Open3D中一个用于写入Azure Kinect传感器生成的MKV文件元数据的函数。
path:string类型,MKV文件完整路径。vendro_id:int类型,供应商ID。默认为0x045E。product_id:int类型,产品ID。默认为0x097E。camera_serial_number:string类型,相机序列号。默认为空字符串。firmware_version:string类型,固件版本号。默认为空字符串。frame_rate:float类型,帧率。默认为30.0。color_resolution_width:int类型,彩色分辨率宽度。默认为1280。color_resolution_height:int类型,彩色分辨率高度。默认为720。depth_mode:str类型,深度模式。默认为NFOV_UNBINNED。depth_resolution_width:int类型,深度分辨率宽度。默认为640。depth_resolution_height:int类型,深度分辨率高度。默认为576。ir_mode:str类型,IR模式。默认为NFOV_UNBINNED。ir_resolution_width:int类型,IR分辨率宽度。默认为640。ir_resolution_height:int类型,IR分辨率高度。默认为576。函数没有返回值。
import open3d as o3d
path = "example.mkv"
vendro_id = 0x0023
product_id = 0x0020
camera_serial_number = "123456"
firmware_version = "1.2.3"
frame_rate = 30.0
color_resolution_width = 1280
color_resolution_height = 720
depth_mode = "NFOV_UNBINNED"
depth_resolution_width = 640
depth_resolution_height = 576
ir_mode = "NFOV_UNBINNED"
ir_resolution_width = 640
ir_resolution_height = 576
# 写入MKV文件元数据
o3d.io.write_azure_kinect_mkv_metadata(path=path,
vendro_id=vendro_id,
product_id=product_id,
camera_serial_number=camera_serial_number,
firmware_version=firmware_version,
frame_rate=frame_rate,
color_resolution_width=color_resolution_width,
color_resolution_height=color_resolution_height,
depth_mode=depth_mode,
depth_resolution_width=depth_resolution_width,
depth_resolution_height=depth_resolution_height,
ir_mode=ir_mode,
ir_resolution_width=ir_resolution_width,
ir_resolution_height=ir_resolution_height)
如果path参数为空字符串,则会引发ValueError异常。