x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

OpenCV in Unreal, Strange "Missing Module Exception"

I have a project where I am attempting to wrap some OpenCV objects and wrapping them such that you can utilize OpenCV functionality from within Unreal's Blueprint system.

The project consists of 3 modules (later I will take the relevant modules and form a plugin for distribution). One is the project module that I test the set up, one is the OpenCV library reference module, and the last one is the OpenCV Blueprint wrapper. All dependencies are appropriately set. I made a test UObject C++ class in the OpenCV blueprint wrapper that simply instantiates a cv::Mat (myMatPtr = new cv::Mat();) on construction, and deletes it (FMemory::Free(myMatPtr);) upon destruction. I load up unreal and everything is fine. I instantiate it in an actor, and run it. presumably it is calling into the opencv .dll files creating a cv:Mat and destroying it properly, no errors! Great. I kick it into high gear and start implementing the most popular functionality, which is cv::VideoCapture. I implement it much in the same way I implemented the test object, but now when I try to load the project into the unreal editor I get a runtime exception mid load (~%70). Running it in debug mode reveals it it a "Missing Module Exception," and is thrown just as it tries to instantiate the cv::VideoCapture object in the constructor of the UObject class wrapper. Both class's CPP and H files are in the same place in the file hierarchy, so I'm not sure why there is a problem. If the first works, why not the new one? Relevant source is zipped up Here.

Product Version: UE 4.10
Tags:
classes.zip (1.7 kB)
more ▼

asked Jan 25 '16 at 04:59 PM in C++ Programming

avatar image

SteamyThePunk
68 6 10 13

avatar image SteamyThePunk Jan 25 '16 at 08:09 PM

The AActor functions can be ignored, they are defined, but not implemented, however they are never called, as the classes are UObjects, and not AActors. They have been removed and the problem persists.

I had moved the initialization of the cv::VideoCapture pointer to another blueprintcallable function, and the project loaded, however if I called this initialization function on a given instance of VideoCapture using blueprint, I get an Accessed None error. Does this mean that cv::VideoCapture isn't being compiled and included as I think it is?

avatar image SteamyThePunk Jan 25 '16 at 09:19 PM

Looking further into all of this... I fear that I'm doing this all completely wrong. The closest example I can find of what I'm doing is the incomplete Phya plugin, and I feel like how you're supposed to wrap a third party library is this huge mystery to the community. It's deplorable.

avatar image SteamyThePunk Jan 25 '16 at 10:02 PM

Implementing Unreal Actors in C++ that use OpenCV objects is possible, but trying to make Unreal Objects in C++ that mirror OpenCV objects seems difficult somehow.... I'm probably just implementing UObject classes wrong.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

The issue with the compilation was that I was not copying the dll files with my project's binaries folder, once added everything compiled, Jury's still out if this will work as I want it to however.

more ▼

answered Jan 26 '16 at 02:51 AM

avatar image

SteamyThePunk
68 6 10 13

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question