If can also recommend the Logitech HD Pro Webcam C920 for visual computing projects like this. I was pleasantly surprised of the range of focus and that everything can be controlled via UVC. It could be cheaper though...
Which of the two do you think would function better for moving objects. I got a crappy off the shelf camera to put on a robot I made to do some work while moving horizontally.... it moved too fast to acquire anything.
[1]: https://www.amazon.com/XCSOURCE-Microscope-Endoscope-Magnifi...