Items with no label
3335 Discussions

Cannot get the pose, landmarks and expressions for more than one face using the JAVA API

APere24
Novice
1,558 Views

I am not able to process face poses, landmarks, expressions when using the JAVA API. In C# I am able to get these from multiple users but when using the Java library I can't. I am using the libpxcclr.jni64.dll and libpxcclr.java.jar files provided in the 2016 R3 SDK. Can someone help me with this?

Also, I don't have the option of using the IR mode in faceConfig.SetTrackingMode as the PXCMFaceConfiguration.TrackingModeType does not contain that enumeration.

I have to use Java in my project and this is the only missing piece for what I need to implement. I would really appreciate some help in solving this problem.

Thank you!

Andre Pereira

Below follows the code of how I initialize the sense manager:

PXCMSenseManager senseMgr = PXCMSenseManager.

pxcmStatus sts = senseMgr.EnableFace(null);

PXCMFaceModule faceModule = senseMgr.QueryFace();

sts = senseMgr.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, cWidth,

// Retrieve the input requirements

sts = pxcmStatus.PXCM_STATUS_DATA_UNAVAILABLE;

PXCMFaceConfiguration faceConfig = faceModule.CreateActiveConfiguration();

faceConfig.SetTrackingMode(PXCMFaceConfiguration.TrackingModeType.FACE_MODE_COLOR);

faceConfig.strategy = PXCMFaceConfiguration.TrackingStrategyType.STRATEGY_CLOSEST_TO_FARTHEST;

faceConfig.landmarks.maxTrackedFaces = 2;

faceConfig.pose.maxTrackedFaces = 2;

faceConfig.detection.maxTrackedFaces = 2;

PXCMFaceConfiguration.ExpressionsConfiguration econfiguration = faceConfig.QueryExpressions();

econfiguration.properties.maxTrackedFaces = 2;

econfiguration.EnableAllExpressions();

faceConfig.detection.isEnabled = true;

faceConfig.pose.isEnabled = true;

faceConfig.landmarks.isEnabled = true;

econfiguration.Enable();

faceConfig.ApplyChanges();

faceConfig.Update();

sts = senseMgr.Init();

6 Replies
idata
Employee
378 Views

Hello Andre.Pereira,

 

 

Thanks for reaching out!

 

 

Java is not available in the 2016 R3 SDK, as you can see at https://communities.intel.com/community/tech/realsense/blog/2016/12/08/whats-new-in-the-intel-realsense-sdk-2016-r3 https://communities.intel.com/community/tech/realsense/blog/2016/12/08/whats-new-in-the-intel-realsense-sdk-2016-r3 Java support has been deprecated and is only available in previous versions of the RealSense SDK. So, unfortunately, you will not be able to use Java with the 2016 R3 SDK.

 

 

I hope this information helps you,

 

Pedro M.
0 Kudos
APere24
Novice
378 Views

Hi Pedro,

Thank you for your response. I know Java has been deprecated I am using the R2 to use the camera in JAVA. However, most examples in the documentation of that revision are not working in JAVA. Besides the problems I mentioned, I just discovered another example, person tracking is not at all supported and the documentation shows examples to use it in JAVA. This is completely misleading and might guide developers to follow a wrong path like it did with me. In the future, I will probably develop in C++ or C# and then make my own integration with JAVA but did not choose to follow that path due to your incorrect documentation. Please either provide a new jar, jni, dll with the features described in the documentation or change the docs provided with the SDK to reflect reality (R2 docs are still included in R3).

Best,

Andre

0 Kudos
idata
Employee
378 Views

I completely understand your point. Java on SDK R2 was beta, therefore some functions were not fully functional and they might or might not work. I believe this is one the reasons why it was deprecated for the release of SDK R3.

 

 

Nevertheless, I understand how the documentation can be misleading, so, I will make sure to pass your feedback to the appropriate team and hopefully they can provide further clarification on the SDK documentation in order to avoid this kind of situation in future.

 

 

We apologize for any inconvenience this might have caused.

 

Pedro M.
0 Kudos
idata
Employee
378 Views

Hi Andre,

 

 

Could you please let us know where you found the Java documentation? We've been looking for this documents in SDK R3 documentation but we've not been able to find them. Is it possible by any chance that you were looking at SDK R2 documentation?

 

 

Just in case, this is the documentation for SDK R3: https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html

 

 

Pedro M.
0 Kudos
APere24
Novice
378 Views

Hi again Pedro,

Sorry for the delayed response and for my mistake of where I took the documentation from, I was looking at documents I had previously copied from C:\Program Files (x86)\Intel\RSSDK\doc\PDF\ and thought they were from R3. So yes, I was looking at the 2016 R2 documentation for the Java code. I believe many people are still going to download the R2 SDK as it is the only way to install all the features at once and provides many additional features such as Javascript/Java integration, person tracking, etc.

Best,

André

0 Kudos
idata
Employee
378 Views

Hi André,

 

 

Thanks for the clarification. Java not being available in the 2016 SDK R3 is something that has been reported before in the community. Nevertheless, we appreciate you giving us your feedback, it definitively helps us improve the customer experience. Don't hesitate to contact us again if help is needed, we'd be happy to assist you.

 

 

Regards,

 

-Sergio A

 

0 Kudos
Reply