Enum BinarizationMethod
Enum BinarizationMethod
Το όνομα: Aspose.Note.Saving Συγκέντρωση: Aspose.Note.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
}
});