Skip to content

Commit

Permalink
snapshot: fix rgb overflow (#24963)
Browse files Browse the repository at this point in the history
clamp rgb
  • Loading branch information
maxime-desroches authored Jun 27, 2022
1 parent de0c12e commit 240c44e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/camerad/snapshot/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 240c44e

Please sign in to comment.