Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
The onboard switch is used to switch between IR-CUT day and night modes.
The night vision mode needs to be used with an infrared fill light, and users need to purchase an 850nm infrared light themselves
To test the Raspberry Pi camera, you need to connect the Raspberry Pi to an HDMI screen or DSI screen
The packages of the CSI (camera) and DSI (monitor) ports on the Raspberry Pi motherboard are similar, so be careful not to connect them incorrectly when wiring. The CSI interface is located between the audio interface and the HDMI interface. The camera interface of the Raspberry Pi Zero series is next to the power interface. If you are using a computing module, it depends on the layout of the baseplate.
Sensor model | Supported Raspberry Pi motherboard models | Supported driver types |
---|---|---|
OV5647 | All Raspberry Pi motherboards | libcamera / Raspicam |
OV9281 | All Raspberry Pi motherboards | libcamera |
IMX219 (Raspberry Pi official) | All Raspberry Pi motherboards | libcamera / Raspicam |
IMX219 (Third-party) | Raspberry Pi computing module | libcamera |
IMX290/ IMX327 | All Raspberry Pi motherboards | libcamera |
IMX378 | All Raspberry Pi motherboards | libcamera |
IMX477 (Raspberry Pi official) | All Raspberry Pi motherboards | libcamera / Raspicam |
IMX477 (Third-party) | All Raspberry Pi motherboards | libcamera |
IMX462 | All Raspberry Pi motherboards | libcamera |
IMX519 | All Raspberry Pi motherboards | libcamera (Install additional driver) |
IMX708 (Raspberry Pi Camera Module 3) | All Raspberry Pi motherboards | libcamera |
IMX296 (Raspberry Pi Global Camera) | All Raspberry Pi motherboards | libcamera |
IMX500 (Raspberry Pi AI Camera) | All Raspberry Pi motherboards | libcamera |
If you are using the latest Raspberry Pi Camera Module 3 or Raspberry Pi Global Shutter Camera, you need to run the following command to update the system (Internet connection required).
sudo apt-get update -y sudo apt-get upgrade -y
If only one camera is called, connect the camera to the CAM1 port.
If you are using a camera that is not the official Raspberry Pi, you need to configure a config.txt file separately.
If you are using the latest Bookworm system, you need to configure /boot/firmware/config.txt.
sudo nano /boot/config.txt #If it is the bookworm system sudo nano /boot/firmware/config.txt
Find the camera-auto-detect=1 statement and change it to camera_auto_detect=0
At the end of the file, add the following setting statements according to the camera model
Model | Setting statement |
---|---|
OV9281 | dtoverlay=ov9281 |
IMX290/IMX327/IMX462 | dtoverlay=imx290,clock-frequency=37125000 |
IMX378 | dtoverlay=imx378 |
IMX219 | dtoverlay=imx219 |
IMX477 | dtoverlay=imx477 |
IMX708 | dtoverlay=imx708 |
Note: To use the IMX290 on the Raspberry Pi 5, you also need to add the json file to the command directory to use it. The operation is as follows:
sudo wget https://www.waveshare.net/w/upload/7/7a/Imx290.zip sudo unzip Imx290.zip sudo cp imx290.json /usr/share/libcamera/ipa/rpi/pisp
dtoverlay=imx219,cam0 dtoverlay=ov5647,cam1
To use the Raspberry Pi AI Camera, you need to make sure you're using the latest Raspberry Pi system.
sudo apt update && sudo apt full-upgrade
sudo apt install imx500-all
sudo reboot
sudo rpicam-hello -t 0
If you want to close the preview window, you can directly press Alt-F4, or click x to close it. You can also return to the terminal interface and use ctrl-c to terminate the program.
Note: If it is Camera module 3, the autofocus function will be enabled
sudo rpicam-hello -t 0 --camera 0 sudo rpicam-hello -t 0 --camera 1
rpicam-hello -t 0s --post-process-file /usr/share/rpi-camera-assets/imx500_mobilenet_ssd.json --viewfinder-width 1920 --viewfinder-height 1080 --framerate 30
rpicam-vid -t 10s -o output.264 --post-process-file /usr/share/rpi-camera-assets/imx500_mobilenet_ssd.json --width 1920 --height 1080 --framerate 30
rpicam-hello -t 0s --post-process-file /usr/share/rpi-camera-assets/imx500_posenet.json --viewfinder-width 1920 --viewfinder-height 1080 --framerate 30
To check what version of the system you are using, run sudo cat /etc/os-release to see if there is any information about the following two images, and then select.
When running the latest version of Raspberry Pi OS, rpicam-apps already has five basic features installed. In this case, the official Raspberry Pi camera will also be detected and automatically enabled.
You can check if everything is working by inputting the following:
rpicam-hello
You should see a camera preview window for about five seconds.
Users of Bullseye's Raspberry Pi 3 or earlier devices will need to enable Glamor in order for this example script using X Windows to work. Input the command sudo raspi-config in the terminal window, then select Advanced Options, Glamor, and Yes. Exit and restart your Raspberry Pi. By default, Raspberry Pi 3 and earlier devices running Bullseye may not be using the correct display driver. Please refer to the /boot/firmware/config.txt file and make sure that dtoverlay=vc4-fkms-v3d or dtoverlay=vc4-kms-v3d is currently active. If you need to change this setting, please restart.
rpicam-hello -t 0
The libcamera for Raspberry Pi has tuning files for each type of camera module. The parameters in the file are passed to the algorithm and hardware to produce the best quality image. libcamera can only automatically determine the image sensor being used, not the entire module, even if the entire module affects the "tuning". As a result, it is sometimes necessary to override the default tuning file for a particular sensor.
For example, a sensor without an infrared filter (NoIR) version requires a different AWB (white balance) setting than the standard version, so an IMX219 NoIR used with a Pi 4 or earlier device should operate as follows:
rpicam-hello --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx219_noir.json
The Raspberry Pi 5 uses different tuning files in different folders, so here you will use:
rpicam-hello --tuning-file /usr/share/libcamera/ipa/rpi/pisp/imx219_noir.json
This also means that users can copy existing tuning files and modify them according to their preferences, as long as the parameter --tuning-file points to the new version.
The --tuning-file parameter is applicable to all rpicam-apps just like other command-line options.
rpicam-jpeg is a simple static image capture application.
To capture a full-resolution JPEG image, use the following command. This will display a preview for approximately five seconds, then capture the full-resolution JPEG image to the file test.jpg.
rpicam-jpeg -o test.jpg
The -t <duration> option is used to change the duration of the preview display, and the --width and --height options will alter the resolution of the captured static images. For example:
rpicam-jpeg -o test.jpg -t 2000 --width 640 --height 480
All of this rpicam-apps allow the user to run the camera with a fixed shutter speed and gain. Capture an image with an exposure time of 20ms and a gain of 1.5x. This gain will be used as an analog gain within the sensor until it reaches the maximum analog gain allowed by the core sensor driver. After that, the rest will be used as a digital gain
rpicam-jpeg -o test.jpg -t 2000 --shutter 20000 --gain 1.5
The AEC/AGC algorithm for the Raspberry Pi enables application-defined exposure compensation, allowing images to be made darker or brighter through a specified number of stops.
rpicam-jpeg --ev -0.5 -o darker.jpg rpicam-jpeg --ev 0 -o normal.jpg rpicam-jpeg --ev 0.5 -o brighter.jpg
The digital gain is applied by the ISP, not by the sensor. The digital gain will always be very close to 1.0 unless:
It emulates many features of the original app raspistill.
rpicam-still -o test.jpg
rpicam-still allows files to be saved in a number of different formats. It supports PNG and BMP encoding. It also allows the file to be saved as a binary dump of RGB or YUV pixels with no encoding or file format. In the latter case, the application that reads the file must be aware of its own pixel arrangement.
rpicam-still -e png -o test.png rpicam-still -e bmp -o test.bmp rpicam-still -e rgb -o test.data rpicam-still -e yuv420 -o test.data
Note: The format in which the image is saved depends on the -e (equivalent to encoding) option and is not automatically selected based on the output file name.
The raw image is an image that is produced directly by an image sensor, before any processing of it by the ISP (Image Signal Processor) or any CPU core. For color image sensors, these are usually Bayer format images. Note that the original image is very different from the processed but unencoded RGB or YUV images we saw before.
Get the raw image:
rpicam-still --raw --output test.jpg
Here, the -r option (also known as raw) indicates capturing the raw image and JPEG. In fact, the original image is the raw image that generates a JPEG. The original images are saved in DNG (Adobe Digital Negative) format and are compatible with many standard applications such as draw or RawTherapee. The original image is saved to a file with the same name but an extension of .ng, thus becoming test.dng.
These DNG files contain metadata related to image capture, including black level, white balance information, and the color matrix used by the ISP to generate JPEGs. This makes these DNG files more convenient to use for "manual" original conversion with some of the above tools in the future. Use exiftool to display all metadata encoded into a DNG file:
File Name : test.dng Directory : . File Size : 24 MB File Modification Date/Time : 2021:08:17 16:36:18+01:00 File Access Date/Time : 2021:08:17 16:36:18+01:00 File Inode Change Date/Time : 2021:08:17 16:36:18+01:00 File Permissions : rw-r--r-- File Type : DNG File Type Extension : dng MIME Type : image/x-adobe-dng Exif Byte Order : Little-endian (Intel, II) Make : Raspberry Pi Camera Model Name : /base/soc/i2c0mux/i2c@1/imx477@1a Orientation : Horizontal (normal) Software : rpicam-still Subfile Type : Full-resolution Image Image Width : 4056 Image Height : 3040 Bits Per Sample : 16 Compression : Uncompressed Photometric Interpretation : Color Filter Array Samples Per Pixel : 1 Planar Configuration : Chunky CFA Repeat Pattern Dim : 2 2 CFA Pattern 2 : 2 1 1 0 Black Level Repeat Dim : 2 2 Black Level : 256 256 256 256 White Level : 4095 DNG Version : 1.1.0.0 DNG Backward Version : 1.0.0.0 Unique Camera Model : /base/soc/i2c0mux/i2c@1/imx477@1a Color Matrix 1 : 0.8545269369 -0.2382823821 -0.09044229197 -0.1890484985 1.063961506 0.1062747385 -0.01334283455 0.1440163847 0.2593136724 As Shot Neutral : 0.4754476844 1 0.413686484 Calibration Illuminant 1 : D65 Strip Offsets : 0 Strip Byte Counts : 0 Exposure Time : 1/20 ISO : 400 CFA Pattern : [Blue,Green][Green,Red] Image Size : 4056x3040 Megapixels : 12.3 Shutter Speed : 1/20
We have noticed that there is only one calibration light source (determined by the AWB algorithm, although it is always labeled as "D65"), and dividing the ISO number by 100 gives the analog gain being used.
In order to capture long-exposure images, disable AEC/AGC and AWB, as these algorithms will force the user to wait many frames while converging.
The way to disable them is to provide explicit values. Additionally, the immediate option can be used to skip the entire preview phase that is captured.
Therefore, to perform an exposure capture of 100 seconds, use:
rpicam-still -o long_exposure.jpg --shutter 100000000 --gain 1 --awbgains 1,1 --immediate
For reference, the maximum exposure times of the three official Raspberry Pi cameras can be found in this table.
rpicam-vid can help us capture video on our Raspberry Pi device. Rpicam-vid displays a preview window and writes the encoded bitstream to the specified output. This will produce an unpacked video bitstream that is not packaged in any container format (such as an mp4 file).
For example, the following command writes a 10-second video to a file named test.h264:
rpicam-vid -t 10s -o test.h264
You can use VLC and other video players to play the result files:
VLC test.h264
On the Raspberry Pi 5, you can output directly to the MP4 container format by specifying the MP4 file extension of the output file:
rpicam-vid -t 10s -o test.mp4
rpicam-vid supports dynamic JPEG as well as uncompressed and unformatted YUV420:
rpicam-vid -t 10000 --codec mjpeg -o test.mjpeg rpicam-vid -t 10000 --codec yuv420 -o test.data
The codec option determines the output format, not the extension of the output file.
The segment option splits the output file into segments-sized chunks (in milliseconds). By specifying extremely short segments (1 millisecond), this allows for the convenient decomposition of a moving JPEG stream into individual JPEG files. For example, the following command combines a 1 millisecond segment with a counter in the output filename to generate a new filename for each segment:
rpicam-vid -t 10000 --codec mjpeg --segment 1 -o test%05d.jpeg
To minimize frame loss for high frame rate (> 60fps) video, try the following configuration adjustments:
The following command demonstrates how to implement a 1280×720 120fps video:
rpicam-vid --level 4.2 --framerate 120 --width 1280 --height 720 --save-pts timestamp.pts -o video.264 -t 10000 --denoise cdn_off -n
Rpicam-vid can encode audio and video streams using the ffmpeg/libav codec backend. You can save these streams to a file, or stream them over the network.
To enable the libav backend, pass libav to the codec option:
rpicam-vid --codec libav --libav-format avi --libav-audio --output example.avi
To use a Raspberry Pi as a server for streaming video over UDP, use the following command, replacing the < IP -addr> placeholder with the IP address of the client or multicast address, and replacing the <port> placeholder with the port you wish to use for streaming:
rpicam-vid -t 0 --inline -o udp://<ip-addr>:<port>
Use a Raspberry Pi as a client to view video streams over UDP, using the following command, replace the <port> placeholder with the port you want to stream:
vlc udp://@:<port> :demux=h264
Alternatively, use ffplay on the client side to stream with the following command:
ffplay udp://<ip-addr-of-server>:<port> -fflags nobuffer -flags low_delay -framedrop
Video can also be transmitted over TCP. Use Raspberry Pi as a server:
rpicam-vid -t 0 --inline --listen -o tcp://0.0.0.0:<port>
Use the Raspberry Pi as the client to view the video stream over TCP, use the following command:
vlc tcp/h264://<ip-addr-of-server>:<port>
Alternatively, use the ffplay stream at 30 frames per second on the client side with the following command:
ffplay tcp://<ip-addr-of-server>:<port> -vf "setpts=N/30" -fflags nobuffer -flags low_delay -framedrop
To transfer video via RTSP using VLC, using the Raspberry Pi as the server, use the following command:
rpicam-vid -t 0 --inline -o - | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}' :demux=h264
To view the video stream on the RTSP using the Raspberry Pi as a client, use the following command:
ffplay rtsp://<ip-addr-of-server>:8554/stream1 -vf "setpts=N/30" -fflags nobuffer -flags low_delay -framedrop
Or on the client side use the following command to stream with VLC:
vlc rtsp://<ip-addr-of-server>:8554/stream1
If you need to close the preview window on the server, use the nopreview command.
Use inline flags to enforce stream header information into each inner frame, which helps the client understand the stream when the beginning is missed.
rpicam-raw records the video directly from the sensor as the original Bayer frame. It doesn't show the preview window. To record a two-second raw clip to a file called test.raw, run the following command:
rpicam-raw -t 2000 -o test.raw
RPICAM-RAW outputs raw frames without any format information. The application prints the pixel format and image size to the terminal window to help the user parse the pixel data.
By default, rpicam-raw outputs raw frames in a single, potentially very large file. Use the segment option to direct each raw frame to a separate file, using the %05d directive to make each frame filename unique:
rpicam-raw -t 2000 --segment 1 -o test%05d.raw
Using a fast storage device, rpicam-raw can write 18MB frames from a 12-megapixel HQ camera at a speed of 10fps to the disk. rpicam-raw is unable to format the output frame as a DNG file; To do this, use the rpicam-still option at a frame rate lower than 10 to avoid frame drops:
rpicam-raw -t 5000 --width 4056 --height 3040 -o test.raw --framerate 8
For more information on the original format, see mode documentation.
Note: The Raspberry Pi operating system does not include rpicam-detect. If you already have TensorFlow Lite installed, you can build rpicam-detect. For more information, see the instructions on building rpicam-apps in build. Don't forget to pass -DENABLE_TFLITE=1 when running cmake.
rpicam-detect displays a preview window and monitors the content using a Google MobileNet v1 SSD (Single Shot Detector) neural network that has been trained to recognize about 80 classes of objects using the Coco dataset. Rpicam-detect can recognize people, cars, cats and many other objects.
Whenever rpicam-detect detects a target object, it captures a full-resolution JPEG. Then return to monitoring preview mode.
For general information about model usage, please refer to the TensorFlow Lite Object Detector section. For example, when you are out, you can keep an eye on your cat:
rpicam-detect -t 0 -o cat%04d.jpg --lores-width 400 --lores-height 300 --post-process-file object_detect_tf.json --object cat
rpicam-hello -h
rpicam-hello --version
Example output:
rpicam-apps build: ca559f46a97a 27-09-2021 (14:10:24) libcamera build: v0.0.0+3058-c29143f7
rpicam-hello --list-cameras
The identifier for the sensor mode has the following form:
S<Bayer order><Bit-depth>_<Optional packing> : <Resolution list>
Cropping is specified in the native sensor pixels (even in pixel binning mode) as (<x>, <y>)/<Width>×<Height>。 (x, y) specifies the position of the width × height clipping window in the sensor array.
For example, the following output shows information for an IMX219 sensor with index 0 and an IMX477 sensor with index 1:
Available cameras ----------------- 0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c@1/imx219@10) Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop] 1640x1232 [41.85 fps - (0, 0)/3280x2464 crop] 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop] 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop] 'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop] 1640x1232 [41.85 fps - (0, 0)/3280x2464 crop] 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop] 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop] 1 : imx477 [4056x3040] (/base/soc/i2c0mux/i2c@1/imx477@1a) Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop] 'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop] 2028x1520 [40.01 fps - (0, 0)/4056x3040 crop] 4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]
rpicam-hello --list-cameras 0 rpicam-hello --list-cameras 1
timeout=99000 verbose=
Notice: Omission of prefixes -- for parameters is typically used in command lines. For flags that are missing values, such as verbose in the example above, a trailing = must be included.
Then you can run the following command to specify a timeout of 99,000 milliseconds and detailed output:
rpicam-hello --config example_configuration.txt
rpicam-hello -t
Specifies how long the application runs before shutting down. This applies to both the video recording and preview windows. When capturing a still image, the application displays a preview window with a timeout millisecond before outputting the captured image.
rpicam-hello -t 0
Pass the preview window dimensions in the following comma-separated form: x,y,w,h
rpicam-hello --preview 100,100,500,500
rpicam-hello -f
rpicam-hello --qt-preview
rpicam-hello --nopreview
Default values: "#%frame (%fps fps) exp %exp ag %ag dg %dg"
When running in a desktop environment, set the provided string as the title of the preview window. The following image metadata substitutions are supported:
Command | Description |
---|---|
%frame | Frame sequence number |
%fps | Instantaneous frame rate |
%exp | Shutter speed at which an image is captured, in ms |
%ag | Image analog gain controlled by photosensitive chip |
%dg | Image number gain controlled by ISP |
%rg | Gain of the red component of each pixel point |
%bg | Gain of the blue component of each pixel point |
%focus | The corner point measure of the image, the larger the value, the clearer the image |
%lp | Diopter of the current lens (distance in 1/meter) |
%afstate | Autofocus status (idle, scanning, focused, failed) |
rpicam-hello --info-test "Focus measure: %focus"
Each parameter accepts a number that defines the size of the image displayed in the preview window in pixels.
For rpicam-still, rpicam-jpeg, and rpicam-vid, specify the output resolution.
For rpicam-raw, specify the original frame resolution. For a camera with a 2×2 bin readout mode, specify a resolution that is equal to or less than the bin mode to capture 2×2 bin original frames.
For rpicam-hello, there is no effect.
Record a 1080p video
rpicam-vid -o test.h264 --width 1920 --height 1080
Capture a JPEG at a resolution of 2028×1520. If used with an HQ camera, the 2×2 bin mode is used, so the original file (test. ng) contains 2028×1520 original Bayer images.
rpicam-still -r -o test.jpg --width 2028 --height 1520
Each parameter accepts a number that defines the size of the image displayed in the preview window in pixels. The size of the preview window is not affected, as the image is resized to fit. Captured still images or videos are not affected.
rpicam-still --viewfinder-width 1920 --viewfinder-height 1080
Bit-depth and packing are optional. By default, Bit-depth is 12, and Packing is set to P (packed).
For information on the bit depth, resolution, and packing options available for the sensors, please refer to list-cameras.
As shown below:
Provide a second low-resolution image stream from the camera, scaled down to a specified size. Each accepts a number to define the dimensions of a low-resolution stream (in pixels). Available in preview and video modes. Static capture is not provided. For RPICAM-vid, disable additional color denoising processing. It is useful for image analysis combined with Image post-processing.
rpicam-hello --lores-width 224 --lores-height 224
rpicam-hello --hflip -t 0
rpicam-hello --vflip -t 0
rpicam-hello --rotation 0
These values define the following proportions:
<x>: X coordinates to skip before extracting an image
<y>: Y coordinates to skip before extracting an image
<w>: image width to extract
<h>: image height to extract
The default is 0,0,1,1 (starting with the first X coordinate and the first Y coordinate, using 100% of the image width and 100% of the image height).
Examples:
rpicam-hello --roi 0.25, 0.25, 0.5, 0.5 selects half of the total number of pixels cropped from the center of the image (skips the first 25% of the X coordinates and the first 25% of the Y coordinates, uses 50% of the total width of the image and 50% of the total height of the image).
rpicam-hello --roi 0,0,0.25,0.25 selects a quarter of the total number of pixels cropped from the top left corner of the image (skips the first 0% of the X coordinate and the first 0% of the Y coordinate, uses 25% of the width of the image and 25% of the height of the image).
rpicam-hello --hdr
Use the onboard HDR mode, if available, even if the sensor has a built-in HDR mode. If the onboard HDR mode is not available, HDR is disabled.
Raspberry Pi 5 and higher versions of devices have the onboard HDR mode.
To check the HDR mode built into the sensor, add this option to the list of cameras.
The following options control the image processing and algorithms that affect the image quality of the camera.
Sets the image clarity. Values from the following ranges are accepted:
rpicam-hello --sharpness 0.0
Specifies the image contrast. Values from the following ranges are accepted:
rpicam-hello --contrast 0.0
Specifies the image brightness, which is added as an offset of all pixels in the output image. Values from the following ranges are accepted:
For more uses, refer to ev.
rpicam-hello --brightness 1.0
Specifies the image color saturation. Values from the following ranges are accepted:
rpicam-hello --saturation 0.6
Specifies the exposure value (EV) compensation for the image. A numeric value is accepted that is passed along the following spectrum to the target value of the automatic exposure/gain control (AEC/AGC) processing algorithm:
rpicam-hello --ev 10.0
Specifies the exposure time using the shutter, measured in microseconds. When you use this option, the gain can still be varied. If the camera's frame rate is too high, it doesn't allow the specified exposure time (for example, with a frame rate of 1 fps and an exposure time of 10,000 microseconds), the sensor will use the maximum exposure time allowed by the frame rate.
For a list of minimum and maximum shutter times for official cameras, see camera hardware documentation. Values higher than the maximum will result in undefined behavior.
rpicam-hello --shutter 10000
The effect of analoggain and gain is the same
Sets the combined analog and digital gain. When the sensor drive can provide the required gain, only analog gain is used. When the analog gain reaches its maximum, the ISP applies the digital gain. Accepts a numeric value.
For a list of analogue gain limits, for official cameras, see the camera hardware documentation.
Sometimes, digital gain can exceed 1.0 even when the analogue gain limit is not exceeded. This can occur in the following situations:
Either of the colour gains drops below 1.0, which will cause the digital gain to settle to 1.0/min(red_gain,blue_gain). This keeps the total digital gain applied to any colour channel above 1.0 to avoid discolouration artefacts.
Slight variances during Automatic Exposure/Gain Control (AEC/AGC) changes.
rpicam-hello --gain 0.8
Sets the metering mode of the Automatic Exposure/Gain Control (AEC/AGC) algorithm. Accepts the following values:
For more information on defining a custom metering mode, and adjusting region weights in existing metering modes, see the Raspberry Tuning guide for the Raspberry Pi cameras and libcamera.
rpicam-hello --metering centre
Sets the exposure profile. Changing the exposure profile should not affect the image exposure. Instead, different modes adjust gain settings to achieve the same net result. Accepts the following values:
You can edit exposure profiles using tuning files. For more information, see the Tuning guide for the Raspberry Pi cameras and libcamera.
rpicam-hello --exposure sport
Sets the exposure profile. Changing the exposure profile should not affect the image exposure. Instead, different modes adjust gain settings to achieve the same final result. Accepts the following values: Available white balance modes:
Mode | Color temperature |
---|---|
auto | 2500K ~ 8000K |
incadescent | 2500K ~ 3000K |
tungsten | 3000K ~3500K |
fluorescent | 4000K ~ 4700K |
indoor | 3000K ~ 5000K |
daylight | 5500K ~ 6500 K |
cloudy | 7000K ~ 8500K |
custom | A custom range defined in the tuning file |
These values are only approximate: values could vary according to the camera tuning.
No mode fully disables AWB. Instead, you can fix colour gains with awbgains.
For more information on AWB modes, including how to define a custom one, see the Tuning guide for the Raspberry Pi cameras and libcamera.
rpicam-hello --awb auto
Sets a fixed red and blue gain value to be used instead of an Auto White Balance (AWB) algorithm. Set non-zero values to disable AWB. Accepts comma-separated numeric input in the following format: <red_gain>,<blue_gain>
rpicam-jpeg -o test.jpg --awbgains 1.5,2.0
Default value: auto
Sets the denoising mode. Accepts the following values:
Even fast colour denoise can lower framerates. High quality colour denoise significantly lowers framerates.
rpicam-hello --denoise off
Specifies the camera tuning file. The tuning file allows you to control many aspects of image processing, including the Automatic Exposure/Gain Control (AEC/AGC), Auto White Balance (AWB), colour shading correction, colour processing, denoising and more. Accepts a tuning file path as input. For more information about tuning files, see Tuning Files.
Default value: default Specifies the autofocus mode. Accepts the following values:
This option is only supported for certain camera modules.
rpicam-hello --autofocus-mode auto
Default value: normal
Specifies the autofocus range. Accepts the following values:
This option is only supported for certain camera modules.
rpicam-hello autofocus-range normal
Default value: normal
Specifies the autofocus speed. Accepts the following values:
This option is only supported for certain camera modules.
rpicam-hello --autofocus-speed normal
Specifies the autofocus window within the full field of the sensor. Accepts four decimal values, ranged 0 to 1, in the following format: <x>,<y>,<w>,<h>. Each of these values represents the percentage of available width and height as a decimal between 0 and 1.
These values define the following proportions:
<x>: X coordinates to skip before applying autofocus
<y>: Y coordinates to skip before applying autofocus
<w>:autofocus area width
<w>:autofocus area height
The default value uses the middle third of the output image in both dimensions (1/9 of the total image area).
Examples:
rpicam-hello—autofocus-window 0.25,0.25,0.5,0.5
selects exactly half of the total number of pixels cropped from the centre of the image (skips the first 25% of X coordinates, skips the first 25% of Y coordinates, uses 50% of the total image width, uses 50% of the total image height).
rpicam-hello—autofocus-window 0,0,0.25,0.25
selects exactly a quarter of the total number of pixels cropped from the top left of the image (skips the first 0% of X coordinates, skips the first 0% of Y coordinates, uses 25% of the image width, uses 25% of the image height).
This option is only supported for certain camera modules.
Default value: default Moves the lens to a fixed focal distance, normally given in dioptres (units of 1 / distance in metres). Accepts the following spectrum of values:
Lens calibration is imperfect, so different camera modules of the same model may vary.
Alias: -v
Default value: 1 Sets the verbosity level. Accepts the following values:
rpicam-hello --verbose 1
For more details, click here for reference.
Enter in the terminal
sudo /opt/nvidia/jetson-io/jetson-io.py
Choose Configure Jetson Nano CSI Connector -> Configure for compatible hardware -> Select the desired settings
Camera IMX219 Dual The two camera interfaces are set to IMX219 Camera IMX477 Dual The two camera interfaces are set to IMX477 Camera IMX477-A and IMX219-B One camera interface is set to IMX477 and the other is set to IMX219
A separate driver needs to be installed. After installing the driver, it may interfere with the use of the original IMX219 camera. It is recommended to back up the system before installing the driver
Jetson Nano driver tutorial
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e
#Test video0 DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e #Test video1 DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e
Note:
- The 12 of NV12 is a number instead of letters
- The test screen is output to an HDMI or DP screen, so when testing, you need to connect the screen to the Jetson Nano first
650nm.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Mobile: +86 13434470212
Email: services01@spotpear.com