1. A vending machine, comprising: at least one horizontally oriented shelf for supporting products to be vended; a plurality of vertically oriented dividers coupled to the shelf, the dividers being individually adjustable side-to-side of the shelf for accommodating different sized products between the dividers; a plurality of location markers located on the dividers, on the shelf, or on both the dividers and the shelf; and an optical recognition module configured to optically recognize the location markers and to determine horizontal positions of the location markers relative to the shelf.