Ask Your Question

MohamedFarghal's profile - activity

2013-09-29 05:13:35 -0600 commented question why shear argument in cvinitfont() function does not work?

I have tried that but give me same result ,all font slant when shear =0 or shear =1

2013-09-29 04:30:39 -0600 asked a question why shear argument in cvinitfont() function does not work?

The shear argument creates an italicized slant to the font; if set to 0.0, the font is not slanted. It can be set as large as 1.0, which sets the slope of the characters to approximately 45 degrees. when i try to apply this i did not find any change in case shear= 0 or shear=1.

IplImage *Image=cvLoadImage("ABC.jpg");

CvFont Font1;
cvInitFont(&Font1,CV_FONT_HERSHEY_COMPLEX,1,1,0.0f,2);
// when i set shear argument to 0.0f , i did not get any effect

CvFont Font2;
cvInitFont(&Font2,CV_FONT_HERSHEY_COMPLEX,1,1,1.0f,2);
// also whean shear arrgument equal 1.0f , i did not get any effect

cvPutText(Image,"Hello World",cvPoint(50,50),&Font1,cvScalar(255));
cvPutText(Image,"Hello World",cvPoint(200,50),&Font2,cvScalar(255));

cvNamedWindow("0",0);
cvShowImage("0",Image);
cvWaitKey(0);