opencv

Face detection and comparison

I'm running a small research on face detection and comparison for my article. Currently, I'm using rapid face detection based on haar like features based on OpenCV cascade (I'll implement learning later). The next step is making face comparison. Are there any well know algorithms? It'll be great, if there are some C# codes, explaining t...

What is the memory structure of OpenCV's cvMat?

Imagine I have the following: CvMat* mat = cvCreateMat(3,3,CV_16SC3) This is a 3x3 matrix of integers of channel 3. Now if you look at OpenCV documentation you will find the following as the deceleration for cvMat: typedef struct CvMat { int type; int step; int* refcount; union { uchar* ptr; short* s; int* i; float...

Fill the holes in OpenCV

I have an edge map extracted from edge detection module in OpenCV (canny edge detection). What I want to do is to fill the holes in the edge map. I am using C++, and OpenCV libraries. In OpenCV there is a cvFloodFill() function, and it will fill the holes with a seed (with one of the location to start flooding). However, I am trying to...

In OpenCV what is CvMatND structure used for?

I've noticed in the O'rielly book that when using histograms it refers to a cvMatND data structure. However, the book does not explain what this data structure is used for and how its different then cvMat. Can someone please explain this to me? Thank you. ...

How/Why is imagedata stored as char - OpenCV

I'm a tad confused. I am just getting started with OpenCV and its image data is pointed to by a char pointer. I can't quite work out how that works considering the actual data itself could be any number of data types, e.g. uint, float, double. As far as I knew, a pointer had to be of the same type as the pointer it represents. It's p...

"error: too few arguments to function"

I have a C program called opencv2.0 function : cvSaveImage( out_img_name, img); Compiler gcc reports that too few arguments to function cvSaveImage The prototype of cvSaveImage in highgui.h is CVAPI(int) cvSaveImage( const char* filename, const CvArr* image, const int* params CV_DEFAULT(0) ) After I change my call to be ...

How to solve QPixmap::fromImage memory leak?

Hello everyone! I have a problem with Qt. Here is a part of code that troubles me: void FullScreenImage::QImageIplImageCvt(IplImage *input) { help=cvCreateImage(cvGetSize(input), input->depth, input->nChannels); cvCvtColor(input, help, CV_BGR2RGB); QImage tmp((uchar *)help->imageData, help->width, help->height, help->w...

Displaying OpenCV iplimage data structures with wxPython

Here is my current code (language is Python): newFrameImage = cv.QueryFrame(webcam) newFrameImageFile = cv.SaveImage("temp.jpg",newFrameImage) wxImage = wx.Image("temp.jpg", wx.BITMAP_TYPE_ANY).ConvertToBitmap() wx.StaticBitmap(self, -1, wxImage, (0,0), (wxImage.GetWidth(), wxImage.GetHeight())) I'm trying to display an iplimage captu...

Testing complex datatypes?

What's are some ways of testing complex data types such as video, images, music, etc. I'm using TDD and wonder are there alternatives to "gold file" testing for rendering algorithms. I understand that there's ways to test other parts of the program that don't render and using those results you can infer. However, I'm particularly interes...

Open CV + Visual Studio 2008 weird Debugging problem

I've recently installed OpenCV2.0 under Visual Studio 2008 professional edition, built the libraries, dll-s and got everything working but when I run the first example program: #include “highgui.h” int main( int argc, char** argv ) { IplImage* img = cvLoadImage( argv[1] ); cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE ); cvShowImage( “E...

What is the best method for object detection in low-resolution moving video?

I'm looking for the fastest and more efficient method of detecting an object in a moving video. Things to note about this video: It is very grainy and low resolution, also both the background and foreground are moving simultaneously. Note: I'm trying to detect a moving truck on a road in a moving video. Methods I've tried: Training a ...

IOError with Python and OpenCV

Hello, i want to do some OpenCV Basic Operations using Python. My Problem is that the Pythoninterpreter says that the file i want to open with cv.LoadImage() dont exists. But as you can see in my code and the and the Interpreter Output this file exists and the Program should be able to read it. Likly the answer is simple (im new at Pyt...

converting image into matrix and vice versa???

Please tell me how to convert image into matrix of pixels and vice versa...using opencv?? ...

mouse in opencv

i need to compare two images together if any change happened mouse point to it how to use mouse in opencv using visual c++ but i can't understnd the function can any one simplefied it to me thnx ...

How to smooth a histogram?

Hi, I want to smooth a histogram. Therefore I tried to smooth the internal matrix of cvHistogram. typedef struct CvHistogram { int type; CvArr* bins; float thresh[CV_MAX_DIM][2]; /* for uniform histograms */ float** thresh2; /* for non-uniform histograms */ CvMatND mat; /* embedded matrix header for array his...

Python/OpenCV: Converting images taken from capture

Hello. I'm trying to convert images taken from a capture (webcam) and do some processing on them with OpenCV, but I'm having a difficult time.. When trying to convert the image to grayscale, the program crashes. (Python.exe has stopped working) Here is the main snippet of my code: newFrameImageGS = cv.CreateImage ((320, 240), cv.IPL_D...

Weird behaviour of custom C# bindings, they run only on my dev environment, nowhere else!

Hello, following my post "Writing a C++ DLL, then wrapping it in C#.", i managed to create a C++ DLL and wrap it in C#, and everything works smooth... Well, only on my dev machine. While the code compiles on other machines too, i just won't run. Some background. I create a dll that uses cvblobslib that is based on opencv. I compiled all...

OpenCV Neural Net Weights

Hi, I am trying to run a NN learner on same data in 2 different programs. Although everything (the data and parameters) are same and also I manually set initial weights to same value (0), I result in different weights in 2 programs. Interesting thing is running each program consecutively doesn't change independent results. What I debug a...

opencv multi channel elemnt access

Hi All, I'm trying to learn how to use openCV's new c++ interface. How do I access elements of a multi channel matrix. for example: Mat myMat(size(3, 3), CV_32FC2); for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { //myMat_at_(i,j) = (i,j); } } What is the easiest way to do this? Something like cvSet2D...

how to get a blob's Skeleton using opencv ?

Hi Guys, In my app, I need to track the motion of the human arms. Now I can get the whole blob of a human body but I don't know how to seperate "arms" from the blob . Some guy in some where said that "skeletonlization" may be used to solve my problem. so I'd like to know how to get the skeleton of a blob ? off course, If you have ot...