diff --git a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs index f0ea478..5c5b17d 100644 --- a/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs +++ b/Tongue extraction_cropresizemethod/Tongue extraction/Form1.cs @@ -871,13 +871,19 @@ } else { - if (pix.Item1 > thresh) { glossCount++; - pix[0] = (byte)(255); - pix[1] = (byte)(0); - pix[2] = (byte)(0); + pix[0] = (byte)(0); + pix[1] = (byte)(255); + pix[2] = (byte)(255); + mat_gloss.Set(i, j, pix); + } + else + { + pix[0] = (byte)((pix[0] + pix[1] + pix[2]) / 3); + pix[1] = (byte)pix[0]; + pix[2] = (byte)pix[0]; mat_gloss.Set(i, j, pix); } } @@ -922,7 +928,7 @@ + bgr[2].ToString() + "," + bgr[1].ToString() + "," + bgr[0].ToString() ); } - + GC.Collect(); } MessageBox.Show("Finished!");