4 ms·
Pure Ruby colored blob detection
- rawsyntax 15y agofor those interested in just the code, gist here https://gist.github.com/913400 https://gist.github.com/913400
- bai 15y agonice!
- inoop 15y agoBassie!
- wlievens 15y agoThe article started nice, but it was a bit of a disappointment to see he just picked the biggest blob and that's it. Would have loved something more relevant to detecting the shape.
- jkreeftmeijer 15y agoThe point of the article was to detect the biggest red blob, find out where it is positioned and how big it is. Shape detection is an interesting subject too, maybe I'll write about that in the future. :)
- pavel_lishin 15y agoI don't really understand how ( red - green + blue ) determines the pixel's redness.
- timmorgan 15y agoActually, I think it's (red - (green + blue)). Equal parts red, green, blue, e.g. FFFFFF or 555555 is just gray. With this formula, that would be zero -- so no red. With his formula, he's getting any pixel that has 100 out of 255 increments greater than the green and blue channels combined.
- bherms 15y agoI'd like to see more follow up posts on this subject. Computer vision is incredibly interesting and it would be cool to see you elaborate in future posts on more complex algorithms/approaches.