diff --git a/ECTrainer2/ECTrainer.cpp b/ECTrainer2/ECTrainer.cpp
new file mode 100644
index 0000000..37878b2
--- /dev/null
+++ b/ECTrainer2/ECTrainer.cpp
@@ -0,0 +1,13 @@
+#include "ECTrainer.h"
+
+ECTrainer::ECTrainer()
+ : _Running(true)
+{
+
+
+}
+
+bool ECTrainer::Init() {
+ if (!_GUI.Init()) return false;
+ return true;
+}
diff --git a/ECTrainer2/ECTrainer.h b/ECTrainer2/ECTrainer.h
new file mode 100644
index 0000000..f0d5d72
--- /dev/null
+++ b/ECTrainer2/ECTrainer.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "ECTrainerGUI.h"
+
+class ECTrainer
+{
+private:
+ ECTrainerGUI _GUI;
+ bool _Running;
+
+public:
+ ECTrainer();
+ bool Init();
+ bool IsRunning() { return _Running; }
+ bool Stop() { _Running = false; }
+};
diff --git a/ECTrainer2/ECTrainer2.vcxproj b/ECTrainer2/ECTrainer2.vcxproj
new file mode 100644
index 0000000..afcbead
--- /dev/null
+++ b/ECTrainer2/ECTrainer2.vcxproj
@@ -0,0 +1,159 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 16.0
+ {9C2C0D9D-9C59-47C4-8FF6-7F21C9B8C968}
+ ECTrainer2
+ 10.0
+
+
+
+ Application
+ true
+ v142
+ Unicode
+
+
+ Application
+ false
+ v142
+ true
+ Unicode
+
+
+ Application
+ true
+ v142
+ Unicode
+
+
+ Application
+ false
+ v142
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ Level3
+ true
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ true
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ true
+ true
+ true
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ Level3
+ true
+ true
+ true
+ NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ECTrainer2/ECTrainer2.vcxproj.filters b/ECTrainer2/ECTrainer2.vcxproj.filters
new file mode 100644
index 0000000..7d55447
--- /dev/null
+++ b/ECTrainer2/ECTrainer2.vcxproj.filters
@@ -0,0 +1,45 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ ソース ファイル
+
+
+ ソース ファイル
+
+
+ ソース ファイル
+
+
+
+
+ ヘッダー ファイル
+
+
+ ヘッダー ファイル
+
+
+ ヘッダー ファイル
+
+
+ ヘッダー ファイル
+
+
+ ヘッダー ファイル
+
+
+
\ No newline at end of file
diff --git a/ECTrainer2/ECTrainerGUI.cpp b/ECTrainer2/ECTrainerGUI.cpp
new file mode 100644
index 0000000..84a14c1
--- /dev/null
+++ b/ECTrainer2/ECTrainerGUI.cpp
@@ -0,0 +1,50 @@
+#include "ECTrainerGUI.h"
+
+#define CVUI_IMPLEMENTATION
+#include "cvui.h"
+
+// ������
+bool ECTrainerGUI::Init() {
+ // ���s���̏��擾
+ GetDisplayInfo();
+ // GUI�E�C���h�E
+ cvui::init(WIN_MAIN);
+ // �h���E�C���h�E
+ cv::namedWindow(WIN_DISP, cv::WINDOW_NORMAL | cv::WINDOW_OPENGL);
+ if (_Displays.size() > 1) {
+ // �}���`���j�^�̏ꍇ �T�u��ʂŃt���X�N���[����
+ cv::moveWindow(WIN_DISP, _Displays[1].left, _Displays[1].top);
+ cv::setWindowProperty(WIN_DISP, cv::WND_PROP_FULLSCREEN, cv::WINDOW_FULLSCREEN);
+ }
+ else {
+ // �V���O�����j�^�̏ꍇ
+ cv::moveWindow(WIN_DISP, _Displays[0].left, _Displays[0].top);
+ }
+ return true;
+}
+
+// �C�x���g���[�v
+void ECTrainerGUI::MainLoop() {
+
+}
+
+// �S�f�B�X�v���C�̏����擾
+void ECTrainerGUI::GetDisplayInfo() {
+ EnumDisplayMonitors(NULL, NULL,
+ (MONITORENUMPROC)MonitorEnumProc, (LPARAM)&_Displays);
+#ifdef _DEBUG
+ for (int i = 0; i < _Displays.size(); i++) {
+ std::cout << "Monitor" << i << " : "
+ << _Displays[i].left << "," << _Displays[i].top << ","
+ << _Displays[i].right << "," << _Displays[i].bottom << std::endl;
+ }
+#endif // _DEBUG
+}
+
+// �e�f�B�X�v���C�̏����擾
+BOOL CALLBACK ECTrainerGUI::MonitorEnumProc(
+ HMONITOR hMon, HDC hdcMon, LPRECT lpMon, LPARAM dwData) {
+ std::vector* displays = (std::vector*)dwData;
+ displays->push_back(*lpMon);
+ return TRUE;
+}
diff --git a/ECTrainer2/ECTrainerGUI.h b/ECTrainer2/ECTrainerGUI.h
new file mode 100644
index 0000000..415ce35
--- /dev/null
+++ b/ECTrainer2/ECTrainerGUI.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include
+#include "myOpenCV.h"
+#include
+#ifdef _DEBUG
+#include
+#endif
+
+
+class ECTrainerGUI
+{
+private:
+ std::vector _Displays;
+ const cv::String WIN_DISP = "ECTrainer Display";
+ const cv::String WIN_MAIN = "Eye Contact Trainer";
+
+ void GetDisplayInfo();
+ static BOOL CALLBACK MonitorEnumProc(HMONITOR hMon, HDC hdcMon, LPRECT lpMon, LPARAM dwDate);
+public:
+ bool Init();
+ void MainLoop();
+};
diff --git a/ECTrainer2/cvui.h b/ECTrainer2/cvui.h
new file mode 100644
index 0000000..d4e47e7
--- /dev/null
+++ b/ECTrainer2/cvui.h
@@ -0,0 +1,2502 @@
+/*
+ A (very) simple UI lib built on top of OpenCV drawing primitives.
+ Version: 2.7.0
+
+ Usage:
+
+ One (and only one) of your C++ files must define CVUI_IMPLEMENTATION
+ before the inclusion of cvui.h to ensure its implementaiton is compiled.
+
+ E.g:
+
+ #define CVUI_IMPLEMENTATION
+ #include "cvui.h"
+
+ int main() {
+ }
+
+ All other files can include cvui.h without defining CVUI_IMPLEMENTATION.
+
+ Use of cvui revolves around calling cvui::init() to initialize the lib,
+ rendering cvui components to a cv::Mat (that you handle yourself) and
+ finally showing that cv::Mat on the screen using cvui::imshow(), which
+ is cvui's version of cv::imshow(). Alternatively you can use cv::imshow()
+ to show things, but in such case you must call cvui::update() yourself
+ before calling cv::imshow().
+
+ E.g.:
+
+ #include
+ #define CVUI_IMPLEMENTATION
+ #include "cvui.h"
+
+ #define WINDOW1_NAME "Window 1"
+
+ int main() {
+ cvui::init(WINDOW1_NAME);
+ cv::Mat frame = cv::Mat(cv::Size(400, 200), CV_8UC3);
+
+ while(true) {
+ frame = cv::Scalar(49, 52, 49);
+ cvui::text(frame, x, y, "Hello world!");
+
+ cvui::imshow(WINDOW1_NAME, frame);
+
+ if (cv::waitKey(20) == 27) {
+ break;
+ }
+ }
+ return 0;
+ }
+
+ Read the full documentation at https://dovyski.github.io/cvui/
+
+ Copyright (c) 2016 Fernando Bevilacqua
+ Licensed under the MIT license.
+*/
+
+#ifndef _CVUI_H_
+#define _CVUI_H_
+
+#include
+#include
+#include