Ask Your Question

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

asked 2012-09-13 14:33:02 -0500

ZachTM gravatar image

updated 2012-09-14 01:57:34 -0500

Andrey Pavlenko gravatar image

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

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

That outputs this: image description

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-09-13 15:16:07 -0500

AgentCain gravatar image

updated 2012-09-13 16:41:15 -0500

I would guess that these lines are just "memory garbage" since you dont load any kind of image on Mat letter. Also if im not mistaken, Point(0,0) is the upper left corner of the image (1st cell of a 2D matrix so its the upper-left-most cell) and it points to the lower left corner of your string "A" (so actually your letter "A" resides somewhere off the borders of the Mat)

Try Point (40,30) and then position it accordingly (since its more or less dead center)

edit flag offensive delete link more


THanks you were right!

ZachTM gravatar imageZachTM ( 2012-09-13 15:46:26 -0500 )edit

Question Tools


Asked: 2012-09-13 14:33:02 -0500

Seen: 349 times

Last updated: Sep 14 '12