forked from yangyangHu/LipSegmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Color.h
39 lines (27 loc) · 916 Bytes
/
Color.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
33
34
35
36
37
38
39
/*
* GrabCut implementation source code Copyright(c) 2005-2006 Justin Talbot
*
* All Rights Reserved.
* For educational use only; commercial use expressly forbidden.
* NO WARRANTY, express or implied, for this software.
*/
/**********************************************************************************
*
* ÒýÈëColor
* by Hu yangyang 2016/1/12
*
***********************************************************************************/
#ifndef COLOR_H
#define COLOR_H
#include "Global.h"
#define Real float
class Color {
public:
Color() : r(0), g(0), b(0) {}
Color(Real _r, Real _g, Real _b) : r(_r), g(_g), b(_b) {}
Real r, g, b;
};
Real Distance(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
// Compute squared distance between two colors
Real ColorDistance2( const Color& c1, const Color& c2 );
#endif //COLOR_H