-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcar_chtext.h
More file actions
executable file
·104 lines (51 loc) · 1.93 KB
/
car_chtext.h
File metadata and controls
executable file
·104 lines (51 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef _CVXTEXT_H_
#define _CVXTEXT_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include <wchar.h>
#include "opencv/cv.h"
#include "opencv/highgui.h"
#include "opencv2/opencv.hpp"
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
class CvxText
{
CvxText& operator=(const CvxText&);
public:
CvxText(const char *freeType);
virtual ~CvxText();
void getFont(int *type,
CvScalar *size=NULL, bool *underline=NULL, float *diaphaneity=NULL);
void setFont(int *type,
CvScalar *size=NULL, bool *underline=NULL, float *diaphaneity=NULL);
void restoreFont();
#if 0
int putText(IplImage *img, const char *text, CvPoint pos);
int putText(IplImage *img, const wchar_t *text, CvPoint pos);
int putText(IplImage *img, const char *text, CvPoint pos, CvScalar color);
int putText(IplImage *img, const wchar_t *text, CvPoint pos, CvScalar color);
private:
void putWChar(IplImage *img, wchar_t wc, CvPoint &pos, CvScalar color);
#endif
#if 0
int putText(cv::Mat &frame, const char *text, CvPoint pos);
int putText(cv::Mat &frame, const wchar_t *text, CvPoint pos);
int putText(cv::Mat &frame, const char *text, CvPoint pos, CvScalar color);
int putText(cv::Mat &frame, const wchar_t *text, CvPoint pos, CvScalar color);
private:
void putWChar(cv::Mat &frame, wchar_t wc, CvPoint& pos, CvPoint color);
#endif
int putText(cv::Mat& img, char* text, cv::Point pos);
int putText(cv::Mat& img, const wchar_t* text, cv::Point pos);
int putText(cv::Mat& img, const char* text, cv::Point pos, cv::Scalar color);
int putText(cv::Mat& img, const wchar_t* text, cv::Point pos, cv::Scalar color);
void putWChar(cv::Mat& img, wchar_t wc, cv::Point& pos, cv::Scalar color);
private:
FT_Library m_library;
FT_Face m_face;
int m_fontType;
CvScalar m_fontSize;
bool m_fontUnderline;
float m_fontDiaphaneity;
};
#endif