OCR
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 4833
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
OCR
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4833
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OCR
--- BASHING REMOVED ----
Where have all those example stacks gone?
Where have all those example stacks gone?
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 3211
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: OCR
In fact, the contents of that file is xhtml:
... and produces this:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="description" content="Gateway to resources for new and experienced LiveCode developers." />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=2.0" />
<link rel="shortcut icon" type="image/x-icon" href="https://livecode.com/wp-content/themes/livecode2013/ims/livecode_favicon.png">
<link rel="stylesheet" href="https://livecode.com/wp-content/themes/livecode2013/css/normalize.css">
<link type="text/css" href="https://livecodeshare.runrev.com/styles.css" rel="stylesheet" media="screen" />
<link type="text/css" href="https://livecodeshare.runrev.com/foldbar.css" rel="stylesheet" media="screen" />
<link type="text/css" href="https://livecodeshare.runrev.com/code.css" rel="stylesheet" media="screen" />
<link type="text/css" rel="stylesheet" href="https://livecodeshare.runrev.com/comments.css" />
<link type="text/css" rel="stylesheet" href="https://livecodeshare.runrev.com/runrev-custom.css" />
<link type="text/css" rel="stylesheet" href="https://livecodeshare.runrev.com/css/companynav.css" />
<link type="text/css" rel="stylesheet" href="https://livecodeshare.runrev.com/css/runrev.css" />
<link type="text/css" rel="stylesheet" href="https://livecodeshare.runrev.com/css/companynav-custom.css" />
<link rel="stylesheet" href="https://livecode.com/wp-content/themes/livecode2013/style.css">
<link rel='stylesheet' id='admin-bar-css' href='https://livecode.com/wp-includes/css/admin-bar.min.css?ver=3.5.1' type='text/css' media='all' />
<link rel='stylesheet' id='q-a-plus-css' href='https://livecode.com/wp-content/plugins/q-and-a/css/q-a-plus.css?ver=1.0.6.2' type='text/css' media='screen' />
<link rel='stylesheet' id='hubspot-css' href='https://livecode.com/wp-content/plugins/hubspot/css/hubspot.css?ver=3.5.1' type='text/css' media='all' />
<link rel='stylesheet' id='core3.0-css' href='https://livecode.com/wp-content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0' type='text/css' media='all' />
<link rel='stylesheet' id='core-Default3.0-css' href='https://livecode.com/wp-content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/styles/shCoreDefault.css?ver=3.0' type='text/css' media='all' />
<link rel='stylesheet' id='theme-Default3.0-css' href='https://livecode.com/wp-content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?ver=3.0' type='text/css' media='all' />
<script type="text/javascript">
var s_url = 'https://livecodeshare.runrev.com';
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src='https://livecodeshare.runrev.com/include/revonline.js'></script>
<title>revOnline | RunRev</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body style="background-color: white;">
<div id="struct-contents">
<div id="struct-holder">
<div id="struct-page">
<div id="struct-page-banner" style="background:URL('https://livecodeshare.runrev.com/images/banner-revonline-home.png') left top no-repeat; height:140px">
<div id="search-form-wrapper">
<form id="search-form" method="post" action='https://livecodeshare.runrev.com/search/'>
<div id="search-form-right"><input id="search-button" type="image" name="Search" value="Search" src='https://livecodeshare.runrev.com/images/revonline-search.gif' /></div>
<div id="seach-form-left"><input id="search-term" type="text" name="term" value="Enter Search Term" onclick="javascript: searchSetText('');" onblur="javascript: searchResetText();" /></div>
</form>
</div>
</div>
<div id="struct-page-middle-holder">
<div id="struct-page-middle-content" >
</div>
</div>
</div>
</div>
<div id="image-menu-bg"></div>
<div id="image-menu-top"></div>
<div id="image-menu-bottom"></div>
</body>
</html>
- richmond62
- Posts: 4833
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OCR
Well, that's useful, isn't it . . . . . . . .
I tried the Wayback Machine to no avail.

