JS & Node

Javascript Image To Text With OCR (Simple Examples)

Welcome to a tutorial on how to convert an image to text in Javascript. Yes, image-to-text has already been around for some time, and it is called “Optical Character Recognition” (OCR). There is an open-source OCR library called TesseractJS that we can use: async conv () { const worker = await Tesseract.createWorker(); await worker.loadLanguage(“eng”); await

Javascript Image To Text With OCR (Simple Examples) Read More »

Capture Photos With Webcam In Javascript (Simple Example)

Welcome to a tutorial on how to capture photos with a webcam in Javascript. Yes, the Stone Age of the Internet is long over, and it is totally possible to take pictures directly using Javascript. navigator.mediaDevices.getUserMedia({ video: true }).then(stream => { // WEBCAM STREAM TO VIDEO let v = document.createElement(“video”); v.autoplay = true; v.srcObject =

Capture Photos With Webcam In Javascript (Simple Example) Read More »

Redirect With Parameters In Javascript (Simple Examples)

Welcome to a tutorial on how to redirect with parameters in Javascript. Need to redirect the user to another page and pass some data along? To redirect with parameters in Javascript: var query = new URLSearchParams(); query.append(“KEY”, “VALUE); location.href = “http://site.com/page?” + query.toString(); That covers the quick basics, but read on for more examples!  

Redirect With Parameters In Javascript (Simple Examples) Read More »