Class ImageBinarizationOptions
Το όνομα: Aspose.Note.Saving Συγκέντρωση: Aspose.Note.dll (25.4.0)
Επιλογές για τη δυαδικότητα της εικόνας.
public class ImageBinarizationOptions
Inheritance
object ← ImageBinarizationOptions
Κληρονομημένα μέλη
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
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
}
});
Constructors
ImageBinarizationOptions()
public ImageBinarizationOptions()
Properties
BinarizationMethod
Αποκτά ή ρυθμίζει τη μέθοδο δυαδικότητας.Η προεπιλεγμένη τιμή είναι Aspose.Note.Saving.BinarizationMethod.FixedThreshold.
public BinarizationMethod BinarizationMethod { get; set; }
Αξία ιδιοκτησίας
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
}
});
BinarizationThreshold
Αποκτά ή καθορίζει το όριο αξίας για τη μέθοδο δυαδικότητας σταθερού όρου.Η προεπιλεγμένη τιμή είναι 128.
public byte BinarizationThreshold { get; set; }
Αξία ιδιοκτησίας
Examples
Δείχνει πώς να αποθηκεύσετε ένα έγγραφο ως δυαδική εικόνα χρησιμοποιώντας ένα σταθερό όριο.
// 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
}
});