• sales

    +86-0755-88291180

RPI-HMI-7B-ACCE User Guide

Product Features​

  • 7-inch DSI touchscreen, supporting 10-point capacitive touch
  • Uses an IPS display panel with a hardware resolution of 720 × 1280 and a refresh rate of up to 60Hz
  • Equipped with a 5-megapixel front camera, meeting image acquisition and video application needs
  • Uses optical bonding technology to effectively reduce light reflection and improve image clarity
  • Equipped with a 6H hardness tempered glass touch cover with good wear resistance
  • Uses AF anti-fingerprint technology to reduce fingerprint residue and make cleaning easier
  • Supports integrated installation for Raspberry Pi 5 / Raspberry Pi 4
  • Directly drives the LCD through the Raspberry Pi DSI interface, requiring no additional HDMI adapter
  • Supports Raspberry Pi OS Trixie system, driver-free operation
  • Supports software brightness adjustment for the backlight
  • When used with a Raspberry Pi 5, supports dual 4K@60Hz HDMI video output
  • Uses an aluminum alloy CNC + sheet metal enclosure with a fanless cooling design
  • Supports embedded installation and VESA standard bracket installation


Parameter Introduction​

ParameterDescription
CPUBroadcom BCM2712, quad-core Cortex-A76 (ARM v8) 64-bit SoC, clocked at 2.4GHz
GPUOpenGL ES 3.1 & Vulkan 1.0
USB2 USB 2.0 ports, dual-layer Type-A connectors, each channel supports up to 480Mbps; 2 USB 3.0 ports, dual-layer Type-A connectors, each channel supports up to 5Gbps
ETHGigabit Ethernet
Wi-FiDual-band 802.11ac Wi-Fi
BLEBluetooth 5.0/Bluetooth Low Energy (BLE)
HDMI2 standard HDMI ports, supporting 4K 60Hz
Size7.0"
Resolution720 x 1280
Refresh Rate60Hz
Viewing Angle170°
Maximum Brightness450cd/m²
Color Gamut70%NTSC
Backlight AdjustmentSoftware brightness adjustment

Electrical Specifications​

ParameterMinimumTypicalMaximumUnitNotes
Input Voltage4.755.005.25V1
Input Current35TBDA2
Operating Temperature02560°C3
Storage Temperature-102570°C3
  1. Input voltage exceeding the maximum value or improper operation may cause permanent damage to the device.
  2. Input current must be ≥ 3 A; otherwise, it will cause startup failure or abnormal display, and prolonged abnormal conditions may cause permanent damage to the device.
  3. Do not store the display in a high-temperature, high-humidity environment for an extended period. The display must operate within the limit values; otherwise, the display may be damaged.

Interface Introduction​


NumberInterface and ComponentNumberInterface and Component
①5 V Type-C Power Interface⑥TF Card Slot
②Standard HDMI Interface × 2⑦Power Button
③Gigabit Ethernet Port⑧Power Indicator Light
④USB 3.0 Interface × 2⑨5 V Power Terminal Block (3.81 mm pitch)
⑤USB 2.0 Interface × 2⑩SH1.0 3PIN Debug Serial Port

Interface functions depend on the installed Raspberry Pi mainboard.

Power Supply and Installation​

Power can be supplied through the 5V Type-C interface or the terminal block. When using the terminal block, connect according to the 5V and GND markings on the enclosure.


Supports 50 × 50 mm VESA mounting, with M4 mounting holes.


Product Dimensions​


RPI-HMI-7B-ACCE Hardware Assembly

Hardware Assembly​

The following uses the Raspberry Pi 5 as an example. Disconnect the power before assembling and connecting cables. Do not plug or unplug DSI or CSI cables while powered.


  1. Remove the back cover and cover plates, and prepare the screen, adapter board, and screws.


  2. Connect the DSI and CSI cables to the corresponding interfaces on the back of the screen, with the gold contacts facing up.


  3. Install the thermal pads and heatsink on the front and back of the Raspberry Pi 5.


  4. Connect the Raspberry Pi to the adapter board and secure them to the bracket on the back of the screen.


  5. Connect the DSI cable to the Raspberry Pi 5's CAM/DISP 0, and the CSI cable to CAM/DISP 1. Insert the cables in the direction shown and lock the latches.


    TIP

    When using a Raspberry Pi 4, refer to the image below to connect the DSI display cable and CSI camera cable to the DISPLAY and CAMERA interfaces respectively, with the gold contacts facing up. The DSI cable and CSI cable are not the same cable; be careful to distinguish them.



  6. Install the back cover, place the silicone buttons into the cover plate, and then secure the cover plates on both sides. (The front cover plate hole positions for PI4 and PI5 are different; be careful to distinguish them.)


  7. Secure the back cover and connect the power according to the selected power supply method.



