Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 26 Jan 2002.
Re: Physical ASCII mosaic

Re: Physical ASCII mosaic

Hi CeeJay,

CeeJay wrote:
[...]
> Now that we are in too good geeky links that have something to do with
> ascii-art, check this page :
> 
> http://www.ai.mit.edu/~jsd/Projects/ImagesToText/
> From a different point of view his algorithm is the only edgetracing image to
> ascii algorithm i have seen , and is a good showcase of this approach - it also
> proves that it was right when I first suggested to Markus that a edgetracer
> would be a good idea.
[...]
> Hmmm .. I'm going to CC this to Jeremy Bonet - maybe he will try his algorithm
> on the testsuite or even better explain the algorithm in details or even show
> some sourcecode

I agree: the edge traced images are cool. Also the algorithm is quite
simple:

  FOR ALL PIXELS x,y IN THE IMAGE DO:
    IF ISSET(x,y)
      IF NOTSET(x-1,y) AND NOTSET(x,y-1)     PRINT /
      ELSEIF NOTSET(x+1,y) AND NOTSET(x,y-1) PRINT \
      ELSEIF NOTSET(x-1,y) AND NOTSET(x,y+1) PRINT \
      ELSEIF NOTSET(x+1,y) AND NOTSET(x,y+1) PRINT /
      ELSEIF NOTSET(x,y+1)                   PRINT _
      ELSEIF NOTSET(x-1,y) OR NOTSET(x+1,y)  PRINT |
      END
    ELSEIF ISSET(x,y+1) AND ISSET(x-1,y+1) AND ISSET(x+1,y+1) PRINT _
    END
  END

The results are somewhat funny:
                       _________
      _________      _/         \_
    _/         \_/__/           __\
   /________                   /  \
  /         |                 |
         __/      _            \
        /        / \       _    \
      _/    _   /   |     | \_  |
     /   __/ | |    \     |   \_/
     |__/   /  /     \__  |
     \      | |         \_/
           /  |
           |  /
          /  |
         /   /
         |  |
         |  |
         |  |
         |  |
         |  |
         |  |
        /   |
        |   |_
       /______\
                     ______/      \______
                  __/                    \___
               __/                           \_
             _/                                \_
            /                                    \_
           /   _______________                     \
          /  _/               \_                    \
         /  /                   \                    \
        /  /                     \                    \
       /  |                       |                    \
      /   |                       \_                    \
    _/    /                         \__                  \
   /     |                             |                 |__/\
   |     |                            _|                      \
  /      |   ____        _/\_________/                        |
  |       \_/    \      /   _                                 |
 /        _ ___   \    /  _/ \_     _____                     |
  |      / \   | /     | |     \___/     |                    |
 _|     |      \/      \_/               |                    |
/       |                               /                     |
|        \                             /                      |
|        |                           _/                       |
|         \           ____          /                         |
|         |          /    \        /                          |
|          \        /_   |___     /                           |
|          |          |      \     |                          |
|           \        /      /     _|                          |
|            \_      \_____/    _/                            |
|              \_           /__/                              |
|                \_       __|                                 |
|                  \_____/                                    |
\                                                             |
 |                                                            |
/                       __                                    |
|                      |  \_                                  |
|                      |    \__        ____                   |
|                       \      \______/    \                  |
|                    ___/                   \_                |
|                  _/                         \               |
|              ___/                            |              |
|             /                               /               |
|            /                                 |              |
|           /                                  |              |
|          |                                  /               |
\__________/                                  \_______________/

/  \_        ________           _/  \
 \_  \__    /  ______\       __/  _/
   \_   \   \_/             /   _/
     \_  \_               _/  _/
       \_  \             /  _/
         \_/   ________  \_/
   _          /______  \        _
  / \          ______|  \      / \
  | |        _/         |      | /
  | |       /  _______  |      ||
  | /      /  |_______| |      ||
  \/        \           |      \/
        ___  \__________/ __
      _/  _\             /  \__
     /  _/                \_   \
   _/  /      ________      \_  \_
 _/  _/      /________\       \_  \_
/  _/                           \_  \
\_/                               \_/

 /_ __  _________________  _____ __  _  _  __  __________________ _\
 | \  |/ _   _______     ||     |  || |/ \|  |/                  \ |
 |\   |_/ \_/     _ \    ||     \\_|| |   |  |                    /|
 |    \__________/ \/    \/    / \__/ \\ //  \\         / /\_/     |
 |       ____________   _                 _______        /__ /     |
 |      /            \ / \__             /       \_         \      |
 |       \____   ____/  \_  \___        /___       \               |
 |    /       | |         \___  \__         |  __   \          /   |
 |   /_\      | |      _______|    \___    /  |  \  |          \   |
 |            | |     /                \___|  /   | |_             |
 |            | |     \______          _     |__/_|   \      /     |
 |       /    | |           _|     ___/ \              \    /_\    |
 |       \    | |        __/   ___/      |  _________  |           |
 |        ____| |____   /   __/        _/  /        _|  \_         |
 |       /           \ /___/          /   |_/\     /      \        |
 |   _/ / ___________/               /________\   /________\       |
 |  / | \/                                                         |
 |   \_\     /\  _______                   ____     /\ /\  /  /    |
 |\          |  / _     \ /\ /\  /  /\ /\ / _ _\    || | /\ / |   /|
 |_/_________|\__|_|    |_||__|\_|\_||_||_||_|_|____||_|\__/__|\_/_|
 \_________________________________________________________________/

But this is no good point for starting a _real_ edge detection
algorithm. Anyway, may investigations on that topic show that chances
are very low for edge detection being the key to better image2ascii
algorithms.

Look at this example:
                               ______________
                            __/      _       \__
                         __/        / |   _     \__
                       _/          |_/   |_|___    \
                      /          _        _/   \__  \_
                     /          / |      |       _|   \
                    /          |_/       |______/      \
                   /                                    \_
                  /              ________________         \
                  |            _/                \__      |
                  |_          |                     \     |
                  \ |          \                     |     \
                   /           |                     |    |
                   |           |__                   |___ |
                   |              \___     ________  |   |/
                   \                  \   /        \ \   \
                    \              __ |   \___    _/
                     \      ______/  ||       \__/
                      \_   |         ||
                        |   \       / |
                        \    \     /  |
                         |    \____|   \__/       /\
                         \            ____/   ___//
                          |          |______ /___/
                         /                  \
                        /               ___/
                      _/             __/     _/\
                    _/              |_______/  |____
                 __/                                \_____
              __/                                         \______
           __/                                                   \__
        __/                                                         \
     __/                                                            |
  __/                                                               |
 /                                                                  |
/                                                                   |
|                                                                   |
\___________________________________________________________________/

Even if it was rendered with a more detailed line style - there is no
way to mix the result with greyscale Ascii-Art:
                                .... ..
                             ....zzz=73v0czxx..
                          ..`Jzxx==:`.z?=....`::,.
                      .......cv0Or`...JnZ:`...a=::..
                     .`:=,?v4Gsz:``aJxav..a`````.zvz=.
                     `.,..,:zvv=``.?#XQAx=`     ````:=..
                    ``,usaJv0=,`.`v0v4QQ+`  .......czxx=`
                 .....a=vOUXna.`...v`4SSxuwZc:..`==vvv==,
                ``.a:aowwxOxsxvv0U0:`vO000V000vv:`:vO00On:`.
                  `|:v4X###UU0=:```         `````:.zvueQdQ:``
                  J`JOZQQ6v:``..``                 ``JdXXSn..
                  `.,?4QXn=,,`....`                 ..zv4Zk``
                  ..:cZ#Oxz:,..``````               .Jv``vx`
                   .?wd#X=cc;,````                  `z:`.c:
                   ``3Qmvz=c...;.....         ..... `,`` :``
                   .s:4X=?z:aaaaaeQQx...` ..uggaJ....:.  ```
                    4#wv::?4dMKWB!?99O:`  `7V3MZV#T%```  `
                     ?Sc,````790=;``.```     ```=^`  `
                      7|``..``      `.``
                        .:,...`    .....            .
                        `Jz:...`   .J:``           .`
                         `zoz,.....Jsau..... `    ..
                         `zz4xc....`3@WWP"'   ....``         `
                         .:zZZxzx.,`.````    ..````
                         upz4ZQ,?3MMMMMM#T"0:  `..`
                        .MMMQQQZoc:3H#ggay=:   .`
                      .JMMMMMMmQnz=::::```    .r
                    .`JMMMMMMMMMmQy:..     ..gMp
                  ..JMMMMMMMMMMMMMMMmQaaaagMMMMBBma..
                .JgMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBmQ...
             ..gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmmgJ...
          .JMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBQ
      ..gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
   ..gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

