murta
(Rodrigo Murta)
1
Inspired on this site I tried to create a Wolfram Language version of an asciicam.
It’s cool to see how compact is the code!
char=CharacterRange[" ","~"]~Join~Map[Style[#,Bold]&,CharacterRange[" ","~"]];
w=N@Mean@Flatten@ImageData@Binarize@Rasterize@#->#&/@char;
w[[All,1]]=#~Rescale~{Min[#],Max[#]}&@w[[All,1]];
findChar=Nearest[w];
asciiIt[image_]:=Module[{img},
img=ImageAdjust@ColorConvert[image,"Grayscale"];
img=ImageData@ImageResize[img,80];
img=Map[First@findChar[#,1]&,img,{-1}];
Grid[img,Spacings->{0.1,-0.2},ItemSize->{0.4,0.4}]
]
Dynamic[asciiIt@CurrentImage[]]
So we get:

20 Likes
Vitaliyk
(Vitaliy Kaurov)
2
And fun this is! - thanks for sharing. Did I get this correctly - you showing a page of paper where you wrote WL to the camera?
3 Likes
murta
(Rodrigo Murta)
3
Hi @Vitaliy! Cool that you liked It.
Yes, I wrote WL in a page of paper.
1 Like
bernatep
(Bernat Espigulé)
4
Rodrigo, that’s really cool! Thanks for sharing 
I added color, first with ColorNegate@image and then using ImageSubtract:
char=CharacterRange[" ","~"]~Join~Map[Style[#,Bold]&,CharacterRange[" ","~"]];
w=N@Mean@Flatten@ImageData@Binarize@Rasterize@#->#&/@char;
w[[All,1]]=#~Rescale~{Min[#],Max[#]}&@w[[All,1]];
findChar=Nearest[w];
asciiIt[image_]:=Module[{img},
img=ImageAdjust@ColorConvert[ColorNegate@image,"Grayscale"];
img=ImageData@ImageResize[img,50];
img=Map[First@findChar[#,1]&,img,{-1}];
Grid[img,Spacings->{0.2,-0.2},ItemSize->{0.4,0.4}]
]
width=ImageDimensions[Rasterize[asciiIt@CurrentImage[]]][[1]];
Dynamic[ImageSubtract[ImageResize[CurrentImage[], width], Rasterize[asciiIt@CurrentImage[]]]]

Spacings->{0.2,-0.2} gives you the right AspectRatio.
8 Likes
murta
(Rodrigo Murta)
5
@Bernard very cool!.. Using green scale in your code we have a beautiful Matrix effect:
ImageSubtract[ImageResize[ImageMultiply[CurrentImage[], Green], 450],Rasterize[asciiIt@CurrentImage[]]]
3 Likes
murta
(Rodrigo Murta)
7
Recreating Neo in Wolfram Language, cool!.. @Bernart, do you have a user in StackExchange? I posted you gif image there, in the chat room.
1 Like
bernatep
(Bernat Espigulé)
8
@Rodrigo here is my user Geonat. Let’s increase my low-level reputation with this new look. 
2 Likes