Ask Your Question

khisraws's profile - activity

2013-12-12 13:02:50 -0600 asked a question Using cvPutText()

HI, I am trying to print a text on the screeen but I keep getting an error.

Can someone help me with the code?

cvNamedWindow("Result", CV_NORMAL);
cvMoveWindow("Result", 350,300);
cvRectangle(img, cvPoint(0,0), cvPoint(2600,2000),cvScalarAll(255), CV_FILLED,8,0);
cvShowImage("Result", img);
cvPutText(img, mytext,cvPoint(100,100),CV_FONT_HERSHEY_SIMPLEX,cvScalarAll(0));
cvWaitKey(0);

Error I get is OpenCV Error: Assertion failed (text != 0 && _font != 0) in cvPutText, file /build/opencv-XZa2gn/opencv-2.3.1/modules/core/src/drawing.cpp, line 2375 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv-XZa2gn/opencv-2.3.1/modules/core/src/drawing.cpp:2375: error: (-215) text != 0 && _font != 0 in function cvPutText

Aborted

Many thanks

2013-12-10 20:30:04 -0600 asked a question Displaying multiple windows on a screen

HI, Does anyone know how to display multiple windows on a single screen using Opencv?

2013-12-07 18:38:40 -0600 asked a question Using cvLoadImage()

I am trying to test the a simple example program on Raspberry PI, to start test Opencv function on Raspberry PI.

After successful compilation, I get an empty window.

The code is an example code when could be found on the Opencv website, however the only part I chage is name of the pic

IplImage* img = cvLoadImage("pic1.jpg", 3);

All I get in an empty window. The pic.jpg is save on the home directory(home/pi).

Anyone has came across this before?

2013-11-30 12:03:14 -0600 commented question Insufficient number of arguments to cvLoadImage()

I tried to compile it on Raspberry PI, gives me the same error. It does not recognise any of the functions. The links to include files all seems ok... :(

2013-11-30 09:34:12 -0600 commented question Insufficient number of arguments to cvLoadImage()

Many thanks, but when I use that I get like a millions of another error..... and unfortunately, i dont know much about c++. Could it be down to the compiler too? I am using icc-win32 (window)..

2013-11-30 08:00:16 -0600 commented question Insufficient number of arguments to cvLoadImage()

Unfortunetly it gives me the same error :(

2013-11-29 21:33:57 -0600 asked a question Insufficient number of arguments to cvLoadImage()

HI all, I am trying to compile a simple program

#include "highgui.h"

int main(int argc, char* argv){

    IplImage* img = cvLoadImage("C:\\Users\khisrow\Pictures\munich.jpg");
    cvNamedWindow("example", CV_WINDOW_AUTOSIZE);
    cvShowImage("example", img);
    cvWaitKey(0);
    cvReleaseImage(&img);
    cvDestroyWindow("example");

}

but it gives me the following error "Insufficient number of arguments to cvLoadImage" it also gives like 100 warnings,

Can someone help me why I get this error???