This is about the (Raspberry) Pi 2020 HighQuality Camera

created on 2020-06-05, last updated on 2022-09-18 by Dein Lerntutor


Specifications table


mountCS (adaptor for C mount objectives included when bought new from official resellers)
releasedyear 2020
pricingtypically starting from 54,50 € in Germany
interfaceCSI-2 with 2 and 4 MIPI lanes supported by the IMX477R chip inside
each MIPI lane carries up to 1 Gbit/s
(both the standard Raspberry Pi and the HQ board are limited to 2 MIPI lanes)
sensorSony IMX477R back-illuminated sensor
12.3 megapixels
4056 x 3040 active pixels (WxH)
4072 x 3064 effective pixels
1.55µm x 1.55 µm pixel dimensions
based on Exmor RS BSI stacked technology
sensor image area: 6.287mm x 4.712 mm
integrated IR cut filter
dynamic range (SNR=1)more than 66 dB (about 11 stops)
noise reduction (raw captures)There is a defective pixel correction, even activated in RAW mode
with stronger noise reduction in horizontal direction.
It’s possible to deactivate the blur algorithm, see below on this page.
data outputRAW12/10/8, COMP8
typical frame ratesExamples of Basic Drive Modes (internal)
4056x3040@60fps 10-bit
4056x3040@40fps 12-bit
2024x1142 (2x2 binning) scaled to 1980x1080@79fps 10-bit
2028x1128 CROP, scaled to 1920x1080@240fps 10-bit
Note:
Raspberry Pi currently has a maximum GPU encoder bandwidth of 1080p30 (H.264 level 4.1) set by firmware,
which might be extended to support higher resolutions in level 5.0/5.1 via firmware updates in the future.
See https://github.com/waveform80/picamera/pull/655, and since 2022 also:
https://forums.raspberrypi.com/viewtopic.php?p=1984364#p1984364
Theoretical maximum would be 2032px width and 1920px height.
tripod mount1/4”-20 screw hole
sensor format nameabout 1/2.3", referring to a sensor size of 6.17mm x 4.55mm
usable sensor size7.86mm diagonal
crop factorapprox. 5.51x
PCB board dimensions38mm x 38mm
PCB board mounting hole spacing30mm each

Notes:
1)  This product comes without objective lenses. For taking photographs, you would have to obtain compatible lenses which fit to the camera CS mount and sensor size of 1/2.3".
2)  Note about naming conventions: The sensor size specification naming 1/2.3" refers to the size of a theoretical camera tube, actual usable sensor size is about 2/3 of that.
3)  The crop factor is used to multiply the focal length value of a lens (e.g., 50mm for Full Frame 35mm with 36x24mm size to the cropped sensor format, here: 50mm x 5.51 = 275.5mm equivalent).


Update for Raspberry Pi OS / Raspbian on the Raspberry Pi

Before the camera is recognized, the following commands should be run on the command line, if the operating system is not prepared for the new Raspberry Pi HQ camera module:
sudo apt update

sudo apt full-upgrade
# or:
sudo apt dist-upgrade sudo rpi-update
Then, enable the camera in the Raspberry Pi Configuration (e.g., via sudo raspi-config). After reboot, you should be able to capture the first images with the sensor:
raspistill -v


Increasing the video encoding bandwidth on Pi Zero


Default values ...
On Raspberry Pi <4:

h264_freq=300
Mhz (See https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md for more details)

On Raspberry Pi 4:

h264_freq=550
Mhz

Note: Use these parameters in /boot/config.txt at your own risk.


Astrophotography: Deactivating the DPC (defective pixel correction) blur algorithm


Experienced users who want to retain the original sensor read-outs might switch off the DPC algorithm. This will give you the direct sensor data, only accessible through the extra RAW image appended to the JPEG.

sudo vcdbg set imx477_dpc <dpc value>


Possible values are:
 0 - All DPC disabled
 1 - Enable mapped on-sensor DPC
 2 - Enable dynamic on-sensor DPC
 3 - Enable mapped and dynamic on-sensor DPC (default)

If DPC is disabled, then static noise/hot pixels could be reduced using dark frames.


HighQuality IMX477R Camera Sensor Modes (on Raspberry Pi)


