Questions tagged [picamera]

140 questions
2
votes
2 answers

How to receive images from Raspberry Pi over ZeroMQ PUB/SUB in Python?

I want to send images taken by Picamera on Raspberry Pi to my windows computer. I wrote some code, as follows (they are simplified here), but it gets stuck in frame = footage_socket.recv_string() in the client.py. I don't get any error but it…
Higashi Yutaka
  • 181
  • 2
  • 11
2
votes
1 answer

Picamera http stream overlay static image

For a project, i would like overlay a static image (image of a circle - png) over a picamera http web stream (mjpeg). Unfortunately picamera doesnt support overlays with recordings. Is there another way to accomplish this? Here is the example code…
Darellon
  • 352
  • 1
  • 4
  • 14
1
vote
0 answers

Unable to change exposure settings for CSI Pi Camera on Raspberry Pi 64 bit Bullseye

Tried varying the expsoure settings for the Pi CSI based camera using libcamera library in python. Tried out multiple methods which did not lead to successful implementation. Unable to vary exposure using the following example code: …
1
vote
0 answers

How to stream a capture video using Picamera2

I trying to use a example of the Picamera2 the capture_stream_udp.py to create a client, but a dont know how to create a server script to capture a udp stream via socket. Can you guys help? #!/usr/bin/python3 import socket import time from…
zuzu
  • 11
  • 1
  • 2
1
vote
0 answers

FastAPI StreamingResponse with picamera2 - browser refresh problem

I'm trying to make FastAPI server which streams MJPEG from Raspberry Pi via picamera2 library. It works, but when I reload browser on /mjpeg multiple times, it will stuck. But with this example it works perfectly - you can reload browsers as many…
Ricckyo
  • 23
  • 5
1
vote
1 answer

Good way to capture an image to memory and serve it with flask

I have a Raspberry Pi with an attached webcam and a python flask-script that sends out some informations as jsons and under the route /image.jpg an image. In the past i capture the image to storage and served it from there but I feel it's more…
globus243
  • 710
  • 1
  • 15
  • 31
1
vote
0 answers

Keep PiCamera object always active after client connection breaks

I'm using the tremendous picamera package on my RPi4. In particular, the server side code import socket import time import picamera camera = picamera.PiCamera() camera.resolution = (640, 480) camera.framerate = 24 server_socket =…
Adriaan
  • 715
  • 10
  • 22
1
vote
0 answers

Picamera module doesn't work in raspberry pi2b with error "No data received from sensor"

I tried two cameras, but They didn't work. I'm using old Raspbian (ver.5.4.72) to build a robot (https://www.adeept.com/raspclaws_p0124.html). My raspberry pi 2b and robotkit's module and picamera This is my first write and I am not good at English.…
ReBot
  • 11
  • 2
1
vote
1 answer

How to encode to Mp4 file with custom output stream on raspberry pi

I want to pass my customOutput class to raspberry pi camera function and want to enncode that output to mp4 and save it. class MyOutput(object): def __init__(self): self.size = 0 def write(self, s): #get h264 encoded…
1
vote
1 answer

Import Error when import a python file to another

I am working on a project on a Raspberry Pi where I need to create a security camera system. I have 3 python files for this project one for live streaming, another one for motion detection and finally the last for activating the motion detection…
1
vote
0 answers

Open CV write h264 encoded frames to stdout

I'm working on a project in which a picamera records to stdout. I'm adding object detection to the video and need to write these frames to stdout in h264. So far I've got this: for frame in self.camera.capture_continuous(rawCapture,…
Louis
  • 40
  • 8
1
vote
1 answer

Why does my image taken with OpenCV appear smaller than that of libcamera?

I am currently working on a project which makes use of a Raspberry Pi and its Camera Module v2.1. I need to scan some barcodes with the camera of which I am using the OpenCV and pyzbar libraries. I am running into some trouble with the image that…
ATN
  • 107
  • 1
  • 1
  • 11
1
vote
0 answers

picamera: capturing black image

I'm trying to capture images with my RaspiCam v2. I have a very specific setup and specified all camera parameters that i need to get a good image quality. I figured them out using a separate python script caputring the image with following…
han_tuch
  • 119
  • 1
  • 9
1
vote
1 answer

How to save RGB data from RPi Camera then save file to matlab/Python readable format?

I am taking multiple white light images in a row that I want to split into RGB images later on due to time constraints for my application. I currently save the raw RGB image as a .data but cannot figure out how to read the file back into an array to…
BUStudent
  • 15
  • 4
1
vote
1 answer

Is there a fast way to record images with raspistill on a Raspberry Pi 4B and HQ Camera module?

I'd like to record multiple images (e.g. 50) with the Raspberry Pi HQ Camera module. These images are recorded with the simple command line raspistill -ss 125 -ISO 400 -fli auto -o test.png -e png. Since I have to record .png files, the image…
adroid
  • 25
  • 4
1
2
3
9 10