Code Monkey home page Code Monkey logo

blinky's Introduction

Blinky - Eyeblink detector and tracker with recorder

Rodent eyeblink detector for classical eyeblink conditioning. Used for high speed videos captured from Basler's acA640-750um. Contains custom video recorder for Basler USB-cameras (may work with others too) made with PyPylon. Image processing done with OpenCV and GUI with python's Tkinter.

Note: Program is at initial prototype state, but still usable.

Features

Eyeblink detector

  • Detect eye with haar cascade. Cascade from human eye, but works well with animals too.
  • Tracking eye of the moving animal (experimental)
  • Frame Filtering (brightness, contrast, blur)
  • Frame thresholding (binary image)
  • Selects ROI area
  • CSV-output for frame, time and white level from binarized frames
  • Load and save parameters
  • Command line interface
  • Quick and dirty GUI

Basler video recorder

  • Set output file (avi)
  • Select video compression via Video for Windows interface. Not tested with UNIX-like OS:s.
  • Set Basler camera parameters (width, height, fps, exposure time)
  • Preview camera output (still frame).
  • Record

Eyeblink detector

  • Docstrings
  • Save overwrite check/message
  • Threading/multiprocessing for better performance
  • Real-time plotting
  • Peak detection (realtime)
  • Rework to meet the MVC pattern requirements for better structure and maintainability
  • Better GUI (code and ui)
  • Refactoring and cleaning

Basler video recorder

  • Docstrings
  • Threading/multiprocessing for better performance
  • Rework to meet the MVC pattern requirements for better structure and maintainability
  • Better GUI (code and ui)
  • Video preview (instead of still frame)
  • Refactoring and cleaning

How to use:

Install:

  • Install Python 3 (Miniconda)
  • Create Conda environment. if you wish.
  • Activate environment..
  • PIP install following packages:
    • numpy, opencv-python, opencv-contrib-python, Pillow, scikit-video
  • In addition for video recorder install Basler Pylon SDK and pip pypylon

Eyeblink detector

To run gui:

python blinky.py

To run cmd line see the help:

python blinky.py -help

Video recorder

To run gui:

python record.py

GUI examples:

Video Recorder Eyeblink Detector

blinky's People

Contributors

lauritk 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.