diff --git a/DeepTongue_feature_LabColor/feature_labColor/newcamera_deeplearning/Form_TIASAutomaticShootingSystem.cs b/DeepTongue_feature_LabColor/feature_labColor/newcamera_deeplearning/Form_TIASAutomaticShootingSystem.cs index 16436f0..15d5e7c 100644 --- a/DeepTongue_feature_LabColor/feature_labColor/newcamera_deeplearning/Form_TIASAutomaticShootingSystem.cs +++ b/DeepTongue_feature_LabColor/feature_labColor/newcamera_deeplearning/Form_TIASAutomaticShootingSystem.cs @@ -63,11 +63,36 @@ mat_oriImg.CopyTo(mat_maskedImg, mat_finalMask); // 5点クリック法(2010石川) - List list_5points = Get5points(mat_finalMask); + //List list_5points = Get5points(mat_finalMask); // 8領域の取得 - List list_8area = Get8area(list_5points); - Show8area(mat_oriImg.Clone(), list_8area); + var p = @"D:\kei2\Study\Tongue\TongueColorAnalysis\automaze5click\Nakaguchi_clicked.csv"; + var sr = new StreamReader(p); + var sw = new StreamWriter(@"D:\kei2\Study\Tongue\TongueColorAnalysis\automaze5click\ed.csv"); + sr.ReadLine(); + for (int i = 0; i < 102; i++) + { + var li = new List(); + var line = sr.ReadLine(); + var list_s = line.Split(','); + for (int j = 2; j < list_s.Length; j = j + 2) + { + int x, y; + int.TryParse(list_s[j], out x); + int.TryParse(list_s[j + 1], out y); + li.Add(new OpenCvSharp.Point(x, y)); + } + List list_8area = Get8area(li); + foreach (var pa in list_8area) + { + sw.Write(pa.X + "," + pa.Y + ","); + } + sw.WriteLine(); + } + sr.Close(); + sw.Close(); + //List list_8area = Get8area(list_5points); + //Show8area(mat_oriImg.Clone(), list_8area); /* // 色抽出 diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs index f23e387..cb68bd5 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs @@ -852,7 +852,7 @@ using (MemoryStream ms = new MemoryStream()) { // ディレクトリglobの取得 - var glob_dir = Directory.GetDirectories("data"); + var glob_dir = Directory.GetDirectories(@"D:\kei2\Study\Tongue\TongueColorAnalysis\automaze5click\Dataset"); for (int a = 0; a < glob_dir.Length; a++) { @@ -987,11 +987,11 @@ 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["generator/input_image"][0], tensor) + //.Fetch(graph["generator/prediction"][0]); - //.AddInput(graph["input_image"][0], tensor) - //.Fetch(graph["generator1/decoder_1/Tanh"][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);