opencv

OpenCV: Drawing on an image

Hello everyone! I am working on a program using the OpenCV library (though I am quite a noob on it). One of the things I need to do is to draw on the image. I looked at the OpenCV drawing functions and they all seem pretty simple (Circle, Line, etc), however the program won't compile! It says this to be exact: error C3861: 'Line': identi...

CUDA - Bus Error

I have been working with CUDA for a while now and started to have bus errors reported on the first attempt to malloc any data to the GPU after working for a short period of time. The only way that i have found to fix this is to restart the machine. The memory should be cleared up automatically but it does not seem to happen if the ap...

iPhone OpenCv build issues

I'm trying to build open_cv on the iphone. I'm a pre-compiled version of it from http://github.com/niw/iphone_opencv_test and am seeing the following build errors... "_cvCvtColor", referenced from: +[PFFaceDetection CreateIplImageFromUIImage:] in PFFaceDetection.o "_OBJC_CLASS_$_PFImageEffects", referenced from: ob...

An exception on OpenCV matrix Function

Hello guys! I am quite a newbie on OpenCV, and I am just about finished my first big program with it. Actually, I would be if a nasty exception wasn't happening. Here it is: OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupport ed array type) in unknown function, file ........\ocv\opencv\src\cxcore\cxarr ay.cpp...

Geometry -> OpenGL

Please help! =) I can't get the correct transformation in OpleGL. I have point3D - P(X,Y,Z), and projection matrix M, which equal to K*(R|T) where K - camera calibration matrix (R|T) - point (object) coordinate system transformation (R - rotation matrix, T - translation vector) As a result we have projected point as p = M*P I kno...

Get OpenCV MinGW libraries

Hi, I just want to compile my OpenCV 2.1 programs using MinGW. But I can't, because it won't compile ANYWAY. I DON'T WANT a solution to compile it, I just want the binary libraries because the pre-built VS2008 libraries don't work with MinGW. Can someone give it to me? Thanks in advance. ...

can anybody explain cvRemap with a code using cvRemap in opencv

OpenCV users know that cvRemap is used for doing geometric transformations. The mapx and mapy arguments are the data structures which give the mapping information in the destination image. Can i create two integer arrays holding random values from 1 to 1024 or from 1 to 768 if i deal with images (1024 X 768) And then make mapx and mapy...

Camera Calibration

Hi, I am using OpenCV, a newbie to the entire thing. I have a scenario, I am projecting on a wall, I am building a kind of a robot which has a camera. I wanted to know how can I process the image so that I could get the real-world values of the co-ordinates of the blobs tracked by my camera? Thank You. ...

Access Violation Exception

Hello, I am having some strange problem. I have written a small module in VC++ using OpenCV. It works fine. The code aggregates feed from the CCTV camera connected to the USB port. however, I had to write the rest of my application in C#, so I made a DLL of the VC++ code and called the VC++ method from C#. Now, I have ended up getti...

Convert single channle image to 3 channel image C++ / OpenCV

Hi there! Im using openCV C++ Im need to convert a single channel image to 3 channels image. So i can use this: cvCvtColor(result,gray,CV_BGR2GRAY); I cannot do that because the result img is a single channel image. Any ideas? ...

Memory Overflow problem-OpenCV

Hi, I had written a blob tracking algorithm in VC++. I had run it in a console program, it just performed brilliantly. Now, I wanted to write the rest of my application in c#, so I made a dll of the VC++ code. And I am calling this dll from C# code. Now, in C#, after running for around 2 minutes, the application is throwing an error...

How to recognize a real square in an image

Hello, I am using OpenCV for square detection in an image. The squares.c example is a really great help, but my problem is that it recognizes pretty much everything that has 4 corners that are close to 90 degrees. My goal is it however to only recognize the real squares in an image from a video feed. This means the objects themselves ...

How to fix error LNK2019 when using videoInput.lib with OpenCv2.1?

Hello everyone,I am new in OpenCV and have some problems when using videoInput.lib,please help me.I am using winXP SP3+Cmake2.8.2+OpenCV 2.1+Visual Studio 2008.I have made every configuration and now OpenCv can be used when I am coding.I heard videoInput.lib has been included since OpenCV2.0 and I want to use it,so I tried codes below to...

Trouble cross compiling OpenCV for ARM9 Montavista Linux

I'm trying to cross-compile the OpenCV library for using it on an embedded system running Montavista Linux(the system has an ARM926 processor). I've managed to configure and generate the makefiles; the sources are built OK, including the 3rd party libraries. The trouble comes at link time. For some reason libtool picks some libraries fro...

Get OpenCV2.1 to run in windows using eclipse

Hi, I am trying to get OpenCV2.1 to run on my windows machine. Here is what I have done so far: Installed MinGW using MinGW-get-inst Installed Visual Studio C++ 2008 Express Installed OpenCV-2.1.0-win32-vs2008.exe downloaded from OpenCV's website Installed Eclipse Then to test everything, I created a new project, and: Configured Ec...

OpenCV2.1, map function? accessing each pixel?

Hi, I have a function that I would like to apply to each pixel in a YUN image (call it src). I would like the output to be saved to a separate image, call it (dst). I know I can achieve this through pointer arithmetic and accessing the underlying matrix of the image. I was wondering if there was a easier way, say a predefined "map" fu...

selecting the pixels with highest intensity in opencv

can anyone help me to find out the top 1% (or say top 100 pixels)brightest pixels with their locations of a gray image in opencv. because cvMinMaxLoc() gives only brightest pixel location. Any help is greatly appreciated. ...

OpenCV Foreground Detection slow...complicated question or?

Hi, I am trying to implement the codebook foreground detection algorithm outlined here in the book Learning OpenCV. The algorithm only describes a codebook based approach for each pixel of the picture. So I took the simplest approach that came to mind - to have a array of codebooks, one for each pixel, much like the matrix structure und...

How to convert Single Channel IplImage* to Bitmap^

How can I convert single channel IplImage (grayscale), depth=8, into a Bitmap? The following code runs, but displays the image in 256 color, not grayscale. (Color very different from the original) btmap = gcnew Bitmap( cvImg->width , cvImg->height , cvImg->widthStep , System::Drawing::Imaging::PixelFormat::Format8bppIndexed, (Sy...

Subtract images by using opencv

Hi, I want to subtract two images. My problem ist that the cvSub()-funtion saturates. What I want to do is: 1) Convert the original images to grayscale. 2) Take the grayscale-images (values from 0-255). 3) Subtract the images (values from -255 to 255) -> problem of rescaling using cvSub(). 4) Rescale by multiplying with 0.5 and addi...