Next time you go to a store, take a minute to look at all the things that are trying to grab your attention. With so many products available and so many stores and websites, how do you decide what to buy and where to shop? Whether it's convenience, good service or finding the best deals, store owners want to know what attracts you to their stores, and what it takes to keep you coming back. Turns out, there's a science to all this.

With support from the National Science Foundation (NSF), computer scientists Rajeev Sharma, Satish Mummareddy and their colleagues have developed software that breaks down shopping behavior much like websites do. Sharma's company, VideoMining, uses overhead cameras to put together a top down view of how people shop and what they buy.

"Basically, what VideoMining does is use software along with cameras mounted on the ceiling of stores to track shoppers as they move around the store and create data that helps us understand how shoppers are shopping," explains Sharma. The software creates maps of a store's traffic patterns by digitally analyzing the video. Using the traffic data, VideoMining creates charts and graphs showing well traveled areas in a store and dead spots-–places people ignore. The software also can tabulate how long shoppers take before that "moment of truth" when they select an item to purchase. Cameras are positioned directly above and picture resolution is intentionally set low so all shoppers remain anonymous.

"You cannot identify individual shoppers," says Sharma. "The computer is actually watching the video and generating numbers that represent [each] shopper's behavior. It's all about capturing human behavior so you can really understand it over a long period of time."

The idea is to show retailers and manufacturers the best areas in the store to place products, and how to create a comfortable place for people to shop. "By providing the data to retailers and manufacturers," says Sharma, "they can customize and design the stores and the shelves and the products to match the shoppers' interest."

Sharma identifies trends. For example, people prefer wider aisles when they shop. Women take a lot longer to shop than men, and, except in a few cases, brand loyalty is not always strong. "What we're finding in some categories, people are going to the store and making up their mind right there. You can see people coming in, going between brands and picking up the product based upon price; based upon other attributes."

The software was initially created to monitor the elderly and disabled in their homes. Now it's keeping an eye on shoppers, giving businesses a scientific leg up in the rat race of figuring out how to best serve their customers and keep them coming back.

This story was originally written for Science Nation and was republished with permission here.

Science of shopping: Cameras and software that track our buying behavior
Video: Aerial surveillance cameras in some stores track our shopping behavior and help retailers determine what to sell and how to position it.