AndroidImageProcessing/AndroidBacteriaImageProcessing — Issue #22: Find ecoli
Author: pakdel
Created: 2011-12-04 16:23:28+00:00
State: open

Find blue areas that represent ecoli.

```python
def filterecoli(img):
red=numpy.compress([False, False, True], img, 2)
green=numpy.compress([False, True, False], img, 2)
blue=numpy.compress([True, False, False], img, 2)

red=192-red.clip(0,192)+64

# Remove green and blue
greenblue=numpy.minimum(192-green.clip(0,192), 192-blue.clip(0,192))
col=(red-greenblue).clip(64,255)-64
col=255-((col*1).clip(0,255))
return col
```

https://github.com/AndroidImageProcessing/AndroidBacteriaImageProcessing/blob/master/data/stage6ecoli.png