Aspose.Imaging.Examples.CSharp.ModifyingAndConvertingImages.Bradleythreshold.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:Bradleythreshold
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages() + "sample.bmp";

            // Load an existing image.
            using (var objimage = (BmpImage)Image.Load(dataDir))
            {
                // Define threshold value, Call BinarizeBradley method and pass the threshold value as parameter and Save the output image
                double threshold = 0.15;
                objimage.BinarizeBradley(threshold);
                objimage.Save(dataDir + "binarized_out.png");
            }
            // ExEnd:Bradleythreshold
        }
    }
Bradleythreshold