One of the features I'm working on for Smart Shooter is improving how live view works. That is, adding the ability to view the live view images from multiple camera simultaneously, and even to use a dual camera rig to view a realtime stereo anaglyphic preview.
An interesting observation will doing this is how much the live view output varies between different cameras. Not just in the width and height of the images, but also in the image quality. Heres a quick comparison:
Canon 450D | Nikon D5000 | Nikon D7000 | |
---|---|---|---|
File Size | 229 KB | 32 KB | 32 KB |
Dimensions | 848 x 560 | 640 x 426 | 640 x 426 |
JPEG Quality | 99 | 56 | 64 |
Compression Ratio | 16.5% | 4.0% | 4.0% |
Frames Per Second | 10.3 | 16.4 | 16.7 |
USB Transfer Rate | 2.4 MBytes/second | 0.5 MBytes/second | 0.5 MBytes/second |
Just from the file sizes its obvious that Nikon are much more aggressive with their JPEG compression settings. In proportion to the image size, the Nikon live view image is compressed 4 times as much as the Canon image, and this has a big impact on the quality of the final image.
Here are the live view images from the two cameras. I've cropped them to the same size for comparison (426x426), and intentionally did not adjust for the difference in original size which explains why the 450D scene is larger.
See Appendix for the original images.
Also these have been converted to PNG files - keeping them as JPEG would mean an additional JPEG encoding process after the crop, whereas PNG is a lossless format so the pixels are exactly as output by the camera.
The next two show a 300% enlargement of the images, and the difference in quality is obvious. The 450D is very clean and shows no compression artifacts. Detail is lacking in some areas but that is due to the pixel resolution and not the JPEG compression. Whereas the D5000 is just not able to cope with the complexity of the scene. There are visual artifacts around the edge of the petals and the colour gradients on the petals are very blocky.
As shown in the first table, Canon are using JPEG compression with the highest possible quality, and so the final image has very little loss of information. In fact, it may be that JPEG it just used as a convenience for packaging and transferring the image data to the PC. Depending on the scene you are capturing, the quality is constant at 99 but the file size varies accordingly; on the 450D it normally varies between 100 KB and 250 KB.
Compare this to Nikon and the JPEG compression quality is much lower and varies much more, between 50 to 80. However the file size hardly varies at all, and seems to be constant at around 30 KB. This means that file size is the limiting factor for the Nikon JPEG compression, and ends up determining the final quality level of the live view image.
I initially began testing with just the Canon 450D and Nikon D5000. These are both fairly old cameras now, but are competitive equals in the camera range. After seeing how far ahead the quality of the 450D was, I was hoping the Nikon D7000 would make up some ground! Alas no, even though the D7000 is Nikon most recent camera, it is still beaten by the 450D which is a full three years older and a couple of price points down the range. The live view output from the D7000 is nearly identical to the D5000, so I guess Nikon have not been putting effort it improving it.
The only area where Nikon has an advantage is in the transfer speed between camera and computer. I was running these tests on a Macbook Air, and the D5000 managed 16 frames per second compared to 10 frames per second for the 450D. This can be explained by the difference in file sizes (remember 7 times as much data is being transferring with the 450D). Both transfer rates are still way below the maximum of 60 MBytes per second for USB 2.0.
If you are interested in checking how your own camera performs, you can use Smart Shooter to record these live view images. Connect the camera to your computer with a USB cable and run the application. You can then control the camera, activate the live view by clicking the Live View check box and then start recording by clicking the Record check box - the JPEG files are saved to the local hard disk.
The JPEG quality is not something that is explicitely stored in the JPEG file, but it is possible to make an accurate estimate of it based on the contents. The Image Magick toolkit provides an easy way to determine the quality value using its identify tool:
identify -verbose Camera2_20110814_223748_387.jpg
Here is the output from the tool - look for the Quality property (near the bottom):
Image: Camera2_20110814_223748_387.jpg Format: JPEG (Joint Photographic Experts Group JFIF format) Class: DirectClass Geometry: 640x426+0+0 Resolution: 72x72 Print size: 8.88889x5.91667 Units: Undefined Type: TrueColor Endianess: Undefined Colorspace: RGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: Red: min: 0 (0) max: 255 (1) mean: 145.206 (0.569435) standard deviation: 57.6332 (0.226013) kurtosis: -0.5674 skewness: -0.0227689 Green: min: 0 (0) max: 224 (0.878431) mean: 68.2773 (0.267754) standard deviation: 43.9806 (0.172473) kurtosis: -1.08889 skewness: 0.114651 Blue: min: 0 (0) max: 195 (0.764706) mean: 56.9974 (0.223519) standard deviation: 41.4114 (0.162398) kurtosis: -0.317251 skewness: 0.541263 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 90.1602 (0.353569) standard deviation: 48.2037 (0.189034) kurtosis: 4.58441 skewness: 1.23384 Rendering intent: Undefined Interlace: None Background color: white Border color: rgb(223,223,223) Matte color: grey74 Transparent color: black Compose: Over Page geometry: 640x426+0+0 Dispose: Undefined Iterations: 0 Compression: JPEG Quality: 64 Orientation: Undefined Properties: date:create: 2011-08-15T18:29:41+03:00 date:modify: 2011-08-15T18:29:41+03:00 jpeg:colorspace: 2 jpeg:sampling-factor: 2x1,1x1,1x1 signature: 91fe81dbaf87b4cd2b7533c81654256eda781cdc5b7b6b4fc6a23d639a195423 Artifacts: verbose: true Tainted: False Filesize: 32.9KBB Number pixels: 273KB Pixels per second: 13.63MB User time: 0.020u Elapsed time: 0:01.019 Version: ImageMagick 6.6.6-3 2011-08-09 Q16 http://www.imagemagick.org
None of these JPEG images contain EXIF data, which I guess is understandable as the image does not represent an actual photo captured by the camera. Adding this data to the JPEG would just be an extra overhead, both for the processing time in the camera and for the file size when transferring it to the computer.
For completeness here is the output of exiftool for one of the Canon 450D live view images.
ExifTool Version Number : 8.15 File Name : Camera4_20110814_224926_544.jpg Directory : . File Size : 229 kB File Modification Date/Time : 2011:08:15 18:29:42+03:00 File Permissions : rw-r--r-- File Type : JPEG MIME Type : image/jpeg Image Width : 848 Image Height : 560 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1) Image Size : 848x560