It's an accomplishment just to do what you've done, as far as detecting areas of light pixels vs dark pixels, counting the number of light and dark, etc. Evidently this only gives you partial information. In addition it appears you need to perform other methods. Example, find the extreme left and right corners of the eye, and measure position of the iris between them.
Researchers have made devices that detect which key the eye is gazing at, on a virtual-reality typewriter. The eye movements are no doubt miniscule. The algorithms need to be very sophisticated, and accurate, and use expertly done tricks, to be that accurate.