Comments (5)
Hi. can you say what OS you are running (cat /etc/os-release
). Are you running a full desktop or the lite version? Are you logged in directory to the Pi, or connecting via ssh? What kind of display is attached? Does libcamera-hello
work? Thanks.
from picamera2.
Its a Raspbian lite 64bit and i am ssh in it libcamera-hello shows about 5s the incrementing last line:
<myuser>@<myhost>:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
<myuser>@<myhost>:~ $ libcamera-hello
[0:13:37.473193192] [705] INFO Camera camera_manager.cpp:284 libcamera v0.2.0+120-eb00c13d
[0:13:37.579142799] [710] WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:13:37.583950182] [710] WARN RPI vc4.cpp:392 Mismatch between Unicam and CamHelper for embedded data usage!
[0:13:37.585426985] [710] INFO RPI vc4.cpp:446 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media2 and ISP device /dev/media0
[0:13:37.585603285] [710] INFO RPI pipeline_base.cpp:1102 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Preview window unavailable
Mode selection for 1640:1232:12:P
SRGGB10_CSI2P,640x480/0 - Score: 4504.81
SRGGB10_CSI2P,1640x1232/0 - Score: 1000
SRGGB10_CSI2P,1920x1080/0 - Score: 1541.48
SRGGB10_CSI2P,3280x2464/0 - Score: 1718
SRGGB8,640x480/0 - Score: 5504.81
SRGGB8,1640x1232/0 - Score: 2000
SRGGB8,1920x1080/0 - Score: 2541.48
SRGGB8,3280x2464/0 - Score: 2718
Stream configuration adjusted
[0:13:37.591477892] [705] INFO Camera camera.cpp:1183 configuring streams: (0) 1640x1232-YUV420 (1) 1640x1232-SBGGR10_CSI2P
[0:13:37.592168248] [710] INFO RPI vc4.cpp:621 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 1640x1232-SBGGR10_1X10 - Selected unicam format: 1640x1232-pBAA
#0 (0.00 fps) exp 32306.00 ag 4.00 dg 1.46
#1 (30.01 fps) exp 33251.00 ag 5.12 dg 1.11
#2 (30.01 fps) exp 33251.00 ag 5.57 dg 1.02
#3 (30.01 fps) exp 33251.00 ag 5.57 dg 1.02
#4 (30.01 fps) exp 33251.00 ag 5.57 dg 1.02
#5 (30.01 fps) exp 33251.00 ag 5.95 dg 1.00
#6 (30.01 fps) exp 33251.00 ag 6.10 dg 1.01
.
.
.
#140 (30.01 fps) exp 33251.00 ag 6.10 dg 1.02
#141 (30.00 fps) exp 33251.00 ag 6.10 dg 1.02
from picamera2.
Are you logged in using X forwarding, and is the machine you are using to log in running an X server? In this case you should be able to use the Qt preview window (Preview.QT
). If the Pi has a display attached but is not running desktop environment, then the DRM preview (Preview.DRM
) should work. There is some information on this in section 3.4 of the manual.
from picamera2.
Why?
All i am trying to do is to save a foto.
from picamera2.
Well, the problem you're having is because it can't create a preview window, which looks to be related to the fact that you are logged in remotely, and it doesn't have the right permissions or display resources. If all you want to do is save an image and don't need a preview, use something like this:
import time
from picamera2 import Picamera2
picam2 = Picamera2()
preview_config = picam2.create_preview_configuration()
capture_config = picam2.create_still_configuration()
picam2.configure(preview_config)
picam2.start()
time.sleep(2)
picam2.switch_mode_and_capture_file(capture_config, "test.jpg")
There are many examples here.
from picamera2.
Related Issues (20)
- [SUGGESTION] HOT 1
- [OTHER] Please improve/update Documentation HOT 3
- [BUG]Program blocking due to camera disconnection HOT 1
- Unexpected warning from v4l2 HOT 1
- strange video size increase with waiting time between video captures
- [SUGGESTION] Mirror DRM/KMS camera preview, across multiple monitors HOT 6
- disable logging when taking picture HOT 5
- [HOW-TO] Improve streaming quality of Raspberry Pi Camera v3 during drone flight HOT 4
- [HOW-TO] Improve video quality of Raspberry Pi Camera v3 for detecting aruco markers in very high or low light conditions HOT 1
- [BUG] capture.array not working with imx296 and rpi-update > 6.6.31 on compute module 4 Bullseye 64bit HOT 1
- [BUG] libav_h264 encoder uses pyav function wrong HOT 6
- [OTHER] IndexError HOT 2
- [BUG] Continuous AutoFocus fails to converge HOT 11
- [HOW-TO] Camera Flash HOT 3
- [HOW-TO] Continuously stream lores, Occasionally record main HOT 2
- [BUG] No exit from function capture_request() HOT 8
- [BUG] Numpy 2.x not supported HOT 1
- [OTHER] Blocks of code overflowing in PDF documentation HOT 5
- [BUG] picamera2 locks up after hours, receiving no more buffers HOT 9
- [HOW-TO] Have two cameras with different tunning files HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picamera2.