Skip to content

vsks/meteOFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

meteOFlow

Optical flow in PHP for meteo.lt radar pictures. Requires GD.

Usage

To initialize class you need two images. Optical flow calculation starts on class construction.

$opticalFlow = new TVL1($firstImage, $secondImage, $fineTune);

Dimensions of images must be the same. As script uses tons of memory $fineTune parameter tells the script when to stop. My sugesstion start at $fineTune = 0 (finest scale), and increase it until memory/time limits are satisfying.

To draw optical flow as lines onto image use method Y2RGB:

$opticalFlow->Y2RGB($image, $scale, $thickness, $color, $step);

where:

  • $image - GD image on which we draw optical flow
  • $scale - (float) optical flow scale factor, scales flow vectors and is used as drawing threshold
  • $thickness - thickness of lines (not used)
  • $step - defines flow drawing grid.

===== Original C code and article can be found here: http://www.ipol.im/pub/art/2013/26/

About

Optical flow in PHP for meteo.lt radar pictures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages