Back

Capture2Text - Japanese OCR Utility

#1
Hello,

Capture2Text allows language learners to quickly snapshot a small portion of the screen, OCR it, and (by default) save the result to the clipboard. This is a great companion for learners who enjoy reading manga.

Conceptual illustration:
[Image: ocr_conceptual_illustration.png]

Download the latest version via SourceForge (source code is included)

Please visit the Capture2Text homepage for more information.

Have Fun!
cb4960
Edited: 2015-08-07, 8:51 pm
Reply
#2
I love you for this, but only in that man on man prison sex sort of way.
Reply
#3
Nukemarine Wrote:I love you for this, but only in that man on man prison sex sort of way.
Oh good. You had me worried there for a second.
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
Awesome! I am trying this out with vobsubs per recent comments in subs2srs thread. So far as long as I'm careful about dragging the blue area, it works pretty well. Probably more accurate when I focus on specific words, per my strategy of extracting specific vocabulary.

I just tried it for when films are playing—same rules apply for getting it to work as the rules for getting screenshots to work: You must change the playback/output settings to something without a single asterisk next to it.

Thanks!

Edit: I meant I tried it via both subs2srs preview and then normal video playback.
Edited: 2010-11-26, 8:54 pm
Reply
#5
I wonder if it'd be possible to integrate this or the OCR rather with subs2srs for scanning idx/sub lines during deck generation. Probably not worth the effort, though.
Reply
#6
WHOOOAAA!!!

I had been looking for exactly this kind of a thing 2 weeks ago!!!
I was starting to think that it was only my imagination that one day I would find such a thing.

Thanks alot!
Reply
#7
That is amazing!

How can we append a linefeed-newline to the copied text?
Reply
#8
Would very much like to use it, but 3 scanners found malware: http://virusscan.jotti.org/en-GB/scanres...065efa68f6 - can anyone reassure me that these are false positives? I'm kind of reluctant to install it...
Edited: 2010-11-27, 6:01 am
Reply
#9
@rigol: Definitely false alarm. The problem with those scanners is they detect prolly a part of the code accessing memory ("the selection" whatsoever) and think it's some injection of viral application. Feel free to use it, it's clean Smile

