ure 9-1). Unlike a USB webcam, you’re unlikely to find the official
Raspberry Pi camera module in an office supply store, but you
should be able to buy it wherever Raspberry Pis are sold, for around
$25.
As of this writing, the newest version has a Sony IMX219 8-megapix-
el sensor (compared to the 5-megapixel OmniVision OV5647 sen-
sor of the original camera). In addition, there is a new high-quality
camera available for the Pi, with a 12.3 mega-pixel Sony IMX477
sensor, 7.9mm diagonal image size, and back-illuminated sensor
architecture, with adjustable back focus and support for C- and
CS-mount lenses.
And just in case those aren’t quite cool enough options for you,
you can also pick up an infrared camera—the Pi NoIR camera, with
the same specs as the new version 2. This camera just doesn’t
have an infrared filter attached, so you’re able to capture images
using infrared lighting. Luckily, all of these different cameras use
the same connector and the same code to access, so whichever
version you’re using, the code you see here will work with your
camera.
140 Getting Started with Raspberry Pi
GSW_RASPI_4ED_FIN.indd 140GSW_RASPI_4ED_FIN.indd 140 10/28/21 10:54 AM10/28/21 10:54 AM