Calibrated ASCII image reproduction

character-map-half-spacing.png

Process in progress. Planned implementation in browser using <canvas>:

  1. Generate character map

    • Manually: Typewriter + scan - use blocks of each character to obtain more accurate measurement.
    • Automatically: Render text to image using specific font.
  2. For manual scans, adjust ‘grid’ width, height, rows, columns so each character (block) is separated.

  3. Weigh each character and save into array of form
    [ [weight (0-255), ASCII character] , [weight (0-255), ASCII character] , … ]

  4. Calculate aspect ratio correction - letter width : line height

  5. Select image for ASCII conversion.

    • Crop (realtime preview)
    • Adjust B&W conversion color balance (realtime preview)
  6. Input largest target dimension.

    • No. of letters in 1 row for ‘portrait’
    • No. of rows on a page for ‘landscape’
  7. Use Floyd-Steinberg dithering to reduce image to ASCII ‘colors’ (weights as per array described in 3).

  8. Generate text based on above settings (realtime preview)

  9. Optionally: Show preview using target font (requires extra process for typewriter fonts)

  10. Optionally: Reduce character map or manually edit weights (ie. to remove superscript characters or increase perceived weight of #)

 
1
Kudos
 
1
Kudos

Now read this

Active crossover in Linux with the amazing TI chip amps

You’ve probably noticed that many speakers have more than one uh, speaker. These speaker systems are called 2-way, 3-way, 4-way, and so on depending on how many individual speakers, or ‘drivers’, they have. Multi-way speaker systems... Continue →