Class ImageProcessing
Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.1.0)
คลาสช่วยเหลือสำหรับไลบรารี Aspose OCR ช่วยให้สามารถประมวลผลและบันทึกภาพได้
public static class ImageProcessing
การสืบทอด
สมาชิกที่สืบทอด
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
วิธีการ
Render(OcrInput)
ใช้การประมวลผลภาพเพื่อปรับปรุงความแม่นยำของ OCR
สร้างรายการของฟิลเตอร์ที่จะถูกนำไปใช้กับภาพนำเข้าตามลำดับที่คุณระบุ
ตัวอย่างการสร้างฟิลเตอร์:
PreprocessingFilter filters = new PreprocessingFilter
{
PreprocessingFilter.Invert(),
PreprocessingFilter.Threshold(150),
PreprocessingFilter.Binarize(),
PreprocessingFilter.Rotate(180),
PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box),
PreprocessingFilter.Scale(6f),
PreprocessingFilter.Dilate()
};
คุณไม่จำเป็นต้องใช้ทั้งหมด ตั้งค่าเฉพาะสิ่งที่คุณต้องการ
public static OcrInput Render(OcrInput images)
พารามิเตอร์
images
OcrInput
ออบเจ็กต์ OcrInput ที่มีภาพต่างๆ Aspose.OCR.OcrInput
คืนค่า
ออบเจ็กต์ OcrInput ที่มีภาพที่ประมวลผลแล้วในฟิลด์สตรีม Aspose.OCR.OcrInput
Save(OcrInput, string)
ใช้การประมวลผลภาพเพื่อปรับปรุงความแม่นยำของ OCR
สร้างรายการของฟิลเตอร์ที่จะถูกนำไปใช้กับภาพนำเข้าตามลำดับที่คุณระบุ
ตัวอย่างการสร้างฟิลเตอร์:
PreprocessingFilter filters = new PreprocessingFilter
{
PreprocessingFilter.Invert(),
PreprocessingFilter.Threshold(150),
PreprocessingFilter.Binarize(),
PreprocessingFilter.Rotate(180),
PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box),
PreprocessingFilter.Scale(6f),
PreprocessingFilter.Dilate()
};
คุณไม่จำเป็นต้องใช้ทั้งหมด ตั้งค่าเฉพาะสิ่งที่คุณต้องการ
public static OcrInput Save(OcrInput images, string folderPath)
พารามิเตอร์
images
OcrInput
ออบเจ็กต์ OcrInput ที่มีภาพต่างๆ Aspose.OCR.OcrInput
folderPath
string
เส้นทางโดยไม่มีชื่อภาพสำหรับบันทึกภาพที่ประมวลผลแล้ว
คืนค่า
ออบเจ็กต์ OcrInput ที่มีภาพที่ประมวลผลแล้ว Aspose.OCR.OcrInput