Live data from Hacker News

Project Naptha: a browser extension that enables text selection on any image

projectnaptha.com

111–120 of 141 posts

Re: Project Naptha: a browser extension that enables text selection on any image

#111

I wonder how deep this project is in violation of the GPLv3. For starter it's based on gnu ocrad [1] but fails to state a license and to publish any source code. [1]: https://www.gnu.org/software/ocrad/

https://github.com/antimatter15/ocrad.js

Re: Project Naptha: a browser extension that enables text selection on any image

#112
post #94

I have a feeling that if you just make the OCR better, a lot of users are going to use this for entering CAPTCHAs...

Doesn't seem to work on reCAPTCHA images at all.

Like I said, needs better OCR.

Re: Project Naptha: a browser extension that enables text selection on any image

#114
post #84

@antimatter15 any recommendations for optimizing Tesseract?

Curious about this too. Also, what's the stack providing Tesseract-as-a-Service? According to my cursory search, Google app engine won't run Tesseract as its a native library, not an API. I'd like to try this on non-Latin/CJK hardcoded subtitles, but ocrat does latin only.

Re: Project Naptha: a browser extension that enables text selection on any image

#115
1) Very, very flippin' cool!

2) Erase Text option menu location Using version 0.7.2, the "Erase Text" option is displayed under the "Translate" section (certainly not where I would ever intentionally look for it).

3) Select Text -> Right-click changes selection After selecting my text, when I right-click the selected text often (almost always) changes. For example, with the kitten text, I selected both paragraphs, but when I right-clicked to go to Translate->Erase the first paragraph ceased to be highlighted. After erasing the second paragraph I tried in vain to select and erase the first paragraph, but everytime I'd right-click the selected paragraph only a single word would still be highlighted. I eventually tried erasing text while only one word was highlighted and the entire first paragraph was erased.

4) I really appreciate the Security & Privacy section of the project page.

5) I would love to see a Firefox version of Project Naptha!

Re: Project Naptha: a browser extension that enables text selection on any image

#116
post #105

Earlier quoted context omitted.

It was suggested to me by a friend that to get good OCR results, run it through the scanner/OCR twice, then diff the results. Usually one or the other will get it right, and if you run the two results through a difference editor like 'meld', it's quick to fix.

If this is done all in software (IE, it isn't analyzing a slightly different image), why wouldn't the OCR just do this itself?

Somebody's got to decide which way to go with the diffs

Re: Project Naptha: a browser extension that enables text selection on any image

#117
post #84

@antimatter15 any recommendations for optimizing Tesseract?

Curious about this too. Also, what's the stack providing Tesseract-as-a-Service? According to my cursory search, Google app engine won't run Tesseract as its a native library, not an API. I'd like to try this on non-Latin/CJK hardcoded subtitles, but ocrat does latin only.

I wrote a little C program that uses TessBaseAPI to extract letter locations which gets triggered with ImageMagick's convert by a NodeJS script. The app engine frontend which acts as a caching reverse proxy.

Re: Project Naptha: a browser extension that enables text selection on any image

#119
post #84

@antimatter15 any recommendations for optimizing Tesseract?

It basically runs SWT on the image, and creates a 3d Lab histogram of the colors the SWT marked as text. Then it does a morphological dilation of 10 pixels and subtracts the original mask to get the colors of the pixels that represent the background.

Then it just binarizes the image by whether the internal histogram is larger than the corresponding value of the color on the external histogram.

It's a strategy that works quite well on machine-printed text, but probably less effective than existing strategies when it comes to scans or photographs.

Re: Project Naptha: a browser extension that enables text selection on any image

#120
This is extremely powerful for the end user. I've been doing a bit of OCR work using some pre-processing methods combined with Tesseract and OpenCV. I am curious to know how you are doing this on the fly and also as a chrome extension. Is the processing done in JS?
Post reply on HN