Category "opencv"

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_

OpenCV MP4 Creation

I've been trying to trying to write MP4 video files using OpenCV, in python. AVI creation works fine, both on linux and windows, when I use both: out = cv2.Vi

Converting an image from Cartesian to Polar - Limb Darkening

import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread('C:\\Users\\not my user name\\Desktop\\20140505_124500_4096_HMIIC.jpg', 0)

How to use the OpenCV c++ with VSCODE

Base on this video https://www.youtube.com/watch?v=l4372qtZ4dc I am trying to use OpenCV in vscode but I canot include the, .lib files what should I do main.

Check if an image contains blue pixels

I have this image: And I'm trying to write a function in Python that will return True if the image contains blue pixels, or False otherwise. That image is ju

Difference between absdiff and normal subtraction in OpenCV

I am currently planning on training a binary image classification model. The images I want to train on are the difference between two original pictures. In ot

Opencv : How to remove rectangle black box without removing any other characters

I would like to remove a rectangle black box from the below image. I do some preprocessing operation to keep the upper top of the image only. My problem with

OpenCV detect towel margins

What would be the best method (using python and OpenCV) of finding the lowest corner ( not edge ) of towel in this images? Also, the towel color can be differen

PPF 3D Models Matching OpenCV C++

I am developing an application that: Reads 7 model files and trains a PPF 3D Detector; Reads a scene file and try to match with the detector; Store the resu

LibTorch with OpenCV: version GOMP_5.0 not found

I'm trying to use OpenCV and LibTorch in the same project. Libtorch is installed in /usr/include/libtorch, downloaded from the PyTorch website. I'm using the cx

Cannot find module cv2 when using OpenCV

I have installed OpenCV on the Occidentalis operating system (a variant of Raspbian) on a Raspberry Pi, using jayrambhia's script found here. It installed versi

Count lines in image

I am planning to use Opencv on Raspberry pi 3 with camera to count lines in the following image It will be used in machine which produce threads. If one (or m

Image Search using Image Similarity Measures

I am working on a project which is image searching engine. The logic behind is that there will be some images stored in a database and the user will input a new

Python OpenCV access webcam maximum resolution

I am trying to acquire images from my webcam using a python code that imports OpenCV. The code is the following: import sys sys.path.append("C:\\opencv\\build

Why if I use a QImage instead of imread I get a null pixmap.?

I try to execute the next code, But If I use a file Image the code run well but If I tried to use a QImage I get the next error. In the same way I get the error

Draw ellipses on people using Expectation Maximization with OpenCV

I have a few doubts about how to approach my goal. I have an outside camera who is recording people and I want to draw an ellipse on every person. Right now wha

Creating augmented reality using Python, OpenCV and SLAM

I was wondering if I could build an augmented reality system in Python using OpenCV and SLAM. If so, do you have any tutorials or documentation that you could r