In this section, we will see how to create web computer vision applications using OpenCV and Flask. We will start with the equivalent Hello world application using OpenCV and Flask.
Web computer vision applications using OpenCV and Flask
A minimal example to introduce OpenCV and Flask
Script hello_opencv.py is coded in order to show how you can use OpenCV to perform a very basic web computer vision application. The code of this script is shown next:
# Import required packages:
import cv2
from flask import Flask, request, make_response
import numpy as np
import urllib.request
app = Flask(__name__)
@app.route('/canny', methods=['GET'])
def canny_processing():
# Get the image:
with urllib.request.urlopen(request...