# Processing (3.5) with kinectV2 on depth value

**URL:** <https://discourse.processing.org/t/processing-3-5-with-kinectv2-on-depth-value/8230>\
**Category:** Libraries\
**Created:** [February 8, 2019, 9:45pm UTC](https://discourse.processing.org/t/processing-3-5-with-kinectv2-on-depth-value/8230 "2019-02-08T21:45:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zznwsuaf](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznwsuaf](https://discourse.processing.org/u/zznwsuaf)\
**Post date:** [February 8, 2019, 9:45pm UTC](https://discourse.processing.org/t/processing-3-5-with-kinectv2-on-depth-value/8230/1 "2019-02-08T21:45:58Z")

</div>

Hello,  
I am working on using Processing 3.0 to get depth value of KinectV2 sensor. The data can show in the Console, but I just do not know how to save the depth data into a csv or txt file (preferred csv). Can someone help a bit? Below is my code.

```auto
import KinectPV2.*;
KinectPV2 kinect;

void setup() {
  //size(1024, 848, P3D);
  size(512, 424, P3D);
  kinect = new KinectPV2(this);
  kinect.enableDepthImg(true);
  //kinect.enableInfraredImg(true);
  //kinect.enableInfraredLongExposureImg(true);
  kinect.init();
}

void draw() {
  background(0);
  
  image(kinect.getDepthImage(), 0, 0);
  //raw Data int values from [0 - 4500]
  int [] rawData = kinect.getRawDepthData(); 
  println(rawData);
   
  delay(1000);
  println("haha it is saved!!!!!!!!!!!!!!!!!!!!!!!!!");

}

```

---

<div class="post-metadata">

**Author:** ![figraham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/figraham/32/4161_2.png) [@figraham](https://discourse.processing.org/u/figraham)\
**Post date:** [February 9, 2019, 3:46am UTC](https://discourse.processing.org/t/processing-3-5-with-kinectv2-on-depth-value/8230/2 "2019-02-09T03:46:21Z")

</div>

Check out the [Table class](https://processing.org/reference/Table.html), if you can find a way to format the data into a table it’s super easy to save as a csv. [Here’s a video](https://www.youtube.com/watch?v=woaR-CJEwqc) by Dan Shiffman about the Table class. It’s more about loading data however it covers the structure of the table class.
