Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [opencv]

Open Source Computer Vision Library, real time computer vision

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Sending Drone Object Location via XBee with Raspberry Pi and GPS

I’m working on a project where I have a drone that have a Raspberry Pi equipped with a camera, GPS and XBee modules. right now I’m making the drone get the location of an object when it recognize one ...
jedlaoui's user avatar
0 votes
0 answers
30 views

OpenCV AruCo detection fails: "Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory."

I've been trying to run a simple AruCo detection code on my Raspberry Pi 4B, and consistently get the error "Embedded video playback halted; module v4l2src0 reported: Failed to allocate required ...
Carter Betts's user avatar
0 votes
0 answers
29 views

Pi4 python OpenCV timeout

I have been having some issues with getting a video stream from my cameras on my Pi4B. I am running this on Python. I have been getting the error; VIDEOIO(V4L2:/dev/video0): select() timeout with the ...
Dwayne David Wallace's user avatar
0 votes
0 answers
16 views

RPi 5 Code Does Not Work Without Root

I have a code. Because it is very long (2500 lines) I can not throw it here but here are the libraries: import sys import datetime import locale import serial import time import os import cv2 import ...
MEnsar55's user avatar
0 votes
1 answer
69 views

I cannot install OpenCV on RaspberryPy

I cannot install OpenCV on RaspberryPi 4 Model B with Bookworm OS. I tried at least 4 different ways including pip and cmake. Each time I reach the step to install OpenCV, it ends in failure: cannot ...
Ovidiu Moise's user avatar
0 votes
1 answer
785 views

on bookworm cant use picamera2 with opencv-python

installed opencv--python on bookworm os when using picamera2 i get this error: QObject::moveToThread: Current thread (0x7f6802fd50) is not the object's thread (0x7f6822efb0). Cannot move to target ...
Oferb's user avatar
  • 11
1 vote
0 answers
54 views

How do I directly process live raw camera data on the GPU without it passing though the CPU?

My understanding of the how a Raspberry Pi camera attached to the CSI port of the Pi works is that the raw data from it ends up directly in the GPU where it is slightly processed and compressed before ...
Curtis's user avatar
  • 11
0 votes
0 answers
105 views

OpenCV Pandas and Numpy

I have been trying out some OpenCv snippets as part of a larger robotics project such as Face Detection and Face Recognition. These have all been working on my MacBook. I am now trying to test out ...
Bill Harvey's user avatar
0 votes
0 answers
145 views

OpenCV - PiCamera or cv2.VideoCapture(0)

Quick question, I am starting to work on some Computer Vision programs using my Raspberry Pi 3. I thought when using the PiCamera you needed to use the specific PiCamera commands however I have simply ...
Bill Harvey's user avatar
0 votes
0 answers
126 views

Arducam Refusing to Connect but other Camera works with OpenCV

I have a problem with my Arducam OV5647 M32076M20. It simply will not work unlike the other generic rpi camera I have on the same code. I am unsure if there are any other dependencies that I need for ...
fireblazer10's user avatar
0 votes
2 answers
191 views

Error Trying to Install Precompiled OpenCV 4.8 on Raspberry Pi 4 64Bit

I was recently shown a method to install a precompiled version of OpenCV from the following link: Install Precompiled OpenCV 4.8 on Raspberry Pi When I run the command sudo apt install -y ./opencv_64....
Jack Regan's user avatar
1 vote
1 answer
345 views

PiCamera2 images with boxes and labels overlay with vis_util

I'm trying to get integrate tensorflow and picamera2 to do some basic object detection. The logic works out fine (I think), but I'm struggling to draw the boxes/labels deduced on top of the image. ...
MergeMonster's user avatar
0 votes
0 answers
258 views

Very low fps when using Opencv

Relatively recently I started writing a project in which faces are detected through raspicam in python using opencv, but the result disappoints me, I get literally 5 fps, but if you remove face ...
Lyricss's user avatar
0 votes
1 answer
105 views

Open CV threading to get frames

I am working on a project for which I need run 3 threads in python. 1 for getting frames and the other 2 for proccessing them. I don't know how to pass variables between threads (I want to pass frames ...
Overclocker.py's user avatar
0 votes
0 answers
131 views

Freenove Camera not able to interface with Raspberry pi 4 + Ubuntu 20.04 LTS

I am trying to work on a project where I want to use ROS. However, I found that for using ROS Noetic, I will need to install Ubuntu 20.04 on my Raspberry pi 4. Now, I bought a camera module (Freenove ...
Inderjeet's user avatar
0 votes
1 answer
202 views

OpenCV issue - cv2image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGBA)

I am curently trying to run the code below, which feeds a live stream to a tkinter gui: from tkinter import * from PIL import ImageTk, Image import cv2 root = Tk() # Create a frame app = Frame(root, ...
Bobby's user avatar
  • 1
-1 votes
2 answers
816 views

ImportError: cannot import name 'ControlType' from 'libcamera' (unknown location)

I'm relatively new to Raspberry Pi and I am having trouble running a python code on raspberry pi. The code I'm trying to run is as shown below: import cv2 from picamera.array import PiRGBArray from ...
Bobby's user avatar
  • 1
