Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Browsing all 2088 articles
Browse latest View live
↧

Angle and Scale Invariant template matching code for python

Hello, I found angle and scale invariant template matching code, but not for python language... Have anybody got it? I will be very grateful !

View Article


Determine a piece of image is in large image, if there - how much Percentage

I am trying to find a piece of image in large image. I used template matching it always give coordinate if image is there or not there. I want to find the percentage occurrence of piece of image in...

View Article


Image data cannot convert to float

The error is for the following line in the code:- plt.imshow(img3), plt.show() Please find the attachments. One of the two attachments contains the source code, whereas the second contains the...

View Article

Setup.py for python bindings?

This is somewhere between a question and a feature request. We have a handful of requests for opencv to be installed on our computational cluster which we've done, however getting it to import into...

View Article

AttributeError: 'module' object has no attribute 'face'

Hi, I compiled the opencv with contrib modules in the cmake GUI and everything seems ok, but when I try to use face module (cv2.face) I receive the following message:> AttributeError: 'module'...

View Article


image fusion in opencv python

i am doing a project on image fusion,ie.,collecting frames and fusing those frames . I was asked to code in Python language which is new to me. can i get some suggestions regarding how to get a video...

View Article

Python OpenCV VideoWriter set PixelFormat

Hello, I'm using OpenCV Python binding v3.1.0 with Python v3.4 and I have troubles writing AVI video. There is a codec named UT Video which it is implemented in ffmpeg and you can read and write UT AVI...

View Article

Template matching python error

Hello, I would like to use this code in my programme: img_rgb = image img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) template = roi w, h = template.shape[::-1] res =...

View Article


Detect an object on known color on a green surface?

On a white surface, the object can be detected by providing a color threshold to filter the image. Then the image is converted gray scale and passed through a medianBlur + Canny filter. The green...

View Article


OpenCV python: face crop program

I was just experimenting with some code and I didn't do what I think it should of done (at least it worked). So the code below was meant to identify faces saved in an "input" folder. Then it would...

View Article

Difference between Java and Python

Hello! I have a strange problem and I am not able to resolve it myself. I am trying to do a 3D camera pose estimation using `findChessboardCorners()` and `solvePnPRansac()`. It really is a simple...

View Article

Triangular mesh draw having coordinates

Hello! I have a mesh in a stl file ( https://dl.dropboxusercontent.com/u/710615/stlMidpoint.stl ) With this code : from stl import mesh import numpy as np import matplotlib.pyplot as plt from...

View Article

How to perform intersection or union operations on a rect in Python?

I saw a question that is solved by using `&` (intersection) on rectangles http://answers.opencv.org/question/67091/how-to-find-if-2-rectangles-are-overlapping-each-other/ I am trying to do the same...

View Article


Fail with Stitcher and Python

I'm trying to learn how to use OpenCV with Stitcher Windows 7 Python 3.4.1 OpenCV 3.1.0 precompiled import cv2 im1 = cv2.imread('1.jpg') im2 = cv2.imread('2.jpg') stitcher = cv2.createStitcher()...

View Article

solvePnPRansac gives unexpected results

I'm running into a spot of unexpected behaviour from solvePnPRansac, one would expect if you calculate the rotation and translation vector using a dataset from 3D and 2D datapoints which were matched...

View Article


Sizes of input arguments do not match () in cvCalcOpticalFlowBM

hello i am trying to Implement the opticalflow algorithm with block matching cv.CalcOpticalFlowBM(), but when i run i have error ***OpenCV Error: Sizes of input arguments do not match () in...

View Article

Parameters of detectMultiScale using python

I am not able to understand the parameters passed to detectMultiScale. I know that the general syntax is detectMultiScale(image, rejectLevels, levelWeights) However, what do the parameters...

View Article


Broken python bindings with createEigenFaceRecognizer

When Trying to use the createEigenFaceRecognizer() and subsequent train(images, lables) method it throws an error: cv2.error: matrix.cpp:357: error: (-215) r == Range::all() || (0 <= r.start...

View Article

Faster RGB to Grey conversion Python.

I am using "cv2.cvtColor(rgb_image, cv2.COLOR_BGR2GRAY)" to convert grey it is taking 0.801 seconds to convert. I am developing a real-time application where I convert RGB image to grey and perform...

View Article

Unable to detect black pixels ?

I am reading a picture to color in red all its black pixels (the background only is black): import numpy as np import cv2 second=cv2.imread('second.png') for i in range(second.shape[0]): for j in...

View Article
Browsing all 2088 articles
Browse latest View live