-
Notifications
You must be signed in to change notification settings - Fork 0
/
Conversor.hpp
56 lines (43 loc) · 1.47 KB
/
Conversor.hpp
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
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <sstream>
#include <fstream>
#include <dirent.h>
#include <opencv4/opencv2/core/core.hpp>
#include <opencv4/opencv2/highgui/highgui.hpp>
#include <opencv4/opencv2/imgproc/imgproc.hpp>
#include <opencv4/opencv2/video/video.hpp>
#include <opencv4/opencv2/videoio/videoio.hpp>
#include <opencv4/opencv2/imgcodecs/imgcodecs.hpp>
#include <math.h>
using namespace std;
using namespace cv;
class Conversor{
public:
Conversor();
/*
H - Hue
S - Saturacion (pureza / sombras de color)
V - Valor (intensidad)
*/
cv::Mat hsv(Mat, Mat);
cv::Mat toGray(Mat, Mat);
/*
L - lightness (intensity)
a - color component ranging from Green to magenta
b - color component ranging from Blue to Yellow
L -> es independiente de informacion de color y solo guarda la intensidad o brillo
cvtColor(Mat input, Mat output, COLOR_BGR2LAB)
*/
cv::Mat toLAb(Mat, Mat);
/*
Y - Luminesencia o Luma, componente obtenido de RGB despues de hacer una correccion gamma
Cr : R - Y (distancia componente rojo de Luma)
Cb - B - Y ( distancia componente azul de Luma)
cv::cvtColor(bright, brightYCB, cv::COLOR_BGR2YCrCb);
cv::cvtColor(dark, darkYCB, cv::COLOR_BGR2YCrCb);
*/
cv::Mat toYcrCb(Mat, Mat);
};