Installation Reference Instructions​

  1. Determine the cabinet cutout dimensions according to the HMI dimensions.


  2. Cut the opening in the cabinet according to the determined dimensions.


  3. Insert the HMI into the cutout from the outside of the cabinet.


  4. Align the unthreaded holes of the clips with the clip mounting holes on the HMI.

  5. Use screws to secure the clips to the HMI, then pass the screws through the threaded holes of the clips and tighten clockwise. The example uses four M2.5 × 8 screws to secure the clips, then four M3 screws to tighten.



Software Setup

Flashing the Official Image​

  1. Connect the TF card to a PC, download and use Raspberry Pi Imager to flash the corresponding system image.

  2. After flashing is complete, modify config.txt in the boot partition according to the instructions below.

Configuring the Display and Camera​

After flashing Raspberry Pi OS, edit config.txt in the boot partition.

CONFIGURATION FILE PATH
  • Trixie and Bookworm: /boot/firmware/config.txt
  • Bullseye and Buster: /boot/config.txt

Raspberry Pi 4:

dtoverlay=vc4-kms-v3d
dtoverlay=ov5647
dtoverlay=vc4-kms-dsi-waveshare-panel-v2,7_0_inch_a

Raspberry Pi 5:

dtoverlay=vc4-kms-v3d
dtoverlay=ov5647
dtoverlay=vc4-kms-dsi-waveshare-panel-v2,7_0_inch_a,dsi0

After saving the configuration, safely eject the system card, insert it into the Raspberry Pi, and boot. If you are modifying the configuration on a running Raspberry Pi, save and reboot:

sudo reboot

Trixie Display Rotation​

  1. Open "Preferences" > "Control Centre" and select "Screens".


  2. Select the corresponding DSI display, and select the corresponding touch device in "Touchscreen".


  3. Select the orientation in the display's "Orientation" menu, then click "Apply".


The display interface and touch device names may differ from the examples; refer to the actual interface.

Lite Version Display Rotation

Edit /boot/firmware/cmdline.txt and add the following parameter on the same line as the existing content, separated from other parameters by a space. The resolution of the 7-inch screen is 720 × 1280:

video=DSI-1:720x1280M@60,rotate=90

DSI-1 is an example interface name; change it according to the actual display interface; rotate can be set to 90, 180, or 270. Save and reboot the Raspberry Pi.

Adjusting Screen Brightness​

Open "Preferences" > "Control Centre" > "Screens", select the corresponding DSI display, and select the brightness in the "Brightness" menu.


Using the Camera​

In Raspberry Pi OS Bookworm, the camera capture applications have changed from libcamera-_ to rpicam-_. Although the old libcamera is still supported, this component will be deprecated in the future. To ensure long-term system compatibility, it is recommended to migrate to rpicam as soon as possible.

When using Raspberry Pi OS Bookworm or newer, you can use the rpicam commands; when using Bullseye, you can refer to the libcamera commands below.

Rpicam​

When running the latest version of Raspberry Pi OS, five basic functions of rpicam-apps are already installed. In this case, the official Raspberry Pi cameras will also be detected and automatically enabled. You can check whether everything is working by entering:

rpicam-hello

You will see a camera preview window for about five seconds. Note: If running on a Raspberry Pi 3 or earlier device with Bullseye, you need to re-enable Glamor for the X Windows hardware-accelerated preview window to work properly. Enter sudo raspi-config in the terminal, then select Advanced Options, Glamor, and Yes. Exit and reboot your Raspberry Pi. By default, Raspberry Pi 3 and earlier devices running Bullseye may not use the correct display driver. Please refer to the /boot/firmware/config.txt file and ensure that dtoverlay=vc4-fkms-v3d or dtoverlay=vc4-kms-v3d is currently active. If you need to change this setting, please reboot.

rpicam-hello​

Equivalent to the camera's "hello world", it starts the camera preview stream and displays it on the screen. You can stop the preview by clicking the close button on the window or using ctrl^C in the terminal.

rpicam-hello -t 0

Tuning Files

Raspberry Pi's libcamera has tuning files for each different type of camera module. The parameters in the files are passed to the algorithms and hardware to produce the best quality images. libcamera can only automatically determine the image sensor being used, but not the entire module, even though the entire module affects "tuning". Therefore, it is sometimes necessary to override the default tuning file for a specific sensor. For example, the NoIR (No Infrared filter) version of the sensor requires different AWB (auto white balance) settings than the standard version, so an IMX219 NoIR used with a Pi 4 or earlier device should be run as follows:

rpicam-hello --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx219_noir.json

Raspberry Pi 5 uses different tuning files in a different folder, so here you would 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 --tuning-file parameter points to the new version. The --tuning-file parameter, like other command-line options, also applies to all rpicam-apps.

rpicam-jpeg​

rpicam-jpeg is a simple still image capture application. To capture a full-resolution JPEG image, use the following command, which will show a preview for about five seconds and then capture a full-resolution JPEG image to the file test.jpg.

rpicam-jpeg -o test.jpg

The -t <duration> option can be used to change the length of time the preview is displayed, and the --width and --height options will change the resolution of the captured still image. For example:

rpicam-jpeg -o test.jpg -t 2000 --width 640 --height 480

