Open davidqzhu opened 4 years ago
Raspberry Pi4
pi@raspberrypi4:~ $ raspistill -v -o img.jpg
"raspistill" Camera App (commit )
Camera Name imx219
Width 3280, Height 2464, filename img.jpg
Using camera 0, sensor mode 0
GPS output Disabled
Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture
Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
pi@raspberrypi4:~ $ uname -a
Linux raspberrypi4 4.19.57-v7l+ #1244 SMP Thu Jul 4 18:48:07 BST 2019 armv7l GNU/Linux
pi@raspberrypi4:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@raspberrypi4:~ $ vcgencmd get_camera
supported=1 detected=1
pi@raspberrypi4:~ $ fswebcam -v
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "bm2835 mmal"
src_v4l2_get_capability,89: cap.card: "mmal service 16.1"
src_v4l2_get_capability,90: cap.bus_info: "platform:bcm2835-v4l2"
src_v4l2_get_capability,91: cap.capabilities=0x85200005
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,94: - VIDEO_OVERLAY
src_v4l2_get_capability,101: - READWRITE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "Camera 0"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,520: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,533: 0: [0x32315559] 'YU12' (Planar YUV 4:2:0)
src_v4l2_set_pix_format,533: 1: [0x56595559] 'YUYV' (YUYV 4:2:2)
src_v4l2_set_pix_format,533: 2: [0x33424752] 'RGB3' (24-bit RGB 8-8-8)
src_v4l2_set_pix_format,533: 3: [0x4745504A] 'JPEG' (JFIF JPEG)
src_v4l2_set_pix_format,533: 4: [0x34363248] 'H264' (H.264)
src_v4l2_set_pix_format,533: 5: [0x47504A4D] 'MJPG' (Motion-JPEG)
src_v4l2_set_pix_format,533: 6: [0x55595659] 'YVYU' (YVYU 4:2:2)
src_v4l2_set_pix_format,533: 7: [0x59555956] 'VYUY' (VYUY 4:2:2)
src_v4l2_set_pix_format,533: 8: [0x59565955] 'UYVY' (UYVY 4:2:2)
src_v4l2_set_pix_format,533: 9: [0x3231564E] 'NV12' (Y/CbCr 4:2:0)
src_v4l2_set_pix_format,533: 10: [0x33524742] 'BGR3' (24-bit BGR 8-8-8)
src_v4l2_set_pix_format,533: 11: [0x32315659] 'YV12' (Planar YVU 4:2:0)
src_v4l2_set_pix_format,533: 12: [0x3132564E] 'NV21' (Y/CrCb 4:2:0)
src_v4l2_set_pix_format,533: 13: [0x34524742] 'BGR4' (32-bit BGRA/X 8-8-8-8)
Using palette JPEG
src_v4l2_set_mmap,672: mmap information:
src_v4l2_set_mmap,673: frames=4
src_v4l2_set_mmap,722: 0 length=110592
src_v4l2_set_mmap,722: 1 length=110592
src_v4l2_set_mmap,722: 2 length=110592
src_v4l2_set_mmap,722: 3 length=110592
Error starting stream.
VIDIOC_STREAMON: Invalid argument
Unable to use mmap. Using read instead.
--- Capturing frame...
VIDIOC_DQBUF: Invalid argument
Segmentation fault
[ 243.910047] bcm2835-v4l2: Failed enabling camera, ret -2
[ 243.910058] bcm2835-v4l2: Failed to enable camera
[ 243.910067] ------------[ cut here ]------------
[ 243.910114] WARNING: CPU: 2 PID: 1099 at drivers/media/common/videobuf2/videobuf2-core.c:1361 vb2_start_streaming+0xe4/0x160 [videobuf2_common]
[ 243.910123] Modules linked in: rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic fuse 8021q garp stp llc spidev brcmfmac brcmutil sha256_generic v3d cfg80211 rfkill gpu_sched vc4 drm_kms_helper drm snd_soc_core drm_panel_orientation_quirks snd_compress raspberrypi_hwmon hwmon snd_bcm2835(C) snd_pcm_dmaengine snd_pcm syscopyarea sysfillrect snd_timer sysimgblt fb_sys_fops snd i2c_bcm2835 bcm2835_codec(C) bcm2835_v4l2(C) spi_bcm2835 v4l2_mem2mem bcm2835_mmal_vchiq(C) v4l2_common videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) argon_mem uio_pdrv_genirq i2c_gpio uio i2c_algo_bit fixed i2c_dev ip_tables x_tables ipv6
[ 243.910680] CPU: 2 PID: 1099 Comm: fswebcam Tainted: G WC 4.19.57-v7l+ #1244
[ 243.910688] Hardware name: BCM2835
[ 243.910718] [<c0212c8c>] (unwind_backtrace) from [<c020d49c>] (show_stack+0x20/0x24)
[ 243.910738] [<c020d49c>] (show_stack) from [<c0976220>] (dump_stack+0xd4/0x118)
[ 243.910757] [<c0976220>] (dump_stack) from [<c0222270>] (__warn+0x104/0x11c)
[ 243.910774] [<c0222270>] (__warn) from [<c02223c0>] (warn_slowpath_null+0x50/0x58)
[ 243.910807] [<c02223c0>] (warn_slowpath_null) from [<bf1fb700>] (vb2_start_streaming+0xe4/0x160 [videobuf2_common])
[ 243.910865] [<bf1fb700>] (vb2_start_streaming [videobuf2_common]) from [<bf1fd138>] (vb2_core_streamon+0x130/0x16c [videobuf2_common])
[ 243.910908] [<bf1fd138>] (vb2_core_streamon [videobuf2_common]) from [<bf21f8a8>] (vb2_streamon+0x40/0x60 [videobuf2_v4l2])
[ 243.910944] [<bf21f8a8>] (vb2_streamon [videobuf2_v4l2]) from [<bf21f918>] (vb2_ioctl_streamon+0x50/0x54 [videobuf2_v4l2])
[ 243.911031] [<bf21f918>] (vb2_ioctl_streamon [videobuf2_v4l2]) from [<bf171e3c>] (v4l_streamon+0x28/0x2c [videodev])
[ 243.911170] [<bf171e3c>] (v4l_streamon [videodev]) from [<bf1747a0>] (__video_do_ioctl+0x268/0x528 [videodev])
[ 243.911300] [<bf1747a0>] (__video_do_ioctl [videodev]) from [<bf17842c>] (video_usercopy+0x218/0x600 [videodev])
[ 243.911428] [<bf17842c>] (video_usercopy [videodev]) from [<bf178834>] (video_ioctl2+0x20/0x24 [videodev])
[ 243.911555] [<bf178834>] (video_ioctl2 [videodev]) from [<bf170144>] (v4l2_ioctl+0x4c/0x60 [videodev])
[ 243.911631] [<bf170144>] (v4l2_ioctl [videodev]) from [<c03c3edc>] (do_vfs_ioctl+0xbc/0x804)
[ 243.911651] [<c03c3edc>] (do_vfs_ioctl) from [<c03c4668>] (ksys_ioctl+0x44/0x6c)
[ 243.911670] [<c03c4668>] (ksys_ioctl) from [<c03c46a8>] (sys_ioctl+0x18/0x1c)
[ 243.911687] [<c03c46a8>] (sys_ioctl) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
[ 243.911696] Exception stack(0xd8c7bfa8 to 0xd8c7bff0)
[ 243.911708] bfa0: 0011b2e0 00000001 00000003 40045612 be8d230c 00000004
[ 243.911721] bfc0: 0011b2e0 00000001 00000001 00000036 0011b438 0011b430 c044560f 00022c28
[ 243.911731] bfe0: 000360a0 be8d22ec 0001cac0 b6e7751c
[ 243.911741] ---[ end trace 9450526b17d7e897 ]---
raspistill Camera App v1.3.11
Width 3280, Height 2464, quality 85, filename cam3.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture
Preview No, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file cam3.jpg
Enabling encoder output port
Starting capture -1
Finished capture -1
Closing down
Close down completed, all components disconnected, disabled and destroyed
uvcdynctrl -f
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Unknown V4L2 user control ID encountered: 0x0098090E (V4L2_CID_USER_BASE + 14)
[libwebcam] Unknown V4L2 user control ID encountered: 0x0098090F (V4L2_CID_USER_BASE + 15)
[libwebcam] Unknown V4L2 user control ID encountered: 0x00980914 (V4L2_CID_USER_BASE + 20)
[libwebcam] Unknown V4L2 user control ID encountered: 0x00980915 (V4L2_CID_USER_BASE + 21)
[libwebcam] Unknown V4L2 user control ID encountered: 0x0098091F (V4L2_CID_USER_BASE + 31)
[libwebcam] Unknown V4L2 user control ID encountered: 0x00980922 (V4L2_CID_USER_BASE + 34)
[libwebcam] Unknown V4L2 user control ID encountered: 0x0098092A (V4L2_CID_USER_BASE + 42)
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00990001, name = 'Codec Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00990001, name = 'Codec Controls'
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x009909CE (V4L2_CID_MPEG_BASE + 206)
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x009909CF (V4L2_CID_MPEG_BASE + 207)
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x009909E2 (V4L2_CID_MPEG_BASE + 226)
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x00990A66 (V4L2_CID_MPEG_BASE + 358)
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x00990A67 (V4L2_CID_MPEG_BASE + 359)
[libwebcam] Unknown V4L2 MPEG control ID encountered: 0x00990A6B (V4L2_CID_MPEG_BASE + 363)
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0913, name = 'Auto Exposure, Bias', type = 9
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0913, name = 'Auto Exposure, Bias'
[libwebcam] Unknown V4L2 camera class (UVC) control ID encountered: 0x009A0914 (V4L2_CID_CAMERA_CLASS_BASE + 20)
[libwebcam] Unknown V4L2 camera class (UVC) control ID encountered: 0x009A0916 (V4L2_CID_CAMERA_CLASS_BASE + 22)
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0917, name = 'ISO Sensitivity', type = 9
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0917, name = 'ISO Sensitivity'
[libwebcam] Unknown V4L2 camera class (UVC) control ID encountered: 0x009A0918 (V4L2_CID_CAMERA_CLASS_BASE + 24)
[libwebcam] Unknown V4L2 camera class (UVC) control ID encountered: 0x009A0919 (V4L2_CID_CAMERA_CLASS_BASE + 25)
[libwebcam] Unknown V4L2 camera class (UVC) control ID encountered: 0x009A091A (V4L2_CID_CAMERA_CLASS_BASE + 26)
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009D0001, name = 'JPEG Compression Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009D0001, name = 'JPEG Compression Controls'
[libwebcam] Unknown V4L2 control ID encountered: 0x009D0903
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009D0903, name = 'Compression Quality'
Listing available frame formats for device video0:
Pixel format: YU12 (Planar YUV 4:2:0)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: YUYV (YUYV 4:2:2; MIME type: video/x-raw-yuv)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: RGB3 (24-bit RGB 8-8-8)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: JPEG (JFIF JPEG)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: H264 (H.264)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: MJPG (Motion-JPEG; MIME type: image/jpeg)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: YVYU (YVYU 4:2:2)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: VYUY (VYUY 4:2:2)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: UYVY (UYVY 4:2:2)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: NV12 (Y/CbCr 4:2:0)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: BGR3 (24-bit BGR 8-8-8)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: YV12 (Planar YVU 4:2:0)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: NV21 (Y/CrCb 4:2:0)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Pixel format: BGR4 (32-bit BGRA/X 8-8-8-8)
Frame sizes: 32x32 - 3280x2464 (in steps of width = 2, height = 2)
Will not display frame intervals.
Metering
Choose how the camera meters exposure.
Mode | Description |
---|---|
(spot) | The camera meters lighting conditions in an area at the center of the frame equivalent to 2% of the total. Recommended with backlit subjects and in other cases in which the background is much brighter or darker than the main subject. |
(center-weighted) | The camera meters the entire frame but assigns the greatest weight to the area at the center. |
(multi) | The camera instantly determines exposure based on an analysis of composition, color, and brightness distribution. Recommended in most situations. |
(average) | Exposure is set to the average for the entire frame. Provides consistent exposure across multiple shots with the same lighting, and is particularly effective for landscapes and portraits of subjects dressed in black or white. |
Re: Connect IMX219-160 to Raspberry Pi
Quote
Wed Oct 02, 2019 9:14 am
That camera board is not official so does not have the required crypto chip on it. So will not work on a standard Raspberry Pi. Should work on a Compute module as that does not require the crypto chip.
There are kernel drivers for that chip, so you could with some effort use it for raw captures, but running the standard camera software will not work.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Re: the driver source code of the Raspberry Pi camera module
Quote
Mon Jan 23, 2017 12:14 pm
Yes, the camera driver is closed source, as is all the code that runs on the Videocore4 GPU. This code is maintained by Broadcom and The Raspberry Pi Foundation.
The camera connects to a CSI peripheral in the VC4, this is controlled by the VC4, as is the entire ISP (Image system pipeline) which processes the Bayer image through to generating jpegs results.
It is possible to get raw bayer from connected sensors now, if you can control the I2C correctly, but you do not have access to the ISP, so you cannot get decent frame rates as you have to process the bayer yourself.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
U4 ATSHA204A is a member of the Microchip CryptoAuthentication™ family of high-security hardware authentication devices.
Leopard LI-IMX219-MIPI-FF-NANO-H136
Raspberry Pi 3B+