The secret to how a professional baseball or tennis player is able to spot and perfectly hit a speeding ball has been envied since major leagues dominated the country.

Now researchers from the University of California, Berkeley are revealing how the brain is able to accurately follow the trajectory of fast-moving objects.

It's all about predicting the route of the object. Researchers say the brain takes one-tenth of a second to process what the eye sees and if we didn't have the ability to predict incoming objects, we would be getting struck by cars and moving balls ages ago. For instance, if a tennis ball were traveling at 120 mph, it would have moved 15 feet ahead of the brain's reading if the brain did not have a prediction mechanism, likely leaving the individual severely injured.

"For the first time, we can see this sophisticated prediction mechanism at work in the human brain," said Gerrit Maus, lead author and postdoctoral fellow in psychology at UC Berkeley.

Researchers recruited six volunteers and applied functional magnetic resonance imaging (fMRI) to the visual cortex of the brain, which configures our ability to visually process things ahead of time. The fMRI tracked how the process worked and results showed that the middle temporal region in the visual cortex (V5) computes exactly where a hurling object would arrive.

The moving objects, in this case, were mimicked in a video showing an optical illusion exercise called the "flash-drag effect," in which participants saw brief flashes that directed the motion of an object.

"The brain interprets the flashes as part of the moving background, and therefore engages its prediction mechanism to compensate for processing delays," said Maus. "Now not only can we see the outcome of prediction in area V5. But we can also show that it is causally involved in enabling us to see objects accurately in predicted positions."

Researchers also added that this prediction mechanism is important for evolutionary purposes, enabling us to understand that everything is not exactly as it seems.

"The image that hits the eye and then is processed by the brain is not in sync with the real world, but the brain is clever enough to compensate for that," said Maus. "What we perceive doesn't necessarily have that much to do with the real world, but it is what we need to know to interact with the real world."

The study was published on May 8 in the journal Neuron.