# BlobDetection library: Can it find light-colored blobs instead of only dark ones?

**URL:** <https://discourse.processing.org/t/blobdetection-library-can-it-find-light-colored-blobs-instead-of-only-dark-ones/36755>\
**Category:** Libraries\
**Created:** [May 7, 2022, 9:51am UTC](https://discourse.processing.org/t/blobdetection-library-can-it-find-light-colored-blobs-instead-of-only-dark-ones/36755 "2022-05-07T09:51:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 8, 2023, 3:52pm UTC](https://discourse.processing.org/t/blobdetection-library-can-it-find-light-colored-blobs-instead-of-only-dark-ones/36755/3 "2023-06-08T15:52:28Z")

</div>

Hello @m0nsterm0vi3 ,

This topic may be of interest to you:

> [@How to use SPOUT input with 11.10: Computer Vision: Adding Lifespan to Blobs - Processing Tutorial](https://discourse.processing.org/t/how-to-use-spout-input-with-11-10-computer-vision-adding-lifespan-to-blobs-processing-tutorial/40735):
>
> Hi, I am relatively new to Processing. I am trying to make the Blobtrack Persistance example (as seen in [this](https://www.youtube.com/watch?v=o1Ob28sF0N8) video) work with Input from SPOUT receiver instead of the webcam input. Does anybody have an advice for me? Many thanks in advance, Marijn

> [@jamshark70](#):
>
> Should I assume, then, that `filter(INVERT)` only affects display but does not affect the image contents?
> 
> Is there a function that inverts the actual pixel values?

I adapted this example:  
[https://processing.org/reference/libraries/video/Capture.html](https://processing.org/reference/libraries/video/Capture.html)

And this code (modify example above) will invert and display the image:

```auto
void draw() {
  if (cam.available() == true) {
    cam.read();
  }
  
  image(cam, 0, 0);
  
  PImage img = cam.copy();
  
  img.filter(INVERT);
  image(img, width/2, 0); // Moved it over
}

```

`:)`

---

_[View the full topic](https://discourse.processing.org/t/blobdetection-library-can-it-find-light-colored-blobs-instead-of-only-dark-ones/36755)._
