# Image Division Raster

**URL:** <https://discourse.processing.org/t/image-division-raster/38146>\
**Category:** Project Guidance\
**Created:** [July 29, 2022, 9:18am UTC](https://discourse.processing.org/t/image-division-raster/38146 "2022-07-29T09:18:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeykech](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jeykech](https://discourse.processing.org/u/jeykech)\
**Post date:** [July 29, 2022, 9:18am UTC](https://discourse.processing.org/t/image-division-raster/38146/1 "2022-07-29T09:18:56Z")

</div>

hello guys,

I am interested in creating a similar effect like this:  
[![](https://i.pinimg.com/564x/31/8d/92/318d928da22affcd16d89eb02ff26f14.jpg) ](https://i.pinimg.com/564x/31/8d/92/318d928da22affcd16d89eb02ff26f14.jpg)  
I am interested in recreating this irregular grid effect that follows the brightness of different areas of the image.  
any advice where to start, an algorithm or tutorial ?  
thanx

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [July 30, 2022, 8:39am UTC](https://discourse.processing.org/t/image-division-raster/38146/2 "2022-07-30T08:39:38Z")

</div>

Hi @jeykech,

Starting points …

- [Wikipedia Quadtree](https://en.wikipedia.org/wiki/Quadtree?wprov=sfla1)
- [Dan’s videos about Quadtrees](https://youtu.be/OJxEcs0w_kE)

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![jeykech](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jeykech](https://discourse.processing.org/u/jeykech)\
**Post date:** [July 30, 2022, 9:51am UTC](https://discourse.processing.org/t/image-division-raster/38146/3 "2022-07-30T09:51:35Z")

</div>

Hi @mnse ,

Thanks for your answer, I am familiar with quad tress but what about the initial seeding ?

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [July 30, 2022, 10:33am UTC](https://discourse.processing.org/t/image-division-raster/38146/4 "2022-07-30T10:33:55Z")

</div>

Hi @jeykech,

Not clear what you exactly mean…  
If I wanted to recreate the above I would do the following as a starting point …

- Choose a picture
- Calculate the average brightness
- Subdivide and compare the single averages against threshold. If under threshold discard.
- Otherwise repeat the process with subdivisions.
- Consider the max depth level to not let the smallest quads to small.
- For the visual representation it’s weather white on black or black on while depending of the average brightness compared to another threshold and size of round rect depending on the variance.
- Refine to get a good result…

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![jeykech](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jeykech](https://discourse.processing.org/u/jeykech)\
**Post date:** [August 2, 2022, 3:02pm UTC](https://discourse.processing.org/t/image-division-raster/38146/5 "2022-08-02T15:02:18Z")

</div>

@mnse I’ll give it a try, thanx !
