字符摄像头
ASCII Camera,Andrei Gheorghe,2013 年

正在布展…
它是怎么做的
- 第 1 步getUserMedia 获取视频流,绘制到小尺寸隐藏 canvas
- 第 2 步逐像素读取亮度并做对比度增强
- 第 3 步按亮度映射到一串由稀到密的字符
- 第 4 步把字符行拼成文本写入 pre 元素
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Request the webcam with getUserMedia and draw each video frame into a small offscreen canvas, for example 160 by 120. Read the pixels with getImageData, compute luminance per pixel and apply a contrast curve. Map each value to a character ramp ordered from dense to sparse and join rows into a string written to a pre element in a monospace font, adjusting the horizontal sampling to compensate for character aspect ratio.
档案
性能开销
轻重
视觉强度
安静强烈
实现难度
一个下午数周打磨
尺度为策展判断(1 到 5),用于比较和推荐。
核实记录:Opened https://andrei.codes/ascii-camera/ (200, title 'ascii camera'); repo idevelop/ascii-camera exists, licence MIT via GitHub API.


