Jun 062013
 

In the previous comparison I did a week or two ago, the resolution of video and stills output was compared. With respect to reading a car license plate from across the street, there was precious little to choose between the output.

With the latest release of the camera drivers, (sudo apt-get update && sudo apt-get upgrade) I took the opportunity to run the test again with both old and new drivers.

The most noticeable change is that the field of view of the stills is much greater. It transpired that the previous stills output was upscaled from a cropped part of the sensor, i.e. not all the sensor was being used. It is now, so thank you to James Hughes for the update.

Screenshot of 1080p video output (new drivers)

Still photo using new drivers – shows much larger field of view

If you click the above images and zoom in to 100%, you’ll see that the car size on both is exactly the same. But, on the stills you can see a lot more of the scene in all directions. This caught me out slightly. I aligned the camera with a test shot using the old drivers (hence a bit of window frame on the left of the ‘new drivers’ still shot).

Results Summary

Here’s the car at 100% (if you click to zoom in the photo) from all four shots and a 400% zoom of the license plate area.

Comparison of Stills vs Video and Old vs New

There’s not much to choose between them. You can resolve the car number plate. I still find this impressive for such a tiny lens and sensor. So there is no significant difference in ‘resolution quality’ of output between stills and video. The only difference is that the video output uses a crop from the middle 1920 x 1080 pixels of the sensor. Stills use the full 2592 x 1944.

Screenshot vs FFMPEG

Another thing I did was compare the quality of my “screen-grab from video” with that of individual .jpg frames split from the .h264 file with FFMPEG. The screen-grab technique gives much better quality results. Zooming right in (400%) on the license plate, you can’t resolve the text with the FFMPEGed version.

comparison of screen grab vs FFMPEGed jpgs

It may be that there’s an FFMPEG setting for maximum quality, but it looks to me as if my “screengrab” technique is plenty good enough for my needs – and a lot quicker too.

FFMPEG output of frame 100 from .h264 stream

Have fun with your Raspberry Pi camera.

Gallery of shots used in this article.

  16 Responses to “Part 2 – Raspberry Pi Camera stills VS video, Old VS New – resolution comparison”

  1. Try framegrabbing as png instead of jpeg, to avoid possible loss of quality in the conversion. Just replace “.jpg” in the ffmpeg command (or avconv from libav-tools) with “.png”.

  2. Another very interesting article – thank you very much.

    I assume the “new drivers” are in the latest 2013-05-25 “wheezy” disk image (http://www.raspberrypi.org/downloads)? Is this where you got them from?

    P.S. License Plate => Licence Plate? (License <= verb, Licence <= noun … unless you are from the US)

    • I don’t know if the drivers are in the new distro, but I expect they are. I got them with an apt-get update, apt-get upgrade (sudoed).

      In the last article I used registration plate. That works better without sounding American or British. (It probably just sounds slightly awkward in both). Actually I used license plate this time deliberately targeting our trans-atlantic brethren. Naughty of me, I know. I shouldn’t do it really – it winds me up something rotten that the BBC is using US English on their web site, but at least you’re not paying for the drivel I write ;)

      • Thanks for the info.

        Perhaps you could use US English if/when you review the “Beaglebone Black” (a similar gizmo to the RaspPi)?

        By the way – do you have any insider knowledge of the possible next piece of Raspberry Pi Foundation hardware? There’s talk of a touch-sensitive mini display which will use the other on-board connector. If this is of similar quality and value as the camera – then it will (again) be very impressive.

        • I deliberately haven’t bought a BBB because I really don’t want to get into another platform just now. I mean, I’d love to, but can’t afford to dilute my efforts. :)

          No inside knowledge to share, but I did see some tweets from Drew Fustini at a conference (something with West in the name) a month or so ago, which mentioned something Gert showed involving two ATMega chips. I think it was Gerduino or something like that. Although I don’t know if that was a private product or official foundation.

          • Google says: https://twitter.com/pdp7/status/326745895393718272 ;-)
            I suspect that like the original Gertboard, it’ll be a 3rd-party product rather than officially linked to the Foundation.

            I don’t have any inside knowledge either, but I think that the rumours are indeed that the next official addon will be a display board which connects to the DSI connector.
            Reading between the lines, I think the Foundation are taking a bit of a break after working so hard on the camera board, and they had so many people pestering them with “is the camera ready yet? why isn’t the camera ready yet?!” that they’re going to be waiting until much nearer to the product being ready to launch before announcing anything.

            • Yes, I think James Hughes has done a magnificent job on the camera software and it’s a shame that so many people keep asking/harranging/complaining/criticising because they want to exploit his work for their own ends (even if non-commercial). I think he’s due a well-earned break.

              I love this camera board. For a £20 mobile phone camera it is totally awesome. The fact that we can control it using the Pi is awesome too. I’ve been writing a couple of programs for it this week to do stuff that I can’t even do with my “proper” video camera.

  3. Thanks for the info mate.
    One question, how can you upgrade to latest drivers? does a simple apt-get update/upgrade will do it or do I need to flush the latest img from raspbian?

  4. Hi Alex – great stuff as usual. I would be very interested in a clear explanation on how to run a Pi with Pi Cam remotely (ie on the web). I know there is various information on the forum but it’s beyond a noob like me.

    One of your excellent tutorials would be brilliant!

    Keep up the good work.
    KC

    • Good idea :)

      • Hi Alex,
        just like Kierian am I very intrested to stream my raspicam-videos via WLAN –>Router–>WLAN–>PC (Win7 prof) (in)to my PC. Several try’s with “VLC, apache2, Xming …..” don’t work!
        Please let me know, when You have the “Good idea :), how to do
        Thank You for your answer
        Regards
        Roland

  5. I recently bought a raspberry pi cam NoIR and the horizontal field of view is the same in stills and video. The photos look interpolated, so I’m guessing it still has this issue the normal pi cam had since the other possible explanation would be the downscaling of the full frame to 1920×1080 and this hasn’t been implemented AFAIK.
    vcgencmd version outputs: Jan 6 2014 21:16:43
    The camera has Rev. 1.3 printed on.

  6. I ran rpi-update before apt-get update and apt-get upgrade and now with vcgencmd version Jan 17 2014 19:57:56; I now get the wider shot in still mode.

Leave a Reply