Category "opencv"

GStreamer warning when running OpenCV on Ubuntu

I'm trying to get a script running on my raspberry pi (Ubuntu system). Right now, I was just refreshing myself on the basics of opencv, since it's been a little

Importing OpenCV - import cv2 or cv3, and why does the directory matter?

I am trying to use OpenCV for Python 3 for the first time. To install, I simply typed "pip3 install opencv-python" into the terminal. When I do this, I see in F

Open-Cv dnn error for python while using Yolov3. Using open-cv ver(4.2.0)

cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:677: error: (-212:Parsing error) Unknown layer type: in functi

Pipe and OpenCV to FFmpeg with audio streaming RTMP in Python

I'm trying to stream FFmpeg with audio. I will show my code below: Import module import subprocess as sp Create variables rtmpUrl = "rtmp://a.rtmp.youtube.com

'no module named cv2' import error on pytorch

I am currently studying Pytorch and trying to use the cv2 module. I am using Jupyter notebook and Windows. I have installed opencv like this: !pip install op

When applying Gaussian filter the image becomes dark

When I run the following code the output result is blurred but the image gets darker as I increase the value of sigma. Imports import numpy as np import cv2 i

Concatenate 2 videos into 1 using Python

I want to write a program that monitors and tracks objects in 2 different videos using openCV in python (cv2). I would like to Merge the two videos into 1 vide

Ipython cv2.imwrite() not saving image

I have written a code in python opencv. I am trying to write the processed image back to disk but the image is not getting saved and it is not showing any error

How to convert NumPy array into OpenCV (cv2) image

I have attached the image of the code here for better understanding, this would help you figure out what I am actually doingI am working on a project in which I

load/save multiple images from/in a directory - opencv c++

i want to load a lot of images (not sequential names though) from a directory. edit them and then save them in a different directory with their original names i

cv2 python has no imread member

I pip installed OpenCV-python. The installation seems to be fine and I tested it out on the python IDLE. It ran without any problems. I've been trying to run it

img is not a numpy array, neither a scalar

I try combine haar cascade code with histogram code I try this code : import cv2 import numpy as np from matplotlib import pyplot as plt #Cascade jeruk jeru

How to fill a polygon in OpenCV?

The Python code given below draws a triangle, how can I fill it with a color inside? Or another easier way to draw a triangle in OpenCV? pts = np.array([[100,3

OpenCV Python with CUDA on Windows: DLL Load Failed

I am trying to get OpenCV python bindings to work with CUDA, but when I run import cv2 I get the following error: OpenCV loader: os.name="nt" platform.syst

How to convert PNG to JPG in Python?

I'm trying to compare two images, one a .png and the other a .jpg. So I need to convert the .png file to a .jpg to get closer values for SSIM. Below is the code

Keep bins between 5% and 95% of a histogram in OpenCV/Python

I am intending to skip some histograms of an image in the extreme points of the distribution of any gray image. The extreme points to the left are represented b

How to get the location of all text present in an image using OpenCV?

I have this image that contains text (numbers and alphabets) in it. I want to get the location of all the text and numbers present in this image. Also I want to

How to automatically determine the background color of an RGBA image with highest contrast?

Background I have a bunch of RGBA images. Imagine icons, logos or similar images that I would like to display. These images can be of any color. Please also not

Opencv rotate camera mode

I want to rotate the camera view by 90 degree clockwise with an interrupt button. But the button's state goes back to it's default state when I click once and u

cv2.cvtColor(img,cv2.COLOR_BGR2RGB) not working

I am trying to create a screen recorder using mss and Opencv in python, the video I am capturing has a very different colours than original computer screen. I t