That code is an exact copy from the nuitrack_console_sample app.
The sample app works OK with no problems/errors.
But the same code fails on my own trial app.
I don’t use a custom config, same as the sample app.
I’ve also tried different *Tracker modules but all fails with the same exception.
I’ve checked the project settings/dependencies, and they both match.
The only thing I can think of is that I’m still using a TRIAL copy/license, since I’m still checking if we can use Nuitrack for our purposes.
Does the TRIAL license not work outside of the sample app?
Or is there something else?
There isn’t really much documentation whatsoever as to the reason for “ModuleNotInitializedException”.
I tried the codes you mentioned.
I still get the same “ModuleNotInitializedException” error
Those are the same codes from the nuitrack_gl_sample app, right?
I checked that sample app and it’s working OK as-is.
I then tried all the different *Sensor and *Tracker modules, but all resulted in the same exception.
I read something in another post, and I already have my system vars set:
Are you environment variables set globally or for a single user? They need to be set globally.
Have you rebooted your computer since you set the environment variables? Without a restart they wont likely be seen by a dynamic library.
There is no technical reason that you need to set the \data folder in the path. The default nuitrack.config should find all the files it needs based on the NUITRACK_HOME variable. Provided that you have not edited the config file.
OK - SOOOO - there is also a couple of very weird known issues with the Intel Realsense sensors.
There are a number of reports that the d415 does not always connect correctly to the USB port - and when it doesnt connect correctly - it winds up running in a very degraded performance state. This degraded state is NOT compatible with the nuitrack system.
ALSO - there is an issue we have seen with the d435 which results in the sensor failing to connect to nuitrack more than once without requiring a hard reset - LITERALLY disconnecting the d415 is one workaround we have found - the other involves doing a hardware reset using the realsense sdk - BEFORE starting nuitrack.
Start by doing some tests with the realsense viewer - plugin the sensor and look at the depth settings - if you cannot select above 640x480 - then your device is running in degraded USB 2.0 mode. (NOTE - it may still SAY its USB 3.0 - this is a bug in the realsense sdk current) This will cause issues with nuitrack - which needs to connect at higher raw resolutions.
I checked and it’s correctly set as a global/system var.
And I did restart my machine after updating.
I tried doing a Hardware Reset using the RealSense Viewer app.
I also tried literally unplugging - re-plugging the device.
It’s not running in degraded mode since I can set above 640x480 (i.e. 1280x720) and I can use all the RealSense features normally. It’s also showing USB 3.2 (and it’s detected correctly in Device Manager).
OK, I found the problem: Nuitrack does not work with RealSense SDK v2.12.0.
After downgrading the RealSense SDK to v2.11.1 then using the downgraded realsense.dll, the Exception went away and I can use the APIs normally now.
In the Nuitrack sample apps, it seems the bundled realsense.dll was also built from the same v2.11.1 release.
That’s why it was working.
I may have missed some documentation on supported versions somewhere… but that’s the case right now.
FWIW - Intel are now internally recommending new versions for a number of hardware bug related reasons - specially with the d435 - but the intel website takes a lot of time to catch up with the internal development.
Once intel updates their public recommendations im sure nuitrack will advance their core.
It depends a lot on how you are looking at the image.
If you are looking using the realsense viewer - you see a direct stream of the RGB image.
If you are looking at a frame using nuitrack - then you will be seeing a processed frame.
By default - the size of the RGB frame is downsized by nuitrack to 640x480 which would have the effect of softening the image.
We have found for the 415 that the best approach is to manually set all the frame info for the best results.
// Realsense Depth Module - force to 1280x720 @ 30 FPS
Nuitrack::setConfigValue(“Realsense2Module.Depth.Preset”, “5”); // this set to 3 sometimes helps as well