Enum BinarizationMethod

Enum BinarizationMethod

نام ها : Aspose.Note.Saving جمع آوری: WL31_.dll (25.4.0)

مشخص کردن روش دوگانه سازی برای یک تصویر.

public enum BinarizationMethod

Fields

FixedThreshold = 0

دوگانه سازی تصویر با استفاده از حد ثابت تعیین شده انجام می شود.

Otsu = 1

دوگانه سازی تصویر به صورت سازگار با استفاده از روش Otsu برای ارزیابی محدوده انجام می شود.

Examples

نشان می دهد که چگونه یک سند را به عنوان یک تصویر باینری با استفاده از روش Otsu ذخیره کنید.

// The path to the documents directory.
                                                                            string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                            // Load the document into Aspose.Note.
                                                                            Document oneFile = new Document(dataDir + "Aspose.one");

                                                                            dataDir = dataDir + "SaveToBinaryImageUsingOtsuMethod_out.png";

                                                                            // Save the document as gif.
                                                                            oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
                                                                                                    {
                                                                                                        ColorMode = ColorMode.BlackAndWhite,
                                                                                                        BinarizationOptions = new ImageBinarizationOptions()
                                                                                                                              {
                                                                                                                                  BinarizationMethod = BinarizationMethod.Otsu,
                                                                                                                              }
                                                                                                    });

نشان می دهد که چگونه یک سند را به عنوان یک تصویر باینری با استفاده از حد ثابت ذخیره کنید.

// The path to the documents directory.
                                                                              string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                              // Load the document into Aspose.Note.
                                                                              Document oneFile = new Document(dataDir + "Aspose.one");

                                                                              dataDir = dataDir + "SaveToBinaryImageUsingFixedThreshold_out.png";

                                                                              // Save the document as gif.
                                                                              oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
                                                                                                        {
                                                                                                            ColorMode = ColorMode.BlackAndWhite,
                                                                                                            BinarizationOptions = new ImageBinarizationOptions()
                                                                                                                                      {
                                                                                                                                          BinarizationMethod = BinarizationMethod.FixedThreshold,
                                                                                                                                          BinarizationThreshold = 123
                                                                                                                                      }
                                                                                                        });
 فارسی