Questions tagged as 'opencv'

1
answer

How to right an image in python

I've been looking for a way to straighten a scanned image, more accurate a form, I need a function that automatically straighten it, I've tried with import numpy as np import numpy as np import argparse import cv2 img = cv2.imread('D:/Consecu...
asked by 27.02.2018 / 15:35
1
answer

because it works when importing cv2 and cv does not work when I import it

I'm trying this import numpy as np import cv2 #Cargar los dos videos video1 = cv2.VideoCapture('video1.mov') video2 = cv2.VideoCapture('video2.mov') #Guardar las dimensiones del primer video ancho1 = int(video1.get(cv2.cv.CV_CAP_PROP_FRAME_W...
asked by 10.07.2017 / 01:24
1
answer

Drawing in OpenCV and Python

I'm doing an application in Python, which using the OpenCV library and passing it the height and width, I create a RGB image with the past dimensions and in which I can draw and gurantee later. I'm trying something like this: import numpy a...
asked by 21.02.2018 / 17:56
1
answer

Generating a shared library of a project in c ++ with OpenCV

I have a C ++ code in visual study in which I use OpenCV to perform certain functions. So far I have had to generate a DLL to integrate it into Unity, but now I have to create a .so to integrate it into Unity and then create an Android applicati...
asked by 29.09.2017 / 12:19
1
answer

Error in inRange () "TypeError: unknown is not a numpy array"

I am doing a motion detector program but I have an error in the following part of the code: rang = cv2.inRange(flow,20,255) Error: TypeError: <unknown> is not a numpy array Annex code: import cv2 import numpy as np cap = cv2...
asked by 26.03.2017 / 11:32
1
answer

Save depth video recorded with kinect360

I'm trying to save a video segment from the depth image of a 360 kinect, but when I watch that video, I get an error saying that the stream could not be demultiplexed. that I am unable to identify its origin. I have tried to change the fps and t...
asked by 22.03.2018 / 13:09
1
answer

C ++ distance algorithms with Opencv

Hello, I have this code in c ++. Its only entry is a totally white image with a black dot of a pixel in the center ~ (300x300), the image is 600x600.png located in a folder img / The problem is that I try to make the CDA 3x3 link based o...
asked by 07.02.2018 / 17:21
1
answer

TypeError: Image data can not be converted to float

I have a problem with the following code: import cv2 import matplotlib.pyplot as plt img1 = cv2.imread('images\colombia_city.jpg') img2 = cv2.imread('images\colombia_city_2.jpg') #img = img1 + img2 #img = cv2.add(img1,img2) abc = cv2.addWei...
asked by 18.02.2018 / 02:50
1
answer

Problem using cv :: Imread

I am writing a code to read all the images in a folder and then write the information of the images in a binary all together. The problem is that when I use the function cv::imread the field .data of the cv::MAT always remains null...
asked by 16.05.2017 / 13:37
1
answer

How to detect if one color is similar to another in opencv?

The most probable thing is that the wording of the question is not correct, but I can not think of how to write it. Adobe Premiere Pro has the green screen option and you can tell it to erase the color you selected and all the similar colors wit...
asked by 02.01.2019 / 00:01