OFX OpenCV plugins on Windows


Is it possible to develop and build OFX plugins using OpenCV on windows?
The compiling instructions are just for Unix/Linux/FreeBSD/OS X.


Of course :slightly_smiling:

We use (as you know) MSYS on Windows, so the instructions should be the same, just remember to install OpenCV through pacman.


I Installed OpenCV, but the compiler issues some errors when I compile the plugins.
There are two ofx-opencv plugins on the repository: VectorGenerator and opencv2fx.

using make CONFIG=release BITS=64 or just make clean && make I could build VectorGenerator.ofx.
Added to the plugin path to Natron but it doesn’t appear in the plugins ‘time’ group, as it should.
Tried both the release and debug folders but they dont work.
After I compile, the first time I run Natron it issues the message:

couldn’t open library C:/msys64/home/Seba/openfx-opencv-master/VectorGenerator/MINGW64_NT-10.0-64-release\VectorGenerator.ofx.bundle\Contents\win64\VectorGenerator.ofx because Specified module could not be found.
** was returned

any idea on how to solve this?

With opencv2fx there’s another error:

  • #error “This code won’t work with OpenCV3 since it uses the - now gone for good - opencv-legacy module”.*

thanks in advance for your help.


VectorGenerator.ofx depends on various OpenCV dll’s, so you need to bundle them and make a manifest, or just copy them to the same folder as Natron.exe.

Use DependencyWalker to find out what you need.


I used dependency walker, I think there’s a problem with the dlls:


Do you know how can I find them?

I downloaded them from two different repositories, added them to the natron.exe path , but non of them worked.
No I get another error in Natron when it tries to load the plugin .ofx file:

couldn’t open library C:/msys64/home/Seba/openfx-opencv-master/VectorGenerator/MINGW64_NT-10.0-64-debug\VectorGenerator.ofx.bundle\Contents\win64\VectorGenerator.ofx because %1 Is Not a Valid Win32 Application

any idea?


You also need to check the dependencies on the OpenCV DLL’s.


Thanks for your help and time.

what do you mean exactly, how can I find other dlls?

these are the only missing dependencies I can see in dependency walker :

I also looked for dlls in the OpenCV.ofx, but it issues the same two dlls.

Due to this problem, I considered migrating the whole project to Linux.
It was easier to compile, now I can see the VectorGenerator plugin loaded in Natron.
But it crashes when I apply it to any video.
I understand openfx-opencv is not part of the natron project, so they are not are guaranteed to work.

I´m a bit lost now, because I needed some of opencv functions for my implementation. Maybe I should try CImg instead, despite it wasn´t my first plan.



You must open the OpenCV dll’s in dependency walker, as they probably depend on other dll’'s.

You should only use openfx-opencv as a guide to implement OpenCV, I’m unsure if any of the plugins actually work anymore.

Linux is a much better platform to develop on than Windows IMHO.


the opencv plug-ins used to work so it’s probably very little fix to make it work. We don’t support them as we don’t have yet any need of making a bunch of opencv based plug-ins. OpenCV is very heavy and brings a lot of dependencies. Since Natron already brings a lot of 3rd party, we’d rather stay away from it if we can.