Exposure Control

All of these rpicam-apps allow the user to run the camera at a fixed shutter speed and gain. To capture an image with an exposure time of 20ms and a gain of 1.5x, that gain will be used as the analog gain within the sensor until the maximum analog gain allowed by the kernel sensor driver is reached, after which the remainder will be used as digital gain.

rpicam-jpeg -o test.jpg -t 2000 --shutter 20000 --gain 1.5

Raspberry Pi's AEC/AGC algorithms allow applications to specify exposure compensation: the ability to make the image darker or brighter by a given 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

Digital Gain

Digital gain is applied by the ISP, not by the sensor. Digital gain will always be very close to 1.0, unless:

  • The total gain requested (either via the --gain option or via the exposure profile in the camera tuning) exceeds the gain that can be used as analog gain within the sensor. Only the additional gain required will be used as digital gain.
  • One of the color gains is less than 1 (note that color gains are also used as digital gain). In this case, the reported digital gain will settle at 1 / min(red gain, blue gain). This means that a unity digital gain is applied to one of the color channels (not the green channel).
  • AEC/AGC is changing. When AEC/AGC is moving, the digital gain will typically vary to some extent to try to eliminate any fluctuations, but it will quickly return to normal values.

rpicam-still​

Emulates many of the features of the original raspistill application.

rpicam-still -o test.jpg

Encoders

rpicam-still allows files to be saved in a variety of different formats. It supports png and bmp encoding. It also allows files to be saved as a binary dump of RGB or YUV pixels, with no encoding or file format. In the latter case, the application reading the file must know 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 that the format in which the image is saved depends on the -e (equivalent to --encoding) option and will not be automatically selected based on the output file name.

Raw Image Capture

A raw image is an image produced directly by the image sensor, before any processing by the ISP (Image Signal Processor) or any CPU core. For color image sensors, these are usually Bayer format images. Note that raw images are very different from the processed but unencoded RGB or YUV images we saw earlier. To obtain a raw image:

rpicam-still --raw --output test.jpg

Here, the -r option (also --raw) indicates capturing both the raw image and the JPEG. In fact, the raw image is the raw image that generated the JPEG. The raw image is saved in DNG (Adobe Digital Negative) format and is compatible with many standard applications (such as dcraw or RawTherapee). The raw image is saved to a file with the same name but the extension .dng, so it is test.dng. These DNG files contain metadata related to the image capture, including black level, white balance information, and the color matrix used by the ISP to generate the JPEG. This makes these DNG files more convenient for "manual" raw conversion later using some of the tools mentioned above. Use exiftool to display all the metadata encoded in the 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 note that there is only one calibration illuminant (the illuminant determined by the AWB algorithm, although it is always labeled "D65"), and dividing the ISO number by 100 gives the analog gain being used.

Ultra-Long Exposure

To capture long-exposure images, disable AEC/AGC and AWB, as these algorithms will force the user to wait for many frames while they converge. The way to disable them is to provide explicit values. In addition, the --immediate option can be used to skip the entire preview phase of the capture. So, to perform a 100-second exposure capture, 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​

rpicam-vid helps us capture video on Raspberry Pi devices. Rpicam-vid displays a preview window and writes the encoded bitstream to the specified output. This produces an uncontainerized video bitstream that is not packaged in any type of container (such as an mp4 file) format.

  • rpicam-vid uses H.264 encoding.

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 play the resulting file with VLC and other video players:

VLC test.h264

On Raspberry Pi 5, you can output directly to the MP4 container format by specifying the MP4 file extension for the output file:

rpicam-vid -t 10s -o test.mp4

Encoders

rpicam-vid supports motion 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 chunks of the segment size (in milliseconds). By specifying a very short (1 ms) segment, this can conveniently break a motion JPEG stream into individual JPEG files. For example, the following command combines 1 ms segments with a counter in the output file name to generate a new file name for each segment:

rpicam-vid -t 10000 --codec mjpeg --segment 1 -o test%05d.jpeg

Capturing High Frame Rate Video

To minimize frame loss in high frame rate (> 60fps) video, try the following configuration adjustments:

  • Set the H.264 target level to 4.2 using the --level 4.2 parameter.
  • Disable software color denoising by setting the denoise option to cdn_off.
  • Disable the nopreview display window to free up some additional CPU cycles.
  • Set force_turbo=1 in /boot/firmware/config.txt to ensure that the CPU clock is not throttled during video capture. For more information, see the force_turbo documentation.
  • Adjust the ISP output resolution parameter to --width 1280 --height 720 or lower to achieve the frame rate target.
  • On Raspberry Pi 4, you can overclock the GPU to improve performance by adding gpu_freq=550 or higher to /boot/firmware/config.txt. For details, see the overclocking documentation.

The following command demonstrates how to achieve 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

Libav Integration with picam-vid

Rpicam-vid can use the ffmpeg/libav codec backend to encode audio and video streams. You can save these streams to files 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

UDP

