OpenCV to measure moving objects

How to use OpenCV to measure moving objects through a camera on a conveyor belt?