After reading a few comments in the Pi forums about perceived quality differences between stills and video, I thought I’d test it out for myself. Some people are saying that the video quality is better than stills. “Quality” is quite a subjective thing, but resolution is a bit easier to test.
This was a pretty simple test. I left the camera propped up facing the same Nissan Micra as yesterday’s blog and remotely took a still shot (by ssh)
raspistill -t 3000 -vf -o reg-plate.jpg
…and then I shot a few seconds of 1080p@30fps video…
raspivid -o reg-plate.h264 -t 10000 -vf
Both these commands use the default resolution settings (highest).
Then I packaged the video to .mp4 as outlined here.
Next I played the video in full screen mode on my laptop and grabbed a full 1920 x 1080 screen capture (I should perhaps have used a clever FFMPEG command to extract a frame). Then, combining the ‘car bit’ of both images at 100% size, in photoshop, produced this…
The stills are bigger than the video
The first thing you notice is that the car is much larger in the still photo. This shouldn’t really surprise us all that much because a 1080p (1920 x 1080 pixels, non-interlaced) image contains about 2 Megapixels and the stills are 2592 x 1944, or ~5 Megapixels. So, if both are at 100%, the still ought to be about twice as big. The images below are a bit misleading as they are scaled for 300 pixels width. Click either one to see it at full size.
What about the Registration Plate?
Looking at the full-sized images on screen, you can just about make out the registration number in both. Same result as yesterday (I’m quite glad about that). But to make it clearer, let’s pixel-peep…
It may be an artefact of having done a screen grab (I doubt it though), but at this enlargement, it looks as if the stills performance of the camera is better (as it should be with twice the pixel resolution). This contradicts the comments I’ve seen in the forums about the video resolution being better. This leads me to believe we may be looking at the controversial issue of photographic technique, rather than the “video is better than stills” message I’ve been reading about.
So, I completely agree that the video output of the Raspberry Pi Camera (RasPiCam) is surprisingly good. But, in terms of “resolving a car number plate from across the street” the stills output appears to be noticeably better, which is what you would expect.
If anyone else wants to repeat the test and report back it would be very interesting to compare notes.
Video and stills for security applications
For a security application, the best approach would probably be to monitor/record video and capture stills when an “event” is triggered. I’m pretty sure I’ve seen James Hughes (author of raspistill and raspicam) mention that the camera is capable of taking a 5MP still whilst videoing, but I don’t think the software for that is available (yet).
This may not stay the case for long
The camera driver is still being worked on so we can expect improvements within a short space of time that will probably make the above out of date pretty soon. That’s OK because I’ll do another comparison when changes are made and we can see how much difference it makes.
Update 6 June 2013
With last week’s driver update, things changed a bit. Here’s an update.
Here’s a gallery of all the shots taken for this article…