Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why is my call to putText creating a wavy image of abstrace lines?

I have the following code trying to display the letter A on a window:

    Mat letter = Mat(80,60,CV_8UC1);

putText(letter,"A",Point(0,0),CV_FONT_HERSHEY_PLAIN,8,Scalar(255,255,255));

namedWindow("Display",CV_WINDOW_NORMAL);

imshow("Display",letter);
imwrite("A.jpg",letter);

cvWaitKey(0);

That outputs this: image description

I do not understand what is going wrong can anyone tell me? I would really appreciate it!

Why is my call to putText creating a wavy image of abstrace lines?

I have the following code trying to display the letter A on a window:

    Mat letter = Mat(80,60,CV_8UC1);

putText(letter,"A",Point(0,0),CV_FONT_HERSHEY_PLAIN,8,Scalar(255,255,255));

namedWindow("Display",CV_WINDOW_NORMAL);

imshow("Display",letter);
imwrite("A.jpg",letter);

cvWaitKey(0);

That outputs this: image description

I do not understand what is going wrong can anyone tell me? I would really appreciate it!

click to hide/show revision 3
formatting

Why is my call to putText creating a wavy image of lines?

I have the following code trying to display the letter A A on a window:

 Mat letter = Mat(80,60,CV_8UC1);
 putText(letter,"A",Point(0,0),CV_FONT_HERSHEY_PLAIN,8,Scalar(255,255,255));
 namedWindow("Display",CV_WINDOW_NORMAL);
 imshow("Display",letter);
imwrite("A.jpg",letter);
 cvWaitKey(0);

That outputs this: image description

I do not understand what is going wrong can anyone tell me? I would really appreciate it!