Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.14 KB

File metadata and controls

40 lines (27 loc) · 1.14 KB

MIT licensed

OpenVX Optical Flow

A sample application that runs Pyramidal Lucas-Kanade Optical Flow on a video file or live camera stream using an OpenVX graph. OpenCV is used for video decode and display.

Prerequisites

Build

export OPENVX_DIR=/opt/rocm

mkdir opticalFlow-build && cd opticalFlow-build
cmake -DOPENVX_INCLUDES=$OPENVX_DIR/include/mivisionx \
      -DOPENVX_LIBRARIES=$OPENVX_DIR/lib/libopenvx.so \
      ../MIVisionX/apps/optical_flow/
make

Run

# From a video file
./opticalFlow --video <path/to/video.mp4>

# From a live camera
./opticalFlow --live <capture-device-id>

Example using the included sample video (adjust the path to where MIVisionX was cloned):

./opticalFlow --video /path/to/MIVisionX/data/videos/AMD_driving_virtual_20.mp4