# \#multithreading

**URL:** https://forum.opencv.org/tag/multithreading/80.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Opencv-python compatibility with python versions 3.13+ (experimental/rc releases for multithreading)](https://forum.opencv.org/t/opencv-python-compatibility-with-python-versions-3-13-experimental-rc-releases-for-multithreading/23902)

<div class="topic-metadata">

**Author:** [@vigneshwaran](https://forum.opencv.org/u/vigneshwaran)\
**Replies:** 3\
**Last updated:** [September 10, 2025, 6:03am UTC](https://forum.opencv.org/t/opencv-python-compatibility-with-python-versions-3-13-experimental-rc-releases-for-multithreading/23902 "2025-09-10T06:03:19Z")

</div>

I’m experimenting with Python 3.14.0rc1, which includes the free-threaded build (PEP 703) to improve multithreading performance by removing the GIL. My project relies heavily on the opencv-python package for image proces…

---

## [Opencv on tbb creating one more thread than expected](https://forum.opencv.org/t/opencv-on-tbb-creating-one-more-thread-than-expected/18953)

<div class="topic-metadata">

**Author:** [@AdamWill](https://forum.opencv.org/u/AdamWill)\
**Replies:** 1\
**Last updated:** [October 15, 2024, 11:50pm UTC](https://forum.opencv.org/t/opencv-on-tbb-creating-one-more-thread-than-expected/18953 "2024-10-15T23:50:31Z")

</div>

Hi, folks! I’m grappling with a tricky issue with opencv threading. I’m Fedora’s QA team lead, I maintain Fedora’s deployment of openQA, a screenshot match-based automated testing tool. openQA’s test runner backend, os-…

---

## [Getting images from one thread and process them in another thread](https://forum.opencv.org/t/getting-images-from-one-thread-and-process-them-in-another-thread/17438)

<div class="topic-metadata">

**Author:** [@SasikaA073](https://forum.opencv.org/u/SasikaA073)\
**Replies:** 2\
**Last updated:** [April 27, 2024, 1:05pm UTC](https://forum.opencv.org/t/getting-images-from-one-thread-and-process-them-in-another-thread/17438 "2024-04-27T13:05:19Z")

</div>

I want to get images from one thread (with 32 Frames per second) and store them in a buffer (a list, or numpy array) then process them in another thread. Then show the final output in another thread. Altogether there sho…

---

## [Help needed on understanding why video from webcam is lagging when using thread and queue](https://forum.opencv.org/t/help-needed-on-understanding-why-video-from-webcam-is-lagging-when-using-thread-and-queue/13064)

<div class="topic-metadata">

**Author:** [@mariojy10](https://forum.opencv.org/u/mariojy10)\
**Replies:** 1\
**Last updated:** [May 4, 2023, 4:47pm UTC](https://forum.opencv.org/t/help-needed-on-understanding-why-video-from-webcam-is-lagging-when-using-thread-and-queue/13064 "2023-05-04T16:47:25Z")

</div>

I am doing a learning experiment: using a worker thread to do the frame capturing from web cam, then send the frames to the main thread to do a processing which is forwarding to a face detection model (yunet). I send the…

---

## [How to select to use OpenMP or Intel TBB?](https://forum.opencv.org/t/how-to-select-to-use-openmp-or-intel-tbb/6598)

<div class="topic-metadata">

**Author:** [@lightbringer](https://forum.opencv.org/u/lightbringer)\
**Replies:** 10\
**Last updated:** [November 29, 2022, 1:20am UTC](https://forum.opencv.org/t/how-to-select-to-use-openmp-or-intel-tbb/6598 "2022-11-29T01:20:49Z")

</div>

Hello there. I have compiled OpenCV 3.4.16 with “WITH\_TBB” and “WITH\_OPENMP” flags enabled by using CMake 3.22.0. The TBB version I used was tbb2019\_20191006. Then I built libraries for Release and Debug by using Visual …

---

## [CV::Resize Performance degrading in multithreaded application](https://forum.opencv.org/t/cv-resize-performance-degrading-in-multithreaded-application/11110)

<div class="topic-metadata">

**Author:** [@D4E](https://forum.opencv.org/u/D4E)\
**Replies:** 1\
**Last updated:** [November 26, 2022, 11:11am UTC](https://forum.opencv.org/t/cv-resize-performance-degrading-in-multithreaded-application/11110 "2022-11-26T11:11:03Z")

</div>

Hey everyone, I’m currently writing a program which continuously grabs images from 4+ cameras, processes and then stores them. To speed the program up, I splitted the processing for each camera into it’s own thread. Th…

---

## [How to use cuda::SparsePyrLKOpticalFlow in multi thread environment](https://forum.opencv.org/t/how-to-use-cuda-sparsepyrlkopticalflow-in-multi-thread-environment/9632)

<div class="topic-metadata">

**Author:** [@keivan\_moazami](https://forum.opencv.org/u/keivan_moazami)\
**Replies:** 11\
**Last updated:** [July 30, 2022, 11:51am UTC](https://forum.opencv.org/t/how-to-use-cuda-sparsepyrlkopticalflow-in-multi-thread-environment/9632 "2022-07-30T11:51:30Z")

</div>

When I using cuda::SparsePyrLKOpticalFlow in multi thread application failed to calc optical flow properly. I run it on different cuda::GpuMats and in separate cuda::Streams with separate Algorithm instances. I create …

---

## [Cv2.imshow() freeze](https://forum.opencv.org/t/cv2-imshow-freeze/9264)

<div class="topic-metadata">

**Author:** [@Kaninchen](https://forum.opencv.org/u/Kaninchen)\
**Replies:** 2\
**Last updated:** [June 27, 2022, 6:41pm UTC](https://forum.opencv.org/t/cv2-imshow-freeze/9264 "2022-06-27T18:41:56Z")

</div>

OpenCV =\> opencv\_python-4.6.0.66 Operating System / Platform =\> win10 Compiler =\> python Detailed description Function cv2.imshow() freezes. The frame to be shown is grabbed by webcam and in debug mode really read. Wh…

---

## [Multithreading issue when using parallel\_for\_ while running on ubuntu](https://forum.opencv.org/t/multithreading-issue-when-using-parallel-for-while-running-on-ubuntu/8168)

<div class="topic-metadata">

**Author:** [@Laura](https://forum.opencv.org/u/Laura)\
**Replies:** 2\
**Last updated:** [March 30, 2022, 6:38am UTC](https://forum.opencv.org/t/multithreading-issue-when-using-parallel-for-while-running-on-ubuntu/8168 "2022-03-30T06:38:27Z")

</div>

Hi, I am having some issues with some multithreading code. I have written this code a while ago on windows (windows 10, visual studio 2019, openCV 4.3.0 with openMP and TBB off), now I want to run it on ubuntu (ubuntu 2…

---

## [Utilise 100% GPU resource for YOLO v3 detection using python](https://forum.opencv.org/t/utilise-100-gpu-resource-for-yolo-v3-detection-using-python/7769)

<div class="topic-metadata">

**Author:** [@Shubham\_Chouksey](https://forum.opencv.org/u/Shubham_Chouksey)\
**Replies:** 0\
**Last updated:** [March 2, 2022, 5:07am UTC](https://forum.opencv.org/t/utilise-100-gpu-resource-for-yolo-v3-detection-using-python/7769 "2022-03-02T05:07:53Z")

</div>

Hello @AlexeyAB, thank you for the amazing repo. My System Configuration : I’m working on a Yolov3 model with GeForce RTX 2080 Ti GPU with 11 GB GPU memory and Intel(R) Core™ i9-9900KF CPU with 6 core and 64GB of RAM. W…

---

## [Does OpenCv4Android use multi-threading?](https://forum.opencv.org/t/does-opencv4android-use-multi-threading/4479)

<div class="topic-metadata">

**Author:** [@kamieniarzk](https://forum.opencv.org/u/kamieniarzk)\
**Replies:** 3\
**Last updated:** [August 27, 2021, 7:30pm UTC](https://forum.opencv.org/t/does-opencv4android-use-multi-threading/4479 "2021-08-27T19:30:29Z")

</div>

I didn’t manage to find anything in the documentation but does OpenCv4Android use multiple threads for processing? I’m using mostly basic methods from Core and Imgproc classes like filter2d, threshold, inRange, GaussianB…

---

## [Thread Sanitizer Issues](https://forum.opencv.org/t/thread-sanitizer-issues/3398)

<div class="topic-metadata">

**Author:** [@pierce](https://forum.opencv.org/u/pierce)\
**Replies:** 3\
**Last updated:** [May 19, 2021, 6:55am UTC](https://forum.opencv.org/t/thread-sanitizer-issues/3398 "2021-05-19T06:55:44Z")

</div>

Hi there, I am trying to run thread sanitizer on my program and running into issues reported down in the guts of opencv. I have recreated a minimal example below. Note that I am running opencv 3.4.1, and it is not curre…

---

## [Threading issue w/ imread + matchTemplate](https://forum.opencv.org/t/threading-issue-w-imread-matchtemplate/2918)

<div class="topic-metadata">

**Author:** [@OceanBlues](https://forum.opencv.org/u/OceanBlues)\
**Replies:** 6\
**Last updated:** [April 22, 2021, 10:54am UTC](https://forum.opencv.org/t/threading-issue-w-imread-matchtemplate/2918 "2021-04-22T10:54:13Z")

</div>

Greetings, Given a base image, I would like to search it for multiple sub-images. To accomplish this, I built an array with all of my .jpg filenames, and called cv.matchTemplate on each sub-image against the base image…
