Vision Apps User Guide
Dense Optical Flow Application

Introduction

This application shows a demo of the TI Dense Optical Flow (DOF) hardware accelerator (HWA). The demo takes as input a sequence of input 8b gray scale images in .png or .bmp file format. Each frame is run through dense optical flow OpenVX node. The flow vectors and confidence scores computed by DOF node are mapped based on a color palatte and output to files in .png or .bmp format, or to display if DISPLAY_OPTION is enabled.

Supported plaforms

Platform Linux x86_64 Linux+RTOS mode QNX+RTOS mode SoC
Support YES YES YES J721e

Data flow

vx_app_dof_data_flow.png
Data flow

Steps to run the application on J721e EVM (Linux + RTOS mode)

  1. Build the application and related libraries as mentioned in Build Instructions for Linux+TI-RTOS mode
  2. A sample "app_dof.cfg" for Dense Optical Flow is provided under "/opt/vision_apps/" on the rootfs partition. Update paths and other fields if necessary.
  3. Run the app as shown below
    cd /opt/vision_apps
    source ./vision_apps_init.sh
    ./run_app_dof.sh
  4. Output will be sent to display.

Steps to run the application on J721e EVM (QNX + RTOS mode)

  1. Build the application and related libraries as mentioned in Build Instructions for QNX+TI-RTOS mode
  2. A sample "app_dof.cfg" for Dense Optical Flow is provided under "/ti_fs/vision_apps/" on the boot partition. Update paths and other fields if necessary.
  3. Run the app as shown below
    cd /ti_fs/vision_apps
    . ./vision_apps_init.sh
    ./run_app_dof.sh
  4. Output will be sent to display.

Steps to run the application on PC Linux x86_64

  1. Build the application and related libraries as mentioned in Build Instructions for PC emulation mode
  2. A sample "app.cfg" for Dense Optical Flow is provided under "${PSDKR_PATH}/vision_apps/apps/basic_demos/app_dof/config" folder.Update paths and other fields if necessary.
  3. Run the app as shown below
    cd ${PSDKR_PATH}/vision_apps/out/PC/x86_64/LINUX/$PROFILE/
    ./vx_app_dense_optical_flow --cfg ${PSDKR_PATH}/vision_apps/apps/basic_demos/app_dof/config/app.cfg
  4. Output will be generated as .bmp files in the "output_file_path" folder specified in app.cfg
  5. View the output images in any image viewer

Sample Output

Shown below is a example input and its corresponding output

vx_app_dof_input.png
Input
vx_app_dof_output2.png
Output DOF Flow Vectors
vx_app_dof_output1.png
Output DOF Confidence Map, White is high confidence, Dark is low confidence

Shown below is a sample display on J721e EVM

vx_app_dof_evm_display.jpg