As @berak mentioned in this answer, this is not possible by using putText()
. It only supports ascii subset.
But you can achieve it by using addText() if you installed opencv with -D WITH_QT = ON
Here is the simple code with Greek letters and result:
#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main()
{
Mat img = Mat::zeros(Size(1000,1000),CV_8UC3);
namedWindow("Window",0);
cv::addText(img, "Greek Letters: ", cv::Point(50, 100), "Times",30,Scalar(0,255,255),QT_FONT_NORMAL,QT_STYLE_NORMAL);
cv::addText(img, "alpha: α", cv::Point(50, 200), "Times",30,Scalar(0,255,255),QT_FONT_NORMAL,QT_STYLE_NORMAL);
cv::addText(img, "betta: β", cv::Point(50, 300), "Times",30,Scalar(0,255,255),QT_FONT_NORMAL,QT_STYLE_NORMAL);
cv::addText(img, "gamma: γ", cv::Point(50, 400), "Times",30,Scalar(0,255,255),QT_FONT_NORMAL,QT_STYLE_NORMAL);
cv::addText(img, "delta: δ", cv::Point(50, 500), "Times",30,Scalar(0,255,255),QT_FONT_NORMAL,QT_STYLE_NORMAL);
cv::addText(img, "epsilon: ε", cv::Point(50, 600), "Times",30,Scalar(0,255,255),QT_FONT_BOLD,QT_STYLE_NORMAL);
imshow("Window",img);
waitKey(0);
return 0;
}