Skip to content

RJSent/USRA_Video_2.0

Repository files navigation

USRA_Video

Table of Contents

  1. Introduction
  2. Installation
    1. Dependencies
  3. Usage
  4. Example
    1. Before
    2. After
  5. Logic
    1. Enhancement
    2. Tracking
  6. License

Introduction

This is a work in progress gem written during undergraduate research with Cleveland State University's physics department. The goal of the gem is to assist with quickly analyzing electron microscope videos of microgels suspended in ionic liquid. This is accomplished in several steps.

  1. Convert the image to black and white, where the microgels are white and the background is black. The header is not adjusted.
  2. Perform object detection of microgel particles using OpenCV and a Haar Cascade model.
  3. Look between adjacent frames, trying to group microgel positions together. This would track the position of microgels for the entire video.
  4. Use the positional data that was just gathered to automatically analyze the microgels.

Installation

Add this line to your application's Gemfile:

gem 'usra_video'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install usra_video

Dependencies

Be sure that ImageMagick and OpenCV 2.4.13.7 are installed on the system. Other versions of OpenCV < 3.0 may work, but are untested. This is a limitation of the ruby-opencv gem dependency. Depending on where OpenCV is installed, the ruby-opencv gem may need to be pointed at the location during installation.

Usage

This gem comes with an executable called usra_video. You can run the application with

 $ usra_video FILE

where FILE is the video you want to analyze.

Example

This is an example showing the effectiveness of the contrast enhancement and particle tracking for silica particles in ionic liquid.

Before

Original image

After

Enhanced and tracked image

Logic

Here are some sequence diagrams that should provide a outline of how the different classes interact with each other. The diagrams were made using Mermaid.

Enhancement

Enhancement sequence diagram

Tracking

Tracking sequence diagram

License

The gem is available as open source under the terms of the MIT License.

Releases

No releases published

Packages

No packages published