Category "opencv"

Video Streaming from IP Camera in Python Using OpenCV cv2.VideoCapture

I am trying to get video stream in python from IP camera but i am getting an error. I am Using Pycharm IDE. import cv2 scheme = '192.168.100.23' host = schem

YoloV5 Image identification and Tracking -How to Draw a A continuous line connecting the previous point and current point until the object is in frame

I am trying to Detect human objects and balls from video input, I am able to identify both objects and draw a square box around the identified objects, but how

How to use PYZBAR to decode QR code OpenCV - Python?

I'm using python PYZBAR to decode QR code captured by real time cam. decode(input_frame) Naturally the output I get is as follows [Decoded(data=b'DATA', type='

Storing RTSP stream as video file with OpenCV VideoWriter

I'm developing a Python module, with OpenCV, that connects to an RTSP stream to perform some preprocessing on the video (mostly, reducing fps and resolution), a

Python OpenCV streaming from camera - multithreading, timestamps

I ran simple python script on Raspberry Pi 3. This script is responsible to open video device and stream data (800x600) to HTTP endpoint using MJPEG. When I rec

Is there a way to convert numpy array to PNG/JPG... payload without saving it as a file?

Suppose there exists a numpy array, data. I am trying to do the equivalent of the following cv2.imwrite(filename, data) with open(filename, 'rb') as fp: da

Interactive labeling of images in jupyter notebook

I have a list of pictures: pictures = {im1,im2,im3,im4,im5,im6} Where im1: im2: im3: im4: im5: im6: I want to assign the pictures to labels (1,

Write video in Azure Function

I have videos that i want to process in Azure function (Service Bus Queue trigger). When new message arrives and function gets called i do the following: Downl

Python OpenCV - Extrapolating the largest rectangle off of a set of contour points

I'm trying to make an OpenCV detect a bed in the image. I am running the usual Grayscale, Blur, Canny, and I've tried Convex Hull. However, since there's quite

cannot unpack non-iterable numpy.float64 object python3 opencv

I am getting this error and cant understand why the issue is appearing. Below will be the code and error. The result of the last printable workout [-8.545822

After deployment Cv2 can not access the webcam

I need help.   I was building facial recognition using Flask. In the local browser, it was working fine but after deployed into AWS EC2 instance Ubuntu ser

ValueError: cannot reshape array of size 921600 into shape (224,224,3)

I trained a model using Transfer Learning(InceptionV3) and when I tried to predict the results it shows: ValueError: cannot reshape array of size 921600 into sh

error: ‘selectROI’ is not a member of ‘cv’

I use Ubuntu 18.04 and opencv3.4.0(with 3.3.1contrib), when i try to compile my project, these errors occured: /home/sunyq/SiamMaskCpp/demo.cpp:98:24: error: &l

Fast method to retrieve contour mask from a binary mask in Python

I want to make a realtime application, which involves finding the edges of a binary mask. I need something fast, without GPU if possible, that runs hopefully be

imread returns None, violating assertion !_src.empty() in function 'cvtColor' error

I am trying to do a basic colour conversion in python however I can't seem to get past the below error. I have re-installed python, opencv and tried on both pyt

Detecting camera motion with opencv

I am working on drone stabilization close to walls using a camera. For this to work I need to extract the motion the camera makes relative to the wall. For now

Convert YUV2 (YUYV) frames to RGB without use of OpenCV

I am trying to convert YUV2 frames generated by V4l2 to RGB. I was able to convert YUV2 to RGB cv2.cvtColor(im, cv2.COLOR_YUV2RGB_YUYV) using OpenCV. Currently

Python OpenCV Error: Current thread is not the object's thread

I'm having an error running simple code using cv2 module. It's just: import cv2 img = cv2.imread('sudoku.png',0) cv2.imshow('image',img) And it fails with

OpenCV VideoWriter using ffmpeg with "Could not open codec 'libx264'" Error

I am new to OpenCV, and I want write Mat images into video using VideoWriter on Ubuntu 12.04. But when constructing VideoWriter, errors came out. It seems tha

warning can't open/read file: check file path/integrity

images_per_class = 80 fixed_size = tuple((500, 500)) train_path = "dataset/train" train_labels = os.listdir(train_path) for training_name in train_