Category "opencv"

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_

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