0 votes
0 answers
126 views

compile and install opencv on raspberry pi 3 model B

i'm facing a problem while i'm installing opencv version 3.1.0 and python 3 ... I followed the steps from here : https://pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-...
Wejdan's user avatar
  • 1
0 votes
0 answers
62 views

Raspberry Pi downaload of CV2 gone wrong

I have installed the CV2 library on my raspberry pi 4, but when I proceeded to import it I got this error: ImportError: libjasper.so.1: cannot open shared object file: No such file or directory I ...
David's user avatar
  • 1
-1 votes
1 answer
248 views

How to detect the position and rotation of objects in Python?

I'm building a robot that needs to detect the position and rotation of multiple trained objects from a single image. For this I'm using my Raspberry Pi 3B with Raspberry OS 64-Bit. I tried Localizer ...
JakesMD's user avatar
  • 107
1 vote
2 answers
3k views

Can't install Opencv on raspberry pi 4

I'm using the raspberry pi 4 (pip version: pip 22.3.1, python version: 3.9.2) on visual studio code and whenever I enter the command pip install opencv-python in the terminal, after 40 mins I get the ...
Ali Moradi's user avatar
2 votes
1 answer
601 views

Raspberry Pi 4 Python not finding installed libraries

I trying to connect an OpenCV OAK-D to an R Pi 4B. I've downloaded & installed all the requirements & installed the depthai library using pip To check its there, pip3 list | grep depthai ...
DrBwts's user avatar
  • 199
0 votes
0 answers
81 views

raspberry pi 4b, python, opencv, When trying to process video frames the instructions do not run sequentially

I have a problem when executing the programme below, So basically what's happening is when I execute the programme I expect it to open the camera (logitec usb camera) capture a frame, process it, ...
Younes ezouagh's user avatar
1 vote
0 answers
528 views

Raspberry Pi and OpenCV. The cv2.error while capture the image through camera lens

https://stackoverflow.com/questions/43572387/error-215-size-width0-size-height0-occurred-when-attempting-to-display-a I have the similar issue with this discussion, after I read it still don't have ...
44 chuang's user avatar
  • 143
1 vote
1 answer
2k views

Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

I'm trying to install opencv on a raspberryPI 4 (RaspberryPI OS Bullseye x64, Python 9), that is part of installing all the dependencies for this tutorial but it always fails with the error below. I ...
Zmur's user avatar
  • 111
0 votes
2 answers
415 views

python cv2 module not found when triggered by crontab

