Fix snapshot NameError and crop zone bbox for PlateRecognizer

Add missing subprocess import in main.py (snapshot was crashing).
When a zone is defined, crop each frame to the zone's bounding box
before sending to PlateRecognizer — smaller payload, faster upload,
recognition focused on the relevant area only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
perco
2026-06-03 17:15:56 +02:00
co-authored by Claude Sonnet 4.6
parent 0fc2be31aa
commit 8fb021bc2b
2 changed files with 15 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ import logging
import threading
import tempfile
import asyncio
import subprocess
from contextlib import asynccontextmanager
from fastapi import FastAPI, Request, Query, HTTPException, UploadFile, File, Form
from fastapi.responses import HTMLResponse, RedirectResponse