diff --git a/Tongue extraction_cropresizemethod/Tongue extraction.sln b/Tongue extraction_cropresizemethod/Tongue extraction.sln
index 26b03bf..3fc5685 100644
--- a/Tongue extraction_cropresizemethod/Tongue extraction.sln
+++ b/Tongue extraction_cropresizemethod/Tongue extraction.sln
@@ -3,7 +3,7 @@
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepTongue1.8", "Tongue extraction\DeepTongue1.8.csproj", "{AFD610B1-8D23-423A-AA0F-B09BA769BDD7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepTIAS1.8", "Tongue extraction\DeepTIAS1.8.csproj", "{AFD610B1-8D23-423A-AA0F-B09BA769BDD7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/DeepTIAS1.8.csproj b/Tongue extraction_cropresizemethod/Tongue extraction/DeepTIAS1.8.csproj
new file mode 100644
index 0000000..89aeb19
--- /dev/null
+++ b/Tongue extraction_cropresizemethod/Tongue extraction/DeepTIAS1.8.csproj
@@ -0,0 +1,187 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {AFD610B1-8D23-423A-AA0F-B09BA769BDD7}
+ WinExe
+ Properties
+ Tongue_extraction
+ DeepTIAS1.8
+ v4.7.1
+ 512
+ true
+
+
+
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE
+ full
+ x64
+ prompt
+ MinimumRecommendedRules.ruleset
+ true
+
+
+ bin\x64\Release\
+ TRACE
+ true
+ pdbonly
+ x64
+ prompt
+ MinimumRecommendedRules.ruleset
+ true
+
+
+ DeepTongue_Icon.ico
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+
+
+
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.7.1 %28x86 および x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+ False
+ ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.dll
+
+
+ False
+ ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.Blob.dll
+
+
+ False
+ ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.Extensions.dll
+
+
+ ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.UserInterface.dll
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.dll
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.Composition.dll
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.Composition.Registration.dll
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.DataAnnotations.dll
+
+
+
+
+
+
+
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Reflection.Context.dll
+
+
+ ..\..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll
+
+
+
+
+ False
+ ..\..\..\packages\TensorFlowSharp.1.11.0\lib\net471\TensorFlowSharp.dll
+
+
+
+
+
+ このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.8.csproj b/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.8.csproj
deleted file mode 100644
index 2065363..0000000
--- a/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.8.csproj
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
- Debug
- AnyCPU
- {AFD610B1-8D23-423A-AA0F-B09BA769BDD7}
- WinExe
- Properties
- Tongue_extraction
- DeepTIAS1.0
- v4.7.1
- 512
- true
-
-
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- DeepTongue_Icon.ico
-
-
-
- Form
-
-
- Form1.cs
-
-
-
-
-
- Form1.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
- True
-
-
-
- SettingsSingleFileGenerator
-
-
-
-
-
-
-
-
-
-
- False
- Microsoft .NET Framework 4.7.1 %28x86 および x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
-
-
- False
- ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.dll
-
-
- False
- ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.Blob.dll
-
-
- False
- ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.Extensions.dll
-
-
- ..\..\..\packages\OpenCvSharp3-AnyCPU.3.2.0.20170107\lib\net40\OpenCvSharp.UserInterface.dll
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.dll
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.Composition.dll
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.Composition.Registration.dll
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.ComponentModel.DataAnnotations.dll
-
-
-
-
-
-
-
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Reflection.Context.dll
-
-
- ..\..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll
-
-
-
-
- False
- ..\..\..\packages\TensorFlowSharp.1.11.0\lib\net471\TensorFlowSharp.dll
-
-
-
-
-
- このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs
index cff6a37..473b399 100644
--- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs
+++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs
@@ -383,7 +383,7 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.Name = "Form1";
- this.Text = "DeepTIAS1.0";
+ this.Text = "DeepTIAS1.8";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.pictureBox_input)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox_detection)).EndInit();
diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs
index 5c5b17d..e867578 100644
--- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs
+++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs
@@ -838,6 +838,7 @@
double sumsq = 0.0;
double avg = 0.0;
double stdev = 0.0;
+ // 2010石川さんの手法にならい,Gchannelのavgとstdを計算
for (int i = 0; i < mat_input.Height; i++)
{
for (int j = 0; j < mat_input.Width; j++)
@@ -855,6 +856,8 @@
}
avg = (double)(sum / areaCount); // G チャンネル の平均
stdev = Math.Sqrt(Math.Abs((sumsq / areaCount) - (avg * avg))); // 標準偏差
+
+ // 閾値を決定し,glossをカウント
double thresh = avg + (stdev * 2.0);
int glossCount = 0;
for (int i = 0; i < mat_input.Height; i++)
@@ -874,8 +877,8 @@
if (pix.Item1 > thresh)
{
glossCount++;
- pix[0] = (byte)(0);
- pix[1] = (byte)(255);
+ pix[0] = (byte)(255);
+ pix[1] = (byte)(0);
pix[2] = (byte)(255);
mat_gloss.Set(i, j, pix);
}