My python script imports cv2, and it works fine when I start the script manually. If I set the script to launch on boot (either via crontab, or via a .desktop file (in the user/.config/autostart/...
Matt Welander's user avatar
1 vote
0 answers
309 views

rpc failed, curl 56 GnuTLSrecv error (-54)

Hi guys my goal is to create an opencv directory and clone opencv and opencv_contrib on a raspberry pi this is why I entered the following command: pi@raspberrypi:~/opencv $ git clone https://github....
raspberry_101's user avatar
0 votes
0 answers
167 views

OpenCV is getting slow in Raspberry pi 4, 8gb

Here is have made a project attendance system, for which I have trained a model and used the .h5 file to make the real time Prediction using opencv. so if the person face is detected then his name and ...
Lele Yu's user avatar
0 votes
0 answers
592 views

Can I use the PI Camera Stream in Python on a PC and use OPENCV?

So I got a Raspberry Pi with the Pi camera and I would like to use the camera with OpenCV in Python. The problem is, I know I can do this easily on the Pi itself but I highly doubt the Pi will be able ...
Clement S's user avatar
0 votes
1 answer
129 views

Can a raspberry pi get the video feed of another through a NFS server between the two?

For my project, I need to get the feed (preferably simultaneousely) of 2 pi cameras (one on each pi 4). As of now, both are communicating through ssh over wifi. It's very slow, not reliable and very ...
Sanico's user avatar
  • 3
1 vote
1 answer
1k views

reading two webcams in opencv

If I run this code on a PC with two webcams attached it runs fast (or fast enough) without any issues: import cv2 cap0 = cv2.VideoCapture(0) cap1 = cv2.VideoCapture(1) while True: ret0, img0 = ...
bfris's user avatar
  • 61
1 vote
0 answers
1k views

Problem using OpenCV and Raspberry PI camera V2

I had been using the following code for the past two months with no problem whatsoever, however, just yesterday I have been getting errors using the code which I will detail as follows. The code in ...
Atharva Naik's user avatar
-1 votes
1 answer
97 views

Rainbow screen on boot when camera plugged in

I bought my Rpi 4B, 4 months ago with an official Pi camera v2.1. Everything was working fine but now, I can't seem to receive frames with openCvpython library. import cv2 cap = cv2.VideoCapture(0) ...
Justin's user avatar
  • 1
0 votes
1 answer
274 views

Segmentation fault running Python/C++ OpenCV executables (package DVR-Scan)

I use DVR-Scan 1.0.1 [1] for video surveillance (scan video files got from an IP camera) under a Raspbian GNU/Linux 8.0 (jessie) system on a Raspberry Pi 3 model B. DVR-Scan depends on Python and ...
Pestro's user avatar
  • 33
0 votes
1 answer
265 views

receiving RTP stream on RPi

Need to receive RTP stream with lowest possible latency and CPU load. I need to always read the latest frame, that is, as if I had a buffer equal to 1. What is the best way? I need it to be possible ...
Mapache's user avatar
0 votes
0 answers
324 views

Random disconnection of an USB Camera with Raspberry Pi 4

I've got a Raspberry Pi 4 with an USB2.0 camera connected through a slip ring. When I boot, there's no problem at all, but sometimes the Raspberry is unable to detect the camera while streaming (I'm ...
Adrián Álvarez's user avatar
0 votes
1 answer
166 views

Viewing the captured content of the webcam live

How can I view the captured content of my webcam on Linux/Raspberry? I dont want to share it, only view the content live on my monitor. On windows Logitech has an official program where I can preview ...
John's user avatar
  • 1
0 votes
2 answers
2k views

WARN:0 global /tmp/pip-wheel-2c57.../opencv/.../cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video0): can't open camera by index

When switching from the legacy camera stack under Raspberry Pi OS with debian 10 to the new libcamera camera stack (in Raspberry Pi OS with debian 11 it is standard), I cannot use OpenCV any longer. ...
Neverland's user avatar
  • 361
0 votes
0 answers
34 views

How to Capture Only Subimage from Rasperry Pi Camera?

I am new to OpenCV and Raspberry Pi. I want to increase the frame rate on the camera (preferably > 300 fps), but I don't need the full image. Instead of sending back the full azimuth and elevation ...
James Strieter's user avatar
0 votes
1 answer
1k views

how to increase fps of yolov3 on raspberry pi 4

I'm currently doing real time object detection with the help of pi camera using pre-defined weights of darknet and coco dataset using openCV. Currently I'm getting 0.14 fps and my video is too much ...
D3mon's user avatar
  • 19
1 vote
0 answers
150 views

Green frames when capturing webcam

We use RPI4 for automation. One of our use-cases is to capture image frames via webcam/HDMI grabber as fast as possible and do some analytics. We use python and opencv for capturing, but it's not ...
Maxxie's user avatar
  • 11
0 votes
1 answer
885 views

ImportError: librsvg-2.so.2: cannot open shared object file: No such file or directory

I am having issues with the rsvg2 library which is a dependency of ffmpeg and opencv. I have installed ffmpeg using the standard sudo apt install ffmpeg and Python-opencv with pip install opencv-...
mandulaj's user avatar
  • 101
-1 votes
2 answers
193 views

compile a c++ app on ubuntu and run it on raspberry pi

I'm on an opencv project that need to be deployed on rpi 4. I do prefer to reach this project development, testing a compiling on other device (lets say a labtop). My question which OS is compatible ...
krayyem's user avatar
0 votes
2 answers
1k views

Error for installing the OpenCV on raspberry (Command "python setup.py egg_info" failed ...)

Based of this post, I have tried to install the below package at first step: sudo apt-get update && sudo apt-get upgrade sudo apt install cmake pkg-config build-essential git sudo apt install ...
Soheil Paper's user avatar
0 votes
1 answer
463 views

build opencv for java on rpi4

I'm trying to build OpencCV for Java on raspberry pi 4B. I am quite new in this sphere and do not understand almost everything. At first, I just wanted to unload my .jar file to the raspberry and run ...
crackanddie's user avatar
0 votes
1 answer
10k views

CMake Error: The source directory "/home/pi" does not appear to contain CMakeLists.txt [closed]

Can someone please tell me what I have to? I'm trying to setup my build using CMake. My code and its' error is the following. How do I make CMakeLists? (cv) pi@raspberrypi:~/build $ cmake -D ...
Ori's user avatar
  • 3
-1 votes
1 answer
158 views

OpenCV not working when ran with sudo

I have an application that uses OpenCV, and now want it to also access GPIO pins, so it needs to run as sudo. So, I tried to run it using "sudo python3 myapp.py" When I do I get the ...
MichRX7's user avatar
  • 71
1 vote
1 answer
158 views

OpenCV can't capture frames on production server (Nginx + uWSGI) on Raspberry Pi 4

I'm building a production server on Raspberry Pi 4. Web app is written in Django. I used uWSGI as an application server and Nginx as a reverse proxy. I followed many tips from Digital Ocean. One of ...
Artur's user avatar
  • 111
0 votes
0 answers
42 views

Calculate the motion of a simple object in 3d

I'm a beginner in python and raspberry pi and for a school project which is due this month, we're using a raspberry pi 3 and a camera module (fixed) and the idea is when u move something in the camera ...
Adam malian's user avatar
0 votes
1 answer
810 views

OpenCV libgtk2.0-dev and pkg-confif Error in Raspbian Buster

History, I have been running OpenCV on Raspbian Stretch in a virtual environment for a couple of years. Due to the requirement to add functionality for a PS4 controller I switched to Raspbian Buster. ...
Bill Harvey's user avatar

1
2 3 4 5
8