Most voted "opencv" questions
Opencv is a multiplatform and *open source* library for developing applications linked to Computer Vision.
Learn more…202 questions
Sort by count of
-
0
votes1
answer123
viewsDoubt Points Recognition with Opencv and Dlib
Hi, I’m looking to do facial recognition with Dlib and Open via Webcam but I’m having a mistake with Numpy that I can’t solve, if someone can give me a hint would be of great help. My Code. import…
-
0
votes0
answers26
viewsHow to use an html page as input in opencv python?
I need to overlay an html page on my camera using Opencv (Python), but I don’t know how I could do that. I managed to do something similar to that code: import cv2 cap =…
-
0
votes0
answers81
viewshow I save variable values in a mysql database
I’m trying to create a facial recognition system using Opencv to record users' access to the school’s lab but the problem is that I’m not being able to save the access time information of each user…
-
0
votes1
answer1733
viewserror: (-215:Assertion failed) ! Empty() in Function 'detectMultiScale'
I’m totally layy on linux and I’m trying to use opencv version 3.4.2 with python 3.5.2 on linux Mint to run an example facial detection code. Below the code: import numpy as np import cv2…
-
0
votes0
answers92
viewsAdapt code to return mouse position
I have the following code that shows me the values of the coordinates X and Y when I double click with the left mouse button. #include <opencv2/opencv.hpp> #include <iostream> using…
-
0
votes1
answer1579
viewsHistogram Python Opencv
Hello, I would like to define a histogram of a function I created to detect an image region. That’s the job of. def points (imagem, pontosFaciais): p68 =[[47, 35, False], [35, 12, False], [12, 13,…
-
0
votes0
answers41
viewsProblem loading color detected by Arduin
I have a problem loading the information on Arduino via pyserial. I’m using a python and opencv script to do color detection via webcam. For each color detected, I want to inform the Arduino so that…
-
0
votes0
answers108
viewsFloating point Exception (core dumped) when running trainhog.cpp from Opencv
Hello, I am developing a solution for object detection in an image, using HOG+SVM. So far I have only set up my database of positive and negative samples. I was using the sample code of Opencv…
-
0
votes1
answer1110
viewsColor detection and tell which color is appearing
How could it be done so that when the predominant color in the video appears a message telling which is the predominant color? Example: appears an object in the capture of red video there would…
-
0
votes1
answer1627
viewsPlate recognition - Opencv - Tesseract
I am doing a TCC with the theme of recognition of automotive plates. I found a problem when using the function pytesseract.image_to_string. This function should convert image to string. I tried to…
-
0
votes1
answer311
viewsPeak value of a histogram
My code reads an image and transforms the RGB color model to HSV, and then I make a frequency histogram of each channel (H, S and V), with H varying from 0-179 and the rest from 0-255. With…
-
0
votes1
answer73
viewsProblem Running Watershed Distance Transform in Opencv 4.0.0
I am working on an object detection project. I use Opencv 4.0.0 and codeblocks 16.01 on Ubuntu 18.04.1. I am testing the Watershed Distance Transform technique using the code of this tutorial:…
-
0
votes0
answers214
viewsOpencv 4 at Visual Studio 2018
I’m trying to use the Opencv library in Visual Studio, but I get the following error message: LINK : fatal error LNK1104: cannot open file 'opencv_calib3d400.lib' The lib is in place C: opencv4…
-
0
votes1
answer405
viewsProblem when displaying text with cv2.QT_FONT_BOLD source using Opencv in Python
I’m having trouble showing a specific text in an image, I believe the problem is in the source used (cv2.QT_FONT_BOLD), because when I change the source to another as cv2.FONT_HERSHEY_COMPLEX_SMALL,…
-
0
votes0
answers89
viewsCount gray and black pixels from a c++ drawing
I have a drawing painted with felt-tip pens and scanned, only seven colors are present: green, blue, black, gray, violet, orange and red I need to know the percentage of color used. I can’t tell the…
-
0
votes1
answer747
viewsHow to save to a specific directory (python)?
Hello. I would like to know how to create a folder every time the program is run and save to a specific location. Currently it saves the file where the code is. This is my current code: import cv2…
-
0
votes1
answer54
viewsDoubt about openCV training
In a machine learning one must separate the data in 3 sets, one for training, another for validation and another for tests with relative quantity to 70%, 15% and 15% respectively. However my doubt…
-
0
votes0
answers140
viewsProblem running facial recognition test with Python - Opencv
When executing the following test code: import cv2 import os import numpy as np from PIL import Image detector_face =…
-
0
votes2
answers136
viewsHow to do continuous firing in python?
Good afternoon. I am developing a project where I need to make two cameras to take sequences of photos and stop only after a pre-defined command. In my current code you need to decide the number of…
-
0
votes1
answer86
viewsReturn brown percentage in image
I have a code where I take a video and save an image every 20 frames and I take a slice of that image, until then I was able to do it, but I need to analyze if they have pixels with the same or…
-
0
votes0
answers149
viewsHow do I get the angle of an image gradient, using Python and Opencv
I need to get the angle of the gradient of an image, I’m programming in Python and using Google Colab for the codes. I found this code here, which should show me the angle of the gradient: import…
-
0
votes1
answer36
viewsVector does not print completely - Python, Opencv
I’m working on a Python project using Opencv, I’m running on Google Colab. I want to save the markers vector from an image of a segmentation method, but whenever I print the vector, it appears…
-
0
votes1
answer189
viewserror in openCv Python drawContorns
I’m trying to paint the contours of an image. Follows the Code: import cv2 import numpy as np img = cv2.imread('./assets/placa.jpg') cv2.imshow('texto', img) # trasnformando a imagem em cinza para…
-
0
votes0
answers177
viewsBlur in a specific area with Opencv
I am trying to blur a face found in a video using Opencv but am having the following error: cv2.error: Opencv(4.1.0) /io/opencv/modules/imgproc/src/filter.simd.hpp:220: error: (-215:Assertion…
-
0
votes1
answer60
viewsHow to know the intensity of pixels in a given row or column of a cv::Mat?? [opencv][c++]
I have a project where there is a need to analyze the intensity of the pixels of a certain column or row, that is, my function will be Intensity(cv::Mat m, int ref, Std::string "lico") with a…
-
0
votes1
answer110
viewsHow to create a CSV file with the pixel values of an image
I’m having trouble getting the data from the pixels of an image and write to a CSV file, follow the current code. The error is in the .writerow, however I cannot identify how to change to work.…
-
0
votes1
answer292
viewsEdge -1 using erode and dilate (Python)
I’m having difficulty creating an edge with -1 pixels around what was labeled in the image. Where 255 is what has been labeled and around this area of 255 I want to put -1 which will be an edge to…
-
0
votes1
answer135
viewsError when connecting an IP camera to Opencv (-215:Assertion failed)
Good afternoon, guys! What’s up? So, I’m trying to connect a webcam per ip to the open cv, the webcam would be the camera on my phone and I’m using the Droid cam for that. It happens that I always…
-
0
votes1
answer559
viewsConvert BGR to RGB (Opencv)
I have a code that finds the edges around what was labeled in the image and places the value of -1 in the pixels of that border found. I’m having trouble converting the image already with the edges…
-
0
votes0
answers100
viewsHelp to translate captcha by using the python, csv and Tesseract language [closed]
I’m trying to make the recognition of these images, I’ve tried several types and I can’t identify with the tesserat because of the lines and scratches I get the site information below and can’t…
-
0
votes0
answers74
viewsDetect an image area at the right time (python)
I am developing a system for level detection in Ambar bottles (Beer/Soda), and I have the following problem: Whenever the bottle appears in the image the script already performs the reading but with…
-
0
votes0
answers126
viewsHow to recognize images using python, cv2, Pillow and Tesseract?
I’m trying to recognize the images below, but I’m not able to abstract the content correctly. A few examples: Code import numpy as np import cv2 import mahotas import pytesseract as ocr from PIL…
-
0
votes1
answer35
viewsHow to build a kernel size for an opencv Medianblur filter
I have this Medianblur filter in opencv: import cv2 img = cv2.imread('Resources/land.jpg') imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) def empty(a): pass # ------- CREATE TRACKBAR -------…
-
0
votes0
answers77
viewsOpencv with Python error occurs "Assertion failed"
I recently started working with Opencv in Python. Well, I’m making a code here and, when compiling, gives the following error: Ocorreu uma exceção: error OpenCV(4.4.0)…
-
0
votes0
answers55
viewsHow to stop a for inside a while (Python)
I’m doing a facial recognition so I’m using a while to process the video and inside the while has 3 for and inside one of them where I left a comment "#STOP HERE" and where I need a stop because…
-
0
votes1
answer327
viewsNameerror: name 'pytesseract' is not defined
I am using the Pytesseract and Opencv libraries to print a text from an image, but when trying to run the script it gives the following error: img_text = pytesseract.image_to_string(img)…
-
0
votes0
answers22
viewsDoubt MATLAB code for Opencv C++
Good evening, everyone! I would like some help in relation to passing a code that is in Matlab to opencv c++. I’m trying to do some operations with rgb channels, but Thresh’s value is not the same -…
-
0
votes0
answers56
viewsKnow the radius of the circle using the python cv2 library
I need to find the radius of the circle using the cv2 library, I have the following code: What he does is circle where he finds circles within the parameters I set, now I want to know the radius of…
-
0
votes0
answers34
viewsWith the removal reflection of a red image (opencv)
I am working on an image and I want to separate the white part (marbling) from the red part (meat), but in the image there is noise, nothing more than reflections on the image. I managed to apply…
-
0
votes2
answers60
viewsDoubt in python with Opencv
Hello, I need to display a certain area of the image with the borders, using the Canny, and display it on top of the image itself, as in the example below. My code displays the selected area and…
-
0
votes0
answers8
viewspython: cv2.error "NULL window Handler" in linux Mint
I’m running a script to learn how to use trackBar in Opencv within Linux Mint. The problem is that sometimes I run and it works normally, sometimes it gives a "Null window Handler" error and other…
-
-1
votes1
answer1698
viewsImage recognition/icone/figure on own python computer screen
I’m starting a study on image recognition, I got to work with Opencv I did some basic tests of face recognition and some objects that already come in the library, I would like to capture the screen…
-
-1
votes1
answer77
viewsError saving an image obtained by Opencv
Directory where I need to save Banco-de-Faces\nome Directory where he is saving: Banco-de-Faces My code: cv2.imwrite("Banco-de-Faces\\" + nome + str(framesObtidos) + ".png", imagemRosto) My program…
-
-1
votes1
answer301
viewsCapture images to create a database
import cv2 import numpy as np classificador = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") classificadorOlho = cv2.CascadeClassifier("haarcascade_eye.xml") camera =…
-
-1
votes1
answer74
viewsMosaicing in Python or C++?
I am developing a program that, in the future, I intend to transform into app for android. I’m developing in Python, my idea was to use kivy to develop the entire app. In the current step I am…
-
-1
votes1
answer136
viewsHow to unify display windows?
Good afternoon, I’m using 2 cameras in a project, but when I run the code it opens in two different windows, I’m trying to make the two images open in the same window... Can someone help me? Thank…
-
-1
votes1
answer124
viewsCapture python libpng Warning
I’m trying to treat a huge number of images with opencv python The vast majority will be despised, so I would like to capture the Warning messages from opencv to be able to treat/despise these…
-
-1
votes2
answers139
viewsHow to open a list of images with Opencv?
I’m trying to open images and show them on screen from a directory called 'Photos' with various images . jpg, but when the windows open they simply do not load the images and the interpreter does…
-
-2
votes1
answer1065
viewsHow to resolve module error not found? (Installing opencv-python)
I installed opencv-python by Anaconda, but when I try to import it the error is presented: DLL load failed: Não foi possível encontrar o módulo especificado. Any idea?…
-
-2
votes1
answer76
viewsHow to create a script on Ubuntu
I need to make a script to run the command below on the terminal several times: opencv_createsamples -img toras/toras_00001.jpg -bg negativas/negativas.txt -info positivas1/positivas1.txt -maxxangle…