📜 ⬆️ ⬇️

Project Naptha - select, copy and translate texts from any pictures

On hh / gt I did not find a single mention of this wonderful extension for Google Chrome. I want to share it with the community, because recently it helps me to save 10 minutes every day - there are a lot of screenshots from social networks in different languages ​​that are translated into two clicks with the help of this plugin.

Meet - Project Naptha ( Chrome webstore ).

image
')
Feature List:


The project was created by Kevin Kwok and is an OCR (Optical character recognition) system implemented in JavaScript as a browser extension.

Project Naptha, despite the simplicity for the end user, is quite complex inside.

First of all, before text recognition began, you need to determine where the blocks with the text in the picture are actually located. Quite a non-trivial task, given that the text can be placed on top of completely different backgrounds and in itself have different colors. To implement this mechanism, Naptha uses the Microsoft Stroke Width Transform (SWT) project - an efficient algorithm that is based on the fact that fonts usually have approximately uniform line widths (font-weight) and, therefore, it is easy to separate text blocks from the rest of the noise in the picture.

Original:
image

After SWT:
image

Naptha, of course, does not recognize every picture on the open page - it would be extremely wasteful with respect to resources. Instead, it starts recognizing the location of blocks of text only after ... no, not pointing the mouse over the picture (mouseover) as you might think, but assuming that the cursor will be over the picture, based on its movement. Next, Web Workers (multi-threading in the background) are working to recognize the location of the text in the picture without any significant braking of the browser.

When you select the text block and “Copy Text” (Ctrl + C), it is sent to the server with Ocrad OCR , an open source text recognition engine. Ocrad will try to recognize a piece of the raster image in the text, which may take a couple of seconds, and upon completion returns the recognized text, which can be pasted in the usual way anywhere (Ctrl + V).

The translation function is still in beta, in order to try it you need to send a request to their email address. It is assumed that it will work similarly to the already working analogue in Google Translate on mobile devices:



The project is still in the testing phase, but even at the moment it is good enough to use it in work. You can of course find fault with the details and possible brakes, but this product, as far as I know, is one of a kind and it already saves my time.

Source: https://habr.com/ru/post/270875/


All Articles