How to Scrape Text from an Image in Chrome

Share
  • September 11, 2019

Usually, you use Optical Character Recognition (OCR) software to extract text from an image. However, as of Google Chrome 76, you can use an experimental feature to scrape text from images without any additional software.

When you use OCR to detect text, it’s computationally expensive. However, hardware manufacturers have supported shape detection for quite some time.

Enter, Shape Detection API. It relies on hardware acceleration from the device it runs on. API is capable of barcode detection, such as QR codes, and face and text detection. You can read more about the project on the developer’s website, where he goes into detail about how API works. For more on text detection, check out the Web Incubator Community Group website.

To use this feature, you have to enable an experimental flag in Chrome. When you enable anything from chrome://flags, you use unfinished features that haven’t been tested on all devices and could misbehave. You’ll potentially run into a few bugs, so be careful when you play around with some of the available flags.

For this guide, we’re using a Windows PC, but everything should work identically on all other platforms, including mobile devices.

To get started, fire up Chrome, type chrome://flags into the Omnibox, press Enter, and then type “Experimental web platform” in the search bar.

Type "Experimental web platform" in the search bar.

Alternatively, you can paste chrome://flags/#enable-experimental-web-platform-features into the Omnibox, and then press Enter to go directly to the flag.

Read the remaining 16 paragraphs

Source : How to Scrape Text from an Image in Chrome