This package has been deprecated

Author message:

this project is renamed to seurat

image-to-braille

0.0.3 • Public • Published

image-to-braille

Build Status NPM Version Dependency Status License

utility to generate a braille text from an image

Installation

requirements:

npm:

npm install -g image-to-braille

Usage

$ image-to-braille image/lena.jpg

⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠉⢏⣹⣾⣻⣿⣿⣿⣿⣿⣻⣿⣻⣿⣿⢟⣿⡵⠋⠓⠅⡀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⣠⠄⠉
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠚⡭⠻⣭⣋⣿⡓⣽⣏⠋⠫⠊⡉⢛⢿⣽⠂⡏⠀⠋⠃⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⢦⠟⠁⠀⠀
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠘⠈⠨⡳⠋⢄⢛⢺⣀⣄⣠⣤⣄⣈⡘⠓⠀⣥⣄⠵⢊⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠘⠁⠀⠀⠀⠀
⣿⣿⠏⢹⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠁⠤⠞⠐⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣀⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠂⠀⠀⠀⠀⠀⠀
⣿⠃⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⠀⠘⠟⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀⣾⣿⣿⡏⠙⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⣠
⠃⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⣠⣼⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⢺⣿⣿⡇⠀⠈⢿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⢠⣾⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠀⣨⢾⢿⠿⢉⣭⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⢸⣿⣿⡇⠀⠀⢀⣽⣿⣟⠁⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⢸⠇⠀⠀⢀⠈⣡⠮⣃⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣼⣿⣿⢇⣠⣴⣿⣿⣿⣿⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣾⣇⠀⠀⠀⠠⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣿⣿⣃⠀⡠⣾⠟⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⠁⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣿⣿⢿⣂⠈⣡⡾⢫⡾⣿⢟⢕⠀⠈⠻⠈⠉⠙⠉⢉⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⣁⡼⠃⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢼⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⠣⠼⢋⠐⣩⠞⠃⠉⠀⠀⠀⠀⠀⠀⡠⣲⣿⣿⣿⣿⣿⣿⠟⠋⡉⣶⣶⡿⠋⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢹⡿⠁⠀⣩⠔⠂⠀⠀⠀⠀⠀⠀⠀⡀⣹⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⣾⠉⠀⠀⠀⠀⠀⢀⢣⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢘⡇⣀⠤⠀⠀⠀⠀⠀⠀⠀⠰⠀⣪⣾⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⢸⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣰⡆⢡⠍⠀⠀⠀⠀⠀⠀⠀⠀⢔⣼⣿⡿⢿⡭⡙⠛⢿⣿⣿⣿⡿⠟⡃⠀⠈⡆⠀⠀⠀⠀⣼⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠃⠀⠀⠀⠀⢰⣿⡟⠏⠀⠀⢀⠀⠀⠀⠀⠀⠀⢬⣿⡿⠋⠀⠀⢀⣦⠈⠻⣿⣿⢏⠀⣠⠀⠀⠀⡇⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⡇⠀⠀⠠⠴⠉⠁⠀⠈⠀⠀⠈⢀⠀⠀⠀⢀⣲⣿⠋⢰⣿⣷⣶⣿⣽⣿⣦⣾⣿⣷⣯⡁⠀⠀⠀⣧⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⡇⢀⠀⡉⠁⠀⠀⢐⠀⠀⠀⠀⠀⡢⡀⢀⢲⡟⠁⠀⢼⣿⣿⣿⣿⣿⣿⡿⢸⣿⣿⣿⣟⠂⠀⠀⣿⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⡇⠨⠈⠃⠀⠀⠈⡵⢁⠀⠀⠀⠊⠁⢠⣆⠏⠀⠀⠀⠘⣿⣿⣿⣿⣿⡏⡧⠜⣿⣿⣿⠋⠀⠀⠀⢸⡆⢀⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⡇⠀⠠⠀⠀⠈⠀⠀⢙⠀⠒⠀⣠⡔⠩⠋⠀⠀⠀⠀⢠⢽⣿⣿⣿⣿⣷⣶⣶⣾⣿⡿⠁⠀⠀⠀⠘⠄⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⣇⠔⡠⠀⠀⠀⢀⠀⠀⠈⢐⢷⢏⡔⠀⠀⠀⠀⠀⠀⠐⠹⣿⣿⣉⠛⣛⣋⣛⣛⡹⠃⠀⠀⠀⠀⠀⣧⣿⣿⣿⣿⣿⣿⣿⡏⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⡇⠰⠀⠘⠀⠀⠼⢠⠀⠒⡿⡷⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢘⣿⣿⣶⣥⣭⣽⡿⠁⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠃⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⢸⣿⣿⣿⠇⡠⠄⠀⠀⠀⠰⠀⠑⡬⡧⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣈⣙⣿⣿⣿⣿⣁⠀⠀⠀⠀⠀⠀⠀⣿⠛⠿⠿⣿⣿⣿⡟⢰⣿⣿⣿⣿⡿⠟⠋
⣤⡀⠀⠀⣿⣿⣿⣇⠐⠀⠀⣀⠀⠀⠀⠰⠁⣠⡐⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⢀⢜⣿⣿⣿⣿⣿⣿⣿⣶⣤⡀⠀⠀⠀⣿⣾⣦⣤⣀⠀⠈⡁⢸⣿⣿⡿⠋⠀⠀⠀
⠘⣿⡆⠀⣿⣿⣿⣏⠀⠀⠀⠀⠀⠀⠈⠀⠀⠸⣋⡌⢰⠀⠀⠀⠀⠀⠀⠀⠀⡰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⢠⣿⣿⣿⣿⣿⡧⠄⣦⣿⣿⡿⠁⠀⠀⠀⠀
⠀⣻⡇⠀⣿⣿⣿⡷⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⢮⠗⣜⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⢸⣿⣿⣿⣿⣯⠓⣾⣿⣿⣿⠃⠀⠀⠀⠀⠀
⠀⢸⣿⠀⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠂⡀⠀⠀⠀⠀⠀⠐⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣸⠿⢿⣿⣿⣧⣶⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀
⠀⢸⣿⠀⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠉⠙⣻⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀
⠀⠸⣿⡂⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⢽⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣿⡇⣿⣿⣿⠅⠀⠀⠀⠀⠠⠀⠐⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠡⣞⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⡀⢀⡠⠀⠀⠀⠀⢠⠀⠀⠀⠀

* The braille characters cannot display on Windows.

Options

$ image-to-braille --help

Usage: image-to-braille [options] path/to/image

  -w, --width Number      width(cols) of the converted text
  -h, --height Number     height(rows) of the converted text
  -t, --threshold Number  threshold for binarization - default: 128
  -i, --invert            invert to negative
  -o, --output String     write the converted text to this file
  -p, --print             print out the converted text
  -v, --version           show version
  --help                  show help

API

  • convert(src: string|Buffer, opts: object): Promise<string>
    • src: string path of the source image file
    • src: Buffer Buffer of the source image
    • opts: object
      • width width(cols) of the converted text - default: 60
      • height height(rows) of the converted text
      • threshold threshold for binarization - default: 128

Example

var imageToBraille = require("image-to-braille");
 
imageToBraille.convert("image/lena.jpg", {
  width: 100, height: 50, threshold: 64
}).then(function(result) {
  conosle.log(result);
});

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i image-to-braille

Weekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • mohayonao