Skip to content

Commit

Permalink
badge
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 10, 2023
1 parent 94fcb54 commit c3a6bc7
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
[![Build status](https://ci.appveyor.com/api/projects/status/y45eymwuq53pgnsa?svg=true)](https://ci.appveyor.com/project/scivision/barron-optflow)

# Barron Optical Flow Code

[Original code](http://www.csd.uwo.ca/faculty/barron/FTP/)
[![cmake](https://github.com/scivision/barron-optflow/actions/workflows/ci.yml/badge.svg)](https://github.com/scivision/barron-optflow/actions/workflows/ci.yml)

[Original code](https://web.archive.org/web/20181121112545/https://www.csd.uwo.ca/faculty/barron/FTP/)
modified to run with modern compilers.

[Examples](https://scivision.dev/barron1994opticalflow/)

## Build

A C compiler is required.
Some of the programs require a Fortran compiler and/or BLAS library.

- Linux: `apt install gcc gfortran libopenblas-dev`
- Mac: `brew install gcc openblas`

```sh
cmake -Bbuild
cmake --build build
cmake --workflow --preset default
```


Horn-Schunck optical flow on Tree image set

```sh
./horn new2binarytreet. 0.5 1.5 20 100 ../TESTDATA/TREE_DATA/TRANS out/ -B 150 150 -MH -T 5.0
```

## Horn-Schunck
convert output to Postscript and view (can use other viewer beside Evince)

1. Run Horn-Schunck optical flow on Tree image set
```sh
./horn new2binarytreet. 0.5 1.5 20 100 ../TESTDATA/TREE_DATA/TRANS out/ -B 150 150 -MH -T 5.0
```
2. convert output to Postscript and view (can use other viewer beside Evince)
```sh
./flow2ps out/horn.modified.new2binarytreet.F-5.00 out/hornOF.ps
```sh
./flow2ps out/horn.modified.new2binarytreet.F-5.00 out/hornOF.ps

evince out/hornOF.ps
```

Lucas-Kanade optical flow on Tree image set

evince out/hornOF.ps
```
```sh
./lucas new2binarytreet. 1.5 20 1.0 ../TESTDATA/TREE_DATA/TRANS out/ -B 150 150
```

## Lucas-Kanade
convert output to Postscript and view (can use other viewer beside Evince)

1. Run Horn-Schunck optical flow on Tree image set
```sh
./lucas new2binarytreet. 1.5 20 1.0 ../TESTDATA/TREE_DATA/TRANS out/ -B 150 150
```
2. convert output to Postscript and view (can use other viewer beside Evince)
```sh
./flow2ps out/lucas.new2binarytreet.20F-1.00-1.5 out/lucas20F.ps
```sh
./flow2ps out/lucas.new2binarytreet.20F-1.00-1.5 out/lucas20F.ps

evince out/lucas20F.ps
```
evince out/lucas20F.ps
```

0 comments on commit c3a6bc7

Please sign in to comment.