diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs index b0b92db..5417822 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.Designer.cs @@ -383,6 +383,7 @@ this.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2); this.Name = "Form1"; this.Text = "DeepTongue1.6"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_input)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_detection)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_cropResized)).EndInit(); diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs index b6a92ab..4982f02 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs @@ -60,12 +60,15 @@ private ManualResetEvent manualReset = new ManualResetEvent(true); - // 20200421 - delegate bool testDele(); + string fileName_info = "tongue_info_" + DateTime.Now.ToLocalTime().ToString("yyyyMMddss") + ".csv"; + StreamWriter sw; public Form1() { InitializeComponent(); + + // boundingboxなどのinfo出力用 + sw = new StreamWriter(fileName_info, false); } private void Button_start_Click(object sender, EventArgs e) @@ -397,6 +400,8 @@ textBox1.Text = P1.ToString() + ", "; textBox1.Text += P2.ToString() + ", "; textBox1.Text += max_score.ToString() + ", "; + sw.WriteLine("," + "image" + "," + "p1" + "," + "p2" + ","); + sw.WriteLine(imageFile.Substring(1) + "," + P1.ToString() + "," + P2.ToString() + ","); }); } @@ -734,6 +739,8 @@ label8.BackColor = Color.Red; time = DateTime.Now.ToLocalTime().ToString(); File.AppendAllText("Log.txt ", time + " " + imageFile + " Done!\n"); + + } MessageBox.Show("Finished!"); @@ -759,5 +766,12 @@ button_pause.Text = "Pause"; } } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + Console.WriteLine("file closing"); + sw.Close(); + Console.WriteLine("file closed"); + } } } \ No newline at end of file diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/20180419045627.jpg index 459eb3f..aa07ef8 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/20180419045627.jpg +++ b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/extraction/20180419045627.jpg Binary files differ diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/20180419045627.jpg index c3ec308..12b28af 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/20180419045627.jpg +++ b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask/20180419045627.jpg Binary files differ diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/20180419045627.jpg b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/20180419045627.jpg index aefb6c3..e7e8d9c 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/20180419045627.jpg +++ b/Tongue extraction_cropresizemethod/Tongue extraction/bin/x64/Debug/mask_changed2/20180419045627.jpg Binary files differ