send image to google vision endpoint
✓ Published0🌍 Public
VVeronicaM
Last edited Apr 15, 2019
Created on Apr 15, 2019
This example shows a client-side web application that sends a canvas-rendered image to a Google Vision endpoint and displays the recognized labels in the page. It first captures the canvas content as a PNG dataURL using `toDataURL('image/png')`, then posts that data along with a selected course language value via `fetch` to the server. The response is an array of words, which the code maps into HTML list items showing each recognized term and its associated language. The rendering uses plain DOM manipulation with `innerHTML`, and the request/response cycle relies on standard JavaScript Promises.
AI-generated description