To stream video over UDP using the Raspberry Pi as a server, use the following command, replacing the < IP -addr> placeholder with the IP address of the client or multicast address, and the <port> placeholder with the port you want to use for streaming:

rpicam-vid -t 0 --inline -o udp://<ip-addr>:<port>

To view the video stream over UDP using the Raspberry Pi as a client, use the following command, replacing the <port> placeholder with the port you want to stream:

vlc udp://@:<port> :demux=h264

Alternatively, use the following command on the client to stream with ffplay:

ffplay udp://<ip-addr-of-server>:<port> -fflags nobuffer -flags low_delay -framedrop

TCP

Video can also be transmitted over TCP. Using the Raspberry Pi as a server:

rpicam-vid -t 0 --inline --listen -o tcp://0.0.0.0:<port>

To view the video stream over TCP using the Raspberry Pi as a client, use the following command:

vlc tcp/h264://<ip-addr-of-server>:<port>

Alternatively, use the following command on the client to stream with ffplay at 30 frames per second:

ffplay tcp://<ip-addr-of-server>:<port> -vf "setpts=N/30" -fflags nobuffer -flags low_delay -framedrop

RTSP

To transmit video over RTSP using VLC, using the Raspberry Pi as a 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 over 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 use the following command on the client 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 the inline flag to force the stream header information into every intra-frame, which helps the client understand the stream if it misses the beginning.

rpicam-raw​

rpicam-raw records video directly from the sensor as raw Bayer frames. It does not display a preview window. To record a two-second raw clip to a file named test.raw, execute 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 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 file name unique:

rpicam-raw -t 2000 --segment 1 -o test%05d.raw

With fast storage devices, rpicam-raw can write 18MB 12-megapixel HQ camera frames to disk at 10fps. rpicam-raw cannot format the output frames as DNG files; to achieve this, use rpicam-still with a frame rate option below 10 to avoid dropped frames:

rpicam-raw -t 5000 --width 4056 --height 3040 -o test.raw --framerate 8

For more information about the raw format, refer to the mode documentation.

rpicam-detect​

Note: Raspberry Pi OS does not include rpicam-detect. If you have already installed TensorFlow Lite, you can build rpicam-detect. For more information, see the rpicam-apps build instructions. Do not forget to pass -DENABLE_TFLITE=1 when running cmake. rpicam-detect displays a preview window and uses the Google MobileNet v1 SSD (Single Shot Detector) neural network to monitor content. The network has been trained to recognize approximately 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. It then returns to the monitoring preview mode. For general information about using the model, see the TensorFlow Lite Object Detector section. For example, when you are out, you can monitor 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 Parameter Settings​

  • --help -h Prints all options and a brief introduction to each option

    rpicam-hello -h
  • --version Outputs the version strings of libcamera and rpicam-apps

    rpicam-hello --version

Example output:

rpicam-apps build: ca559f46a97a 27-09-2021 (14:10:24)
libcamera build: v0.0.0+3058-c29143f7
  • --list-cameras Lists the cameras connected to the Raspberry Pi and their available sensor modes

    rpicam-hello --list-cameras

Sensor mode identifiers have the following form:

S<Bayer order><Bit-depth>_<Optional packing> : <Resolution list>

Cropping is specified in native sensor pixels (even in pixel binning mode) as (<x>, <y>)/<Width>×<Height>. (x, y) specifies the position of the cropping window of size width × height within the sensor array. For example, the following output shows information for an IMX219 sensor at index 0 and an IMX477 sensor at 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]
  • --camera Selects the camera to use. Specify an index from the list of available cameras.

    rpicam-hello --list-cameras 0
    rpicam-hello --list-cameras 1
  • --config -c, Specifies a file containing command-line option parameters and values. Usually, it is a file named example_configuration.txt, with options and values specified as key-value pairs, one option per line.

    timeout=99000
    verbose=

Note: Omit the -- prefix normally used for parameters on the command line. For flags lacking values, such as verbose in the example above, the trailing = must be included. Then you can run the following command to specify a timeout of 99000 milliseconds and verbose output:

rpicam-hello --config example_configuration.txt
  • --time -t, default 5000 milliseconds delay

    rpicam-hello -t

Specifies how long the application runs before closing. This applies to video recording and preview windows. When capturing a still image, the application displays a preview window for the timeout milliseconds before capturing the output image.

rpicam-hello -t 0
  • --preview Sets the position (x,y coordinates) and size (w,h dimensions) of the desktop or DRM preview window. It does not affect the resolution or aspect ratio of the image requested from the camera.

Pass the preview window dimensions in the following comma-separated form: x,y,w,h

rpicam-hello --preview 100,100,500,500
  • --fullscreen -f, forces the preview window to use the entire screen, with no borders or title bar. The image is scaled to fit the entire screen. Does not accept a value.

    rpicam-hello -f
  • --qt-preview Uses the Qt preview window, which consumes more resources than other options but supports X window forwarding. Not compatible with the fullscreen flag. Does not accept a value.

    rpicam-hello --qt-preview
  • --nopreview Makes the application not display a preview window. Does not accept a value.

    rpicam-hello --nopreview
  • --info-text

