GithubHelp home page GithubHelp logo

img2hex's Introduction

img2hex

img2hex es un script en python que permite convertir una imagen a formate hexadecimal para que pueda ser vista en un LCD desde MicroPython o Arduino.

alt text

Instalacion

Es necesario instalar OpenCV para poder procesar las imagenes. En mi caso lo instale desde la consola de la siguiente manera:

install opencv-python install opencv-contrib-python install matplotlib

Forma de uso

La forma de utilizar la herramienta es la siguiente: python img2hex.py img output column row

  • img: indica la imagen que deseamos convertir a formato hexadecimal, se aceptan diferentes formatos (jpg, png).
  • output: es el archivo resultado del proceso, contiene el codigo python con los caracteres resultantes del proceso.
  • column: cantidad de caracteres horizontales que deseamos que ocupe la imagen. Para el caso de los display de 16x2, el maximo es 16.
  • row: cantidad de filas que utilizara la imagen.

Lo recomendable es que se utilice una sola fila, visualmente queda mejor. Si bien el script conviente las imagenes a blanco y negro, y las redimensiona para que se correspondan con el tamaño de la reticula elegida, es aconsejable utilizar imagenes en blanco y negro, y de muy baja resolucion para tener mejores resultados.

Ejemplo

Dentro de la carpeta example hay varias imagenes que se utilizaron para construir la demo del pacman. alt text

img2hex's People

Contributors

gsampallo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.