opencv

How to load image data from resource bitmap file for directshow filter ?

I need put one bitmap image to my directshow filter. Then user can use this bitmap image and do not care where is it. First, I import this bitmap file into resource bundle, and get one IDB_BITMAP1. Then, I need to read this IDB_BITMAP1 using opencv cvLoadImage or some windows image API to load this image into buffer. So question is h...

compiling OpenCV on Mac OS X Snow Leopard gets error: ‘Movie’ does not name a type

When I'm trying to compile OpenCV on Mac OS X Snow Leopard I recieve an error highgui/cvcap_qt.cpp:76: error: ‘Movie’ does not name a type There is a structure /// Movie state structure for QuickTime movies typedef struct CvCapture_QT_Movie ...

cv.SaveImage in openCV

Hi, I'm trying to learn how to use opencv in python and having some difficulties, and also I'm a newbie at python too. Here is my question : I want to convert a jpg file tp png. Simple and clear. But when I run this code : from opencv import _cv from opencv.highgui import cvSaveImage, cvLoadImage cvSaveImage("bet.jpg",cvLoadImage(...

How to convert a Mat variable type in an IplImage variable type in OpenCV 2.0 ?

Hi all, I am trying to rotate an image in OpenCV. I've used this code that I found here on StackOverflow Mat source(img); Point2f src_center(source.cols/2.0, source.rows/2.0); Mat rot_mat = getRotationMatrix2D(src_center, 40.0, 1.0); Mat dst; warpAffine(source, dst, rot_mat, source.size()); Once I have my dst Mat variable type fille...

Installing OpenCV as php extension under Windows

Could please anyone recommend me a guide/tutorial on how to install OpenCV as php extension under Windows ? ...

Compile OpenCV 2.0 in MinGW and Codeblocks (win)

Hi all, it's a long time since I try to compile OpenCV2.0 in Windows successfully but this has never happened.. (I can compile successfully in Linux) First I installed MinGW with g++, GDB and Code::Blocks.. than I installed CMake and OpenCV2.0 (editing a "cxoperations.hpp" line to #if GNUC >= 4 || MINGW32) I make OpenCV from source "Op...

What sort of acceleration does openCV use ? How can it process so fast ?

I've been using openCV quite a bit lately and I'm amazed at how fast it can process arrays. Is it using a special type of optimization or relying on special features of the CPU ? I'm on an Intel CPU btw. ...

Discrete Curve evolution algorithm

i am trying to implement discrete curve evolution algorithm in c++ do any one help me with psudo code or c code or some simple steps of your understanding ...

subtract one image from another using openCV

How can I subtract one image from another using openCV? Ps.: I coudn't use the python implementation because I'll have to do it in C++ ...

Problem about cvGetSeqElem in opencv - python

Hi, I'm trying to write eye detection in opencv with python but having some problems about cvGetSeqElem. In C we can write : CvRect *face = (CvRect*)cvGetSeqElem(faces, 0); When I'm trying to write this with Python : face = cvGetSeqElem(faces, 0) It returns str, therefore I can't reach x,y positions. Any idea ? ...

Using boost.python to import a method with opencv calls but failing due to symbols not being found after compilation

So I don't have the code right now, as I am not home... but i used the boost library for python in C++ to allow python to access a function called something like loadImageIntoMainWindow(string filepath) in the C++ source code the method calls opencv methods that are imported at the top of the file, I included opencv in my Jamroot file, ...

Does opencv have a function similar to size and bwperim in matlab?

I am new to opencv and good at matlab i want to write equalent of below to opencv [mm,nn]=size(binaryimage); bwperim(binaryimage); Please can any one help ...

Choosing a VS project type (C++)

Hi all, I do not use C++ much (I try to stick to the easier stuff like Java and VB.NET), but the lately I have not had a choice. When I am picking a project type in VS for some C++ source I download, what project type should I pick? I had just been sticking with Win32 Console Applications, but I just downloaded some code (below) that w...

Laplacian of Gaussian: how does it work? (opencv)

Does anybody know how does it work and how to do it using opencv? Laplacian can be calculated using opencv, but the result is not what I expected. I mean I expect the image to be approximately constant contrast at background regions, but it is black, and edges are white. There are a lot of noise also, even after gauss filter. I filter im...

problem with background subtraction

I'm doing background subtraction using opencv. The problem is the foreground object is not always detected correctly. To deal with this I would like to use four or five images, and take their average as the background image. How can I do that? ...

OpenCV's cvKMeans2 - chosing clusters

Hi, I'm using cvKMeans2 for clustering, but I'm not sure, how it works in general - the part of choosing clusters. I thought that it set the first positions of clusters from given samples. So it means that in the end of clustering process would every cluster has at least one sample -> in the output array of cluster labels will be full ra...

EmguCV/OpenCV QueryFrame slow/buffers

We have an application, where we get a message from an external system and then we take a picture, do some processing and return something back to the external system. Doing some performance testing, I found two problems (they are somewhat related). I was hoping someone will be able to explain this to me. 1) Does _capture.QueryFrame() b...

invalid cast from type ‘CvSeq’ to type ‘CvPoint* (How to typecast in Opencv)

i get the error at line below Vertex2 = (CvPoint*)Vertices[I]; //where vertices is cvseq of contour and Vertex2 is cvpoint i get error invalid cast from type ‘CvSeq’ to type ‘CvPoint* how do i solve this ...

cvHaarDetectObjects(): "Stack aound the variable 'seq_thread' was corrupted."

I have been looking in to writing my own implementation of Haar Cascaded face detection for some time now, and have begun with diving in to the OpenCV 2.0 implementation. Right out of the box, running in debug mode, Visual Studio breaks on cvhaar.cpp:1518, informing me: Run-Time Check Failure #2 - Stack aound the variable seq_thread...

Building an OpenCV application with Visual Studio 2008 and running it from another computer

I've made a simple OpenCV application with Visual Studio 2008 and I've built it in both release mode and debug mode.It works fine from my computer but when I try to run it from another computer which doesn't have OpenCV installed or has another version of Visual Studio with OpenCV it doesn't work. How can I make the app work from a comp...