modemax. source pixelsaspect ratioframe ratesFOVbinning/scalingnative bit-depthapplications
0(auto)
12028x1080169/900.1 - 50fpspartial2x2 binned12-bit“Full HD” video (1080p)
1920x1080p30 (slightly more narrow FOV)
1920x1008p30 (full width of sensor readout)
22028x15204/30.1 - 42fpsfull2x2 binned12-bit4:3 video recording,
1600x1200p30 in H.264
1080x1080p50 in H.264
34056x30404/30.005 - 10fpsfullnone, full active resolution12-bitstill images
timelapse video
41012x7604/350.1 - 120fpsfull4x4 scaled (skipped)10-bitrecord for slow-motion video

Notes:
Pixel Binning Mode means averaging the pixels 2x2.
Pixel Scaling Mode means skipping information (read only every 4th pixel in horizontal and vertical direction) for faster sensor readout.
Hints:
1) Recording in sensor mode 1 with 1920x1008 (instead of 1920x1080) will give you full horizontal FOV for 30fps video recording, because the sensor readout format is about 5.6% wider than 16:9 in this mode.
2) To get to 50fps while encoding H.264 video, you may select mode 2 and crop to 1080x1080.
3) Recording timelapse video and a maximum exposure time of 10s per frame is possible with mode 3 and 1600x1200 resolution, using the GPU to encode to H.264.


Useful Applications for Raspberry Pi and the HQ Camera Sensor


Starfield Timelapse Recording
Please adjust the gain here according to your lenses aperture/f-stop
#  8 minutes of 10 seconds/frame at full 4:3 sensor resolution
raspivid -v -pts timecodes.txt --mode 3 -ss 10000000 -fli off -drc high -ag 16.0 -dg 1.0 -awb off -awbg 2.2,1.7 -ex off -w 1600 -h 1200 -b 15000000 -t 480000 -fps 0.1 --codec H264 --profile high --level 4.2 -o tmp.h264
# apt install mkvtoolnix
mkvmerge  -o tmp.mkv --timecodes 0:timecodes.txt tmp.h264
# speed up to 24 fps
ffmpeg -i tmp.mkv -filter:v "setpts=(0.1/24.0)*PTS" -b:v 15000k -c:v libx264 -r 24.0 output.mkv


Focussing with Enhanced Preview on a Regular Monitor
# this live-preview is a crop from the center of the sensor
raspistill -v -t 0 -awb sun  -drc off -roi 0.4,0.4,0.2,0.2  -drc med -ag 1.0 -dg 1.0 -ex auto -sh -25


Shoot in RAW / Capturing and Saving 10-bit or 12-bit RAW Images
raspistill --raw --mode 3 -t 2 -ex auto -awb sun -ag 1.0 -e jpg -q 25 -o test.jpg
dcraw -W -6 -T test.jpg
# resulting file: test.tiff, you may view that with ImageMagick (display command) or gimp
Please visit https://github.com/6by9/dcraw for building the dcraw tool (Raspberry Pi specific tool)


Comparison of selected flange-to-sensor distances (back focus, Auflagemaße)


lens mountmount typediameterGewindesteigungflange focal distance [mm]designated sensor size
CSthread / Gewinde1 inch / 25.4 mm1/32 inch12.5261/3" up to 16mm film
Cthread / Gewinde1 inch / 25.4 mm1/32 inch17.5261/3" up to 16mm film
Pentax Kbayonet44 mm-45.46APS-C (1.5x crop)
Minolta / Sony Abayonet49.7 mm-44.5
Four Thirdsbayonet50 mm-38.67
Micro Four Thirdsbayonet44 mm-19.25
M42x1
(some Praktica models)
thread / Gewinde M42x142 mm1 mm45.5035 mm full frame
T2thread / Gewinde M42x0.7542 mm0.75 mm55.00
S-Mount / M12
(some Pi camera clones)
thread / Gewinde M12x0.512 mm0.5 mmundefined
range of 1..12 mm
1/6" to 2/3"


Calculating FOV from focal length


d: is the dimension of the sensor, typically given by its diagonal, so for full-frame 36mm x 24mm, it’s approx. d=43.27mm.
f: is the focal length for the lens directly from the label or datasheet (referring to what would be the FOV on a 35mm full-frame).

The resulting field-of-view (FOV) diagonal is calculated by:
𝛼 = 2×arctan ( d / 2f )

This way, you may calculate the horizontal and vertical view as well, just by putting the width or height into the variable d.

Example: An 18mm lens on a Raspberry Pi HighQuality Camera (diagonal dimension of 7.86mm in 4:3 aspect mode) would have a FOV diagonal of approx. 24.6°.


Although collected carefully, data are provided without warranty / Angaben ohne Gewähr.