From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/3763 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: river detection Date: Wed, 10 Jan 2001 09:27:03 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20010110092703.015d1670@server-1> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035394481 19878 80.91.224.250 (23 Oct 2002 17:34:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:34:41 +0000 (UTC) Cc: NTG-ConTeXt mailing list Original-To: Ed L Cashin In-Reply-To: Xref: main.gmane.org gmane.comp.tex.context:3763 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:3763 At 01:45 PM 1/9/01 -0500, Ed L Cashin wrote: >Han The Thanh discusses in his thesis several problems that computer >typography systems face. One problem that no current systems address >is "rivers", visual lines of blank space like this: > > > XXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXX XXXXXXXX > XXXXXXX xxXX XXXXXXXX Xxxxx XXXXXX XXXXX > XX XXX XXXXXXX XXXXXX XXXXX XXXXXXXX XXXX > XXXXXXX XXXX XXXXXXX XXXX XXXXXXXX XXXXXXX > XXX XX XXXXXXX XXXXXX XXXXX XXXXXXXX XXXXX > XXXXX xxXX XXXXXXXX Xxxxx XXXXXX XXXXX X > XXXX XXX XXXXXXX XXXX XXXXXXXX XXXXXXX XX > >... where there's a river on the left. Hans has been doing many >experiments combining MetaPost and TeX, where they share more >information about the visual appearance of the typeset text than has >traditionally been available. > >Would it be possible to use MP and TeX together in order to detect >rivers? If so, it would be a computer typesetting first, according to >Thanh's thesis. :) I must say that my first thought was that you might had a point, but after half an hour metaposting [playing a bit with picture postprocessing, of which you can find an example in the metafun manual] i think that, given that there was a good method, it could as well be done in tex itself, since tex has as much knowlegde in this respect as metapost, i.e. the boundingbox. What i did was (1) converting text into pictures, (2) converting boundingboxes of chars into matrix points and (3) looking at the result. Maybe some matrix guru could program an ananalyzer but my math is to weak for that. I think [but thanh may disagree] that grayness is something perceptual and rivers are things recognized by our eyes and brain at a quite low level, not so much analytical. So, if there was a way that tex could send an paragraph shape in terms of boundingboxes to a file, and after that a separate process could feed that into a neural net [optionally converted to bitmaps so that the character shape could be taken into account], and the net could send back a badness value to tex, so that there could be an additional pass ... I think that it's not that hard to extend tex with a spawned process in the paragraph builder and let it act upon the baddness. The main question is: how do we convince thanh to provide that hook, and after that, how do we trick ed in writing that analyzer. But this is a nice thread, Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------