mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2026-02-04 09:04:50 +00:00
Werkend ANPR systeem
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from flask import Blueprint, request, jsonify
|
||||
from application import db
|
||||
import application
|
||||
from application.dashboard.models import AllowedPlate, LoggedItem
|
||||
from application.api.image_processing import process_image
|
||||
from datetime import datetime
|
||||
import asyncio
|
||||
import io
|
||||
|
||||
api_blueprint = Blueprint("api", __name__, template_folder="templates")
|
||||
|
||||
@@ -12,6 +14,8 @@ api_blueprint = Blueprint("api", __name__, template_folder="templates")
|
||||
@api_blueprint.route("/", methods=["POST"])
|
||||
def data():
|
||||
data = request.data
|
||||
application.last_image.seek(0)
|
||||
application.last_image = io.BytesIO(request.data)
|
||||
np = asyncio.run(process_image(image=data))
|
||||
|
||||
# Check if the found plate is allowed to exit
|
||||
|
||||
Reference in New Issue
Block a user