Raspberry Pi High Quality Camera – First Pictures and Videos – Tutorial Australia

These lenses focus manually so the easiest way is to set up a preview menu running on your monitor and then find the focus using that preview menu as a guide. Make sure the CS-mount has been screwed finger tight and has been locked into place with the locking screw. Then set the Aperture to about the halfway point by rotating the ring with Open-Close on it and looking directly into the lens to see the Aperture change size/dilate. The Aperture on a lens is like a pupil in the human eye, it decides how much light enters into the camera. Halfway open is a good level to start for a reasonably well-lit-up room. Open up a new terminal window using the black console button on the top left of the screen on Raspberry Pi OS and type the following and press enter. 

raspistill -t 0 

This will open up a new window on your monitor showing exactly what the High-Quality Camera is seeing. Use this window to give you feedback on the manual adjustment that you will now do on the lens until you get a good colour and a sharp focus. The image below shows exactly where these fine adjustments are on your lens. 

Adjustment sections
 

Sometimes you will not be able to pull focus no matter how much you adjust the focus ring. If this is the case it is because the back focal length does not match the specifications for the lens. To solve this, adjust the Back Focus Ring. Then once that has been extended a couple of millimetres lock it in position using the locking screw. You can then adjust the focus ring to try to pull focus like before. Some lenses will require a longer back focus than the 6mm back focus length the normal Back Focus Ring can supply. In that case, you will need the C-CS adapter.

Take Pictures

To start off let us take some pictures. Type the following into the terminal opening the terminal using the same method as before.

raspistill -o image.jpg

Once you press enter on your keyboard the camera will take a photo after a couple of seconds and save it in the /home/pi directory providing it with the name image and formatting it as a JPG file. See below for an image taken using this exact method with the Raspberry Pi HQ camera. The image taken by the High-Quality camera is uploaded to this page at full resolution. Right-click and open it in a new window or save it to zoom in and see the fine details.

Image using this camera

 
There are heaps of additions you can add to this terminal line to alter all kinds of settings like exposure time, ISO settings, image rotation, change the directory location, isolating just a section of the image to be captured to name only a few. If you want to see all the available options the official Raspberry Pi Documentation for it here is the place to check out.

An example of some of these additions can be seen below. If you typed and entered below into the console it would take a picture after a two-second wait (represented by the -t 2000 where 2000 is in milliseconds) and capture it at a 640×480 resolution. It will also flip the image both horizontally and vertically.

raspistill -t 2000 -o image.jpg -w 640 -h 480 -hf -vf

An example of using a single terminal line to create a time-lapse can be seen below. This line below will take a time-lapse over 10 days with an image taken every 2 seconds. The resolution will be 1920×1080, all images will be JPEG format and be named image followed by an increasing number. You can then compile these images into a video using FFmpeg or any good time-lapse application. 

raspistill -t 864000000 -tl 2000 -o imaged.jpg -w 1920 -h 1080

Take Video

Now, let’s take some videos with the High-Quality Camera. Type the following into the terminal opening it using the same method as before.

raspivid -t 5000 -o video.h264

Once you press enter on that the high-quality camera will take a video for 5 seconds and save it in the /home/pi directory providing it with the name video and turning it into an h264 format. The video will be recorded at the default for this camera which is 1080p30. Below is a snippet from this video.

Snippet from Video
 

Much like before there are heaps of additions you can add to this terminal line to get the exact result you desire, check them out here. An example of some of these additions can be seen below. If you typed and entered below into the console it would take a video captured at 640×480 resolution at 90 frames per second for 10 seconds. It would then name the file test90fps as a .h264 format. As more frames per second are being captured you can create slow-motion footage with the captured video.

raspivid -w 640 -h 480 -fps 90 -t 10000 -o test90fps.h264

Another useful tip is an easy way to turn the h264 files into MP4 (which are a more commonly used format type). Enter the following into the terminal. If prompted press and enter Y to confirm the installation.

sudo apt-get install gpac

Then to convert files type and enter the following into terminal (replacing YourFileName with the name of the h264 formatted file to be converted. This command will then produce an MP4 file from the h264 file. This will leave you with an MP4 file and an h264 file.

MP4Box -add YourFileName.h264 YourFileName.mp4

Where To Now

Want your Raspberry Pi camera to take an image when it sees the movement of a potential thief or have your Raspberry Pi 4 be able to identify you based on your face we have tutorials for you to explore. If you want to use Python to control your Raspberry Pi Camera the place to check out is here.