Git Product home page Git Product logo

Comments (5)

davidplowman avatar davidplowman commented on August 17, 2024

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.

novski avatar novski commented on August 17, 2024

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.

davidplowman avatar davidplowman commented on August 17, 2024

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.

novski avatar novski commented on August 17, 2024

Why?
All i am trying to do is to save a foto.

from picamera2.

davidplowman avatar davidplowman commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.