Skip to main content

All Questions

0 votes
0 answers
46 views

Unable to open a new webcam connection in OpenCV from a while loop

I'm trying to make an application that can switch between webcam feeds. I put the webcam functionality into a Class, and it creates the VideoCapture object when the class is created. When I initialize ...
PBTPB's user avatar
  • 1
-1 votes
1 answer
70 views

Python : Record 5 RTSP to 5 video files (with Thread) but get only the last frame

I'm trying to record 5 RTSP streams (from IP Cameras) to 5 video files in one python script with threading on a Windows machine. But with my code, I only have the last frame of each stream in my video ...
Jul Pandoa's user avatar
0 votes
0 answers
65 views

Python OpenCV threading with tkinter

I have a small python opencv code to predict age and gender. I also have a GUI tkinter library to print the age on a separate window. import cv2 import math import time import argparse import requests ...
Monty Swanson's user avatar
1 vote
2 answers
271 views

How should I properly stop a Thread?

I am making a simple GUI for a video capture application using customtkinter and opencv. The code below is the creation and start of the thread which is responsible for executing the video capture ...
hedge's user avatar
  • 47
-1 votes
1 answer
624 views

Does the thread can terminate when call OpenCV release() method?

The ThreadedCamera Class that get frame from thread. I have two questions. Q1: Will it affect program performance if I don't close threads when I create a lot of ThreadedCamera classes? Q2: Does the ...
Creek's user avatar
  • 215
0 votes
1 answer
1k views

Why is OpenCV crashing when I use it with threading? [duplicate]

I'm working on a project where I have to run an image classifier on the frames from a live video feed with opencv. Now, I also have to get input from the user, to run various other functions. However, ...
Aadhi Arun's user avatar
4 votes
2 answers
24k views

Multi-threading in image processing - video python opencv

Im working on object detection from a live stream video using opencv python. The program I have is running on a single thread because of that the resulting video shown on the screen doesnt even look ...
Haha's user avatar
  • 177
0 votes
1 answer
991 views

How to run OpenCV VideoCapture's read function outside multithreading class?

I am using Nathancy's SO code to read two static videos from disk in parallel, leveraging multithreading. The below modified code works perfectly fine for me: from threading import Thread import cv2, ...
Aakash Basu's user avatar
  • 1,777
0 votes
1 answer
95 views

Thread doesn't stopping when i want to stop it

I have a program that displays video in a tkinter window. When i want to close window i stopping video thread. But it doesn't stop. There are four functions: def start_video(self): if self....
crackanddie's user avatar
0 votes
1 answer
881 views

Sharing camera frames between threads

I'm trying to build a script to manage multiple threads that are supposed to be running in parallel, and exchange data between them. As a starting point, I have two threads...the first one should be ...
Carlo's user avatar
  • 1,590
1 vote
1 answer
962 views

Using OpenCV along with Pyttsx3 using multithreading but the screen in freezing continuously

I am trying to make an application that will use OpenCV to read the live stream from the webcam along with Python Text to speech (Pyttsx3) library which will simultaneously read out the text and give ...
ujjwal's user avatar
  • 11
1 vote
0 answers
229 views

how to divide videoCapture in 2 theads to process video faster in opencv?

I'm trying to start 2 process to read the same video in opencv, each process will read the video and set the start start frame . example: process 1 -> read video and read the file 0-4000 process 2 ...
Italo José's user avatar
  • 1,686
2 votes
1 answer
9k views

Running two videos with OpenCV python with multi threading

I am trying to run on python using openCV two functions at the same time. One function is supposed to show local video and the other should show frames from my webcam. When running the code below, the ...
Mohamad Ballout's user avatar
0 votes
0 answers
2k views

Thread inside thread for saving image with OpenCV

My scenario: When I run program in new thread video stream is open from webcam and every 10 seconds I need to save image to database. Saving image in database I work in new thread. But when I make ...
Sec Cam's user avatar
  • 67
0 votes
1 answer
1k views

Webcam from worker thread

Im using the following code to run webcam in background thread. I have to do heavy processing so I have done this hoping that it will improve the fps import cv2 import time from threading import ...
user avatar

15 30 50 per page