diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs index 8c0b99c..b27fd7e 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs @@ -75,7 +75,7 @@ sw.WriteLine( "image" + "," + "top left X" + "," + "top left Y" + "," + "bottom right X" + "," + "bottom right Y" + "," + - "Width" + "," + "Height" + "," + "Area" + "," + "Gloss Count" + "," + "mean R" + "," + "mean G" + "," + "mean B"); + "Width" + "," + "Height" + "," + "Area" + "," + "Gloss Count"); } [Conditional("DEBUG")] @@ -802,7 +802,6 @@ label6.BackColor = Color.Red; mat_extraction = mat_input.Clone(); areaCount = 0; - var bgr = new double[3] { 0.0, 0.0, 0.0 }; for (int i = 0; i < mat_input.Height; i++) { for (int j = 0; j < mat_input.Width; j++) @@ -820,17 +819,11 @@ 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); - bgr[0] += pix[0]; - bgr[1] += pix[1]; - bgr[2] += pix[2]; mat_extraction.Set(i, j, pix); areaCount++; } } } - bgr[0] /= areaCount; - bgr[1] /= areaCount; - bgr[2] /= areaCount; mat_extraction.SaveImage(basepath + "\\extraction" + imageFile); bitmap_bitch = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat_extraction); Invoke((MethodInvoker)delegate @@ -925,8 +918,7 @@ + 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() + "," - + bgr[2].ToString() + "," + bgr[1].ToString() + "," + bgr[0].ToString() + + areaCount.ToString() + "," + glossCount.ToString() ); } GC.Collect();