I’ve been playing with trying to mimic the visual system for a while now, and I’m currently programming OpenCL code to mimic the function of the Retinal Ganglian Cells in the eyes. I think I’ve come across a few useful finds:
(Note: this is optimized so I can see things, not for HTM, yet.)
Both of those filters above are programmed to mimic RGCs. The one on the right mimics ‘midget’ RGCs with small input areas. It computes top hat and black hat filters, like the RGC center-surround/surround-center activations, and adds or subtracts that from grey (so I can see what’s happening). I don’t think it beats any of the other current edge detectors, but I had fun making it.
Interestingly, it’s not just edge information, but some lightness information: a darker object on a light background (like my hair), will have a dark line on the inside, and a white line on the outside, while light objects on dark backgrounds will be opposite. This might not seem too interesting, but it’s one property that seems to stay consistent across different RGCs, so it should be useful for combining data.
I find the larger, color RGCs a little more interesting though.
The blurry image on the left runs the same algorithm as the one on the right, but with the center and surround sizes much greater, with larger differences in size, and color isn’t optimized out. It’s blurry due to the large cell size, but it seems to keep relative color information rather than total: if I put a color filter over it, roughly the same video is shown on the screen before and after. A certain optical illusion also works on it:
Okay, I might need to tune things a little, but those two inner squares are the same color.
I haven’t tried much larger RGCs yet, because at this point I’d need to change the algorithm to just select any pixels at random, but I imagine they’re good for detecting overall lighting, whether we have a color filter on our face, or whether it’s nighttime.
Now I just need to figure out some good algorithms for detecting line orientation like the V1 does…
Edit: improved the color RGC algorithm: