Not the NBA, but some teams use a system called SportVU[0] that do auto player&ball tracking.
I used to work on the system, so I can answer (some) questions about it.
I used to work on the system, so I can answer (some) questions about it.
There is a nice article in wired about it(include a picture of one of the cameras and the view from another) http://www.wired.com/playbook/2011/04/nba-data-revolution/al...
The calibration is done by matching(automatically or manually) known world points to pixels from the cameras. (This is a very common practice in image-processing systems)