opencv

opencv: execution halting at double pointer arithmetic for image pixel access

A single channel image is my input. ( defalut IPL_DEPTH_8U) I am multiplying each pixel of my input image with scalar floating point numbers like 2.8085 (as a part of my algorithm). So this needs me to increase the depth and change the image type to IPL_DEPTH_64F But whenever I am trying to change my image datatype to IPL_DEPTH_64F an...

cvConvertScale not Working as Expected ??

I am running the simple code below and expecting the depth of o to become 32. But it still remains 8. Am I missing something ??? IplImage *o = cvCreateImage(cvSize(100,100), 8,1); IplImage *n = cvCreateImage(cvSize(100,100), 32,1); cvConvertScale(o,n,1.0,0.0); printf("The depth of o is %d\n", o->depth); printf("The dep...

Application which tracks different color blobs from video feed from webcam

I wanted to create an application which tracks four different colored blobs from video feed from the webcam and outputs the x and y co-ordinates of the blob. I would prefer if I code this in Visual C++ but if that is not the best language to use I wouldn't mind exploring some other language. I also stumbled upon OpenCV which seems to be ...

OpenCV Image Processing -- C++ vs C vs Python

I was thinking of trying OpenCV for a project and noticed that it had C, C++ and Python. I am trying to figure out whether I should use C++, C or Python -- and would like to use whatever has the best OpenCV support. Just from looking at the index page for the various documentation it looks like the C++ bindings might have more featur...

Error when building OpenCV on my mac: 'Py_ssize_t' issues

I've been following the instructions here: http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port, and have just finished the make -j8 step. Although the make completes to 100%, I am getting errors make[2]: *** [interfaces/python/CMakeFiles/cvpy.dir/cv.o] Error 1 make[1]: *** [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2 make: ...

How to set up OpenCV 2.0 on Visual C++?

I am trying to setup OpenCV 2.0 for Visual C++ Express but I can not do it successfully. I have looked all over the internet and have tried the official guide. Can someone guide me to a tutorial that worked for them for OpenCV 2.0. Thanks in advance. ...

Configuring OpenCV with visual c++ 2008

I am new to OpenCV , i was following http://www.hanckmann.net/?q=node/17 tutorial to configure openCV, after configuring openCV , i get this error, could someone help me on this. this is where it explains how to configure openCV http://opencv.willowgarage.com/wiki/VisualC++ and this is the example code i was using. it gives the error ...

Porting functions from OpenCV

I want to copy some functions from OpenCV library to my embedded application. Rewriting them to use standard data structures is really painful, so I tried the following: bfin-elf-g++ -c cvcalibration.cpp `pkg-config --cflags opencv` I did not get any missing header errors but got lots of error: expected unqualified-id before numeric...

OpenCV: how to rotate IplImage?

I need to rotate an image by very small angle, like 1-5 degrees. Does OpenCV provide simple way of doing that? From reading docs i can assume that getAffineTransform() should be involved, but there is no direct example of doing something like: IplImage *rotateImage( IplImage *source, double angle); ...

Trying to write a video file using OpenCV

Hi , I’m trying to use OpenCV to write a video file. I have a simple program that loads frames from a video file then accepts to save them At first the cvCreateVideoWrite always return NULL. I got a answer from your group saying it returns separate images and to try to change the file name to test0001.png, this worked. But now the cv...

Qt and OpenCV 2.0 integration problems

Hi all, I have a Qt application that uses OpenCV for image processing. Everything was working fine with OpenCV 1.0 but when I upgraded to OpenCV 2.0 it started crashing. I noticed that it only crashes whenever OpenCV functions are called inside Qt slots. For instance, the following slot: void TestClass::on_testButton_clicked() { I...

Using OpenCV 2.0.0a with dev c++

OpenCV 2.0.0a is very different to the older version of OpenCV and so is very different to setup. I have tried to set it up for Visual C++ Express 2008 but to no avail so I wanted to ask whether anyone has got it to work on Dev C++ and if yes can they tell me how. ...

What does this OpenCV exactly program do?

I want to know exaclty what this program does: #include <iostream> #include <cv.h> #include <cxcore.h> #include <highgui.h> using namespace std; int main(int argc, char* argv[]) { printf("Hello world\n"); IplImage *img = cvLoadImage("C:/Program Files/OpenCV/samples/c/lena.jpg"); // Create a window cvNamedWindow( "result", CV_WINDOW_AUTO...

OpenCV match template not scoring well

I am trying to do some image matching using OpenCV and am using the cvMatchTemplate function. I took a sample image and then cut part of it out as a template and then tried to match it. When I do this, the cvMatchTemplate function finds the subimage correctly and gave it the best score. The problem is that the score is lower than I wo...

EmguCV - how to detect and track a color

hey everybody :-) i want to make application using EmguCv (C# language) to detect a color range from user input and keep tracking it is moves and position, so can some body help me? or if there is demo application doing thins that is will be good. thank u and waiting the answer ...

Finding the spread of each cluster from Kmeans

Hello, I'm trying to detect how well an input vector fits a given cluster centre. I can find the best match quite easily (the centre with the minimum euclidean distance to the input vector is the best), however, I now need to work how good a match that is. To do this I need to find the spread (standard deviation?) of the vectors which ...

OpenMP with OpenCV on OS X

I'm having a problem getting OpenMP and OpenCV to play nicely with a new project in Xcode. The project in its current state does nothing but grab frames from the default camera and put them into a window. This functionality works. However, I would like to grab the frames in a separate thread, and I was hoping I could get some experience ...

dylib on Snow Leopard "file is not of required architecure"

I have compiled opencv on snow leopard and it says it compiled correctly, however when I try to compile my sample program against it, I get output like: g++ -o tm_scons template.o -L/opencv/opencv/build/lib -lcxcore -lcv -lcvaux -lhighgui -lml ld: warning: in /opencv/opencv/build/lib/libcxcore.dylib, file is not of required architecture...

How to access image Data from a RGB image (3channel image) in opencv

I am trying to take the imageData of image in this where w= width of image and h = height of image for (int i = x; i < x+h; i++) //height of frame pixels { for (int j = y; j < y+w; j++)//width of frame pixels { int pos = i * w * Channels + j; //channels is 3 as rgb // if any data exists if (data->imageD...

How to access a RGB image data

I want the data at pixel to be compared with the colour and then i want to find contour then take centroid points of the contour ,so i am using like this to find countourdata am i wrong at this statement int pos = i * w * Channels + j; //channels is 3 as rgb // if any data exists if (data->imageData[pos]>0) Code i...