X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,b639181160774d8d X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2001-10-04 13:25:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!feed.news.nacamar.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail From: Markus Gebhard Newsgroups: alt.ascii-art Subject: Re: Repairing wrapped lines (was: Re: Nokia 8210) Date: Thu, 04 Oct 2001 22:25:17 +0200 Organization: University of Karlsruhe, Germany Lines: 50 Message-ID: <3BBCC5AD.D546D5AE@rz.uni-karlsruhe.de> References: <2GNs7.25353$Lc6.1427451@news1.cableinet.net> <9pamf7$h3u3l$4@ID-39741.news.dfncis.de> <3BB8EE51.38A2D080@rz.uni-karlsruhe.de> <9pg27j$i9jph$2@ID-39741.news.dfncis.de> <3BBC3C2A.77DCA130@rz.uni-karlsruhe.de> <1002220684.5186@itz.pp.sci.fi> NNTP-Posting-Host: wn4-jarjar.wn4.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.rz.uni-karlsruhe.de 1002227113 15207 172.20.12.141 X-Complaints-To: usenet@rz.uni-karlsruhe.de X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en Xref: archiver1.google.com alt.ascii-art:8340 Ilmari Karonen wrote: [...] > It occurs to me that this step might not be too hard -- we can simply do > it the way a human would detect linewrapping. > > * A wrapped image will look "interlaced" -- line N will resemble N+2 > (or N+3, etc.) more than it resembles line N+1. > > * An image that has been needlessly unwrapped will contain two (or > more) similar pictures side by side -- some of these may be distorted > because of loss of spaces, but that shouldn't matter too much. Sounds interesting. > So a basic approach might be to compute some sort of histogram checksum > for each line -- the goal is to derive a number which will change more > or less continuously in an unwrapped image, but will jump sharply in a > wrapped image. Then try to unwrap lines until the jumps are minimized. I have thought about how to get the histogram values for rating the difference between two subsequent lines. As I already said I have a table of greyscale values for each character in Ascii, but I also have a table with 4 values for each character: +-----+ +--+--+ | X| | | X| | X| | | X| | XXXX| +-XXXX+ 1 grayscale |X X| 4 grayscale |X X| value/char: | XXXX| values/char: | XXXX| < line n +-----+ +--+--+ |XXXX | |XXXX | < line n+1 |X X| |X | X| |XXXX | +XXXX-+ |X | |X | | |X | |X | | +-----+ +--+--+ This could make a better result if the image is 'antialiased': ,8P d8' dP ,8P d8' > I guess I should try coding a prototype to test... Great idea. If you want me to, I can provide the code for rating the difference between two lines. Markus