Tuesday, 14 July 2020

Raspberry pi HQ Camera and 16mm lens quality

The 16mm lens sold alongside the Raspberry Pi HQ lens is a really nice lens. After some misgivings about the image quality I got with some early testing, some more careful tests show that the lens has a rather specific problem that can easily be avoided, although it does slightly limit what it can do.

I have compared the photos from the HQ camera and 16mm lens with the images from a DSLR (crop sensor) using a 55mm lens which gives very nearly the same field of view. I also did a couple of tests using the canon lens with the Raspberry Pi camera, and there is little improvement (if any) over the results with the standard 16mm lens. Give there is 15X price difference, this is pretty remarkable.

 What is the problem?

The only problem I have found is that wide open (F1.4) the lens has significant bloom, which can really show up on some types of photo (Distant street lights at night have a big bloom around them; stars do as well, although it is not usually as noticeable.)

The good news is that this problem disappears rapidly as the lens is stopped down and from F2.8, there is no real evidence of the problem. Sample images at the end of this page.


Sample pictures - full image

These photos are all straight out of camera and resized in gimp to a more web friendly size. Used in this way there is little to choose between them:
(btw all these photos are through the window - a bit wild and woolly out to take an unprotected pi!)

First is the Raspberry Pi HQ camera with the 16mm lens, set to F2.8.
Pi HQ camera 16mm lens F2.8
This is the same thing but using a Canon 7D with an EFS 17-55 lens at 17mm and F2.8
Canon 7D F2.8
Finally - with a ludicrously expensive lens on the Raspberry Pi H! camera. Same lens as above - EFS 17-55 lens at 55mm (and F2.8)

Cropped views of the above photos

These are crops into the same small area of the photos to see what's going on at pixel level.
here is a big crop into the original photo, full size.
Still looking pretty good
Pi Camera F2.8 Crop
This is a similar crop on the canon photo. It looks a lot softer compared to the Pi camera photo, but I suspect this is due to:
  1. Canon's in camera jpeg processing is a bit naff!
  2. The raspberry pi is applying more sharpening. 
  3. more pixels!
Canon camera and lens
And to complete the set, The Pi camera with the same canon lens at 17mm.
Pi camera - canon lens

What about the blooming problem then?

On this type of photo, the blooming isn't too obvious until print it, or zoom in. Here are some big crops of the same photo taken at different F stops.
Here is the same photo taken with the lens wide open. The green leaves - especially those with no friends around them - are washed over with the bright sky, loosing contrast and making them almost grey rather than green.
Pi 16mm lens at F1.4
Stopping the lens down to F2 significantly improves the photo. Contrast and colour are both much better.
Pi Camera F2 Crop
And now stopped down to F2.8.

This is the same image as at the top of the post. Just added here to make the comparison easier.
Pi Camera F2.8 Crop

No comments:

Post a Comment