Oh, I’m facing the exact same issue with findContours CV3. Which solution did you end up going with in the end?
At last I had to precompile my code into a DLL and use it as external library inside Unreal In general, I recommed to precompile your external code into DLLs to avoid memory issues with unreal’s garbage collector
I hope this could be a little help
I’m curious if you ran into any other issues with cv::findContours when you were investigating this issue. I had similar symptoms and as I kept digging I got strange memory-management-related errors in simple examples using cv::findContours, without Unreal Engine. When I google the issue it seems there is a history of compability issues between Visual Studio and cv::findContours.
I’m running Windows 10 and Visual Studio 2015. I get issues on several computers, but one other possibility is that installing Unreal Engine somehow affects the development environment.
Did you get any issues with cv::findContours without Unreal Engine?
Hi dsjolie
No, I had no issues working with findContours out of Unreal. After dive into this question, I figured out that it was a problem not with findContours but with the std::vector filled inside. I guessed Unreal’s Garbage Collector didn’t know how to free that vector filled “out of its scope” inside OCV. I readed somewhere that Unreal’s GB presents some known incompatibilities with standard containers as well, so they recomend you to use their own containers.
Considering the fact that OCV works with standard containers, I found no more solutions than precompile the code which uses those containers into a DLL
In any case I would never defend the use of Windows or VS as a stable development environment (Windows latest version even less). I’m only using Windows (7 Pro) and VS (2013) because there is more documentation and Unreal’s hot reload functions were built to work in collaboration with VS. I would prefer to use Ubuntu + QTCreator, which is possible, but less supported
I don’t think Unreal Engine is interfering with OCV normal behaviour, but maybe I’m wrong.
Best regards and I hope to be a help in some aspect
Hi ,
Thanks for the quick reply!
I’ll try to update you all if/when I get to the bottom of this on my end.
Hello all.
I am currently following your tutorial about the integration of OpenCV 3.0 into Unreal Engine 4.14. I tried it couple of times and seem to allways get the same error at the end of when I enable the plugin. It reads:
The following modules are missing or built with a different engine version:
UE4Editor-OpenCV.dll
Would you like to rebuild them now?
I click Yes, the build fails and it does not copile. In the end it reads :
X could not be compiled. Try rebuilding from source manually.
I am currently preety new to the Unreal engine, so I don’t know how to go about this error, tried to find out why the newer versions of the engine don’t work but no luck. Any help would be appriciated.
As a project I’m trying to make a simple camera web recorder that build an augmented module above it. To put it simply an augmented reality model.
Best regards, Rokew
Hello Rokew,
I have updated my plugin/tutorial (finally) for UE4 4.14.0 and opencv 3.0. There was a small API change that needed fixing, which is why the plugin wouldn’t compile.
Have fun with your augmented reality project!
Hello again,
First of all thank you very much for your time and upgrade to the plugin (also the tutorial). As I mentioned above, I’m still new to the whole Unreal engine. I would like to ask you a question if you don’t mind since the whole engine is a little confusing to me, for now.
I would need the camera reader to show the input on the screen (not the billboard in the world) so that the only thing you see is your input from your camera, how could I do that?
Thank you in advance if you would be so kind to help me out.
Best regards
Rokew
Hello,
I followed your tutorial,and got the problem the same as Rokew’s.
you said that you had updated the newest tutorial but I couldn’t find it.
I just want to know how to fix the small API change,ver4.13 works fine.
I am newb,too.
best regards