O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Client

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="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required