Skip to content

Instantly share code, notes, and snippets.

@jpalmer
Created July 1, 2011 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpalmer/1058087 to your computer and use it in GitHub Desktop.
Save jpalmer/1058087 to your computer and use it in GitHub Desktop.
for alex
the hardest part will be identifying where the gels are - if you make the assumption that the gel is vertical in the middle its a bit easier.
Convert all the pixels to grayscale (could use saturation, simple (R+G+B)/3 is probably ok)
First apply an average the pixels over a strip with width of the gel (if this can be higly variable ~ 5 is probably enough)
Now apply a Gaussian filter of width about 5 pixels in the vertical direction (if you get too many bands near each other which shouldn't be there you increase the width of this filter)
band peaks will be roughly where the difference between peaks switches from positive to negative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment