Click here to Skip to main content
15,886,919 members
Everything / OpenCV

OpenCV

OpenCV

Great Reads

by HoshiKata
Practical on the fly fast mesh generation from arbitrary points.
by Phil Hopley
Second part in a series on a ROS (Robot Operating System) House Bot
by Ansel Castro
The article shows how to render 3D graphics with C# in .NET using an API Igneel.Graphics.
by Phil Hopley
In this article, we will add AI to an existing ROS (Robot Operating System) House Bot.

Latest Articles

by Edward Sulistijono
Face Recognition with Python Programming Language using Haarcascade
by Markus Koppensteiner
Python code for image-blending based on an image mask
by Dawid Borycki
In this last article of the series, we improve our Python console application for AI-powered social distancing detection.
by Dawid Borycki
In this article, we will use those centers to estimate distances between people and indicate people that are too close.

All Articles

Sort by Updated

OpenCV 

N 25 Apr 2024 by Pete O'Hanlon
I'm going to have to make assumptions that you have circular tablets with circular spots. Off the top of my head, you would use something like HoughCircles to detect all circles in the image; once you have the list of all circles, you would look...
N 25 Apr 2024 by 01fe20bec297
I have a frame which consist of many tablets. There are spots on the tablets. I want to detect those spots which are on tablet. The spots are of random color, random shape and random size. How can i detect these spots using image processing? ...
6 Dec 2023 by Maciej Los
If you're talking about: Magick.NET/docs at main · dlemstra/Magick.NET · GitHub[^] then you're in trouble, because that library is for: Quote: ImageMagick is a powerful image manipulation library that supports over 100 major file formats (not...
5 Dec 2023 by Richard MacCutchan
See OpenCV: Feature Detection and Description[^]
5 Dec 2023 by Tim the Gamer
I have applied an effect to highlight all the edges on an image with C# wrapper to Image Magick called Magick. NET . I intend to detect the scratches and small circles on it. How can I do this. This is what I got so far, check the image from this...
6 Nov 2023 by Hossain23
Google Colab[^] The code link has been updated. Now you can access it here. I was trying to implement smile detection project from kaggle on to my Google collab. kaggle link smile-detection | Kaggle[^] I have downloaded the datasets and...
26 Oct 2023 by OriginalGriff
"It doesn't work" is probably the most useless problem report we get - and we get it a lot. It tells us nothing about what is happening, or when it happens - and "I get error" means just that - "it doesn;t work"! So tell us what it is doing that...
21 Jun 2023 by Member 15902014
I would like to get a “blurness” value after using the cannyfilter on a siemensstar image, to check the blurness level. After usind the canny filter you can identify that the sharper image has more lines than the blurry one. So what would be the...
21 Jun 2023 by Richard MacCutchan
See canny filter - Google Search[^] for further information.
11 Jun 2023 by Deepen Bedar
I want to develop a vision application to detect the angle of an object with respect to horizontal and vertical. I need someone's assistance to understand the basics of object detection, and what all functions and Libraries are required for this...
16 May 2023 by Richard MacCutchan
object detection python opencv - Google Search[^]
22 Mar 2023 by sahil ajmeri 2022
i am working on a project in C++ WinForms. i have a blur and defocused Image. i want to make that image more focused and sharpened but smooth and clean as this Image. this image enhanced in mobile application. and i want the same result as this...
12 Mar 2023 by sahil ajmeri 2022
i have created CLR winforms(.net framework) c++ project, there's two buttons SelectImageBtn and EnhanceBn. i want to select the folder where the blur images are stored by clicking SelectImageBtn and want to sharp and enhance all the blur images...
12 Mar 2023 by merano99
The /std option is used to control version-specific standard features of the ISO C or C++ programming language in a compiler. https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version However, according to your...
10 Mar 2023 by sahil ajmeri 2022
okay i found the solutions for getting errors i was using ISO C++14 Standard (/std:c++14) instead of upgraded version ISO C++17 Standard (/std:c++17) i fix the problem following steps To switch to C++17 or later, you need to modify the...
30 Jan 2023 by Member 15908705
I have detected the edge of the wires. Now I need to get the color of each wire column and make a list of the color from left to right but I don't know how to do it or what function should I use to get the color for each wire column. What I have...
22 Jan 2023 by omar weeka
Iam using open cv and opencv to read multiple barcode scan I need to check if theres some barcode equal to each other by uaing live video by webcam i need to say of theres barcode equal to other display truee on screen theres more than one...
27 Dec 2022 by Atharav Jadhav
I have a code which takes images from a folder, crops the region of interest around it using the ROI function, and then removes the background using the rembg library. But I want a border around that image, around that specific object itself,...
6 Oct 2022 by Richard MacCutchan
You have the following lines in your code: ROI3 = image2[y:y+h, x:x+w] # this looks like part of the image # ... img_path = ROI3 # ... save_path = os.path.join(out_path, img_path + '-output.jpg') You need to look at the content of...
6 Oct 2022 by M@153
I'm trying to run the paddleOCR framework on the cropped ROI of a scanned image, but when I do, I always get the error message mentioned below. I have no idea what's gone wrong. UFuncTypeError Traceback (most recent...
3 Oct 2022 by Member 11246616
I have project written in cmakelists.txt using opencv. And, I want to run this project in QT in ubuntu. But there is an error; `/home/asiye/ 38 | #include | ...
3 Oct 2022 by Richard MacCutchan
Possibly because your include statement is telling the compiler to look in the standard library locations and your opencv is in your project folder. Try changing it to #include "opencv2/xfeatures2d.hpp" with double quotes rather than angle...
3 Oct 2022 by ASHIN KUNJUMON
import os import cv2 import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf import sys # This is needed since the notebook is stored in the object_detection folder. sys.path.append("..") # Import utilites from...
3 Oct 2022 by ASHIN KUNJUMON
import os import cv2 import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf import sys # This is needed since the notebook is stored in the object_detection folder. sys.path.append("..") # Import utilites from...
3 Oct 2022 by Richard MacCutchan
See tkinter — Python interface to Tcl/Tk — Python 3.10.7 documentation[^].
23 Sep 2022 by M@153
Input image I need to extract CR No.from the sample image above. Using Easyocr, I got the output in complex nested list form. How to update the code to filter out all the detected text/numbers and get only CR No. I tried to fetch the text "CR...
23 Sep 2022 by Richard MacCutchan
Something like: mainlist = [([[212, 26], [314, 26], [314, 50], [212, 50]], 'SCB MEDICAL', 0.998906268787747), ([[36, 56], [84, 56], [84, 80], [36, 80]], '6ein8', 0.19502338570146513), ([[303, 99], [335, 99], [335, 119], [303, 119]], 'OPD',...
30 Aug 2022 by embedde
im about to build video analytic using python. im able to detect object in video using tensorflow. But i cannot get the time when the object appear in video. i have scenario like this : i have 16 seconds video . in the 5th second, the object...
27 Jul 2022 by GUREY MARINE SHOP
I'm making a body measurements application that can be used to measure the human body, but I'm having trouble matching the correct person size to the image size. how can you help me ? What I have tried: import cv2 import mediapipe as mp import...
22 Jun 2022 by RickZeeland
Maybe you can use one of these open-source-command-line-image-conversion-tools[^] And also take a look at: what-are-the-most-enjoyable-programming-languages-for-web-development[^] Another option might be the OpenCV library which can be used...
22 Jun 2022 by Member 15678123
Hello everyone, I'm building a sketch website where I am trying to introduce different types of sketches including pencil sketches, color sketches, IG-like filters, and more. I'm an initial phase where I am exploring the possible technologies...
12 Jun 2022 by ATF 98
I'm trying to extract 3 random areas from the image (lungs image) these areas are indicated in the soft tissues, each area will be a square of specific height and width e.g. 10mm for width and height, as shown in the image in the link. ...
30 Apr 2022 by Hamna Malik 2022
Canvas is not displaying video even there is no error while execution of code What I have tried: def ir_frame_to_jpg(self, IRFrame): IRFrame = IRFrame.reshape((const.ir_image_size)) IRFrame = np.uint8(IRFrame) ...
27 Apr 2022 by Emmett O neill
Hi I am creating a Rubik's cube detection program for OpenCV in order to detect the colour of each individual cubie however i am struggling to tell the difference between colours such as red, orange and yellow. I have investigated this throughly...
27 Apr 2022 by matblue25
Maybe because you have overlap between the yellow and orange ranges?
27 Apr 2022 by Emmett O neill
Description: So i'm currently working on a program to solve a rubik's cube using Python and OpenCV. In order to do this i first am trying to extract all the colors of the cubies, and then apply kociemba's algorithm in order to output a solution...
27 Apr 2022 by Richard MacCutchan
Look at the second message below in the error messages: Traceback (most recent call last): File "c:\Users\eonei\Documents\Emmett\Rubiks-Cube-Solver\main.py", line 81, in screen_record() File...
27 Apr 2022 by Greg Utas
Debugging skills are as important as design and coding skills. You will learn nothing if someone debugs your program for you. It's unlikely that many people here are even amiliar with Kociemba's algorithm, so someone wanting to help would have to...
26 Apr 2022 by OriginalGriff
Seriously, you need to use the debugger to find out exactly what it is doing, and where it crashes. So go here: pdb — The Python Debugger — Python 3.10.4 documentation[^] and use set_trace to start debugging from a point just before where you...
21 Apr 2022 by Kaushik Vezzu
As a part of my project involving conversion of sign language to english , I developed .tflite model and did predictions successfully using opencv. Now i want to implement web application for this . On the web page , there will be live streaming...
13 Apr 2022 by Member 15590963
There is a picture of the written exam paper, we converted it to a text file with opencv. I am comparing the answer key text file with the exam text file. it gets high marks as long as it's the same words, so it's just comparing word similarity,...
12 Apr 2022 by youssef alaa 2022
I'm trying to make LIDAR to RGB projection using [ViViD dataset](https://visibilitydataset.github.io/1_about.html). I tried to use the same approach as the one used for kitti dataset. However, i got wrong results. the calibration files provided...
4 Apr 2022 by Member 15590963
I just started opencv I converted a picture into a text file with opencv and I want to compare the similarities with the code with the ready text file I have, how can I code it? can anyone help? What I have tried: I did some research but...
4 Apr 2022 by OriginalGriff
Don't even think about it. "Similarities" in an image are complicated enough: a shade off, a slight change in size or alignment, a small rotation - these are difficult enough for a computer to spot in an actual picture: image similarity python -...
12 Feb 2022 by Member 14526095
Basically, I get inputs from aircraft (lon, lat) point to track it. To do this I implemented the openCV Kalman filter algorithm but Kalman filter gives me following result. lon = 37.461758852005005 => 63 (big difference) lat =...
12 Feb 2022 by KarstenK
You better start with reading some Kalman example implementation to understand what is going on. When using some library it is important to understand the details to not misuse the library and its details. Afte that I recommend that you write...
6 Feb 2022 by haytam7
Hello everyone, in this project I'm trying to convert an image to a matrix of ASCII characters but I got stuck at some point and I would be happy te get your help. The idea is: - Load an image as a Mat object - Iterate through all the pixels and...
24 Jan 2022 by Isaac Nimco
I recently started on a ball tracking project using open cv and python. I got the tracking to work but I wanted to store the position of the ball every frame in a txt file. Since I am a new developer I had no idea what to do. If you know how to...
24 Jan 2022 by Richard MacCutchan
See 7. Input and Output — Python 3.9.10 documentation[^], which explains how to format values into text, and how to write to a file. You may also like to look at json — JSON encoder and decoder — Python 3.9.10 documentation[^] which is a good way...
4 Jan 2022 by Member 14047666
We are performing Auto Crop operations using OpenCV library in C# project, For few sample automatically cropping the image but for other samples images are not cropped. Let us know anything is missing in source code. Please find the below piece...
4 Jan 2022 by KarstenK
A clear case for the debugger, because it is some special situation. So use the tool with some test data. I think your fix coordinates in the code can be a problem when using different image sizes. Also read the OpenCV documentation for...
24 Dec 2021 by Edward Sulistijono
Face Recognition with Python Programming Language using Haarcascade
2 Dec 2021 by Abdussalam Elhanashy
0 I am streaming lepton FLIR camera on jetson nano using python3 and OpenCV and I have problems that I can not resize live video. The original lepton resolution is (160 x 120) and I would like to resize it to (640 x 480). I tried to use...
30 Sep 2021 by Junwoo Kim
I am trying to show my annotations and show the video frame by frame. However, I get the frame by frame but not the annotation. Here is my code: import cv2 import mediapipe as mp import video_tools as vt # Video prep file_name = 'OpenTurn'...
10 Sep 2021 by payam mohammadi
yRBW2 — Postimages[^] hi, at the first, please open link and see (image) that is on top of question i have only one simple question as you see in image , there are few lines in image, my code find intersection points of lines i want to...
3 Sep 2021 by Manas Sharma 2021
I am building a python project using opencv and kociemba library, the aim is to solve a rubik's cube. It would take the 6 faces of cube as input and produce the instructions to solve the cube as output. However, I want to encase my project to run...
3 Sep 2021 by Gbetnkom Jeff
If you are considering a Web application, you can look through Flask. It's a great way to combine front and back.
29 Aug 2021 by maryam ranjbar
I wanna debug software in visual studio 2019. the software made in Visual Studio 2010.the software use OpenCV.I installed OpenCV but there is no opencv_core240d.lib in the libraries path.I searched for the error, I don't understand how to solve...
29 Aug 2021 by Rick York
First, find out if and where the file opencv_core240d.lib exists on your development machine. If it does not exist then you will need to install the OpenCV library and then find out where that file is. Once you have found that file then make...
20 Aug 2021 by Member 15325248
I am converting .raw image into bmp and then displaying on image control in wpf. My UI is in WPF. I am also saving the bmp image in png or jpeg format. Now the challenge is correcting the bmp image using brightness and contrast. So is there any...
20 Aug 2021 by Richard MacCutchan
Look what Google found: OpenCV: Changing the contrast and brightness of an image![^]
29 Jul 2021 by Member 11246616
I run Cmake for install opencv for windows 10 but there is an error CMake Error at CMakeLists.txt:107 (enable_language): Generator CMake Error at CMakeLists.txt:107 (enable_language): Generato Visual Studio 17 2022 could not find any...
30 Jun 2021 by Halifia Hendri S Pd M Kom
I can't import cv2 in my Jupyter like this error message below: ModuleNotFoundError Traceback (most recent call last) in ----> 1 import cv2 ...
30 Jun 2021 by Richard MacCutchan
Wherever you have installed opencv, the system cannot find it. Use pip to find out where it is: Quickstart - pip documentation v21.1.3[^].
10 May 2021 by Member 15192080
Hi everyone, I'm trying to convert with ffmpeg-python every frame of a video in a numpy array that could work with opencv What I have tried: Here my code: for i in (frames): out, _ = ( ffmpeg ...
10 Mar 2021 by Member 15096949
I need to merge two images with respect to its coordinate values. I have done merging using single point to point merge using Paste an image to another image at two given co-ordinates with altered opacity using PIL or OpenCV in Python - Stack...
28 Dec 2020 by Member 11271608
Hello, I'm trying to implement spline Catmull-Rom for image zooming using C++ and OpenCV. I performed two tests, the first is image zooming (X2), and the second image reconstruction (zooming image decimated). What I have tried: I'm trying to...
28 Dec 2020 by KarstenK
That is clearly a bug you must fix. I guess it is some overflow in your math. So check the code for overflows and fix them correctly. My first candidate would be CalCurveInt. tip: use some test data like input code or specail sample file to...
22 Dec 2020 by Markus Koppensteiner
Python code for image-blending based on an image mask
16 Dec 2020 by Member 14649324
i have two lines that will be draw through mouse events and to find the angle between them like if i draw two parallel line the angle give me 0 What I have tried: import numpy as np import cv2 import math btn_down = False def...
16 Dec 2020 by Sandeep Mewara
You can make use of use the Hough Transform as mentioned here: How to measure the angle between 2 lines in a same image using python opencv? - Stack Overflow[^] Snippet from there: from skimage.transform import (hough_line, hough_line_peaks)...
11 Dec 2020 by Dawid Borycki
In this last article of the series, we improve our Python console application for AI-powered social distancing detection.
10 Dec 2020 by Dawid Borycki
In this article, we will use those centers to estimate distances between people and indicate people that are too close.
9 Dec 2020 by Dawid Borycki
In this article, we'll calculate the center of each detected bounding box, which will serve as a base for calculating distance.
8 Dec 2020 by Dawid Borycki
In this article we will perform object detection on the frames from the test data sets including video sequence stored in the video file.
7 Dec 2020 by Dawid Borycki
In this article, we continue learning how to use AI to build a social distancing detector.
4 Dec 2020 by Dawid Borycki
In this article, we will use drawing functions to depict detected objects.
3 Dec 2020 by Dawid Borycki
In this article, we will learn how to add annotations to images.
2 Dec 2020 by Dawid Borycki
In this article series, we'll look at how to use AI and deep learning on video frames to ensure people are maintaining adequate social distancing in crowds.
18 Nov 2020 by Member 14649324
i have two perpendicualr lines how to draw the Angle between them What I have tried: mport numpy as np import cv2 btn_down = False def get_points(im): # Set up data to send to mouse handler data = {} data['im'] = im.copy() ...
18 Nov 2020 by Gerry Schmitz
I put my line vertical or horizontal then rotate it about some point to make and get an angle. Easier than doing geometry. c++ - Rotate a point around a point with OpenCV - Stack Overflow[^] (Yeah, I know it's C++; it's the "concept". That's...
16 Nov 2020 by Maciej Los
There's at least several articles in our database on that topic. See: CP Knowledge Base[^]
11 Nov 2020 by Member 14834230
hi ! i'm newer in java , and i have project on openCV for java i have to present what is opencv and their function for java please who can help me by a video or tuto or document ? What I have tried: hi ! i'm newer in java , and i have...
11 Nov 2020 by Gerry Schmitz
Welcome to OpenCV Java Tutorials documentation! — OpenCV Java Tutorials 1.0 documentation[^]
4 Nov 2020 by Hai Luu
My project is to detect the lines on a picture, I know using houghline function(openCVsharp), but the result gives me many parallel lines. Could you guide me on how to merge these parallel lines? var gray = OpenCvSharp.Cv2.ImRead(filename,...
2 Nov 2020 by Arnaldo P. Castaño
In this series of articles we will use a deep neural network (DNN) to perform coin recognition. Specifically, we will train a DNN to recognize the coins in an image.
30 Oct 2020 by MehreenTahir
In this we’ll see if we can implement YOLO on video feeds for queue length detection.
29 Oct 2020 by MehreenTahir
In this article we will compare training our models from scratch with more advanced and pre-trained approaches like YOLO.
21 Oct 2020 by Supoh
so i am trying to implement a face detection age classifying agent that detects a face on a photo and then classifies it according to age as 'Old' and 'Young'. So far I have implemented the face recognition class using OpenCV in which I used the...
21 Oct 2020 by Sandeep Mewara
Based on different facial feature you need to define a confidence factor for defining an age. Train the model with datasets (images). Would suggest CNN (Neural Network) for this classification. Quote: In order to evaluate an age detector, you...
5 Oct 2020 by Member 12087553
I have been developing a project. it is developed with C#, OpenCL.NET. Aforge, OpenCV. I have a big problem. it is I can't release Memory on OpenCL.NET. I tried release() and dispose() but there weren't released. So I need the method that can...
1 Oct 2020 by Member 14785741
So basically I have an image with whitespace and a text above. The output should be only the picture. Without the text and the whitespaces. The best example would probably be a meme: https://i.stack.imgur.com/03Tmo.jpg How could I implement...
1 Oct 2020 by Member 14953523
import cv2 import numpy as np #img = cv2.imread("test.png") img = cv2.imread("img02.png") blurred = cv2.blur(img, (3,3)) canny = cv2.Canny(blurred, 50, 200) ## find the non-zero min-max coords of canny pts = np.argwhere(canny>0) y1,x1 =...
28 Aug 2020 by peterkm
To start with, I suggest to find C++ equivalents for Python libraries which you do not mention in your sample ... like this equivalent of Numpy GitHub - dpilger26/NumCpp: C++ implementation of the Python Numpy library[^] Researching needs to...
28 Aug 2020 by wiseman s
I doesn't know anything about pyhton. But I want to implement " Joachim Weickert 'Coherence-Enhancing Shock Filters' " for C++ and openCV. Only source code that I found written in pyhton. opencv functions are OK . I can adapt but some variable...
28 Aug 2020 by OriginalGriff
This is not a code conversion service: we are not here to translate code for you. Even if we did, what you would end up with would not be “good code” in the target language – they are based on very different frameworks, and what makes something...
24 Jul 2020 by Sergey L. Gladkiy
In this article we will explain how to use the pre-trained CNN for estimating a person’s age from an image.