diff --git a/TIASshot/Lucam.cs b/TIASshot/Lucam.cs
index abfa127..6d68ae8 100644
--- a/TIASshot/Lucam.cs
+++ b/TIASshot/Lucam.cs
@@ -46,6 +46,7 @@
readonly float RefRGB;
readonly float UpdateRate;
readonly Mat TCC_SRGB;
+ readonly Mat TCC_XYZ;
IntPtr _hCam = IntPtr.Zero;
PictureBox _picPreview, _picDisplay;
@@ -81,6 +82,7 @@
UpdateRate = Config.GetFloat("UpdateRate");
TCC_SRGB = LoadMatFromCsv(Config.GetString("TccSrgbTableFile"));
+ TCC_XYZ = LoadMatFromCsv(Config.GetString("TccXyzTableFile"));
// カメラパラメータの初期値
_snap.BufferLastFrame = false;
@@ -116,10 +118,11 @@
}
///
- /// カメラ接続
+ /// 起動チェック
///
///
- public bool Connect() {
+ private bool BootCheck() {
+
if (!Config.IsLoaded()) {
ErrorMsg = "設定ファイル(Config.xml)の読み込みに失敗しました.\r\n終了します.";
return false;
@@ -128,6 +131,19 @@
ErrorMsg = $"ファイル({Config.GetString("TccSrgbTableFile")})の読み込みに失敗しました.\r\n終了します.";
return false;
}
+ if (TCC_XYZ is null) {
+ ErrorMsg = $"ファイル({Config.GetString("TccXyzTableFile")})の読み込みに失敗しました.\r\n終了します.";
+ return false;
+ }
+ return true;
+ }
+
+ ///
+ /// カメラ接続
+ ///
+ ///
+ public bool Connect() {
+ if (!BootCheck()) return false;
var numCam = dll.LucamNumCameras();
if ( numCam < 1 ) {
diff --git a/TIASshot/TIASshot.csproj b/TIASshot/TIASshot.csproj
index d1e6c2f..ff8353c 100644
--- a/TIASshot/TIASshot.csproj
+++ b/TIASshot/TIASshot.csproj
@@ -155,6 +155,7 @@
copy /Y $(ProjectDir)config.xml $(TargetDir)
copy /Y $(ProjectDir)tcc_srgb.csv $(TargetDir)
+copy /Y $(ProjectDir)tcc_xyz.csv $(TargetDir)
\ No newline at end of file
diff --git a/TIASshot/config.xml b/TIASshot/config.xml
index 3f8544b..29d47cb 100644
--- a/TIASshot/config.xml
+++ b/TIASshot/config.xml
@@ -16,6 +16,7 @@
4.0
30
tcc_srgb.csv
+ tcc_xyz.csv
tcc.png
tcc_rois.jpg
conv_mat_srgb.csv
diff --git a/TIASshot/tcc_xyz.csv b/TIASshot/tcc_xyz.csv
new file mode 100644
index 0000000..e996566
--- /dev/null
+++ b/TIASshot/tcc_xyz.csv
@@ -0,0 +1,24 @@
+26.9694,22.2296,13.364
+19.2884,13.7524,8.8177
+14.4237,9.6129,5.7125
+11.6642,8.1157,5.4909
+24.4396,18.5826,14.128
+19.8521,16.0356,15.6832
+9.017,7.4296,6.9528
+26.7245,26.1374,26.6745
+9.1571,8.5392,9.1153
+23.7175,20.2923,16.5283
+33.7693,34.1348,26.5486
+24.9456,22.819,12.6612
+71.9692,75.7916,83.293
+26.6574,28.0067,30.7125
+17.4989,18.3474,20.1302
+10.8166,11.3659,12.3731
+6.1187,6.4283,6.9788
+2.7859,2.9221,3.2307
+12.7324,13.4197,30.094
+17.5731,26.8943,10.8587
+23.5593,15.9663,7.9469
+47.8421,55.1381,18.6999
+31.926,23.7278,31.8657
+25.5922,31.3085,55.2278