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.