iplimage

How to convert an OpenCV IplImage to an SDL_Surface?

Hey all, I'm trying to write a program which takes an SDL_Surface, converts it to an IplImage, uses the cvBlobsLib to find blobs, paints the blobs as spots back over the image, then converts the output IplImage back to an SDL_Surface. I'm almost done: only converting the IplImage back to an SDL_Surface hasn't been done yet. This IplIma...

How to convert an 8-bit OpenCV IplImage* to a 32-bit IplImage*?

I need to convert an 8-bit IplImage to a 32-bits IplImage. Using documentation from all over the web I've tried the following things: // general code img2 = cvCreateImage(cvSize(img->width, img->height), 32, 3); int height = img->height; int width = img->width; int channels = img->nChannels; int step1 = img->widthStep; int s...

DirectX and OpenCV

So i have a program written already that captures the image from a webcam, into a vector called pBuffer. I can easily acess the RGB pixel information of each pixel, simply by pBuffer[i]=R;pBuffer[i+1]=G;Buffer[i+2]=B. No problem in here. The next step is now create an IplImage* img, and fill it in with the information of the pBuffer......

Convert RGB IplImage to 3 arrays

I need some C++/pointer help. When I create an RGB IplImage and I want to access i,j I use the following C++ class taken from: http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html template<class T> class Image { private: IplImage* imgp; public: Image(IplImage* img=0) {imgp=img;} ~Image(){imgp=0;} ...

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...

OpenCV's IplImage* as function parametr error

Hello. I am using OpenCV library and I want to clone picture in separate function, but I cannot send address to the function IplImage* image = cvLoadImage( path, CV_LOAD_IMAGE_GRAYSCALE ); // loading is ok showFoundPoints(image); // -> here it shows errors ... //my function int showFoundPoints(IplImage*image) {...} And I got t...

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...

How to load a png image received through http post to OpenCV IplImage format.

I am writing a webserver which receives an image and do some processing and replys with results. The image is in the png format. It is received as a byte[] via POST using PHP. I have to convert this byte[] to OpenCV IplImage format. What are the steps I should follow to get this done? The way I am currently doing it is reading the imag...