mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-21 07:38:22 +03:00
cv2.imread with IMREAD_UNCHANGED loads the image as-is, but the code unconditionally indexes channel 3 (birdseye_logo[:, :, 3]) assuming RGBA format. This crashes with IndexError for: - Grayscale PNGs (2D array, no channel dimension) - RGB PNGs without alpha (3 channels, no index 3) - Fully transparent PNGs saved as grayscale+alpha (2 channels) Handle all image formats: - 2D (grayscale): use directly as luminance - 4+ channels (RGBA): extract alpha channel (existing behavior) - 3 channels (RGB/BGR): convert to grayscale Also fixes the shape[0]/shape[1] swap in the array slice that breaks non-square images (related to #6802, #7863). |
||
|---|---|---|
| .. | ||
| birdseye.py | ||
| camera.py | ||
| output.py | ||
| preview.py | ||