Code Monkey home page Code Monkey logo

video2lcd's Introduction

Video2Lcd

English|简体中文

This is a software to convert video to lcd format and its source code based on Python 3. You can use the python script videoToBin.py to simply get the image bin file.

demo

Structure

video2lcd/
    ├─images/                     // test input images
    ├─output/                     // output bin files
    ├─Proteus/                    // MCU simulation folder
    │  ├─program/                 // source program based on Keil
    │  └─simulation/              // simulation files based on Proteus
    ├─source/                     // source code folder
    │  ├─outputImg/               // some test images
    ├─tools/                      // two transcoding tools
    │  ├─binHEBING合并bin文件/     // merge bin files
    │  └─Image2Lcd/               // convert images to lcd format
    └─videos/                     // test input videos

Simple use

  1. After cloning this repo you should have a python environment not less than 3.7.4.

  2. Then inatall opencv-python.

    pip install opencv-python
  3. If you want to plot results, you should also install matplotlib.

    pip install matplotlib
  4. Use binarization.py to verify the effectiveness of different algorithms.

    simpleBinary adaptiveBinary12864-1 otsuBinary12864

  5. Use imgToBin.py to test the transform method on one image.

  6. Use videoToBin.py to simply get the image bin file.

    We offer two kinds of binarization method: Global & Local, the conversion effect is as shown above.

    We provide parameters to suit different conversion needs:

    freq=3,                      # extract frame interval
    transMode='Global'/'Local',  # transform mode
    reverse=False,               # whether the color is reversed
    reOrder=False,               # whether the bytes are in reverse order
    UDFlip=False,                # whether to scan from bottom to top
    RLFlip=False,                # whether to scan from right to left
    scanMode=0(0,1,2,3)          # scanning mode: 
    # 0 horizontal scan; 1 vertical scan; 2 data horizontal, byte vertical; 3 data vertical, byte horizontal

    When you get the .bin file under /output/, you can rename it into .mmc. Then copy it into /Proteus/simulation, add it into the sd card at sd.pdsprj.

Installation

Go to source code folder

cd source

Create a virtual environment using venv

python -m venv env

Source the virtual environment

Windows:

cd env/bin
activate

Linux:

source env/bin/activate

Use the package manager pip to install requirements.

pip install -r requirements.txt

p.s. The graphics window software is under development, the Qt Designer file is source/simpleUI.ui.


Todo List:

  • Develop the corresponding graphics window software.
  • Support color video generation.

coming soon~

video2lcd's People

Contributors

dehua98 avatar renzehua1998 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

video2lcd's Issues

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.