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
}
});