After the camera is opened [DepthHandler.java](TraitDetector/app/src/main/java/com/wur/invite/traitdetector/depth/DepthHandler.java) actiates ARCore and starts streaming from the camera. Everytime a frame is drawn (`onDrawFrame` based on the ARCore Getting Started application) there is a check whether the button for capturing a photo is pressed.
After the camera is opened [DepthHandler.java](TraitDetector/app/src/main/java/com/wur/invite/traitdetector/depth/DepthHandler.java) actiates ARCore and starts streaming from the camera. Everytime a frame is drawn (`onDrawFrame` based on the ARCore Getting Started application) there is a check whether the button for capturing a photo is pressed.
## Summary
The model creates a folder in the `Gallery` for each variety using the format `<year>_<trial id>_<variety id>`. Within this folder the raw image is stored as well as the individual masks as extracted by the model.
The variety data that is calculated is stored in the `trialData.json` file. This `json` file contains an array with all the individual trials, with average scores for each individual traits. The final output after hitting the "snapshot" button is:
```json
"traits":{
"27":{"score":0,"value":0.8279384255409241},
"31":{"score":0,"value":1503.8},
"34":{"score":0,"value":73.20500335693359},
"101":{"score":0,"value":60.49634323120117},
"102":{"score":0,"value":1355690.838366231},
...
}
```
For more information on how the output is generated look below.