Result:                        _...._..______
                            _./..zzz=_3v0czxx\._
                         _./`Jzxx==:/.|?=....`::\._
                      ../....cv0Or`|./JnZ|i|.._=::.\
                     ./:=,?v4Gsz:i`aJxav.._/```\._vz\.
                     /.,..,:zvv=/`|?#XQAx|`     `i|`:=\.
                    /`,usaJv0=,|./v0v4QQ+|__..../..czxx\`
                 ../..a=vOUXna.`...v`4SSxuwZc:..`==vvv==\_
                ``/a:aowwxOxsxvv0__:i___________:`:vO00On:\.
                  ||:v4X###UU0=:/``         `````\._vueQdQ|``
                  |iJOZQQ6v:``|.``                 `\JdXXS|..
                  \.|?4QXn=,,`.\..`                 .|zv4Zk\`
                  ./:cZ#Oxz:,..|`````               .|v``v|`
                   |?wd#X=cc;,`|ii                  `|:i.c|
                   |`3Qmvz=c...;..\.._     ___..... `|`` |/`
                   \s:4X=?z:aaaaaeQQx.\.` /.uggaJ..\.\.  \``
                    \#wv::?4dMKWB!?__O|`  \___MZV#_/```  `
                     \Sc,```i_____/`.||`     `\i_/`  `
                      \|``.|``      `||`
                        |:,.\.`    ./.|.            .
                        \Jz:.\.`   /J:|`           .`
                         |zoz,\....|sau\../. `    /\
                         \zz4xc....`3@__8i/   ...//`         `
                         .|zZZxzx.,`.|iii___ /.ii/`
                         /pz4ZQ,?3MMMMMM#T"0\  `..`
                        /MMMQQQZoc:3H#gg___/   .`
                      ./MMMMMMmQnz=::::/``   _/\
                    ./JMMMMMMMMMmQy:|._____./gM|____
                 _./JMMMMMMMMMMMMMMMmQaaaagMMMMBBma.\_____
              __/JgMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBmQ..\______
           __/.gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmmgJ.\._
        __/JMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMB\
     _./gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|
  _./gMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|

Looks strange, doesn't it? :-)
Ideas, comments, diddles?

Markus

PS: The edge tracing algorithm will be part of the next release of JavE.
-- 
 \-/         http://www.jave.de    O_< Get JavE now!    \-/
J|a|v|E                           /|                   J|a|v|E
 /-\      Ascii-Art for eyeryone  / \   - for free!     /-\

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,aa76fa8f4e74bb08
X-Google-Attributes: gidf996b,public
X-Google-ArrivalTime: 2002-01-26 12:58:40 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!feed.news.nacamar.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail
From: Markus Gebhard <ukg...@rz.uni-karlsruhe.de>
Newsgroups: alt.ascii-art
Subject: Re: Physical ASCII mosaic
Date: Sat, 26 Jan 2002 21:59:33 +0100
Organization: University of Karlsruhe, Germany
Lines: 274
Message-ID: <3C5...@rz.uni-karlsruhe.de>
References: <3C5...@ericharshbarger.org> <3c52d8eb$0$14078$edf...@dspool01.news.tele.dk>
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 1012078710 5085 172.20.12.141
X-Complaints-To: use...@rz.uni-karlsruhe.de
X-Mailer: Mozilla 4.79 [en] (Win98; U)
X-Accept-Language: en
Xref: archiver1.google.com alt.ascii-art:14093

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this message. This message was posted publicly to the newsgroup alt.ascii-art in 2002 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post