Skip to content

Architecture

Tymur Shashok edited this page Oct 5, 2026 · 1 revision

Architecture

Files

File Purpose
Image2ASCII.cpp Entry point: loads the image and starts rendering
ASCIIConverter.h / .cpp Maps a pixel's brightness to an ASCII character; holds the symbol mode
Pixel.h PIXEL class: stores R, G, B and computes brightness
Renderer.h / .cpp Resizes the image, loops over pixels, prints to the console and writes image.txt
Config.h Configuration header
CMakeLists.txt CMake build file
.github/workflows CI workflows
image.txt Example / generated output

Note: the README still refers to ASCII_ART_.cpp and ASCII_ART_.vcxproj. Check these names against the current repository and update the README or this page so they match.

Data flow

image file ──► OpenCV (load, resize 200×200)
                  │
                  ▼
             PIXEL (R, G, B → brightness)
                  │
                  ▼
          ASCIIConverter (brightness → character)
                  │
                  ▼
   Renderer ──► console (BlackWhite / RGB)
            └─► image.txt (plain text)

Responsibilities

  • PIXEL: a small value class. It knows its color and how to compute its own brightness.
  • ASCIIConverter: knows the character sets and which one is active. It turns a brightness value into a single character.
  • Renderer: owns the image processing loop and the output, both console and file.

Clone this wiki locally