mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-02 00:07:11 +01:00
clear position before copy
This commit is contained in:
parent
fa61e9da29
commit
f009897eca
@ -327,7 +327,6 @@ def copy_yuv_to_position(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if source_frame is None:
|
|
||||||
# clear y
|
# clear y
|
||||||
destination_frame[
|
destination_frame[
|
||||||
y[1] : y[3],
|
y[1] : y[3],
|
||||||
@ -342,7 +341,8 @@ def copy_yuv_to_position(
|
|||||||
destination_frame[v1[1] : v1[3], v1[0] : v1[2]] = 128
|
destination_frame[v1[1] : v1[3], v1[0] : v1[2]] = 128
|
||||||
# clear v2
|
# clear v2
|
||||||
destination_frame[v2[1] : v2[3], v2[0] : v2[2]] = 128
|
destination_frame[v2[1] : v2[3], v2[0] : v2[2]] = 128
|
||||||
else:
|
|
||||||
|
if not source_frame is None:
|
||||||
# calculate the resized frame, maintaining the aspect ratio
|
# calculate the resized frame, maintaining the aspect ratio
|
||||||
source_aspect_ratio = source_frame.shape[1] / (source_frame.shape[0] // 3 * 2)
|
source_aspect_ratio = source_frame.shape[1] / (source_frame.shape[0] // 3 * 2)
|
||||||
dest_aspect_ratio = destination_shape[1] / destination_shape[0]
|
dest_aspect_ratio = destination_shape[1] / destination_shape[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user