I have the Pixel 2 XL and the Pixel 3 XL. I -HAD- an iPhone X. The iPhone X has a better camera on it than the iPhone 7. Period. The Pixel 2 is better than the iPhone X and the Pixel 3 is at least as good as the Pixel 2 (I haven't been able to prove one as being decidedly better than the other).
The Pixel isn't just a great camera, it's a great camera with great post-processing AI software. I just took a photo on a cruise ship veranda, at 11:30 at night, and you see the correct color of the sky and the water - Google's Night Sight is pretty impressive for shooting still scenes in extremely low light.
Also, for the record, I own a MacBook Air, iPad Pro 12.9, and a 27" Retina iMac. I dumped the iPhone and have zero intention of going back. So, even if you're currently an iPhone user and leverage the ecosystem, you'll get used to Android pretty quickly.
I [personally] wouldn't get the Pixel 2 specifically, though, or the Pixel 3 - get the XL version. Physical size is only slightly larger than the iPhone X (and, I believe, smaller than the iPhone 7 Plus) and the screen is noticeably larger. The display on the Pixel 3 XL is definitely better than the Pixel 2 XL in terms of what you see on the phone itself, but the underlying quality of the images is pretty darn similar.