mWater / mWater-Android-App

An Android App that snaps a picture of a petrifilm, counts the bacteria and posts the counts on a server for the mWater project
https://github.com/AndroidImageProcessing
GNU General Public License v3.0
24 stars 16 forks source link

Remove the yellow grid #20

Closed pakdel closed 12 years ago

pakdel commented 12 years ago

Find and remove the yellow grid on the petri-film.

def removeyellow(img):
    h, w = img.shape[:2]

    # Get max histogram value
    for x in xrange(0,w):
        for y in xrange(0,h):
            img[y][x][0]=max(min(img[y][x][1],img[y][x][2]),img[y][x][0])

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