Default: "#%frame (%fps fps) exp %exp ag %ag dg %dg" When running in a desktop environment, sets the provided string as the title of the preview window. The following image metadata substitutions are supported:

DirectiveDescription
%frameFrame sequence number
%fpsInstantaneous frame rate
%expShutter speed when capturing the image, in ms
%agAnalog image gain controlled by the sensor
%dgDigital image gain controlled by the ISP
%rgGain of the red component of each pixel
%bgGain of the blue component of each pixel
%focusCorner metric of the image; higher values indicate a sharper image
%lpCurrent lens diopter (distance in 1/meters)
%afstateAutofocus state (idle, scanning, focused, failed)
rpicam-hello --info-text "Focus measure: %focus"
  • --width
  • --height

Each accepts a single number to define the dimensions of the captured image (in pixels). For rpicam-still, rpicam-jpeg, and rpicam-vid, specifies the output resolution. For rpicam-raw, specifies the raw frame resolution. For cameras with a 2×2 binning readout mode, specifying a resolution equal to or smaller than the binning mode captures 2×2 binned raw frames. Has no effect for rpicam-hello. Recording 1080p video

rpicam-vid -o test.h264 --width 1920 --height 1080

Capturing a JPEG at 2028×1520 resolution. If used with the HQ camera, 2×2 binning mode is used, so the raw file (test.dng) contains a 2028×1520 raw Bayer image.

rpicam-still -r -o test.jpg --width 2028 --height 1520
  • --viewfinder-width
  • --viewfinder-height

Each parameter accepts a number to define the dimensions of the image displayed in the preview window, in pixels. It does not affect the dimensions of the preview window, as the image is resized to fit. It does not affect the captured still image or video.

rpicam-still --viewfinder-width 1920 --viewfinder-height 1080
  • --mode Allows the camera mode to be specified in the following colon-separated format: <width>:<height>:<bit-depth>:<packing>. If the provided values do not match exactly, the system will select the closest available option for the sensor. Packed (P) or unpacked (U) packing formats can be used, which affect the format of stored video and still images, but not the format of frames passed to the preview window.

Bit-depth and packing are optional; bit-depth defaults to 12, and packing defaults to P (packed). For information about the bit depths, resolutions, and packing options available for the sensor, see list-cameras. As shown below:

    • 4056:3040:12:P - 4056×3040 resolution, 12 bits/pixel, packed.
  • 1632:1224:10 - 1632×1224 resolution, 10 bits/pixel.

  • 2592:1944:10:U - 2592×1944 resolution, 10 bits/pixel, unpacked.

  • 3264:2448 - 3264×2448 resolution.

  • --viewfinder-mode Same as the mode option, but it applies to the data passed to the preview window. For more information, see the mode documentation.

  • --lores-width and --lores-height

Provides a second low-resolution image stream from the camera, scaled down to the specified size. Each accepts a number to define the dimensions of the low-resolution stream (in pixels). Can be used in preview and video modes. Does not provide still captures. For rpicam-vid, disables additional color denoising. Useful for image analysis combined with image post-processing.

rpicam-hello --lores-width 224 --lores-height 224
  • --hflip Flips the image horizontally. Does not accept a value.

    rpicam-hello --hflip -t 0
  • --vflip Flips the image vertically. Does not accept a value.

    rpicam-hello --vflip -t 0
  • --rotation Rotates the image extracted from the sensor. Only accepts values 0 or 180.

    rpicam-hello --rotation 0
  • --roi Crops the image extracted from the full sensor area. Accepts four decimal values ranging from 0 to 1, in the format: <x>, <y>, <w>, <h>. Each of these values represents a percentage of the available width and height as a decimal between 0 and 1.

These values define the following proportions: <x>: x-coordinate to skip before extracting the image <y>: y-coordinate to skip before extracting the image <w>: width of the image to extract <h>: height of the image to extract Default is 0,0,1,1 (start from the first X coordinate and first Y coordinate, use 100% of the image width, use 100% of the image height). Examples: rpicam-hello --roi 0.25,0.25,0.5,0.5 selects half of the total pixels cropped from the center of the image (skip the first 25% of the X coordinate, skip the first 25% of the Y coordinate, use 50% of the total image width, use 50% of the total image height). rpicam-hello --roi 0,0,0.25,0.25 selects a quarter of the total pixels cropped from the top-left corner of the image (skip the first 0% of the X coordinate, skip the first 0% of the Y coordinate, use 25% of the image width, use 25% of the image height).

  • --hdr Default: off. Runs the camera in HDR mode. If no value is passed, auto is assumed. Accepts one of the following values:

    • off - Disables HDR.
    • auto - Enables HDR on supported devices. If available, uses the sensor's built-in HDR mode. If the sensor does not have a built-in HDR mode, uses the onboard HDR mode (if available).
    • single-exp Enables HDR on supported devices. If available, uses the sensor's built-in HDR mode. If the sensor does not have a built-in HDR mode, uses the onboard HDR mode (if available).
    rpicam-hello --hdr

