Want to use USB camera for robotics vision with UR5

I’m starting a new project to use the UR5 cobot to pick and place objects of different shapes and sizes which require the use of USB camera to estimate the gripper position when grabbing the object. I was researching ways to go about this and some people use a direct python library and some people use ROS. I was leaning towards ROS2 since it would provide the best performance, but are there any other platforms or mediums I could use to allow for communication between computer vision and UR5 programming or is ROS2 the most widely used robotics vision platform? Thank you.