Esempio n. 1
0
    private void HandleFrameReceivedCallback(ARCameraFrameEventArgs obj)
    {
        ARLightEstimationData lightEstimation = obj.lightEstimation;

        Debug.Log("Camera Frame received");
        avgBrightness   = lightEstimation.averageBrightness != null ? (float)lightEstimation.averageBrightness : -1;
        avgColorTemp    = lightEstimation.averageColorTemperature != null ? (float)lightEstimation.averageColorTemperature : -1;
        colorCorrection = lightEstimation.colorCorrection != null ? (Color)lightEstimation.colorCorrection : Color.black;
    }
Esempio n. 2
0
    void OnCameraFrameReceived(ARCameraFrameEventArgs camFrameEvent)
    {
        ARLightEstimationData led = camFrameEvent.lightEstimation;

        if (led.averageBrightness.HasValue)
        {
            lightComponent.intensity = led.averageBrightness.Value;
        }
        if (led.averageColorTemperature.HasValue)
        {
            lightComponent.colorTemperature = led.averageColorTemperature.Value;
        }
    }