Uses the onboard HDR mode if available, even if the sensor has a built-in HDR mode. If the onboard HDR mode is unavailable, HDR is disabled. Raspberry Pi 5 and newer devices have an onboard HDR mode. To check for built-in HDR modes in the sensor, add this option to the camera list.

Camera Control Options​

The following options control the image processing and algorithms that affect camera image quality.

  • sharpness

Sets the image sharpness. Accepts values in the following range:

    • 0.0 applies no sharpening
  • Values greater than 0.0 but less than 1.0 apply less sharpening than the default

  • 1.0 applies the default amount of sharpening

  • Values greater than 1.0 apply additional sharpening

rpicam-hello --sharpness 0.0
  • contrast

Specifies the image contrast. Accepts values in the following range:

    • 0.0 applies minimum contrast
  • Values greater than 0.0 but less than 1.0 apply less contrast than the default

  • 1.0 applies the default contrast

  • Values greater than 1.0 apply additional contrast

rpicam-hello --contrast 0.0
  • brightness

Specifies the image brightness, added as an offset to all pixels in the output image. Accepts values in the following range:

    • -1.0 minimum brightness (black)
  • 0.0 applies standard brightness

  • 1.0 applies maximum brightness (white)

For more usage, ev is recommended.

rpicam-hello --brightness 1.0
  • saturation

Specifies the image color saturation. Accepts values in the following range:

    • 0.0 applies minimum saturation (grayscale)
  • Values greater than 0.0 but less than 1.0 apply less saturation than the default

  • 1.0 applies the default saturation

  • Values greater than 1.0 apply additional saturation

rpicam-hello --saturation 0.6
  • ev

Specifies the exposure value (EV) compensation for the image. Accepts a numeric value that controls the target value passed to the automatic exposure/gain control (AEC/AGC) processing algorithm along the following spectrum:

    • -10.0 applies the minimum target value
  • 0.0 applies the standard target value

  • 10.0 applies the maximum target value

rpicam-hello --ev 10.0
  • shutter

