DxOMark provides independent image quality measurements and ratings which are performed at DxO Labs’ dedicated testing laboratories, where conditions are controlled as in standard metrology labs.
Here's what DxOMark had to say about the Galaxy S5 camera:
From our industry-standard tests the GS5 has reliable auto-exposure in difficult outdoor lighting. Also it has fast and accurate autofocus in the camera’s ‘trigger-mode’, though noticeably less so in the standard auto-mode. Still images retain a high level of detail in the frame center. The corners are however slightly blurry. Noise levels are well controlled in low-light, albeit then with a noticeable loss of detail. For video, from our tests, the GS5 is the best performing handset tested to date, achieving a DxOMark Mobile Video score of 79 points, up 6 points on the Sony Xperia Z2.
When analyzing the iPhone 5s camera, DxOMark said:
The new iPhone 5s focuses quickly and accurately and captures images with lower noise and fewer artifacts than its predecessor, while retaining very nearly the same high levels of detail. On the downside, strong luminance noise is still apparent in low light levels despite a slightly bigger sensor and larger f/2.2 optics.
At the time the iPhone 5s was released it topped the DxOMark charts with a score of 76. It's now been surpassed by the Galaxy S5 and Sony Xperia Z2 with a score of 79. The Nokia 808 Pureview also surpassed the iPhone 5s with a score of 77.
You can read the full Galaxy S5 review here. The iPhone 5s camera review can be found here.