All Projects → symisc → Ascii_art

symisc / Ascii_art

Licence: gpl-2.0
Real-Time ASCII Art Rendering Library

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Ascii art

Litiv
C++ implementation pool for computer vision R&D projects.
Stars: ✭ 82 (-86.31%)
Mutual labels:  algorithms, library, image-processing
Sod
An Embedded Computer Vision & Machine Learning Library (CPU Optimized & IoT Capable)
Stars: ✭ 1,460 (+143.74%)
Mutual labels:  library, image-processing, embedded
Beam
✨ Expressive WebGL
Stars: ✭ 383 (-36.06%)
Mutual labels:  graphics, library, image-processing
Fbg
Lightweight C 2D graphics API agnostic library with parallelism support
Stars: ✭ 349 (-41.74%)
Mutual labels:  graphics, library, embedded
Tslib
Touchscreen access library
Stars: ✭ 416 (-30.55%)
Mutual labels:  library, embedded
Tf Pose Estimation
Deep Pose Estimation implemented using Tensorflow with Custom Architectures for fast inference.
Stars: ✭ 3,856 (+543.74%)
Mutual labels:  image-processing, embedded
Bkasciiimage
Convert UIImage to ASCII art
Stars: ✭ 421 (-29.72%)
Mutual labels:  image-processing, ascii-art
C Sharp Algorithms
📚 📈 Plug-and-play class-library project of standard Data Structures and Algorithms in C#
Stars: ✭ 4,684 (+681.97%)
Mutual labels:  algorithms, tree
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+562.94%)
Mutual labels:  graphics, rendering
Mtlpp
C++ Metal wrapper
Stars: ✭ 425 (-29.05%)
Mutual labels:  graphics, rendering
Competitiveprogramming
A collection of algorithms, data structures and other useful information for competitive programming.
Stars: ✭ 475 (-20.7%)
Mutual labels:  algorithms, library
Touchdesigner shared
TouchDesigner toxes and small projects
Stars: ✭ 385 (-35.73%)
Mutual labels:  graphics, rendering
Pycnn
Image Processing with Cellular Neural Networks in Python
Stars: ✭ 509 (-15.03%)
Mutual labels:  library, image-processing
Datastructure
常用数据结构及其算法的Java实现,包括但不仅限于链表、栈,队列,树,堆,图等经典数据结构及其他经典基础算法(如排序等)...
Stars: ✭ 419 (-30.05%)
Mutual labels:  algorithms, tree
Algorithms
Minimal examples of data structures and algorithms in Python
Stars: ✭ 20,123 (+3259.43%)
Mutual labels:  algorithms, tree
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+641.4%)
Mutual labels:  algorithms, tree
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (-17.53%)
Mutual labels:  graphics, rendering
Imagesharp
📷 A modern, cross-platform, 2D Graphics library for .NET
Stars: ✭ 5,186 (+765.78%)
Mutual labels:  graphics, image-processing
Im3d
Immediate mode rendering and 3d gizmos.
Stars: ✭ 561 (-6.34%)
Mutual labels:  graphics, rendering
Distortos
object-oriented C++ RTOS for microcontrollers
Stars: ✭ 354 (-40.9%)
Mutual labels:  library, embedded

ASCII Art

Real-Time ASCII Art Rendering Library - Live demo: https://art.pixlab.io

ASCII Art is a single file C/C++ library that let you transform an input image or video frame into printable ASCII characters at real-time using a single decision tree. Real-time performance is achieved by using pixel intensity comparison inside internal nodes of the tree.

ASCII Camera Now Availabe On Unity Asset Store: https://assetstore.unity.com/packages/slug/165558

For a general overview on how the algorithm works, check the bottom of the demo page.

Output ASCII art is a related (and older) graphic design technique for producing images from printable characters. This implementation is based on the paper:

N. Markus, M. Fratarcangeli, I. S. Pandzic and J. Ahlberg, "Fast Rendering of Image Mosaics and ASCII Art", Computer Graphics Forum, 2015, http://dx.doi.org/10.1111/cgf.12597

Ribery

Getting started

Embedding the library in your application is straightforward. All you have to do is drop the ascii_art.c and its header file in your source tree plus the hex model that can be downloaded here and perform the following API calls successively:

  1. Call AsciiArtInit first to initialize the ascii_render structure defined in the ascii_art.h header file.
  2. Prepare the image to be processed by converting it to the grayscale colorspace. You can rely on some external library like OpenCV cvtColor or the built-in AsciiArtLoadImage interface.
  3. Allocate a buffer big enough to hold the entire ASCII text output. The amount of bytes needed is returned via the AsciiArtTextBufSize interface. This step is optional if you do not want a text output but instead a binary ASCII glyphs image.
  4. Finally, transform the input image into ASCII glyphs/text via AsciiArtRender.

Below is a simple C program that demonstrates a typical usage of the ASCII Art C/C++ interfaces.

#include "ascii_art.h"

ascii_render sRender; /* Stack allocated */
	
/* Initialize the render structure */
AsciiArtInit(&sRender);
	
/* Load an image from disk */
int width, height;
unsigned char *zBlob = AsciiArtLoadImage(argv[1],&width,&height);
if( zBlob == 0 ){
	puts("Cannot load image");
	return;
}
	
/* Allocate a buffer big enough to hold the entire text output */
size_t nBytes = AsciiArtTextBufSize(&sRender, width, height);
unsigned char *zText = malloc(nBytes);
	
/* Finally, process */ 
AsciiArtRender(&sRender, zBlob, &width, &height, zText,1);
/* zBlob[] hold the binary ASCII glyphs now */
	
/* Output the result */
fwrite(zText, sizeof(char), nBytes, stdout);
	
/* Release memory */
free(zText);
free(zBlob);

sample.c source code

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].