mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
snapshot: fix rgb overflow (#24963)
clamp rgb old-commit-hash: 240c44e50c4dd44c2237f4f37d716fd898160917
This commit is contained in:
@@ -39,7 +39,7 @@ def yuv_to_rgb(y, u, v):
|
||||
[0.00000, -0.39465, 2.03211],
|
||||
[1.13983, -0.58060, 0.00000],
|
||||
])
|
||||
rgb = np.dot(yuv, m)
|
||||
rgb = np.dot(yuv, m).clip(0, 255)
|
||||
return rgb.astype(np.uint8)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user