arcore-android-sdk icon indicating copy to clipboard operation
arcore-android-sdk copied to clipboard

Getting valid LightEstimate values

Open ptc-dberry opened this issue 7 years ago • 1 comments

SPECIFIC ISSUE ENCOUNTERED

I have just tried to log out some values for light estimates using the following code.

`
ArLightEstimate *lightEstimate; float colorCorrectionValues[4] {}; ArLightEstimate_create(arSession, &lightEstimate); ArLightEstimateState lightEstimateState {}; ArLightEstimate_getState(arSession, lightEstimate, &lightEstimateState);

if (lightEstimateState == AR_LIGHT_ESTIMATE_STATE_VALID) {
    ArLightEstimate_getColorCorrection(arSession, lightEstimate, colorCorrectionValues);
    LOG("Colour correction values: r=%f g=%f b=%f i=%f", colorCorrectionValues[0],
                                                         colorCorrectionValues[1],
                                                         colorCorrectionValues[2],
                                                         colorCorrectionValues[3]);
}
else
{
    LOG("Colour correction values are not valid");
}
ArLightEstimate_destroy(lightEstimate);

`

I've tried on a couple of phones now Samsung Note 9 running Android Pi and ARCore 1.7 and a Nokia 8 Scirocco one phone running ARCore 1.7 and in both cases I never see a valid light estimate being returned. Is there anything I need to do with the phone in order to see valid values being returned?

VERSIONS USED

  • Android Studio: 3.1.4

  • ARCore SDK for Android: 1.6

  • Device manufacturer, model, and O/S: Nokia 8 Scirocco, TA-1005, Android 8.1.0 Samsung Galaxy Note 9, SM-N960F

  • ARCore: Packages: versionName=1.7.190128066

STEPS TO REPRODUCE THE ISSUE

  1. Include the above code in an ARCore application
  2. Build the code run it, and then move the phone around
  3. I don't ever see anything other than invalid lighting estimates

WORKAROUNDS (IF ANY)

ADDITIONAL COMMENTS

We are getting the video background using the camera frame not the gpu.

Is there something I need to do with the phone that would mean we would see valid values, is there anything we need to do with the configuration?

ptc-dberry avatar Feb 27 '19 15:02 ptc-dberry

Programming error on my part, next time read the sample code in hello_ar_c.

ptc-dberry avatar Feb 27 '19 18:02 ptc-dberry