The sensor is crucial to image quality - it doesn't matter how many pixels you have if the sensor is inferior. The quality of the image depends on the size of sensor, the number of pixels on it and the size of those pixels.
The size of the sensor also affects what gets recorded on the frame. Smaller sensors crop and capture less of the scene than full frame sensors. As a guide a full frame is the same as a 35mm film frame (36×24 mm). Apple's sensor in the iPhone 5s is 15% larger than that in the iPhone 5.
There are various type of sensor. The iPhone features a CMOS sensor (CMOS stands for complementary metal-oxide semiconductor). The iPhone camera sensor has been provided by Sony since the iPhone 4s. Some cameras use a CCD image sensor, but CMOS sensors work more efficiently, require less power and handle high-speed burst modes better, which is why they tend to be used in camera phones. The Galaxy S4 also features a CMOS sensor.
Other features in the iPhone 5s camera
As we note above, Apple's flagship iPhone - the iPhone 5s - offers 8MP with each of those measuring 1.5µm pixels, and a larger sensor, but there are other ways in which Apple has improved the camera in the iPhone 5s.
The iPhone 5s has a ƒ/2.2 aperture, this enables it to capture more light than the iPhone 5 (and iPhone 5c camera) with its f/2.4 aperture camera. The combination of this larger image sensor and the larger aperture is a 33% increase in light sensitivity, according to Apple. Because it is more sensitive to light the iPhone 5s can capture brighter images with less noise.
Other improvements that add up to better photos are the Sapphire crystal lens cover; True Tone flash; Backside illumination sensor; Five-element lens; Hybrid IR filter; Autofocus; Tap to focus; and Auto image stabilization.
For example, the True Tone Flash includes an amber light that compensates for white balance and helps you get the best colour temperature for the shot and leads to more realistic skin tones.
When more megapixels are bad
As we've established above, there is no point in having more megapixels in a smartphone if those pixels are small and the sensor is poor, but there are additional reasons why you want to avoid camera phones that boast more megapixels.
The more megapixels in your image the more megabytes of space it will take up. If space is already constrained on your smartphone an image that takes up 5MB will be a problem. To get around this your image might be compressed - which means you are losing that extra 'quality' anyway.
Sign up for CIO Asia eNewsletters.