Enum BinarizationMethod
Enum BinarizationMethod
A név: Aspose.Note.Saving Összefoglaló: Aspose.Note.dll (25.4.0)
A képernyő bináris módszere.
public enum BinarizationMethod
Fields
FixedThreshold = 0
A kép binarizálása a meghatározott rögzített küszöbön keresztül történik.
Otsu = 1
A kép binarizálása adaptív módon történik az Otsu módszerével a küszöbértékeléshez.
Examples
Megmutatja, hogyan menthet egy dokumentum bináris képet a Otsu módszerrel.
// 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,
}
});
Megmutatja, hogyan menthetünk egy dokumentumot bináris képként rögzített küszöbön.
// 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
}
});