It’s not that they’ve photographed every inch of the Earth. It’s that google has seen enough photographs to make a plausible prediction for what’s behind it.
So lets say you take a photo of yourself in the park and in the background there’s a dog sitting on the grass. It’s fairly easy to guess what should be behind the dog if cut out of the photo: more grass. There might not be grass behind the dog. There might be a second smaller dog standing behind the first. Fill that spot with grass though and no one will be the wiser.
Fun related fact: Everyone has [a blind spot where their optic nerve is](https://lifehacker.com/how-optical-illusions-trick-our-brains-1790829333). You never notice the blind spot because your brain makes reasonable assumptions for what would be there and fills in the hole much like google does.
Latest Answers