diff --git a/.gitignore b/.gitignore index 365d1f6..790b7e9 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,53 @@ *.pb *.jpg *.png +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed2/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed2/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed2/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed2/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed1/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropresized/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropresized/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropresized/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropped/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_resized/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_resized/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_resized/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed1/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed1/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed1/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/detection/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed1/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed1/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed1/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output_changed1/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/detection/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/detection/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output256/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output256/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output256/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/output256/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropped/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/cropped/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_final/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_final/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_final/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/gloss/VShot0016.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/gloss/VShot0011.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/新しいビットマップ イメージ.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/VShot0020.bmp +Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/gloss/VShot0020.bmp +*.bmp diff --git a/Readme.txt b/Readme.txt index cc2b99f..3885419 100644 --- a/Readme.txt +++ b/Readme.txt @@ -1,31 +1,35 @@ -DeepTongue v1.7 +DeepTongue_GlossExtraction 1.0 �X�V���e�ɂ‚��āF -1. ���o�y�ѕ������ꂽ��̈�̏���info�t�H���_��csv�ŏo�͂ł���悤�ɋ@�\��lj����܂����D -2. �����‚��̃o�O���C�����C���萫�����サ�܂����D +1. Gloss���o�@�\�̒lj� +2. ���t�@�N�^�����O�ƍׂ��ȃo�O�̏C�� -��̈撊�o�v���O�����̑���ɂ‚��āF -1. ���o��������摜��"data"�t�H���_�ɓ���Ă��������B -2. "cropped"�t�H���_: �g���~���O�ɂ���Đ������ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B -3. "cropresized"�t�H���_: �T�C�Y�ύX��ɐ������ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B -4. "detection"�t�H���_: �㌟�o���ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B -5. "extraction"�t�H���_: �㒊�o���ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B -6. "mask"�t�H���_: ��̈�mask�͎����I�ɂ����ɕۑ�����܂��B -7. "mask_changed1"�t�H���_: SRG�㏈��������̈�mask�͎����I�ɂ����ɕۑ�����܂��B -8. "mask_changed2"�t�H���_: �ŏI�I�Ȑ�̈�mask�͎����I�ɂ����ɕۑ�����܂��B -9. "output256"�t�H���_: ����������l����摜�͎����I�ɂ����ɕۑ�����܂��B -10. "output_resized"�t�H���_: ���T�C�Y������l����摜�͎����I�ɂ����ɕۑ�����܂��B -11. "output_changed1"�t�H���_: SRG1�㏈��������l����摜�͎����I�ɂ����ɕۑ�����܂��B -12. "output_changed2"�t�H���_: SRG2�㏈��������l����摜�͎����I�ɂ����ɕۑ�����܂��B -13. "info"�t�H���_: �㌟�o�œ���ꂽ���W�Ɛ㕪���œ���ꂽ�ʐς�csv�ɏ������݂����ɕۑ�����܂��D -14. "Log.txt": ����������摜�������L�^����܂��D +Gloss���o�v���O�����̑���ɂ‚��āF +1. VShot�摜��"data"�t�H���_�ɓ���Ă��������B +2. Start�������Ă��������B + +"cropped"�t�H���_: �g���~���O�ɂ���Đ������ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B +"cropresized"�t�H���_: �T�C�Y�ύX��ɐ������ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B +"detection"�t�H���_: �㌟�o���ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B +"extraction"�t�H���_: �㒊�o���ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B +"gloss"�t�H���_�F�@Gloss���o���ꂽ�摜�͎����I�ɂ����ɕۑ�����܂��B + +"mask"�t�H���_: ��̈�mask�͎����I�ɂ����ɕۑ�����܂��B +"mask_changed1"�t�H���_: SRG�㏈��������̈�mask�͎����I�ɂ����ɕۑ�����܂��B +"mask_changed2"�t�H���_: �ŏI�I�Ȑ�̈�mask�͎����I�ɂ����ɕۑ�����܂��B +"output256"�t�H���_: ����������l����摜�͎����I�ɂ����ɕۑ�����܂��B +"output_resized"�t�H���_: ���T�C�Y������l����摜�͎����I�ɂ����ɕۑ�����܂��B +"output_changed1"�t�H���_: SRG1�㏈��������l����摜�͎����I�ɂ����ɕۑ�����܂��B +"output_changed2"�t�H���_: SRG2�㏈��������l����摜�͎����I�ɂ����ɕۑ�����܂��B +"info"�t�H���_: �㌟�o�œ���ꂽ���W�Ɛ㕪���œ���ꂽ�ʐς�csv�ɏ������݂����ɕۑ�����܂��D +"Log.txt": ����������摜�������L�^����܂��D �s��ɂ‚��āF �f�[�^�ʂ����������I�[�o�[�����ꍇ�́C�����I�Ƀv���O������������”\��������܂��D ���̏ꍇ��"data"�t�H���_���琶���ς݂̎ʐ^��S�č폜������C�Ă�.exe���N�����Ă��������D ���s�‹��ɂ‚��āF -Python 3.6.5�i�s�K�v�j�@OpenCV3.2�i�s�K�v�j.Net Framework4.7.1 (�K�v) +Python 3.6.5�i�s�K�v�j�@OpenCV3.2�i�s�K�v�j .Net Framework4.7.1 (�K�v) Tips: ����CPU I7�ȏ�@���������� 16G�ȏ� \ No newline at end of file diff --git a/Tongue extraction_cropresizemethod/Tongue extraction.sln b/Tongue extraction_cropresizemethod/Tongue extraction.sln index e79838b..26b03bf 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.7", "Tongue extraction\DeepTongue1.7.csproj", "{AFD610B1-8D23-423A-AA0F-B09BA769BDD7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepTongue1.8", "Tongue extraction\DeepTongue1.8.csproj", "{AFD610B1-8D23-423A-AA0F-B09BA769BDD7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.7.csproj b/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.7.csproj deleted file mode 100644 index f34ab27..0000000 --- a/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.7.csproj +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - Debug - AnyCPU - {AFD610B1-8D23-423A-AA0F-B09BA769BDD7} - WinExe - Properties - Tongue_extraction - DeepTongue1.7 - 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 new file mode 100644 index 0000000..7d27d7c --- /dev/null +++ b/Tongue extraction_cropresizemethod/Tongue extraction/DeepTongue1.8.csproj @@ -0,0 +1,187 @@ + + + + + + Debug + AnyCPU + {AFD610B1-8D23-423A-AA0F-B09BA769BDD7} + WinExe + Properties + Tongue_extraction + DeepTongue1.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/Form1.Designer.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs index 92cf792..bca39f5 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs @@ -48,7 +48,7 @@ this.pictureBox_output = new System.Windows.Forms.PictureBox(); this.pictureBox_outputSRG = new System.Windows.Forms.PictureBox(); this.pictureBox_maskSRG = new System.Windows.Forms.PictureBox(); - this.pictureBox_contract = new System.Windows.Forms.PictureBox(); + this.pictureBox_gloss = new System.Windows.Forms.PictureBox(); this.label_processingFileName = new System.Windows.Forms.Label(); this.label_totalProgress = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); @@ -63,7 +63,7 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox_output)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_outputSRG)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_maskSRG)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox_contract)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_gloss)).BeginInit(); this.panel2.SuspendLayout(); this.SuspendLayout(); // @@ -147,7 +147,7 @@ this.tableLayoutPanel1.Controls.Add(this.pictureBox_output, 3, 0); this.tableLayoutPanel1.Controls.Add(this.pictureBox_outputSRG, 0, 2); this.tableLayoutPanel1.Controls.Add(this.pictureBox_maskSRG, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.pictureBox_contract, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.pictureBox_gloss, 3, 2); this.tableLayoutPanel1.Controls.Add(this.label_processingFileName, 0, 5); this.tableLayoutPanel1.Controls.Add(this.label_totalProgress, 2, 5); this.tableLayoutPanel1.Controls.Add(this.panel2, 3, 4); @@ -179,10 +179,10 @@ // // textBox1 // - this.textBox1.Location = new System.Drawing.Point(196, 1); + this.textBox1.Location = new System.Drawing.Point(486, -1); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(562, 51); + this.textBox1.Size = new System.Drawing.Size(269, 60); this.textBox1.TabIndex = 1; this.textBox1.Visible = false; // @@ -279,7 +279,7 @@ this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(246, 20); this.label8.TabIndex = 14; - this.label8.Text = "Contract (last input)"; + this.label8.Text = "Gloss"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // pictureBox_output @@ -312,15 +312,15 @@ this.pictureBox_maskSRG.TabIndex = 17; this.pictureBox_maskSRG.TabStop = false; // - // pictureBox_contract + // pictureBox_gloss // - this.pictureBox_contract.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBox_contract.Location = new System.Drawing.Point(767, 242); - this.pictureBox_contract.Name = "pictureBox_contract"; - this.pictureBox_contract.Size = new System.Drawing.Size(246, 207); - this.pictureBox_contract.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox_contract.TabIndex = 18; - this.pictureBox_contract.TabStop = false; + this.pictureBox_gloss.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox_gloss.Location = new System.Drawing.Point(767, 242); + this.pictureBox_gloss.Name = "pictureBox_gloss"; + this.pictureBox_gloss.Size = new System.Drawing.Size(246, 207); + this.pictureBox_gloss.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox_gloss.TabIndex = 18; + this.pictureBox_gloss.TabStop = false; // // label_processingFileName // @@ -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 = "DeepTongue1.7"; + this.Text = "DeepTongue_GlossExtraction1.0"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_input)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_detection)).EndInit(); @@ -396,7 +396,7 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox_output)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_outputSRG)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_maskSRG)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox_contract)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_gloss)).EndInit(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); @@ -423,7 +423,7 @@ private System.Windows.Forms.PictureBox pictureBox_output; private System.Windows.Forms.PictureBox pictureBox_outputSRG; private System.Windows.Forms.PictureBox pictureBox_maskSRG; - private System.Windows.Forms.PictureBox pictureBox_contract; + private System.Windows.Forms.PictureBox pictureBox_gloss; private System.Windows.Forms.Label label_processingFileName; private System.Windows.Forms.Label label_totalProgress; private System.Windows.Forms.Panel panel2; diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs index 72a0ae4..e1e0dea 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs @@ -32,6 +32,7 @@ Mat mat_outputSRGNoBox = new Mat(1024, 1280, MatType.CV_8UC1, 1); Mat mat_outputSRG = new Mat(1024, 1280, MatType.CV_8UC1, 1); Mat mat_maskSRG = new Mat(1024, 1280, MatType.CV_8UC1, 1); + Mat mat_gloss = new Mat(1024, 1280, MatType.CV_8UC1, 1); public static Bitmap bitmap_bitch; string[] path; @@ -51,6 +52,7 @@ string modelFile; int ii = 0; int count; + int areaCount; Rect roi = new Rect(); int mmp = 0; @@ -73,7 +75,7 @@ sw.WriteLine( "image" + "," + "top left X" + "," + "top left Y" + "," + "bottom right X" + "," + "bottom right Y" + "," + - "Width" + "," + "Height" + "," + "Area"); + "Width" + "," + "Height" + "," + "Area" + "," + "Gloss Count"); } [Conditional("DEBUG")] @@ -102,8 +104,8 @@ pictureBox_maskSRG.Refresh(); pictureBox_extraction.Image = null; pictureBox_extraction.Refresh(); - pictureBox_contract.Image = null; - pictureBox_contract.Refresh(); + pictureBox_gloss.Image = null; + pictureBox_gloss.Refresh(); backgroundWorker1.RunWorkerAsync(); } @@ -347,7 +349,7 @@ label_totalProgress.Text = "Total Progress: " + count + "/" + path.Length; }); - mat_input = Cv2.ImRead(basepath + "\\data" + imageFile); + mat_input = Cv2.ImRead(basepath + "\\data" + imageFile, ImreadModes.Color); bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_input); Invoke((MethodInvoker)delegate { @@ -409,21 +411,12 @@ } } } - if (check_detection == 1) + + // 舌が検出されなかった場合,Detectionされた画像で学習したモデル(CropResize)を使用するのはまずいので + // 以前のモデル(Detectionせずに学習)を使用する + if (check_detection == 0) { - mat_drawBox.SaveImage(basepath + "\\detection" + imageFile); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_drawBox); - Invoke((MethodInvoker)delegate - { - pictureBox_detection.Image = bitmap_bitch; - pictureBox_detection.Refresh(); - }); - label1.BackColor = Color.White; - label2.BackColor = Color.Red; - } - else // 舌が検出されなかった場合 - { - MessageBox.Show("Error: Sorry can not detect any tongue in this image.\nPress [OK] to skip preprocessing.", + MessageBox.Show("Error: Sorry can not detect any tongue in this image.\nPress [OK] to skip preprocessing.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); time = DateTime.Now.ToLocalTime().ToString(); File.AppendAllText("DetectionFailedLog.txt ", time + " " + imageFile + "\n"); @@ -441,8 +434,8 @@ pictureBox_maskSRG.Refresh(); pictureBox_extraction.Image = null; pictureBox_extraction.Refresh(); - pictureBox_contract.Image = null; - pictureBox_contract.Refresh(); + pictureBox_gloss.Image = null; + pictureBox_gloss.Refresh(); }); bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_input); byte_inputSegmentation = Bitmap2Byte(bitmap_bitch); @@ -494,7 +487,7 @@ label1.BackColor = Color.White; label4.BackColor = Color.Red; }); - + mat_outputNoBox.SaveImage(basepath + "\\output256" + imageFile); try { @@ -514,7 +507,7 @@ pictureBox_outputSRG.Refresh(); label4.BackColor = Color.White; label5.BackColor = Color.Red; - }); + }); Cv2.Resize(mat_outputSRGNoBox, mat_mask, mat_input.Size()); mat_mask.SaveImage(basepath + "\\mask" + imageFile); try @@ -536,9 +529,9 @@ pictureBox_maskSRG.Refresh(); label5.BackColor = Color.White; label6.BackColor = Color.Red; - }); + }); mat_extraction = mat_input.Clone(); - int areaCount_noDetection = 0; + areaCount = 0; for (int i = 0; i < mat_input.Height; i++) { for (int j = 0; j < mat_input.Width; j++) @@ -557,7 +550,7 @@ pix[1] = (byte)(mat_extraction.At(i, j).Item1); pix[2] = (byte)(mat_extraction.At(i, j).Item2); mat_extraction.Set(i, j, pix); - areaCount_noDetection++; + areaCount++; } } } @@ -567,221 +560,355 @@ { pictureBox_extraction.Image = bitmap_bitch; pictureBox_extraction.Refresh(); - label6.BackColor = Color.White; - label7.BackColor = Color.Red; }); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_input); + label6.BackColor = Color.White; + + + + label7.BackColor = Color.Red; + mat_gloss = mat_input.Clone(); + double sum = 0.0; + double sumsq = 0.0; + double avg = 0.0; + double stdev = 0.0; + for (int i = 0; i < mat_input.Height; i++) + { + for (int j = 0; j < mat_input.Width; j++) + { + var g_value = mat_gloss.At(i, j).Item1; + if (mat_maskSRG.At(i, j) == 0) + { + } + else + { + sum += g_value; // G チャンネル の和 + sumsq += g_value * g_value; // G チャンネル の平方和 + } + } + } + avg = (double)(sum / areaCount); // G チャンネル の平均 + stdev = Math.Sqrt(Math.Abs((sumsq / areaCount) - (avg * avg))); // 標準偏差 + double thresh = avg + (stdev * 2.0); + int glossCount = 0; + for (int i = 0; i < mat_input.Height; i++) + { + for (int j = 0; j < mat_input.Width; j++) + { + if (mat_maskSRG.At(i, j) == 0) + { + } + else + { + Vec3b pix = mat_gloss.At(i, j); + if (pix.Item1 > thresh) + { + glossCount++; + pix[0] = (byte)(255); + pix[1] = (byte)(0); + pix[2] = (byte)(0); + mat_gloss.Set(i, j, pix); + } + } + + } + } + mat_gloss.SaveImage(basepath + "\\gloss" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_gloss); Invoke((MethodInvoker)delegate { - pictureBox_contract.Image = bitmap_bitch; - pictureBox_contract.Refresh(); - label7.BackColor = Color.White; - label8.BackColor = Color.Red; + pictureBox_gloss.Image = bitmap_bitch; + pictureBox_gloss.Refresh(); }); + label7.BackColor = Color.White; + + label8.BackColor = Color.Red; //csvにboundingbox情報を保存 sw.WriteLine( imageFile.Substring(1) + "," + "None" + "," + "None" + "," + "None" + "," + "None" + "," - + "None" + "," + "None" + "," + areaCount_noDetection.ToString() + + "None" + "," + "None" + "," + areaCount.ToString() ); continue; } - for (int i = P1.Y; i < P2.Y; i++) + // 舌が検出された場合 + else { - for (int j = P1.X; j < P2.X; j++) + mat_drawBox.SaveImage(basepath + "\\detection" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_drawBox); + Invoke((MethodInvoker)delegate { - Vec3b pix = mat_input.At(i, j); - mat_cropped.Set(i, j, pix); - } - } - mat_cropped.SaveImage(basepath + "\\cropped" + imageFile); - OpenCvSharp.Size size_roi = new OpenCvSharp.Size(); - size_roi.Height = rectangle.Height; - size_roi.Width = rectangle.Width; - roi = new Rect(P1, size_roi); - mat_roisize = mat_input.Clone(roi); - Cv2.Resize(mat_roisize, mat_roi, mat_roi256.Size()); - mat_roi.SaveImage(basepath + "\\cropresized" + imageFile); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_roi); - Invoke((MethodInvoker)delegate - { - pictureBox_cropResized.Image = bitmap_bitch; - pictureBox_cropResized.Refresh(); - }); + pictureBox_detection.Image = bitmap_bitch; + pictureBox_detection.Refresh(); + }); + label1.BackColor = Color.White; - label2.BackColor = Color.White; - label3.BackColor = Color.Red; - byte_inputSegmentation = Bitmap2Byte(bitmap_bitch); - Thread.Sleep(1000); - modelFile = DownloadDefaultModel(basepath); - using (var graph = new TFGraph()) - { - var model = File.ReadAllBytes(modelFile); - graph.Import(model, ""); - using (var session = new TFSession(graph)) + label2.BackColor = Color.Red; + // 検出された場合の処理の続き + for (int i = P1.Y; i < P2.Y; i++) { - var tensor = ImageUtil2.CreateTensorFromImageFile(byte_inputSegmentation); - var runner = session.GetRunner(); - runner - .AddInput(graph["generator/input_image"][0], tensor) - .Fetch(graph["generator/prediction"][0]); - - //.AddInput(graph["input_image"][0], tensor) - //.Fetch(graph["generator1/decoder_1/Tanh"][0]); - - var output = runner.Run(); - float[,,,] resultfloat = (float[,,,])output[0].GetValue(jagged: false); - - for (int p = 0; p < 256; p++) + for (int j = P1.X; j < P2.X; j++) { - for (int q = 0; q < 256; q++) + Vec3b pix = mat_input.At(i, j); + mat_cropped.Set(i, j, pix); + } + } + mat_cropped.SaveImage(basepath + "\\cropped" + imageFile); + OpenCvSharp.Size size_roi = new OpenCvSharp.Size(); + size_roi.Height = rectangle.Height; + size_roi.Width = rectangle.Width; + roi = new Rect(P1, size_roi); + mat_roisize = mat_input.Clone(roi); + Cv2.Resize(mat_roisize, mat_roi, mat_roi256.Size()); + mat_roi.SaveImage(basepath + "\\cropresized" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_roi); + Invoke((MethodInvoker)delegate + { + pictureBox_cropResized.Image = bitmap_bitch; + pictureBox_cropResized.Refresh(); + }); + label2.BackColor = Color.White; + + + label3.BackColor = Color.Red; + byte_inputSegmentation = Bitmap2Byte(bitmap_bitch); + Thread.Sleep(1000); + modelFile = DownloadDefaultModel(basepath); + using (var graph = new TFGraph()) + { + var model = File.ReadAllBytes(modelFile); + graph.Import(model, ""); + + using (var session = new TFSession(graph)) + { + var tensor = ImageUtil2.CreateTensorFromImageFile(byte_inputSegmentation); + var runner = session.GetRunner(); + runner + .AddInput(graph["generator/input_image"][0], tensor) + .Fetch(graph["generator/prediction"][0]); + + //.AddInput(graph["input_image"][0], tensor) + //.Fetch(graph["generator1/decoder_1/Tanh"][0]); + + var output = runner.Run(); + float[,,,] resultfloat = (float[,,,])output[0].GetValue(jagged: false); + + for (int p = 0; p < 256; p++) { - float check = resultfloat[0, p, q, 0]; - if (check < 0) + for (int q = 0; q < 256; q++) { - mask[ii] = 0; + float check = resultfloat[0, p, q, 0]; + if (check < 0) + { + mask[ii] = 0; + } + else + { + mask[ii] = 255; + } + ii++; } - else - { - mask[ii] = 255; - } - ii++; } } } - } - Thread.Sleep(1000); - bitmap_bitch = ToGrayBitmap(mask, 256, 256); - mat_output = OpenCvSharp.Extensions.BitmapConverter.ToMat(bitmap_bitch); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_output); - Invoke((MethodInvoker)delegate - { - pictureBox_output.Image = bitmap_bitch; - pictureBox_output.Refresh(); - }); - - label3.BackColor = Color.White; - label4.BackColor = Color.Red; - mat_output.SaveImage(basepath + "\\output256" + imageFile); - try - { - RemoveSmallRegion(basepath + "\\output256" + imageFile, basepath + "\\output_changed1" + imageFile, 500, 1, 1); - RemoveSmallRegion(basepath + "\\output_changed1" + imageFile, basepath + "\\output_changed2" + imageFile, 500, 0, 0); - } - catch - { - MessageBox.Show("Error: Unable to reprocess! Please check is there [RemoveSmallRegionDLL.dll] file in floder?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - break; - } - mat_outputSRG = new Mat(basepath + "\\output_changed2" + imageFile, ImreadModes.GrayScale); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_outputSRG); - Invoke((MethodInvoker)delegate - { - pictureBox_outputSRG.Image = bitmap_bitch; - pictureBox_outputSRG.Refresh(); - }); - - label4.BackColor = Color.White; - label5.BackColor = Color.Red; - Cv2.Resize(mat_outputSRG, mat_outputChanged, mat_roisize.Size()); - mat_outputChanged.SaveImage(basepath + "\\output_resized" + imageFile); - mat_mask = new Mat(mat_input.Size(), MatType.CV_8UC1, 1); - for (int i = P1.Y; i < P2.Y; i++) - { - for (int j = P1.X; j < P2.X; j++) + Thread.Sleep(1000); + bitmap_bitch = ToGrayBitmap(mask, 256, 256); + mat_output = OpenCvSharp.Extensions.BitmapConverter.ToMat(bitmap_bitch); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_output); + Invoke((MethodInvoker)delegate { - int pix = mat_outputChanged.At(mmp, pmm); - mat_mask.Set(i, j, pix); - pmm++; + pictureBox_output.Image = bitmap_bitch; + pictureBox_output.Refresh(); + }); + label3.BackColor = Color.White; + + + label4.BackColor = Color.Red; + mat_output.SaveImage(basepath + "\\output256" + imageFile); + try + { + RemoveSmallRegion(basepath + "\\output256" + imageFile, basepath + "\\output_changed1" + imageFile, 500, 1, 1); + RemoveSmallRegion(basepath + "\\output_changed1" + imageFile, basepath + "\\output_changed2" + imageFile, 500, 0, 0); } - mmp++; - pmm = 0; - } - mmp = 0; - Cv2.Resize(mat_mask, mat_mask, mat_input.Size()); - mat_mask.SaveImage(basepath + "\\mask" + imageFile); - try - { - RemoveSmallRegion(basepath + "\\mask" + imageFile, basepath + "\\mask_changed1" + imageFile, 500, 1, 1); - RemoveSmallRegion(basepath + "\\mask_changed1" + imageFile, basepath + "\\mask_changed2" + imageFile, 500, 0, 0); - } - catch - { - MessageBox.Show("Error: Unable to reprocess! Please check is there [RemoveSmallRegionDLL.dll] file in floder?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - break; - } - mat_maskSRG = new Mat(basepath + "\\mask_changed2" + imageFile, ImreadModes.GrayScale); - Cv2.Threshold(mat_maskSRG, mat_maskSRG, 128, 255, ThresholdTypes.Binary); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_maskSRG); - Invoke((MethodInvoker)delegate - { - pictureBox_maskSRG.Image = bitmap_bitch; - pictureBox_maskSRG.Refresh(); - }); - - label5.BackColor = Color.White; - label6.BackColor = Color.Red; - - mat_extraction = mat_input.Clone(); - int areaCount = 0; - for (int i = 0; i < mat_input.Height; i++) - { - for (int j = 0; j < mat_input.Width; j++) + catch { - Vec3b pix = mat_extraction.At(i, j); - if (mat_maskSRG.At(i, j) == 0) + MessageBox.Show("Error: Unable to reprocess! Please check is there [RemoveSmallRegionDLL.dll] file in floder?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + break; + } + mat_outputSRG = new Mat(basepath + "\\output_changed2" + imageFile, ImreadModes.GrayScale); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_outputSRG); + Invoke((MethodInvoker)delegate + { + pictureBox_outputSRG.Image = bitmap_bitch; + pictureBox_outputSRG.Refresh(); + }); + label4.BackColor = Color.White; + + + label5.BackColor = Color.Red; + Cv2.Resize(mat_outputSRG, mat_outputChanged, mat_roisize.Size()); + mat_outputChanged.SaveImage(basepath + "\\output_resized" + imageFile); + mat_mask = new Mat(mat_input.Size(), MatType.CV_8UC1, 1); + for (int i = P1.Y; i < P2.Y; i++) + { + for (int j = P1.X; j < P2.X; j++) { - pix[0] = (byte)(255); - pix[1] = (byte)(255); - pix[2] = (byte)(255); - mat_extraction.Set(i, j, pix); + int pix = mat_outputChanged.At(mmp, pmm); + mat_mask.Set(i, j, pix); + pmm++; } - else + mmp++; + pmm = 0; + } + mmp = 0; + Cv2.Resize(mat_mask, mat_mask, mat_input.Size()); + mat_mask.SaveImage(basepath + "\\mask" + imageFile); + try + { + RemoveSmallRegion(basepath + "\\mask" + imageFile, basepath + "\\mask_changed1" + imageFile, 500, 1, 1); + RemoveSmallRegion(basepath + "\\mask_changed1" + imageFile, basepath + "\\mask_changed2" + imageFile, 500, 0, 0); + } + catch + { + MessageBox.Show("Error: Unable to reprocess! Please check is there [RemoveSmallRegionDLL.dll] file in floder?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + break; + } + + mat_maskSRG = new Mat(basepath + "\\mask_changed2" + imageFile, ImreadModes.GrayScale); + Cv2.Threshold(mat_maskSRG, mat_maskSRG, 128, 255, ThresholdTypes.Binary); + mat_maskSRG.SaveImage(basepath + "\\mask_final" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_maskSRG); + Invoke((MethodInvoker)delegate + { + pictureBox_maskSRG.Image = bitmap_bitch; + pictureBox_maskSRG.Refresh(); + }); + label5.BackColor = Color.White; + + + label6.BackColor = Color.Red; + mat_extraction = mat_input.Clone(); + areaCount = 0; + for (int i = 0; i < mat_input.Height; i++) + { + for (int j = 0; j < mat_input.Width; j++) { - pix[0] = (byte)(mat_extraction.At(i, j).Item0); - pix[1] = (byte)(mat_extraction.At(i, j).Item1); - pix[2] = (byte)(mat_extraction.At(i, j).Item2); - mat_extraction.Set(i, j, pix); - areaCount++; + Vec3b pix = mat_extraction.At(i, j); + if (mat_maskSRG.At(i, j) == 0) + { + pix[0] = (byte)(255); + pix[1] = (byte)(255); + pix[2] = (byte)(255); + mat_extraction.Set(i, j, pix); + } + else + { + pix[0] = (byte)(mat_extraction.At(i, j).Item0); + pix[1] = (byte)(mat_extraction.At(i, j).Item1); + pix[2] = (byte)(mat_extraction.At(i, j).Item2); + mat_extraction.Set(i, j, pix); + areaCount++; + } } } + mat_extraction.SaveImage(basepath + "\\extraction" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_extraction); + Invoke((MethodInvoker)delegate + { + pictureBox_extraction.Image = bitmap_bitch; + pictureBox_extraction.Refresh(); + }); + + label6.BackColor = Color.White; + + /// Gloss抽出処理 extraction結果は使用しない(255,255,255の扱いが煩雑なため) + label7.BackColor = Color.Red; + mat_gloss = mat_input.Clone(); + double sum = 0.0; + double sumsq = 0.0; + double avg = 0.0; + double stdev = 0.0; + for (int i = 0; i < mat_input.Height; i++) + { + for (int j = 0; j < mat_input.Width; j++) + { + var g_value = mat_gloss.At(i, j).Item1; + if (mat_maskSRG.At(i, j) == 0) + { + } + else + { + sum += g_value; // G チャンネル の和 + sumsq += g_value * g_value; // G チャンネル の平方和 + } + } + } + avg = (double)(sum / areaCount); // G チャンネル の平均 + stdev = Math.Sqrt(Math.Abs((sumsq / areaCount) - (avg * avg))); // 標準偏差 + double thresh = avg + (stdev * 2.0); + int glossCount = 0; + for (int i = 0; i < mat_input.Height; i++) + { + for (int j = 0; j < mat_input.Width; j++) + { + if (mat_maskSRG.At(i, j) == 0) + { + } + else + { + Vec3b pix = mat_gloss.At(i, j); + if (pix.Item1 > thresh) + { + glossCount++; + pix[0] = (byte)(255); + pix[1] = (byte)(0); + pix[2] = (byte)(0); + mat_gloss.Set(i, j, pix); + } + } + + } + } + + /* + textBox1.Invoke((MethodInvoker)delegate + { + textBox1.Text = sum.ToString() + ", "; + textBox1.Text += sumsq.ToString() + ","; + textBox1.Text += avg.ToString() + Environment.NewLine; + textBox1.Text += stdev.ToString() + Environment.NewLine; + textBox1.Text += glossCount.ToString(); + }); + */ + + mat_gloss.SaveImage(basepath + "\\gloss" + imageFile); + bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_gloss); + Invoke((MethodInvoker)delegate + { + pictureBox_gloss.Image = bitmap_bitch; + pictureBox_gloss.Refresh(); + }); + label7.BackColor = Color.White; + /// Gloss抽出処理 + + + label8.BackColor = Color.Red; + time = DateTime.Now.ToLocalTime().ToString(); + File.AppendAllText("Log.txt ", time + " " + imageFile + " Done!\n"); + + + //csvにboundingbox情報を保存 + sw.WriteLine( + imageFile.Substring(1) + "," + + P1.X.ToString() + "," + P1.Y.ToString() + "," + + P2.X.ToString() + "," + P2.Y.ToString() + "," + + Math.Abs(P1.X - P2.X).ToString() + "," + Math.Abs(P1.Y - P2.Y).ToString() + "," + + areaCount.ToString() + "," + glossCount.ToString() + ); } - mat_extraction.SaveImage(basepath + "\\extraction" + imageFile); - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_extraction); - Invoke((MethodInvoker)delegate - { - pictureBox_extraction.Image = bitmap_bitch; - pictureBox_extraction.Refresh(); - }); - - label6.BackColor = Color.White; - label7.BackColor = Color.Red; - bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_input); - Invoke((MethodInvoker)delegate - { - pictureBox_contract.Image = bitmap_bitch; - pictureBox_contract.Refresh(); - }); - - label7.BackColor = Color.White; - label8.BackColor = Color.Red; - time = DateTime.Now.ToLocalTime().ToString(); - File.AppendAllText("Log.txt ", time + " " + imageFile + " Done!\n"); - - - //csvにboundingbox情報を保存 - sw.WriteLine( - imageFile.Substring(1) + "," - + P1.X.ToString() + "," + P1.Y.ToString() + "," - + P2.X.ToString() + "," + P2.Y.ToString() + "," - + Math.Abs(P1.X - P2.X).ToString() + "," + Math.Abs(P1.Y - P2.Y).ToString() + "," - + areaCount.ToString() - ); - } MessageBox.Show("Finished!"); diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/20180419045627.jpg deleted file mode 100644 index d7d3375..0000000 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/data/20180419045627.jpg +++ /dev/null Binary files differ diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/data/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/data/20180419045627.jpg deleted file mode 100644 index d7d3375..0000000 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/data/20180419045627.jpg +++ /dev/null Binary files differ diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/extraction/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/extraction/20180419045627.jpg deleted file mode 100644 index aa07ef8..0000000 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Release/extraction/20180419045627.jpg +++ /dev/null Binary files differ