Most smartphones use a focusing technology called contrast autofocus. The camera compares the image of each pixel to each other, and keeps altering the focus backwards and forwards until the pixels in the sensor match each other. It works, but it’s not that fast.
Samsung Galaxy S5
The Samsung Galaxy S5 uses a combination of contrast autofocus and something called phase detection. Phase detection is actually what’s used in almost all DSLR cameras. It works using a special sensor and lens inside the camera. The sensor compares the image from the furthest corner of the lens. It’s so fast because the sensor knows if it’s focused too close or too far away, and can just zip right into focus in a fraction of the time of a contrast focus camera.
HTC One M8
HTC chose a different technology, and instead gave the HTC One (M8) a second camera, right at the top on the back. When you take a photo, the camera compares the images from both cameras and works out the distance to whatever you’re photographing. Then it can correct the focus super quickly – in fact, the two cameras working together isn’t too different to how your eyes focus.
When it comes to the LG G3, the techies at LG decided to give its camera a laser, and called the technology LaserAF. Every time you turn the camera on, a laser next to the camera lens fire out a laser beam – it’s not much different to the beam from your television remote. The beams come out in a cone shape. This means they’ll hit anything you’re aiming at. When the beam bounces back, the G3 measures it and can work out exactly how far away your subject is. Of course, this takes just 0.276 seconds, and is happening constantly to ensure perfect focus.