Message Boards Message Boards

0
|
606 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Connecting to the Wolfram Engine from C++ using WSTP/LLU - Image and Numerical arrays as parameters

Posted 5 months ago

The intend of my application is to collect data from a Pylon Camera. Send the image to a running Wolfram Engine. Let some vision algorithm loos on the picture and display the changed picture in a window.

I use the Library Link Utilitues for WSTP communication. The part where I have problems looks as follows:

          try
          {
              LLU::Image<uint8_t> image(100, 100, 1, colorspace_t::MImage_CS_Gray,false);
              /*
                 Copy the data from the camera in the image object
              */
              test << LLU::WS::Function("test =  Image[]", 1) << image;
          }
          catch (LLU::LibraryLinkError e)
          {
              std::cout << e.message() << std::endl;
          }

When I execute this peace of code it gives the following error message:

WolframLibraryData is not set. Make sure to call LibraryData::setLibraryData in WolframLibrary_initialize.

Normally LLU is used the other way around (calling c++ code from Wolfram).
So my question is, is it possible to use the LLU::Image<uint8_t> class in a stand alone application? When Yes, where should I call setLibraryData (Since this is normally done by the Wolfram Engine I believe). By the way, I've got the same results when using an NumericalArray.

POSTED BY: Bart R.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract