Optical Flow SDK 5.0-7 on windows

Following the build instructions for the NvOFTracker, it requires opencv and I found that opencv doesn’t build until I install harfbuzz,

First install harfbuzz
git clone git@github.com:harfbuzz/harfbuzz.git
cd hardbuzz
pip install meson
meson build --wrap-mode=default
cd build

and then I have to fix the generated opencv_freetype.cxproj so that AdditionalLibraryDirectories points to these folders:


Then the opencv link step can find freetype.lib and harfbuzz.lib and the build succeeds. I don’t know if you can fix this somehow by adding more to your handy installOCV_Windows.sh script. Perhaps theres a way to disable freetype feature in opencv cmake setup, unless your samples use that to write some text on the video streams…

Hi @clovett,

thank you for letting us know. I suspect there was some change lately to the OpenCV dependencies that introduced this additional work.

I’ll forward your post and ask the team to check if this is a general issue or something isolated to your setup for some reason.


1 Like

I eventually got everything working. I had to install latest nvidia device driver (which was mentioned in the doc already) and I had to do a manual install of ffmpeg, it was not found in your Video Codec SDK download like the readme says it should be in VideoCodecSDK/Samples/External/FFmpeg/lib/x64, that folder didn’t exist. So I also had to modify the ~\Optical_Flow_SDK_5.0.7\NvOFTracker\NvOFTSample\CMakeLists.txt to not look in that location.

Disabling BUILD_opencv_freetype in the CMake Options works as well.

I had other issues; namely that my Python version wasn’t getting detected properly, but adjusting the Windows Paths to only include the Python I wanted, and restarting the CMake configuration from scratch in the CMake GUI and manually configuring which options I want seems to be getting be pretty far.

(Disabling Test and Sample Building was essential to getting a reasonably fast compile time, but now I’m rolling with blazing fast Optical Flow!)