Getting valid LightEstimate values
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
- Include the above code in an ARCore application
- Build the code run it, and then move the phone around
- 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?
Programming error on my part, next time read the sample code in hello_ar_c.