MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit b3b50c69 authored by ATREVI Dieudonne's avatar ATREVI Dieudonne
Browse files

Merge branch 'dev' of https://gitlab.inria.fr/OCSR/chaos into #24_real_menu

parents 51bc39b5 fbdd80c4
......@@ -38,6 +38,8 @@ public class CamRecorder : MonoBehaviour
public float timeToStop = 60; // Time when recording shall stop
public int framerate = 25; // Framerate at which screenshot are taken
public string saveDir = "Img/capture/"; // Directory where to save all the data
private bool runOncePerFrame = false;
#endregion
/// <summary>
......@@ -67,41 +69,54 @@ public class CamRecorder : MonoBehaviour
imageIncrement = 0;
}
private void Update()
{
runOncePerFrame = true;
}
/// <summary>
/// Create screenshot during recording time
/// </summary>
protected virtual void LateUpdate()
{
if (record && !(Time.timeSinceLevelLoad < timeToStart))
{
if (Time.captureFramerate == 0)
Time.captureFramerate = framerate;
if (Time.timeSinceLevelLoad > timeToStop)
{
record = false;
Time.captureFramerate = 0;
Debug.Log("record stopped !");
Application.Quit();
return;
}
if (Time.timeScale==0)
return;
//ScreenCapture.CaptureScreenshot(saveDir + "Images/" + imageIncrement.ToString("D" + 4) + ".png");
this.GetComponent<FiltersControl>().Save(imageIncrement.ToString("D" + 4) + ".png",ConfigReader.recordingWidth,ConfigReader.recordingHeight, saveDir);
// Record data need for deep learning
foreach (DeepRecorder rec in gameObject.GetComponentsInChildren<DeepRecorder>())
{
rec.RecordDeepData(imageIncrement);
}
imageIncrement++;
} else
Time.captureFramerate = 0;
//protected virtual void LateUpdate()
private void OnGUI()
//private void OnPostRender()
{
if (runOncePerFrame)
{
Debug.Log(Time.fixedTime);
if (record && !(Time.timeSinceLevelLoad < timeToStart))
{
if (Time.captureFramerate == 0)
Time.captureFramerate = framerate;
if (Time.timeSinceLevelLoad > timeToStop)
{
record = false;
Time.captureFramerate = 0;
Debug.Log("record stopped !");
Application.Quit();
return;
}
if (Time.timeScale == 0)
return;
//ScreenCapture.CaptureScreenshot(saveDir + "/" + imageIncrement.ToString("D" + 4) + ".png");
this.GetComponent<FiltersControl>().Save(imageIncrement.ToString("D" + 4) + ".png", ConfigReader.recordingWidth, ConfigReader.recordingHeight, saveDir);
// Record data need for deep learning
foreach (DeepRecorder rec in gameObject.GetComponentsInChildren<DeepRecorder>())
{
rec.RecordDeepData(imageIncrement);
}
imageIncrement++;
}
else
Time.captureFramerate = 0;
runOncePerFrame = false;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment