# \#programming

**URL:** https://forum.opencv.org/tag/programming/327.md

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

---

## [Toolbar Definition](https://forum.opencv.org/t/toolbar-definition/24720)

<div class="topic-metadata">

**Author:** [@danielc](https://forum.opencv.org/u/danielc)\
**Replies:** 0\
**Last updated:** [September 21, 2026, 11:55pm UTC](https://forum.opencv.org/t/toolbar-definition/24720 "2026-09-21T23:55:20Z")

</div>

Hello all, I am using Opencv V5 C++ and Qt6 cv::imshow(“Display Window”, image); How do I setup/modify toolbar? or opencv qt toolbar Definition? in source code. Thank you.

---

## [Image preprocessing for OCR on glossy, curved and unevenly illuminated packaging](https://forum.opencv.org/t/image-preprocessing-for-ocr-on-glossy-curved-and-unevenly-illuminated-packaging/24711)

<div class="topic-metadata">

**Author:** [@Suraj\_Singh](https://forum.opencv.org/u/Suraj_Singh)\
**Replies:** 2\
**Last updated:** [September 18, 2026, 1:36pm UTC](https://forum.opencv.org/t/image-preprocessing-for-ocr-on-glossy-curved-and-unevenly-illuminated-packaging/24711 "2026-09-18T13:36:34Z")

</div>

I’m trying to preprocess smartphone photographs of consumer-product packaging before sending them to PaddleOCR. The challenging images contain combinations of specular highlights, curved surfaces, perspective distortion…

---

## [Computer Vision Task](https://forum.opencv.org/t/computer-vision-task/24508)

<div class="topic-metadata">

**Author:** [@Vijaya\_Raghava](https://forum.opencv.org/u/Vijaya_Raghava)\
**Replies:** 1\
**Last updated:** [September 18, 2026, 2:29am UTC](https://forum.opencv.org/t/computer-vision-task/24508 "2026-09-18T02:29:16Z")

</div>

Currently I’m working on a computer vision project in which object detection module is there. When I’m scanning in a super market shelf, it has to show the product name below. Tell me is that possible? If yes, please sug…

---

## [Heap error from cvtColor](https://forum.opencv.org/t/heap-error-from-cvtcolor/24677)

<div class="topic-metadata">

**Author:** [@mael15](https://forum.opencv.org/u/mael15)\
**Replies:** 4\
**Last updated:** [September 16, 2026, 8:39am UTC](https://forum.opencv.org/t/heap-error-from-cvtcolor/24677 "2026-09-16T08:39:06Z")

</div>

Hi everyone! Why does this simple code result in a heap error? auto img = std::make\_unique\<wxImage\>(); bool success = img-\>LoadFile(wxGetUserHome() + wxT("\\\\Desktop\\\\circleTest.jpg")); cv::Mat src(img-\>GetHeight(), img…

---

## [This implementation keps failing silently, but the repo readme says it works fine. The controller for my robot keeps crashing when this function is triggered](https://forum.opencv.org/t/this-implementation-keps-failing-silently-but-the-repo-readme-says-it-works-fine-the-controller-for-my-robot-keeps-crashing-when-this-function-is-triggered/24593)

<div class="topic-metadata">

**Author:** [@John\_Paul](https://forum.opencv.org/u/John_Paul)\
**Replies:** 1\
**Last updated:** [June 19, 2026, 9:26am UTC](https://forum.opencv.org/t/this-implementation-keps-failing-silently-but-the-repo-readme-says-it-works-fine-the-controller-for-my-robot-keeps-crashing-when-this-function-is-triggered/24593 "2026-06-19T09:26:01Z")

</div>

def fire\_detection(self, verbose=True): """ Detect the smoke and return the fire coordinate in the image Parameters: verbose (bool): whether to print status messages or not Ret…

---

## [Loader don't find an imageproc function](https://forum.opencv.org/t/loader-dont-find-an-imageproc-function/24378)

<div class="topic-metadata">

**Author:** [@Etruscus](https://forum.opencv.org/u/Etruscus)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 2:40pm UTC](https://forum.opencv.org/t/loader-dont-find-an-imageproc-function/24378 "2026-03-09T14:40:12Z")

</div>

GCC at compile time give me this messageundefined reference tocv::GaussianBlur(cv::\_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)’ with this code cv::Mat CreateLinearMotionKernel(double Angl…

---

## [Unsure what the problem is with canny edge detection issues](https://forum.opencv.org/t/unsure-what-the-problem-is-with-canny-edge-detection-issues/24343)

<div class="topic-metadata">

**Author:** [@jun176](https://forum.opencv.org/u/jun176)\
**Replies:** 2\
**Last updated:** [January 31, 2026, 9:44pm UTC](https://forum.opencv.org/t/unsure-what-the-problem-is-with-canny-edge-detection-issues/24343 "2026-01-31T21:44:20Z")

</div>

Hi. I am new to opencv, and after reading some documentation have combined it with mss. I am trying to implement edge detection to detect objects in a game. However, I am facing an issue where the objects continuously fl…

---

## [Trying to detect the color red in opencv c++](https://forum.opencv.org/t/trying-to-detect-the-color-red-in-opencv-c/24299)

<div class="topic-metadata">

**Author:** [@d22](https://forum.opencv.org/u/d22)\
**Replies:** 0\
**Last updated:** [January 6, 2026, 2:04pm UTC](https://forum.opencv.org/t/trying-to-detect-the-color-red-in-opencv-c/24299 "2026-01-06T14:04:14Z")

</div>

I am trying to learn to detect the color red in opencv in c++. and i am struggling with the code a bit can someone help me? the code is below: #include #include “opencv2/objdetect.hpp” #include “opencv2/highgui.hpp” #…

---

## [Can not get through with this problem, can someone help?](https://forum.opencv.org/t/can-not-get-through-with-this-problem-can-someone-help/24294)

<div class="topic-metadata">

**Author:** [@Phan\_Hung\_Linh](https://forum.opencv.org/u/Phan_Hung_Linh)\
**Replies:** 1\
**Last updated:** [January 4, 2026, 9:03pm UTC](https://forum.opencv.org/t/can-not-get-through-with-this-problem-can-someone-help/24294 "2026-01-04T21:03:02Z")

</div>

Propose some SEs (structure element) to extract the sticks and the circles (2 situation) then write a python program using morphological transformations (from openCV). The final result should be an image with only one…

---

## [Extract data from rect = cv2.minAreaRect(c) structure (tuple?)](https://forum.opencv.org/t/extract-data-from-rect-cv2-minarearect-c-structure-tuple/24273)

<div class="topic-metadata">

**Author:** [@jogl](https://forum.opencv.org/u/jogl)\
**Replies:** 1\
**Last updated:** [December 21, 2025, 10:20pm UTC](https://forum.opencv.org/t/extract-data-from-rect-cv2-minarearect-c-structure-tuple/24273 "2025-12-21T22:20:26Z")

</div>

I have rect = cv2.minAreaRect(c) which contains the data as (centre x,y), (size l,w), angle. How can I extract the data so I have it in simple integer form? Ie. x= y= l= w= angle= I know this is simple but I’m ki…

---

## [RaspberryPi 4 with Trixie X Wayland question](https://forum.opencv.org/t/raspberrypi-4-with-trixie-x-wayland-question/24258)

<div class="topic-metadata">

**Author:** [@jogl](https://forum.opencv.org/u/jogl)\
**Replies:** 1\
**Last updated:** [December 16, 2025, 4:11pm UTC](https://forum.opencv.org/t/raspberrypi-4-with-trixie-x-wayland-question/24258 "2025-12-16T16:11:01Z")

</div>

I am setting up a RaspberryPi4 with 4 Mb RAM to run OpenCV. It will be running on an isolated safe LAN headless. I am using Vinagre VNC client on a number of computers to access a number of other headless RPi’s. The n…

---

## [Can't get waitKey() to work](https://forum.opencv.org/t/cant-get-waitkey-to-work/24257)

<div class="topic-metadata">

**Author:** [@jogl](https://forum.opencv.org/u/jogl)\
**Replies:** 3\
**Last updated:** [December 16, 2025, 4:09pm UTC](https://forum.opencv.org/t/cant-get-waitkey-to-work/24257 "2025-12-16T16:09:36Z")

</div>

My head is getting sore. What am I doing wrong? This: import cv2 print(“here”) cv2.waitKey(5000000) print(“jp”) cv2.destroyAllWindows() does not wait whether I have 5,000,000, 0 (zero), or 1 as argument. Just print…

---

## [VS code won't install opencv](https://forum.opencv.org/t/vs-code-wont-install-opencv/24245)

<div class="topic-metadata">

**Author:** [@Fred](https://forum.opencv.org/u/Fred)\
**Replies:** 5\
**Last updated:** [December 11, 2025, 9:14am UTC](https://forum.opencv.org/t/vs-code-wont-install-opencv/24245 "2025-12-11T09:14:20Z")

</div>

I have a new computer so have installed python v 3.14, and the newest VS Code IDE. But when I try to install opencv (pip install opencv-python) I get the following. (myvenv) C:\\Users\\xxx\\Documents\\MyPythonFolder\>pip i…

---

## [Does waitKey does not show image when socket is used?](https://forum.opencv.org/t/does-waitkey-does-not-show-image-when-socket-is-used/24216)

<div class="topic-metadata">

**Author:** [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Replies:** 0\
**Last updated:** [November 20, 2025, 8:52am UTC](https://forum.opencv.org/t/does-waitkey-does-not-show-image-when-socket-is-used/24216 "2025-11-20T08:52:06Z")

</div>

Hi, Here my first program (python and windows11 opencv-python 4.11.0.86): import time import numpy as np import cv2 as cv tps\_start = time.time() img = np.zeros((256, 256, 3),np.uint8) idx = 0 code = 0…

---

## [Cannot access /system/vendor/lib64/libOpenCL.so when using OpenCL on Android](https://forum.opencv.org/t/cannot-access-system-vendor-lib64-libopencl-so-when-using-opencl-on-android/24160)

<div class="topic-metadata">

**Author:** [@Yixun\_Liu](https://forum.opencv.org/u/Yixun_Liu)\
**Replies:** 0\
**Last updated:** [October 28, 2025, 2:18am UTC](https://forum.opencv.org/t/cannot-access-system-vendor-lib64-libopencl-so-when-using-opencl-on-android/24160 "2025-10-28T02:18:42Z")

</div>

Hi All, I need to use OpenCL via Opencv ocl module on Android. However, when the app start I get error: library “/system/vendor/lib64/libOpenCL.so needed or dlopened by myJNI.so is not accessible for the namespace … I…

---

## [How to build an opencv function into a dll for calling in E Language](https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095)

<div class="topic-metadata">

**Author:** [@cxnet](https://forum.opencv.org/u/cxnet)\
**Replies:** 1\
**Last updated:** [October 5, 2025, 11:03am UTC](https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095 "2025-10-05T11:03:53Z")

</div>

Hello everyone, I want to build the imread, imshow,dilate and other functions of Opencv into DLLS for E language to call. But what data type should the Mat data after imread reads the image be? Can the subsequent functio…

---

## [Error \_img.empty() in function 'imwrite'](https://forum.opencv.org/t/error-img-empty-in-function-imwrite/24044)

<div class="topic-metadata">

**Author:** [@Deruel\_Roland](https://forum.opencv.org/u/Deruel_Roland)\
**Replies:** 2\
**Last updated:** [September 26, 2025, 7:28pm UTC](https://forum.opencv.org/t/error-img-empty-in-function-imwrite/24044 "2025-09-26T19:28:19Z")

</div>

Hello result message error with opencv version opencv-python 4.12.0.88 my test python on ubuntu 22 image\_path = os.path.join(‘,’, ‘data’, ‘bird.jpg’) img = cv2.imread(image\_path) cv2.imwrite(os.path.join(‘,’, ‘da…

---

## [Problem with OpenCV, Android app crashes](https://forum.opencv.org/t/problem-with-opencv-android-app-crashes/19497)

<div class="topic-metadata">

**Author:** [@Mladen](https://forum.opencv.org/u/Mladen)\
**Replies:** 1\
**Last updated:** [December 16, 2024, 12:25pm UTC](https://forum.opencv.org/t/problem-with-opencv-android-app-crashes/19497 "2024-12-16T12:25:55Z")

</div>

Hello, I would be grateful if someone provided help. I have built android app in python/kivi/kivimd and used OpenCV library. Library was correctly (I think) installed and imported into the app, and everything works wel…

---

## [Delete keypoints by x and y coordinates](https://forum.opencv.org/t/delete-keypoints-by-x-and-y-coordinates/23901)

<div class="topic-metadata">

**Author:** [@NektoN95](https://forum.opencv.org/u/NektoN95)\
**Replies:** 3\
**Last updated:** [August 27, 2025, 4:24pm UTC](https://forum.opencv.org/t/delete-keypoints-by-x-and-y-coordinates/23901 "2025-08-27T16:24:05Z")

</div>

I have series of firstperson game screenshots which will be further used for Simultaneous Localization and Mapping. But the thing is, there are elements of interface you cannot hide. So before searching for similar keypi…

---

## [Removing the jagedness from the image](https://forum.opencv.org/t/removing-the-jagedness-from-the-image/23855)

<div class="topic-metadata">

**Author:** [@Kunal\_Kewat](https://forum.opencv.org/u/Kunal_Kewat)\
**Replies:** 3\
**Last updated:** [August 21, 2025, 8:57am UTC](https://forum.opencv.org/t/removing-the-jagedness-from-the-image/23855 "2025-08-21T08:57:24Z")

</div>

i have images like this and i want to remove all the jageddness while keeping the shape.

---

## [Can not install dlib for face\_recognition](https://forum.opencv.org/t/can-not-install-dlib-for-face-recognition/23515)

<div class="topic-metadata">

**Author:** [@zamigmammadzada](https://forum.opencv.org/u/zamigmammadzada)\
**Replies:** 2\
**Last updated:** [August 14, 2025, 8:27pm UTC](https://forum.opencv.org/t/can-not-install-dlib-for-face-recognition/23515 "2025-08-14T20:27:46Z")

</div>

Hello everyone, I need to download the dlib library for face\_recognition but every time I get this error: “building wheel for dlib (pyproject.toml) did not run successfully” and even though I downloaded the cmake library…

---

## [OpenCV/Windows Broke yesterday](https://forum.opencv.org/t/opencv-windows-broke-yesterday/23623)

<div class="topic-metadata">

**Author:** [@scott\_grodevant](https://forum.opencv.org/u/scott_grodevant)\
**Replies:** 3\
**Last updated:** [August 7, 2025, 3:32pm UTC](https://forum.opencv.org/t/opencv-windows-broke-yesterday/23623 "2025-08-07T15:32:12Z")

</div>

Hi All, I am a long time programmer (mostly embedded firmware), and have used OpenCV for several years. I was working yesterday on an application that uses two 2MP USB cameras and was having some issues opening both fo…

---

## [Cv::min(const Mat& src1, const Mat& src2, Mat& dst) is not being recognized by IntelliSense in VS2022](https://forum.opencv.org/t/cv-min-const-mat-src1-const-mat-src2-mat-dst-is-not-being-recognized-by-intellisense-in-vs2022/23633)

<div class="topic-metadata">

**Author:** [@mjan](https://forum.opencv.org/u/mjan)\
**Replies:** 3\
**Last updated:** [August 7, 2025, 2:44pm UTC](https://forum.opencv.org/t/cv-min-const-mat-src1-const-mat-src2-mat-dst-is-not-being-recognized-by-intellisense-in-vs2022/23633 "2025-08-07T14:44:26Z")

</div>

Hi There, I am working on a project, where I need to merge to images. These images are being printed, that means intensity 255 is the background. To merge the two images I wanted to use cv::min(const Mat& src1, const Ma…

---

## [Does the change of camera effects the prediction?](https://forum.opencv.org/t/does-the-change-of-camera-effects-the-prediction/23433)

<div class="topic-metadata">

**Author:** [@Uday\_Hiremath](https://forum.opencv.org/u/Uday_Hiremath)\
**Replies:** 0\
**Last updated:** [July 31, 2025, 6:55am UTC](https://forum.opencv.org/t/does-the-change-of-camera-effects-the-prediction/23433 "2025-07-31T06:55:49Z")

</div>

Hi, I trained YOLOv5 using images of walnuts captured with different cameras. The model achieved 98% accuracy on the training data, 98% on the validation data, and 96% on the test data. However, when I test the same mod…

---

## [Gray frames/lost pixes](https://forum.opencv.org/t/gray-frames-lost-pixes/23174)

<div class="topic-metadata">

**Author:** [@Fellipe\_Zambrano](https://forum.opencv.org/u/Fellipe_Zambrano)\
**Replies:** 11\
**Last updated:** [July 19, 2025, 7:03pm UTC](https://forum.opencv.org/t/gray-frames-lost-pixes/23174 "2025-07-19T19:03:44Z")

</div>

Hello guys. I’m using the opencv\_contrib\_python\_rolling-4.12.0.86-cp37-abi3-win\_amd64.whl, to read a video streaming (RTSP link). What happens, is that, usually video is getting gray frames, in part of image or in tota…

---

## [Opencv4.6 compitible problem with opencv4.11](https://forum.opencv.org/t/opencv4-6-compitible-problem-with-opencv4-11/23159)

<div class="topic-metadata">

**Author:** [@vita](https://forum.opencv.org/u/vita)\
**Replies:** 4\
**Last updated:** [July 18, 2025, 8:32am UTC](https://forum.opencv.org/t/opencv4-6-compitible-problem-with-opencv4-11/23159 "2025-07-18T08:32:23Z")

</div>

Our program is developed under opencv 4.6, now the new environment is opencv 4.11 installed. It shows 127 error when i run the code. I assume it is mixing library problem. how can i make the independent library 406 subs…

---

## [I would like to display a image that is loaded in memory](https://forum.opencv.org/t/i-would-like-to-display-a-image-that-is-loaded-in-memory/23124)

<div class="topic-metadata">

**Author:** [@golson](https://forum.opencv.org/u/golson)\
**Replies:** 3\
**Last updated:** [July 15, 2025, 9:35am UTC](https://forum.opencv.org/t/i-would-like-to-display-a-image-that-is-loaded-in-memory/23124 "2025-07-15T09:35:28Z")

</div>

Hi, I would like to use TCPIP or UDP to send a JPEG file to the computer. I would like to grab the data in memory and display it. using client/server communications. Can I do that. Or do I have to write to the hard …

---

## [Can you explain values of imgIdx and trainIdx in this example of cv.match?](https://forum.opencv.org/t/can-you-explain-values-of-imgidx-and-trainidx-in-this-example-of-cv-match/21018)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://forum.opencv.org/u/pauljurczak)\
**Replies:** 1\
**Last updated:** [May 30, 2025, 4:03am UTC](https://forum.opencv.org/t/can-you-explain-values-of-imgidx-and-trainidx-in-this-example-of-cv-match/21018 "2025-05-30T04:03:59Z")

</div>

This OpenCV Python script: import numpy as np, cv2 as cv bf = cv.BFMatcher(cv.NORM\_L1, crossCheck=False) bf.add(np.array(\[\[0\], \[1\], \[2\]\], dtype='f4')) # train image 0 bf.add(np.array(\[\[0.1\], \[1.1\], \[2.1\]\], dtype='f4')…

---

## [Add text or image without desktop environment (RPi and Picamera2)](https://forum.opencv.org/t/add-text-or-image-without-desktop-environment-rpi-and-picamera2/21103)

<div class="topic-metadata">

**Author:** [@GG2GG](https://forum.opencv.org/u/GG2GG)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 9:35am UTC](https://forum.opencv.org/t/add-text-or-image-without-desktop-environment-rpi-and-picamera2/21103 "2025-05-28T09:35:57Z")

</div>

Hi all, I’m new here and newbie. I’m working on Raspberry with attached camera and Picamera2. The RPi is running Bookworm Lite without desktop. I got a 640\*480 preview on a 800\*480 DSI LCD display connected to RP1, so th…

---

## [Using QT on macos 15.5 with opencv (and the unexpected problems)](https://forum.opencv.org/t/using-qt-on-macos-15-5-with-opencv-and-the-unexpected-problems/21089)

<div class="topic-metadata">

**Author:** [@Jason\_Stelzer](https://forum.opencv.org/u/Jason_Stelzer)\
**Replies:** 0\
**Last updated:** [May 24, 2025, 11:39pm UTC](https://forum.opencv.org/t/using-qt-on-macos-15-5-with-opencv-and-the-unexpected-problems/21089 "2025-05-24T23:39:19Z")

</div>

Hey, I have an app I wrote in rust on linux that I wanted to use on my mac. The porting effort was minimal, but the version of opencv I got via brew wasn’t linked to qt. On the linux side, I have a hot key that shows he…

[Next page](https://forum.opencv.org/tag/programming/327.md?match_all_tags=true&page=1&tags%5B%5D=programming)