Specifies the exposure time using the shutter, in microseconds. When you use this option, the gain can still vary. If the camera is running at a frame rate too fast to allow the specified exposure time (for example, a frame rate of 1fps with an exposure time of 10000 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 the camera hardware documentation. Values above the maximum will cause undefined behavior.

rpicam-hello --shutter 10000
  • gain

analoggain has the same effect as gain. Sets the combined analog and digital gain. When the sensor driver can provide the requested gain, only analog gain is used. When analog gain reaches its maximum value, the ISP applies digital gain. Accepts a numeric value. For a list of analog gain limits for official cameras, see the camera hardware documentation. Sometimes, digital gain will exceed 1.0 even without exceeding the analog gain limit. This may occur in the following situations: If any of the color gains is below 1.0, which will cause the digital gain to settle at 1.0/min(red gain, blue gain). This makes the total digital gain applied to any color channel above 1.0 to avoid color shading artifacts. Slight differences when the automatic exposure/gain control (AEC/AGC) changes.

rpicam-hello --gain 0.8
  • metering Default: centre

Sets the metering mode for the automatic exposure/gain control (AEC/AGC) algorithm. Accepts the following values:

    • centre Center-weighted metering
  • spot Spot metering

  • average Average or full-frame metering

  • custom Custom metering mode defined in the camera tuning file

For more information on defining custom metering modes and adjusting region weights in existing metering modes, see the Raspberry Pi Camera and libcamera Tuning Guide.

rpicam-hello --metering centre
  • exposure

Sets the exposure profile. Changing the exposure profile should not affect image exposure. Instead, different modes adjust gain settings to achieve the same net result. Accepts the following values:

    • sport: Short exposure time, high gain
  • normal: Normal exposure, normal gain

  • long: Long exposure time, low gain

You can edit exposure profiles using tuning files. For more information, see the Raspberry Pi Camera and libcamera Tuning Guide.

rpicam-hello --exposure sport
  • awb

Sets the available white balance modes. Different modes adjust gain settings to achieve the same final result. Accepts the following values:

ModeColor Temperature
auto2500K - 8000K
incandescent2500K - 3000K
tungsten3000K -3500K
fluorescent4000K - 4700K
indoor3000K - 5000K
daylight5500K - 6500 K
cloudy7000K - 8500K
customCustom range, set via tuning file

These values are only approximate: values may vary depending on camera tuning. No mode completely disables AWB. Instead, you can use awbgains to fix the color gains. For more information on AWB modes, including how to define custom modes, see the Raspberry Pi Camera and libcamera Tuning Guide.

rpicam-hello --awb auto
  • awbgains

Sets a fixed red and blue gain value to replace the automatic white balance (AWB) algorithm. Setting a non-zero value disables AWB. Accepts comma-separated numeric input in the following format: <red_gain>, <blue_gain>

rpicam-jpeg -o test.jpg --awbgains 1.5,2.0
  • denoise

Default: auto Sets the denoising mode. Accepts the following values:

    • auto: Enables standard spatial denoising. Uses ultra-fast color denoising for video and high-quality color denoising for images. Does not enable additional color noise reduction in the preview window.
  • off: Disables spatial and color denoising.

  • cdn_off: Disables color noise reduction.

  • cdn_fast: Uses fast color denoising.

  • cdn_hq: Uses high-quality color denoising. Not suitable for video/viewfinder due to reduced throughput.

Even fast color denoising reduces the frame rate. High-quality color denoising significantly reduces the frame rate.

rpicam-hello --denoise off
  • tuning-file

Specifies the camera tuning file. Tuning files allow you to control many aspects of image processing, including automatic exposure/gain control (AEC/AGC), automatic white balance (AWB), color shading correction, color processing, denoising, and more. Accepts a tuning file path as input. For more information on tuning files, see Tuning Files.

  • autofocus-mode

Default: default Specifies the autofocus mode. Accepts the following values:

    • default: Places the camera in continuous autofocus mode, unless lens position or autofocus capture overrides to manual mode
  • manual: Does not move the lens unless the lens position is manually configured

  • auto: Moves the lens to perform an autofocus scan only when the camera starts or before capture, if the autofocus capture function is also used

  • continuous: Automatically adjusts the lens position as the scene changes

This option is only supported by certain camera modules.

rpicam-hello --autofocus-mode auto
  • autofocus-range

Default: normal Specifies the autofocus range. Accepts the following values:

    • normal: Focus range is fairly close to infinity
  • macro: Focuses only on close objects, including the closest focal length supported by the camera

  • full: Focuses the entire range, from the closest object to infinity

This option is only supported by certain camera modules.

rpicam-hello autofocus-range normal
  • autofocus-speed

Default: normal Specifies the autofocus speed. Accepts the following values:

    • normal: Changes the lens position at normal speed
  • fast: Changes the lens position quickly

This option is only supported by certain camera modules.

rpicam-hello --autofocus-speed normal
  • autofocus-window

Specifies the autofocus window within the full sensor area. Accepts four decimal values ranging from 0 to 1, in the following format: <x>, <y>, <w>, <h>. Each of these values represents a percentage of the available width and height as a decimal between 0 and 1. These values define the following proportions: <x>: x-coordinate to skip before applying autofocus <y>: y-coordinate to skip before applying autofocus <w>: autofocus area width <h>: autofocus area height The default 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 half of the total pixels cropped from the center of the image (skips the first 25% of the X coordinate, skips the first 25% of the Y coordinate, 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 a quarter of the total pixels cropped from the top-left corner of the image (skips the first 0% of the X coordinate, skips the first 0% of the Y coordinate, uses 25% of the image width, uses 25% of the image height). This option is only supported by certain camera modules.

  • lens-position

Default: default Moves the lens to a fixed focal length, usually expressed in diopters (unit of 1/meter distance). Accepts the following value range:

    • 0.0: Moves the lens to the "infinity" position
  • Any other number: Moves the lens to the 1/number position. For example, a value of 2.0 will focus at approximately 0.5m

  • normal: Moves the lens to the default position corresponding to the lens's hyperfocal position

Lens calibration is not perfect, so different camera modules of the same model may vary.

  • verbose

Alias: -v Default: 1 Sets the verbosity level. Accepts the following values:

    • 0: No output
  • 1: Normal output

  • 2: Verbose output

rpicam-hello --verbose 1

For more detailed information, click here.


Working with Raspberry Pi

On-Screen Keyboard​

Click the keyboard icon in the top right corner of the desktop to show or hide the on-screen keyboard.


To adjust the on-screen keyboard settings, open "Preferences" > "Control Centre" > "Display" and select the desired option in "On-screen Keyboard".


Selecting the Touch Mode​

In "Control Centre" > "Screens", select the corresponding display, and choose the touch mode via "Touchscreen" > "Mode".


Configuring Wi-Fi​

  • On Raspberry Pi devices that support the 5GHz band (such as Pi 3B+, Pi 4, CM4, Pi 400), you need to set the country code first before you can use the wireless network normally.
  1. Open a terminal, type sudo raspi-config, select Localisation Options > WLAN Country (set country code), and press Enter.
  2. Select your country from the list (for example, select CN for China), confirm, and press OK. (If you don't know your country code, you can look it up on wikipedia)
  3. Return to the main interface, press Finish, and the system will prompt you to reboot; select Yes and wait for the Raspberry Pi to restart.
  4. After completing this, you can connect to a wireless network on the Raspberry Pi and enter the password to finish connecting.


Finding the Device IP​

Obtaining the Raspberry Pi's IP address is a prerequisite for remote login. After configuring Wi-Fi or connecting an Ethernet cable, refer to the following steps.

Viewing the IP Address on the Desktop​

If you are using the desktop version of the operating system, hover the mouse over the network icon in the top right corner to display the name of the currently connected network and the IP address.


Enabling SSH and VNC​

  • Open the Raspberry Pi terminal and type raspi-config to enter the settings interface, then select Interface Options.
  • Go to the Interfaces tab.
  • Select Enable next to SSH.
  • Click OK.
  • Reboot the Raspberry Pi.


For VNC, follow the same steps as above

Remote Login​

VNC Login​

Please first ensure that the Raspberry Pi and your computer are under the same router or on the same subnet, and that the VNC login function has been enabled according to the steps above.

  1. Download and open the remote login software VNC-Viewer
  2. Open VNC and enter the Raspberry Pi's IP address:


  1. Select Continue:


  1. Enter the username and password actually set in the system:


  1. You are now logged in successfully:


SSH Login​

Using MobaXterm Software​

Please first ensure that the Raspberry Pi and your computer are under the same router or on the same subnet, and that the SSH login function has been enabled according to the steps above.

  1. Open the remote login software MobaXterm:


  1. Click session, click ssh, and enter the Raspberry Pi's IP address in Remote host:


  1. Enter the username and password actually set in the system:


  1. You are now logged in successfully:


Raspberry Pi Connect Login​

This feature requires the Wayland window server. Raspberry Pi OS Bookworm and later use Wayland by default. Screen sharing is incompatible with Raspberry Pi OS Lite or systems using the X window server.

Installing Connect​

If your version of Raspberry Pi OS does not have Connect installed, open a terminal window. Run the following commands to update your system and packages:

sudo apt update
sudo apt full-upgrade

Run the following command on the Raspberry Pi to install Connect:

sudo apt install rpi-connect

Starting Connect​

After installation, use the rpi-connect command-line interface to start Connect for the current user:

rpi-connect on

Alternatively, click the "Connect" icon in the menu bar to open the drop-down menu and select "Turn on Raspberry Pi Connect":


To stop Connect, run the following command:

rpi-connect off

Associating the Raspberry Pi Device with a Connect Account​

Now that you have installed and started Connect on your Raspberry Pi device, you must associate your device with a Connect account.

If you use the Connect plugin in the menu bar, clicking "Turn on Raspberry Pi Connect" for the first time opens a browser and prompts you to sign in with your Raspberry Pi ID:


Alternatively, select "Sign in..." from the drop-down menu:


If you do not have a Raspberry Pi ID yet, click create one for free.

Completing the Raspberry Pi Connection​

After verification, give your device a name. Choose a name that uniquely identifies the device. Click the "Create device and sign in" button to continue.


You can now connect to your device remotely. The Connect icon in the menu bar will turn blue, indicating that your device is now signed in to the Connect service. You should receive an email notification indicating that a new device has been linked to your Connect account.


Accessing Your Raspberry Pi Device​

Now that your device is displayed in the Connect interface, you can access your device from anywhere using only a browser. Connect provides multiple ways to interact with your device remotely.

  • Access connect.raspberrypi.com on any computer.

  • Connect redirects you to the Raspberry Pi ID service for login. After logging in, Connect displays a list of linked devices. Devices available for screen sharing display a gray screen-sharing badge below the device name.


  • Click the "Connect via" button on the right side of the device you want to access. Select the "Screen sharing" option from the menu. This opens a browser window showing the device desktop.


  • You can now use your device as if you were local. For more information about the connection, hover the mouse over the padlock icon to the right of the "Disconnect" button.


For more information, refer to the official Raspberry Pi documentation.


Resources and Documents

1. Hardware Resources​

2. Software Tools​

3. Other Resources​


Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Email: services01@spotpear.com

TAG: UART Serial TTL To RS232 B Built-In Protection Circuits Rail-mount 7inch Round LCD HDMI Capacitive 7 inch Touchscreen Display 1080x1080 For Raspberry Pi/Jetson Nano/mini PC Raspberry Pi 5 ABS Case ESP32-S3 Raspberry Pi RTC WatchDog SpotPear ESP32 1.9 inch LCD Capacitive TouchScreen 1.9inch Display ST7789 170x320 for Arduino /Raspberry Pi /Pico Raspberry Pi 12.3 inch HDMI LCD Captive TouchScreen Display 1920x720 For Jetson Series/Computer PC D-Robotics RDK X3 MD Carrier Board For RDK X3 Module Horizon Sunrise Pi ARM Cortex-A53 5Tops 8.8inch LCD 1920x480 Computer PC Monitor Display Secondary Screen TypeC USB CPU RAM Raspberry Pi 5 PCIe to M.2 SSD Bus Servo DC-BUCK-Adapter 7.2V Voltage mini module For SC15/SC09 Servo Raspberry Pi Audio WIFI Configuration ESP32-S3 Raspberry Pi 13.3 inch DSI MIPI Display 13.3inch LCD Capacitive TouchScreen 1920x1080 ESP32-S3 Industrial Grade Dual Channel CAN Relay IoT Device ESP32-S3 LCD Mini tiny Development Board 0.85 inch Display 0.85inch Screen 128x128 SD-Port For Arduino Luckfox Pico ST7789 Jetson Orin NX