Questions tagged [picamera]

140 questions
1
vote
1 answer

White/ Blue balance error in high resolution with opencv and picamera (V2)

my problem is when i set the resolution higher than 640x480, the output colors are only in the bottom part right. The rest of the output has a blueish color. I have a RaspyberryPi4 with 4GB ram and a PiCamera V2. The CPU usage is not more than…
Jeffote
  • 73
  • 7
1
vote
1 answer

Extract and analyze frames while recording using PiCamera, OpenCV

I'm streaming the video from my raspberryPi using piCamera to a web socket, so that I can view it within my local network. I want to make my own motion detection script from scratch, therefore I want to get the first image from the video stream…
Niccolò Diana
  • 119
  • 2
  • 13
1
vote
2 answers

Is there a way to use ROI (Region of Interest) through a Rapsberry Pi in Code?

I'm looking to take images using my raspberry pi v2 camera module and extract a specific part of those using ROI. -roi 0.5,0.5,0.25,0.25 However, ROI seems to only be a flag for taking still images through the command line, is there any way to…
yupthatsme
  • 47
  • 7
1
vote
0 answers

Let multiple users stream a webcam in Flask

I've written a website written in python by using the Flask framework. I tried to show a live video stream on the website but it seems like only one client can stream the video and even that stream fails after 30 seconds... The website is deployed…
1
vote
0 answers

Issue with loading an image into imageview android

I am trying to stream video from a raspberry pi camera to an android application. My raspberry pi's code is as follows: import io import socket import struct import time import…
Vivekh
  • 25
  • 5
1
vote
1 answer

Python and PiCamera Color Detection Boolean Issues

I'm fairly new with Python and trying to code a way a PiCamera to pick up on different colors and react based off of that. My current attempt for each color is to take a picture and detect the color involved. Some example code is below. def…
0
votes
1 answer

Raspberry Pi 4B - VLC player - Pir Sensor - Camera

I'm starting to know Python, so you can say I'm a newby. For Halloween I'm working with a Python script for a Scare. The idea is to show a nice picture (a paused video) on a tv screen and when motion is detected the video is going to play the rest…
Wessie
  • 11
  • 1
0
votes
0 answers

Purple + White Bar in Right Image With Stereo Side By Side Recording + Streaming

I'm using a StereoPi v2 Camera Kit and running the OpenCV OS that came with the pi. I'm running into an issue where there is a purple and white flickering column in the right image of a side by side stereo recording. This happens with both raspivid,…
0
votes
0 answers

Failing to view picamera on Raspberry Pi 3 when running headless

I am trying to run my Raspberry Pi 3B+ headless. I need to use a picamera, but it is not showing anything while running headless. I know that the reason for this behavior is that the RPi doesn't create a virtual screen if no monitor is plugged in…
Jeppe
  • 13
  • 3
0
votes
0 answers

OpenCV BackgroundSubtractorMOG2 seems to return false-positive pixels

I have the following code with which, I am trying to detect movements (ideally with adjustable threshold) in specific regions of a video (roi_masks). I am just doing something fatally wrong, because it returns false positive detections sometimes…
peter
  • 4,289
  • 12
  • 44
  • 67
0
votes
0 answers

my code throws TypeError: only size-1 arrays can be converted to Python scalars

I'm trying to get the NDVI of a plant image. As probably you know this project is on the Internet and for me, it was working some years ago. Now that I am trying to use it again, I have a mistake in the last part of the process, here the complete…
0
votes
0 answers

Why is Python Flask in Debug Mode Causing Raspberry Pi Camera Resource Error?

I am working on a small project at home with a Raspberry Pi using Python to sense motion via a PIR and record a 30 second video when motion is detected - using a night vision camera. This part of the project is working and I decided to use Flask to…
Kapi
  • 49
  • 5
0
votes
0 answers

Can not use Pi Camera Module 3 (IMX708) with RaspberryPi 4B (4GB) - Raspbian (bullseye)

I am trying to use the Pi Camera Module 3 on the Raspberry Pi 4B. I have tried running a Python script which calls the module in the terminal, and the output shows an error message: cshwstem@raspberrypi:~/Desktop $ python3 preview.py Traceback…
0
votes
0 answers

picamera2 interfacing with ImageAI yolov3 ValueError: Ensure you specified correct input image, input type, output type and/or output image path

So i am using a raspberry pi 4 8gb running RPi OS and i'm having trouble with the yolov3 module of ImageAI 2.1.6. It's not accepting my picamera2 images. I can't seem to find a solution to my issue. When i use cv2 as the camera on my regular…
0
votes
1 answer

What's the fastest way to trigger a PiCamera using a light barrier for capturing small, fast-moving objects?

I want to trigger a PiCamera by a light barrier to catch up small, fast moving objects with the Camera. Setup: IR-Light barrier module connected to GPIO Pin 4 on a Raspberry Pi zero as well as a Raspberry Pi Camera from picamera import…
Liam
  • 11
  • 1