Added python VisionBuf class (#29075)

* Added python VisionBuf class

* fixed property names

* Bump cereal
This commit is contained in:
Mitchell Goff
2023-07-25 01:08:39 -07:00
committed by GitHub
parent 0dd1dcc7d0
commit f0ae0c34cd
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -113,10 +113,10 @@ def ui_thread(addr):
yuv_img_raw = vipc_client.recv()
if yuv_img_raw is None or not yuv_img_raw.any():
if yuv_img_raw is None or not yuv_img_raw.data.any():
continue
imgff = np.frombuffer(yuv_img_raw, dtype=np.uint8).reshape((vipc_client.height * 3 // 2, vipc_client.width))
imgff = np.frombuffer(yuv_img_raw.data, 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_NV12)