-
Notifications
You must be signed in to change notification settings - Fork 0
/
genChar.h
32 lines (25 loc) · 855 Bytes
/
genChar.h
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
// This file contains all functions used to generate chars
#ifndef GENCHAR_H
#define GENCHAR_H
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <string>
#include <fstream>
using namespace cv;
using namespace std;
extern int INVERSE;
//char array used to represent pixels
const char chars[] = "@%#*+=-:. ";
const int FONT_SIZE = 4;
// used to generate char to terminal
// PRE:
// Mat image from opencv, this should be non-empty
// number of chars per row, this may be changed if the width is too large
void generateChar(Mat &image, string out_filename);
//construct header and tags for the output html file
void constructHtmlHeader(ofstream &output, string out_filename);
//construct footer and tags for the output html file
void constructHtmlFooter(ofstream &output);
#endif