5.0

5.0 | 1 rating Rate this file 71 Downloads (last 30 days) File Size: 1.85 KB File ID: #46114

Ascii Art image converter

by

 

02 Apr 2014 (Updated )

Turns image files into ascii art

| Watch this File

File Information
Description

3 input arguments. The first is the name of the image file (in quotes) you wish to use. The second is a gamma correction factor used to alter the way the product comes out. Fiddle around with numbers between 1 and 5 until it looks good. (generally low numbers make it darker). The third input is the name of a text file you want to output to.
Example function call:
asciipic2('imagename.jpg',2.5,'outputname.txt')

Open the text file in notepad using its standard font and with word wrap turned off to view.

Required Products MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
04 Apr 2014 Yu

Hi Daniel

This is awesome. I have two suggestions that may be helpful.

1) The size of the rectangular that you use to replace ASCII characters is fixed to 4*7. Can you let the program adjust it automatically according to the actual size of the image?

2) In Line 54, I guess the default value of which_char is better to be 0, not 1. Otherwise, the space character will not be used in the TXT figure.

Yu

Contact us