All Questions
48 questions
0
votes
4
answers
2k
views
No such file or directory: 'B.npz' while compiling 'pose_estimation.py' to draw 3d cube using Opencv
I want to draw 3D coordinate axis (X, Y, Z axes) on a chessboard’s first corner using Opencv and python.
But when I run this following code,
import cv2
import numpy as np
import glob
def draw(img,...
0
votes
0
answers
197
views
compile the following opencv python source code
The following link contains the source code to create some 3D effects in images using Opencv & python. But the problem is I can't summarize the fractional codes. I need whole source code so that I ...
3
votes
2
answers
4k
views
How to find number of clusters in a image?
Find the number of clusters in this image:
I'm trying to find the number of cluster in this image. I tried openCV morphologyEx and erode but can't seem to get a single pixel for each cluster. Please ...
0
votes
1
answer
1k
views
Video recorded with opencv is accelerated
I trying to record a 30 seconds video, but the output video are with just 15 seconds and accelerated.
import numpy as np
import os
import cv2
import time
filename = 'video.avi'
frames_per_second = ...
-1
votes
1
answer
1k
views
AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer' in python 3.6.4 and opencv 3.4
I used different types of things and I need this to work in 3.6 Python. i also try
roc = cv2.face.LBPHFaceRecognizer_create() but getting the same error but this time with face module. Need help.
The ...
2
votes
0
answers
3k
views
Understanding opencv's decomposeHomographyMat outputs
I'm trying to find the angle required to move my camera so it's directly in front of an object. If my camera is looking at the object at a 30 degree angle from the left, then my script should return ...
1
vote
0
answers
212
views
I want to open bin files that have been saved in opencv into python?
SIFT keypoints in opencv have been saved in a .bin file. I want to load the file into Python and use them. The total number of keypoints is 6022451 from 7865 images. I followed the link, however, ...
22
votes
4
answers
21k
views
Python OpenCV video format play in browser
I'm trying to create a video from a sequence of images and display it in a browser but from some weird reason no matter what codec or file format I use I get the following error:
No video with ...
0
votes
1
answer
168
views
Upgrading code that uses OpenCV2.4
I'm trying to upgrade python code that was programed for OpenCV 2.4 to be used with OpenCV 3.3.
I found a problem with the flags of the function cv2.calcCovarMatrix, as I show next.
The code is this ...
2
votes
1
answer
23k
views
libpng warning in python opencv2
I managed to install and successfully import cv2 on a linux(Debian) virtual machine, using python 2.7. I tried to take a picture using my webcam with the following piece of code:
import cv2
from ...
0
votes
0
answers
660
views
Python 2.7/Opencv3.0: Number of centroids is incorrect using cv2.connectedComponentsWithStats.
I used cv2.connectedComponentsWithStatsin Python 2.7 to find out centroids of three blobs in a binary image. (Image is given below In code it is img3).
In this image, three white bolbs are present so ...
0
votes
1
answer
588
views
Forever Bouncing Python Rocket Ship when using OpenCV
The Python version I'm using is Python 2.7.13 on MacOS Sierra, and I'm also using OpenCV 3 with Python.
while True:
frame = read_stream()
# some manipulation on `frame`
cv2.imshow("Screen"...
1
vote
2
answers
5k
views
Opencv fillPoly() not working for greyscale (1-channel) images
so I am using opencv to modify pixel values on a 1-channel image.
I create the blank image using
curr = np.zeros((660,512, 1))
then execute the code:
for r in regions:
cv2.fillPoly(curr, r, [190]...
1
vote
1
answer
2k
views
Live Heatmap generation in OpenCV python
I want to generate heatmap while the video is playing basically i want to show the crowd density. I have no idea how to do this i am doing this now it calculates the heatmap after processing the whole ...
1
vote
2
answers
1k
views
Python : Testing Video in OpenCV using python
I just installed opencv3 on my macOS sierra 10.12.3. I tried some examples and it worked out but when I try the following example it throws me some exceptions. My python version is 2.7. I cannot ...