mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-16 02:12:06 +08:00
ui.py: update for nv12
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ def ui_thread(addr):
|
||||
|
||||
imgff = np.frombuffer(yuv_img_raw, dtype=np.uint8).reshape((vipc_client.height * 3 // 2, vipc_client.width))
|
||||
num_px = vipc_client.width * vipc_client.height
|
||||
bgr = cv2.cvtColor(imgff, cv2.COLOR_YUV2RGB_I420)
|
||||
bgr = cv2.cvtColor(imgff, cv2.COLOR_YUV2RGB_NV12)
|
||||
|
||||
zoom_matrix = _BB_TO_FULL_FRAME[num_px]
|
||||
cv2.warpAffine(bgr, zoom_matrix[:2], (img.shape[1], img.shape[0]), dst=img, flags=cv2.WARP_INVERSE_MAP)
|
||||
|
||||
Reference in New Issue
Block a user