Edit: Maybe adding some Rikai-chan-like feature in it? (if possible.. that'd turn reading mangas at least easier!)
Edited: 2010-11-27, 6:37 am
Reply
#10
Awesome! This could be extremely useful, especially if the OCR software can be made more accurate! Shame there's no linux version though (doesn't work in wine when I tried it) =(

*edit*
If there are any linux users out there who want something like this, I put together a quick python script to get something similar to work. I tied it to a hotkey in my window manager, works reasonably well...

http://pastebay.com/110710

You need to have nhocr for the ocr, xsel for the clipboard, scrot to select an area on the screen, and imagemagick to convert the image from scrot.
Edited: 2010-11-27, 1:55 pm
Reply
#11
Better safe than sorry, so thanks for the explanation, Tori Smile
Reply
#12
rigol Wrote:Would very much like to use it, but 3 scanners found malware: http://virusscan.jotti.org/en-GB/scanres...065efa68f6 - can anyone reassure me that these are false positives? I'm kind of reluctant to install it...
He provided the source for it, so you can always look over it to make sure it's not doing anything you don't like and then compile it yourself.
Reply
#13
bombpersons Wrote:If there are any linux users out there who want something like this, I put together a quick python script to get something similar to work. I tied it to a hotkey in my window manager, works reasonably well...

http://pastebay.com/110703

You need to have nhocr for the ocr, xsel for the clipboard, scrot to select an area on the screen, and imagemagick to convert the image from scrot.
Thanks
Reply
#14
overture2112 Wrote:
rigol Wrote:Would very much like to use it, but 3 scanners found malware: http://virusscan.jotti.org/en-GB/scanres...065efa68f6 - can anyone reassure me that these are false positives? I'm kind of reluctant to install it...
He provided the source for it, so you can always look over it to make sure it's not doing anything you don't like and then compile it yourself.
Yeah, but not everyone knows that much about source and compiling, so...
Reply
#15
I'm just surprised you'd think cb4960 would post software with a virus and that no one would notice, based on 3/19 scanners...

Anyway. ;p
Edited: 2010-11-27, 3:11 pm
Reply
#16
I didn't say "Dude, nice try distributing malware" or anything, it's just that my antivirus program goes crazy with the exe, so I merely asked for reassurance... Tori already explained what was happening, so can we please leave it at that?
Reply
#17
I did a virus scan on each DLL and executable:

ConvertImageFormat.exe
http://virusscan.jotti.org/en-GB/scanres...2b6888018a

DevIL.dll
http://virusscan.jotti.org/en-GB/scanres...d7ca7e632b

ILU.dll
http://virusscan.jotti.org/en-GB/scanres...d8ee244e5e

msvcr90.dll
http://virusscan.jotti.org/en-GB/scanres...5403bec414

cygwin1.dll
http://virusscan.jotti.org/en-GB/scanres...0a0f82dd75

nhocr.exe
http://virusscan.jotti.org/en-GB/scanres...11a4eb42f5

Capture2Text.exe
http://virusscan.jotti.org/en-GB/scanres...60e3666c11

GdiPlus.dll
http://virusscan.jotti.org/en-GB/scanres...182d252d6c

-----

The only component that has trouble passing is Capture2Text.exe (3/19 give false positives based on heuristics).

If you want to compile Capture2Text.exe yourself, it is very easy. Just download AutoHotKey and run the "Convert .ahk to .exe" tool on Capture2Text.ahk in the SourceCode folder.

Edit:

Actually, you don't even need to compile the code. Just move the Capture2Text.ahk to the same directory as settings.ini and run it with AutoHotKey.
Edited: 2010-11-27, 3:56 pm
Reply
#18
rigol Wrote:I didn't say "Dude, nice try distributing malware" or anything, it's just that my antivirus program goes crazy with the exe, so I merely asked for reassurance... Tori already explained what was happening, so can we please leave it at that?
Well you kind of implied it, in my opinion, so that's why I'm giving you a very slight hard time, (with no malice). If your own antivirus software went haywire (which you only just mentioned) and then you found only 3/19 results, for software from someone trusted on the forum, with other members having posted no problems but indicating they've used it, it's like you're questioning all of our integrity and savvy, in my opinion, and with little cause. It's like by seeking reassurance you preempted your own trust that allowed for the possibility of reassurance.

I don't think you meant anything by it, honestly, I just think you were too paranoid. It's your computer, but since you posted here... ;p
Edited: 2010-11-27, 3:58 pm
Reply
#19
I have just posted version 1.01 of Capture2Text

Download Capture2Text v1.01 via MediaFire (source code is included)

- Added ability to use linefeeds, carriage returns, and tabs in the PrependText and AppendText settings in settings.ini. (Thanks KanjiDevourer!)
Use these tokens:
${cr} = Carriage return
${lf} = Linefeed
${tab} = Tab

- Removed the capture box showing up in the taskbar

- Removed the PassThruKey settings in settings.ini. Now I disable those hotkeys when not in capture mode so they are no longer needed.

- Added ReplaceControlText to settings.ini. If SendToControl=1, it allows you to replace the control text instead of sending to it (doesn't always work, depends on the control)

- Added an "About" item to the tray menu Smile

- Cleaned up code and put the ScreenCapture routines in a seperate file (ScreenCapture.ahk)
Reply
#20
KanjiDevourer Wrote:That is amazing!

How can we append a linefeed-newline to the copied text?
In settings.ini, set
AppendText=${cr}${lf}
Edited: 2010-11-27, 4:31 pm
Reply
#21
Tori-kun Wrote:Maybe adding some Rikai-chan-like feature in it? (if possible.. that'd turn reading mangas at least easier!)
That would be interesting. For now, you can use a program that detects the clipboard like StarDict or EBwin
Edited: 2010-11-27, 4:38 pm
Reply
#22
I have just posted version 1.02 of Capture2Text.

Download Capture2Text v1.02 via MediaFire (source code is included)

- You can now press the space bar to toggle which corner of the selection that you move: the top-left corner or the bottom-right corner. This key can be changed in settings.ini.

- You can now press the left mouse button to complete a capture. This key can be changed in settings.ini.
Reply
#23
Very nice tool!
Would it be possible to have it generate multiple possible candidates so you can select from a different one if the primary ocr result is incorrect?
Reply
#24
Zarxrax Wrote:Very nice tool!
Would it be possible to have it generate multiple possible candidates so you can select from a different one if the primary ocr result is incorrect?
Unfortunately, the OCR tool that I'm using doesn't have such an option.
Reply
#25
I have just posted version 1.03 of Capture2Text.

Download Capture2Text v1.03 via MediaFire (source code is included)

- Added Chinese OCR support. See the Dictionary setting in settings.ini to enable it.
Edited: 2010-11-27, 11:44 pm
Reply