-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSkinColor.cpp
More file actions
28 lines (23 loc) · 774 Bytes
/
SkinColor.cpp
File metadata and controls
28 lines (23 loc) · 774 Bytes
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
// SkinColor.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
Mat SrcImg = imread("G:/data/20150528173901.jpg");
resize(SrcImg, SrcImg, Size(384, 512));
Mat DstImg;
//Strategy *Ptr2SkinDetector = new QuadPoly(SrcImg);
//Strategy *Ptr2SkinDetector = new RGBColorSpace(SrcImg);
//Strategy *Ptr2SkinDetector = new YCbCrColorSpace(SrcImg);
//Strategy *Ptr2SkinDetector = new SkinDetector_OPENCV(SrcImg);
Strategy *Ptr2SkinDetector = new EllipseModel(SrcImg);
Ptr2SkinDetector->detectSkin();
Ptr2SkinDetector->getResult(DstImg);
//imwrite("G:/data/SkinColor.jpg", DstImg);
namedWindow("Src");
namedWindow("Dst");
imshow("Src", SrcImg);
imshow("Dst", DstImg);
cvWaitKey(0);
return 0;
}