I tried the Wayback Machine to no avail.
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2633
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: OCR
Edit: Oh, that was one of the LCS + JS demos from Hermann Hoch, he took a few of his stacks off of that site out of frustration at one point, and sadly they aren't in any WaybackMachine snap shot either.richmond62 wrote: ↑Mon Mar 18, 2024 9:36 am https://www.mail-archive.com/use-liveco ... 04595.html
?
It sounds like this was a stack with the JavaScript (Emscripten webasm) port here:The library is included in the stack, so you can use it offline.
The License is GNU GENERAL PUBLIC v3.0
https://github.com/antimatter15/ocrad.js
Pasted in to HTML and used via Browser Widget.
There's a library version of the original Ocrdad as seen here: https://packages.debian.org/bullseye/libocrad-dev
so that could be wrapped with Extension Builder binding strings to use the library more directly from our scripts.
If you have newer macOS Ventura and above, instant Optical Character Recognition is built into the OS now.
- OpenXTalkPaul
- Posts: 2633
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: OCR
This might be a good Extension Builder FFI starter project for someone to try because
there does not appear to be all that many functions to wrap in that library:
OCRAD.set_print
OCRAD.write_file
OCRAD.read_file
OCRAD.read_text
OCRAD.delete_file
OCRAD.version
OCRAD.open
OCRAD.close
OCRAD.get_errno
OCRAD.set_image
OCRAD.set_image_from_file
OCRAD.set_exportfile
OCRAD.add_filter
OCRAD.set_utf8_format
OCRAD.set_threshold
OCRAD.scale
OCRAD.transform
OCRAD.recognize
OCRAD.result_blocks
OCRAD.result_lines
OCRAD.result_chars_total
OCRAD.result_chars_block
OCRAD.result_chars_line
OCRAD.result_line
OCRAD.result_first_character
OCRAD._simple
Probably primarily need to wrap "OCRAD.set_image_from_file" and "OCRAD.recognize" and "OCRAD.result_chars_block" handlers
there does not appear to be all that many functions to wrap in that library:
OCRAD.set_print
OCRAD.write_file
OCRAD.read_file
OCRAD.read_text
OCRAD.delete_file
OCRAD.version
OCRAD.open
OCRAD.close
OCRAD.get_errno
OCRAD.set_image
OCRAD.set_image_from_file
OCRAD.set_exportfile
OCRAD.add_filter
OCRAD.set_utf8_format
OCRAD.set_threshold
OCRAD.scale
OCRAD.transform
OCRAD.recognize
OCRAD.result_blocks
OCRAD.result_lines
OCRAD.result_chars_total
OCRAD.result_chars_block
OCRAD.result_chars_line
OCRAD.result_line
OCRAD.result_first_character
OCRAD._simple
Probably primarily need to wrap "OCRAD.set_image_from_file" and "OCRAD.recognize" and "OCRAD.result_chars_block" handlers
- richmond62
- Posts: 4833
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OCR
Well aware of that as have used it several times with my MacOS Sonoma box to 'rejuvenate' academic PDF documents from the early 90s of my wife (i.e. PDFs with no embedded text layer).If you have newer macOS Ventura and above, instant Optical Character Recognition is built into the OS now.
However, "as we all know" (why does that phrase make me want to throw up?), not everyone has the dubious benefits of either MacOS 13 or 14 . . .
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2633
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: OCR
But if you DO have a recent macOS machine, access to one (or otherwise use some alternative method to run a recent macOS, perhaps via the magic 'the cloud'), Then you can save an image like that's had it's text recognized, as PDF and THEN you can use OXT Apple PDF wrapper extension to extract the plain text (possibly even Rich Text) that you can then use for anything anywhere.richmond62 wrote: ↑Tue Mar 26, 2024 7:44 amWell aware of that as have used it several times with my MacOS Sonoma box to 'rejuvenate' academic PDF documents from the early 90s of my wife (i.e. PDFs with no embedded text layer).If you have newer macOS Ventura and above, instant Optical Character Recognition is built into the OS now.
However, "as we all know" (why does that phrase make me want to throw up?), not everyone has the dubious benefits of either MacOS 13 or 14 . . .
I'm certainly interested in what open-source alternatives are available, and I'd consider taking a crack at wrapping the OCR library mentioned earlier in this thread if I didn't already have a full plate.
Who is online
Users browsing this forum: No registered users and 5 guests