# How can I get center point of each a bunch of red points

**URL:** <https://discourse.processing.org/t/how-can-i-get-center-point-of-each-a-bunch-of-red-points/3823>\
**Category:** Libraries\
**Created:** [September 25, 2018, 8:26am UTC](https://discourse.processing.org/t/how-can-i-get-center-point-of-each-a-bunch-of-red-points/3823 "2018-09-25T08:26:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [September 25, 2018, 12:49pm UTC](https://discourse.processing.org/t/how-can-i-get-center-point-of-each-a-bunch-of-red-points/3823/5 "2018-09-25T12:49:10Z")

</div>

You would need some sort of [flood algorithm](https://en.wikipedia.org/wiki/Flood_fill).  
Check [this discussion](https://discourse.processing.org/t/cutting-cards-in-an-image/3650/18), I wrote an example that is perfect for your problem.

---

_[View the full topic](https://discourse.processing.org/t/how-can-i-get-center-point-of-each-a-bunch-of-red-points/3823)._
