# Split screen in 4 (Processing 3.3.6 - Windows + Kinect v2)

**URL:** https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570
**Category:** Coding Questions
**Created:** [August 12, 2018, 1:08pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570 "2018-08-12T13:08:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Niubbie](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@Niubbie](https://discourse.processing.org/u/Niubbie)
#### Post date: [August 12, 2018, 1:08pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/1 "2018-08-12T13:08:25Z")

</div>

Hi! I’m new in the Processing world, really new.  
I was looking on the web to find a way to split the screen in 4 parts, but i can’t find a code that helps me do this. Now i am using (or try to ahah) the 3.3.6 Processing version. Could some one help me?  
I would use the 4 part for display the same video, taken by a kinect v2.  
Sorry for my bad english, if something it’s confuse, I can try to explane my self better. Thank you 🙂

---

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [August 12, 2018, 1:13pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/2 "2018-08-12T13:13:13Z")

</div>

You can use the following:

```auto
image(img, 0, 0, width/2, height/2);
image(img, width/2, 0, width/2, height/2);
image(img, 0, height/2, width/2, height/2);
image(img, width/2, height/2, width/2, height/2);

```

---

<div class="post-metadata">

### Author: ![Niubbie](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@Niubbie](https://discourse.processing.org/u/Niubbie)
#### Post date: [August 12, 2018, 1:17pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/3 "2018-08-12T13:17:26Z")

</div>

I tried and it says “img cannot be resolved to a variable”. Maybe I am doing something wrong ☹  
Could you be more specific, please?

---

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [August 12, 2018, 1:21pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/4 "2018-08-12T13:21:01Z")

</div>

It is because it supposes that you have a `PImage` variable called `img` in which you are storing the current frame of you kinect.

---

<div class="post-metadata">

### Author: ![Niubbie](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@Niubbie](https://discourse.processing.org/u/Niubbie)
#### Post date: [August 12, 2018, 1:25pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/5 "2018-08-12T13:25:10Z")

</div>

Oh, ok! Thank you! 🙂

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [August 13, 2018, 5:10am UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/6 "2018-08-13T05:10:58Z")

</div>

Check this post: [https://forum.processing.org/two/discussion/21990/get-depth-value-for-each-pixel#latest](https://forum.processing.org/two/discussion/21990/get-depth-value-for-each-pixel#latest)

Kf

---

<div class="post-metadata">

### Author: ![Niubbie](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@Niubbie](https://discourse.processing.org/u/Niubbie)
#### Post date: [August 14, 2018, 2:24pm UTC](https://discourse.processing.org/t/split-screen-in-4-processing-3-3-6-windows-kinect-v2/2570/7 "2018-08-14T14:24:42Z")

</div>

Hi! I have another question. Could I split the screen in 4 coves, instead of 4 square? Like I said before, in every coves should be seen the image take from the kinect (the same image, replicate 4 time).  
Thanks a lot for your time.
