cv.putText does not display text properly
Good day. Not so long time ago I started working with openCV for face recognition and was faced with the fact that the text does not want to be drawn normally. Most often, lines appear, sometimes the entire screen turns green and very rarely, the name is displayed as needed. I tried to change the position and style of the font, it did not help. What could be the problem?
//Draw text
for (Rect face : facesArray) {
int posX = (int) Math.max(face.tl().x, 0);
int posY = (int) Math.max(face.tl().y, 0);
Imgproc.putText(aInputFrame, name, new Point(posX, posY),
Core.FONT_HERSHEY_DUPLEX, 2, new Scalar(0, 255, 0, 255));
}
Also in Logs i'm getting this error
Exceptions are never "also"... I don't know why that happens, but fonts do vary in their reliability and this could be some sort of bug in font data. So, I'd try the simplex font - simple is usually reliable...
Does this help:
Here is snippet example: