Capture Images with set parameters

  1. Where did you get the camera module(s)?
    ArduCam

  2. Model number of the product(s)?
    OV2311

  3. What hardware/platform were you working on?
    RPI 4B

  4. Instructions you have followed. (link/manual/etc.)
    How to access and program the Pivariety Camera using Command Line, Python, OpenCV, and GStreamer

  5. Problems you were having?
    Decrease the exposure time with v4l2-ctl, but libcamera-still seems to default.
    What is another way to decrease the exposure time to 1 and take image?

  6. The dmesg log from your hardware?

  7. Troubleshooting attempts you’ve made?
    Web search, v4l2-ctl and libcamera (but exposure is set to modes?)

  8. What help do you need?

How to decrease the exposure time and shutter time to take a picture for a high-speed application. I am using libcamera-still to capture images and using the command line. Is there a better way?

hi, @Wook

You can set the exposure time through the --shutter parameter, which can be set very small.

E.g:

libcamera-still -t 0 --shutter 1000
1 Like

Thank you, Yang. 1000 is in microseconds?

hi, @Wook

That’s right, the unit is microseconds.

Last question for the thread. Can ISO be adjusted with libcamera?

hi, @Wook

You can set the gain (ISO) via the --gain parameter.

To see more libcamera-still parameters, you can use the following command:

libcamera-still -h

Hi @yang.

I tried the following: libcamera-still -t 5000 --shutter 88 --gain 2 -o exposure88.jpg

but it freezes the camera window.

[email protected]:~/Desktop/Test $ libcamera-still -t 5000 --shutter 88 --gain 2 -o exposure88.jpg
[0:01:29.701479269] [3556] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3139-5baab39e
[0:01:29.704195392] [3559] WARN CameraSensor camera_sensor.cpp:197 ‘arducam-pivariety 10-000c’: Recommended V4L2 control 0x009a0922 not supported
[0:01:29.718319715] [3559] WARN CameraSensor camera_sensor.cpp:249 ‘arducam-pivariety 10-000c’: The sensor kernel driver needs to be fixed
[0:01:29.718387753] [3559] WARN CameraSensor camera_sensor.cpp:251 ‘arducam-pivariety 10-000c’: See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:01:29.719340146] [3559] WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘arducam-pivariety’
[0:01:29.719399016] [3559] WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:01:29.719426609] [3559] WARN CameraSensor camera_sensor.cpp:414 ‘arducam-pivariety 10-000c’: Failed to retrieve the camera location
[0:01:29.739532311] [3559] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file ‘arducam-pivariety.json’ not found for IPA module ‘raspberrypi’
[0:01:29.914656112] [3559] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/video0
[0:01:29.916003117] [3556] INFO Camera camera.cpp:937 configuring streams: (0) 800x650-YUV420
[0:01:29.916197377] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt BG10 Score: 1862.5 (best 1862.5)
[0:01:29.916310896] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt BG10 Score: 1901.52 (best 1862.5)
[0:01:29.916400508] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt BG10 Score: 1842.63 (best 1842.63)
[0:01:29.916485119] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt BA81 Score: 2862.5 (best 1842.63)
[0:01:29.916566583] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt BA81 Score: 2901.52 (best 1842.63)
[0:01:29.916646324] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt BA81 Score: 2842.63 (best 1842.63)
[0:01:29.916731454] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt pBAA Score: 1362.5 (best 1362.5)
[0:01:29.916815380] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt pBAA Score: 1401.52 (best 1362.5)
[0:01:29.916897991] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt pBAA Score: 1342.63 (best 1342.63)
[0:01:30.064012615] [3559] INFO RPI raspberrypi.cpp:624 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected mode: 1280x720-pBAA
[0:01:30.125980766] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: Saturation = 1.000000
[0:01:30.126153360] [3564] WARN IPARPI raspberrypi.cpp:857 Could not set SATURATION - no ccm algorithm
[0:01:30.126523935] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: Contrast = 1.000000
[0:01:30.126890770] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: Brightness = 0.000000
[0:01:30.127103975] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: AwbMode = 0
[0:01:30.127173994] [3564] WARN IPARPI raspberrypi.cpp:789 Could not set AWB_MODE - no AWB algorithm
[0:01:30.127368235] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: Sharpness = 1.000000
[0:01:30.127581107] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: ExposureValue = 0.000000
[0:01:30.127937775] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: AeExposureMode = 0
[0:01:30.128149368] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: AnalogueGain = 2.000000
[0:01:30.128364999] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: ExposureTime = 88
[0:01:30.128610444] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]
[0:01:30.128840464] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: AeMeteringMode = 0
[0:01:30.128918149] [3564] INFO IPARPI raspberrypi.cpp:633 Request ctrl: NoiseReductionMode = 3
[0:01:35.613905827] [3556] INFO Camera camera.cpp:937 configuring streams: (0) 1600x1300-YUV420
[0:01:35.614042087] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt RG10 Score: 1500 (best 1500)
[0:01:35.614117606] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt RG10 Score: 2034.02 (best 1500)
[0:01:35.614152346] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt RG10 Score: 3505.13 (best 1500)
[0:01:35.614187013] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt pRAA Score: 1000 (best 1000)
[0:01:35.614217958] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt pRAA Score: 1534.02 (best 1000)
[0:01:35.614248606] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt pRAA Score: 3005.13 (best 1000)
[0:01:35.614284347] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1300 fmt RGGB Score: 2500 (best 1000)
[0:01:35.614314162] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1600x1080 fmt RGGB Score: 3034.02 (best 1000)
[0:01:35.614344347] [3559] INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt RGGB Score: 4505.13 (best 1000)
[0:01:35.722122437] [3559] INFO RPI raspberrypi.cpp:624 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected mode: 1600x1300-pRAA

hi, @Wook

I use the same command as you without any problems.

When saving an image, the maximum resolution image is saved by default and the window freezes. Maybe because it took too long to save the image.

You can use the --width, --height parameters to set the size of the saved image. Test saving smaller resolutions.

1 Like