Skip to content

rddtz/ascii-art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fundamentals of Image Processing: Structure-based ASCII Art

                     Q
                  U/  "N_
                 7  25w  N
               UZ 2[   3\ `\
               ( 7   DL  &  $ [3S\ Gx  U
              } J   "\$&  N  39[  "$ DR"[        _QG2H8"C )
             U[ [ ) "\G8"                $_UyB8"`  Uw*E55Lu
             QLD  _@"                          QP8       ( [
             ] )QZ                         _yZ          uL_[
             ]y`                            `x_Q9*5L    f ]
            U[                                3$CQZ8`  7 _[
           M    _9855                          U*855  7  7
         UZ    7  2   g                         )   y'  J
    __QyE     Z[ U[    [                         "r    U[
      8&#QQQ_D L  5-@B`             _""58k             f                __
  UQ*4kQ_   _\$3\    DL  `    \   Qw,GE58w"[          ]              QZ` P"8*k_
8B^       3SQ_  8-9A8         ' U$   [    [3          T          yB8           3\
 _25`    ``"5R\        u~Q,_    ((   SyB8` u          T         GE               W
 QLyQw-8E""555558RBw_   Xw@8    !Qk      @*           T       y$                  [
 "   y'           CRQ _Q@         3R%55Qy6            ]     DE  "  `N             d
    <w_UL              5$8s_ "$, -\@wwwwwQQQU_      JN]`   UE UE                 D
    3 34U8&_                     3sC$w_         `38-9wLUZ D   @P                QE
          QZWQQ_                    `&_ `8RQ_       3r $     ]       Z   888885
       _e`       5SkQQ_                b\    "5*\  $8E_(9           uB[U-
      8"Q`  Z           ``   _8-wQ_      3\U   UZ$NQ{  &{           'y
      y'    L U                    "8\ _$85R88`  3      DN          GL
     7     3\7                              "E   D        )L        3L
    Uf`Z     &                                u8k7         3_        [
    C J                                       D          3_D N        [
      J                                     _F7           "QL X        ()L
       L Q                                 Q(                  T       J ) \
       "$Q3_                                       3k          D[        J* L
          ["\ T          L         U   +             `"[     R_ 1           1
          ]  S_[        U[_         [ uL     E         ]       [)           1
           [   3_       DZ          DN]     7          J        !          u[D[
           )    3_mx   \ !            "_    [          @5[     _L         u@8(
           "[     W 3w, R             \1   D             f     Z        BE UE_
      QE`   [         7`f              L   y             `    2            UZ
     QL 7` 8555E      []              ] U$8`   `             3           QZ
     ]  [  7         uL$_          u 7_Z _                 [          QP`
      D~&QQ[   Z     u xE U        7W_f _L  7`$           E           3@{
           C$9Qb__QQ9$7  j       UZ`C`L 3L  E '   _QQGB8` `NQ  3x ``
                      3*\Q[__Qy*5      $9Q_UQ@P"`              ```L

This repository contain the codes, reports and results of our final work for the Fundamentals of Image Processing (INF01046). The aim of this repository is to reproduce the results from this paper.

Creating ASCII Art

Requirements

This code as created using python 3.11.2. We use different libraries in order to achieve the aimed results. To make it reproducible we created a python virtual environment. All the libraries used for running the application are described in the requirements.txt. This file can be used to install all the needed libraries to run the code using the pip command:

pip install -r requirements.txt

Executing the application

The application takes command line arguments in order to create ASCII Art from a image. A normal execution would use three arguments, the path (-p), that indicates the path to the image you want to convert, the ratio (-r), who is the color threshold for the image, and the columns (-c), the number of columns for the output ASCII Art. You can see all the options using:

python ascii.py -h

An example of execution would be:

python ascii.py --path ../image-tests/image2.jpg --ratio 0.2 -c 40

This makes a ASCII Art made of 40 columns (text width) from the image2.jpg taking in count only 0.2% of the colors. A good chose of ration is important to correctly get the image vertices.

              73
             u  {
            U[   [
            Z    "L
Q@@==G~~~~-Z      3-~~~~~==@@y
  5\                      QZ
     S\                U2`
       DS_           2'
        u            1
        (      ,      [
       7   _2'  "S\   3
      u U2'        DS\ 1
      $`              C8L

Members

                             UQ2P85`      `"5*\      _y-85""""""58*-QQ_
                      U\y5'                    "& _*`                    ""S
                    uE D[                        DL                         [3k
                   *   ]                          L                         h &{
                  f    L                          L                          t3_[
                U#    7                           L                          J  "\
               U(Z    [                           L                           [  3
              U(7    $                            L                           3   d"i
              fuL   _[                            L                            {   WC[
            U$U[[   7                             L                            2L  E1"[
            $ (}   G[                             L                             {   LEC[
           7 +Q    $                              L                             3L  `3(3L
          7 y [   u                               L                              $   !J 3L
         7 uLZ    !                               L                              D[   N$\3
        7 u']    u                                L                               $    83_d_
       7  ZuL    (                                L                               D[    ]) h_
      u U$ E    @   _QQw9-B$85555555$-kQ_         L        Uu#**888888$*9wwQQQQ__  W     {W W
     y Q$ZZ   _QQ@~B855``C_QQQwwx8$wQU_   `By,    L   _G8`_Qy*BBP558BBR*_   ``38B-C       [N $
    y  (DE __QUQ9r8=Hck_UQww@@@@@*y@@9\QQ`8~$(    [  {,9$85@@@@k@@@@@@@C__QZ58$-~9$wwQU___DDL w
  UZGP8        _Q  U__QQQQww@$$********wQ_ `  [ __[Q7`$C UQQ9*****B#wwwwQQQU____            `8*QN_
y*$8555"`"' C` D`                         `8H3     b@@85                              C"""$Z555558*\

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages