mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 03:09:58 +00:00
Update image_processing.py
This commit is contained in:
@@ -30,6 +30,8 @@ async def process_image(image: bytes) -> str:
|
|||||||
if cars == []:
|
if cars == []:
|
||||||
return ""
|
return ""
|
||||||
# Get the biggest car box
|
# Get the biggest car box
|
||||||
|
if not cars:
|
||||||
|
return ""
|
||||||
size, corners = max(cars, key=lambda x: x[0])
|
size, corners = max(cars, key=lambda x: x[0])
|
||||||
|
|
||||||
# Crop biggest car
|
# Crop biggest car
|
||||||
|
|||||||
Reference in New Issue
Block a user