修改布局

This commit is contained in:
i
2026-04-21 20:42:56 +08:00
parent 428dbbab72
commit b3e99742dd
2 changed files with 593 additions and 470 deletions
+587 -470
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -134,6 +134,12 @@ def frame_to_bgr_image(frame: VideoFrame) -> Union[Optional[np.array], Any]:
elif color_format == OBFormat.UYVY:
image = np.resize(data, (height, width, 2))
image = cv2.cvtColor(image, cv2.COLOR_YUV2BGR_UYVY)
elif color_format == OBFormat.BGRA:
image = np.resize(data, (height, width, 4))
image = cv2.cvtColor(image, cv2.COLOR_BGRA2BGR)
elif color_format == OBFormat.RGBA:
image = np.resize(data, (height, width, 4))
image = cv2.cvtColor(image, cv2.COLOR_RGBA2BGR)
else:
print("Unsupported color format: {}".format(color_format))
return None