The purpose of the client-side code is to provide an interface for the user to upload an image and select an operation. To build this, we will use JavaScript and HTML. To get started, we will make two files, index.html and index.js, in the Client folder that we created earlier:

<html>    <head>        <script src="index.js"></script>        <script src=""></script>    </head>    <body>        <!-- Create upload image function -->        <input id="img_src" type="file"/>        <input id = "load_img_btn" type="button" onclick="loadImage()" value="Load"/>        <!-- Drop down menu to select image processing operation -->        <select id="image_op">            <option value="to_grayscale">Convert to Grayscale</option> <option value="get_edge_canny">Get ...

Get Computer Vision with Python 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.