CtrEditor/Documentation/PaddleOCRSharpAPI.txt

148 lines
13 KiB
Plaintext

[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/raoyutian/PaddleOCRSharp")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
namespace PaddleOCRSharp
{
public abstract class EngineBase
{
public EngineBase() { }
public static string PaddleOCRdllPath { get; set; }
public virtual void Dispose() { }
public virtual string GetLastError() { }
protected byte[] ImageToBytes(System.Drawing.Image image) { }
public static string GetRootDirectory() { }
}
public class JsonHelper
{
public JsonHelper() { }
public static T DeserializeObject<T>(string json) { }
}
public class ModifyParameter
{
public ModifyParameter() { }
public bool m_det { get; set; }
public float m_det_db_box_thresh { get; set; }
public float m_det_db_thresh { get; set; }
public float m_det_db_unclip_ratio { get; set; }
public int m_max_side_len { get; set; }
public bool m_rec { get; set; }
}
public class OCRModelConfig
{
public OCRModelConfig() { }
public string cls_infer { get; set; }
public string det_infer { get; set; }
public string keys { get; set; }
public string rec_infer { get; set; }
}
public class OCRParameter
{
public OCRParameter() { }
public bool cls { get; set; }
public int cls_batch_num { get; set; }
public float cls_thresh { get; set; }
public int cpu_math_library_num_threads { get; set; }
public bool det { get; set; }
public float det_db_box_thresh { get; set; }
public bool det_db_score_mode { get; set; }
public float det_db_thresh { get; set; }
public float det_db_unclip_ratio { get; set; }
public bool enable_mkldnn { get; set; }
public int gpu_id { get; set; }
public int gpu_mem { get; set; }
public int max_side_len { get; set; }
public bool rec { get; set; }
public int rec_batch_num { get; set; }
public int rec_img_h { get; set; }
public int rec_img_w { get; set; }
public bool show_img_vis { get; set; }
public bool use_angle_cls { get; set; }
public bool use_dilation { get; set; }
public bool use_gpu { get; set; }
public bool use_tensorrt { get; set; }
public bool visualize { get; set; }
}
public class OCRPoint
{
public OCRPoint() { }
public OCRPoint(int x, int y) { }
public int X { get; set; }
public int Y { get; set; }
public override string ToString() { }
}
public class OCRResult
{
public OCRResult() { }
public string JsonText { get; set; }
public string Text { get; }
public System.Collections.Generic.List<PaddleOCRSharp.TextBlock> TextBlocks { get; set; }
public override string ToString() { }
}
public sealed class OCRStructureResult
{
public OCRStructureResult() { }
public System.Collections.Generic.List<PaddleOCRSharp.StructureCells> Cells { get; set; }
public int ColCount { get; set; }
public int RowCount { get; set; }
public System.Collections.Generic.List<PaddleOCRSharp.TextBlock> TextBlocks { get; set; }
}
public class PaddleOCREngine : PaddleOCRSharp.EngineBase
{
public PaddleOCREngine() { }
public PaddleOCREngine(PaddleOCRSharp.OCRModelConfig config) { }
public PaddleOCREngine(PaddleOCRSharp.OCRModelConfig config, PaddleOCRSharp.OCRParameter parameter) { }
public PaddleOCREngine(PaddleOCRSharp.OCRModelConfig config, string parameterjson) { }
public PaddleOCRSharp.OCRStructureResult DetectStructure(System.Drawing.Bitmap image) { }
public PaddleOCRSharp.OCRResult DetectText(System.Drawing.Bitmap image) { }
public PaddleOCRSharp.OCRResult DetectText(byte[] imagebyte) { }
public PaddleOCRSharp.OCRResult DetectText(string imagefile) { }
public PaddleOCRSharp.OCRResult DetectText(nint imgPtr, int nWidth, int nHeight, int nChannel) { }
public PaddleOCRSharp.OCRResult DetectTextBase64(string imagebase64) { }
public override void Dispose() { }
public void EnableDetUseRect(bool enable) { }
public bool ModifyParameter(PaddleOCRSharp.ModifyParameter parameter) { }
}
public class PaddleStructureEngine : PaddleOCRSharp.EngineBase
{
public PaddleStructureEngine() { }
public PaddleStructureEngine(PaddleOCRSharp.StructureModelConfig config) { }
public PaddleStructureEngine(PaddleOCRSharp.StructureModelConfig config, PaddleOCRSharp.StructureParameter parameter) { }
public PaddleStructureEngine(PaddleOCRSharp.StructureModelConfig config, string parameterjson) { }
public override void Dispose() { }
public string StructureDetect(System.Drawing.Image image) { }
public string StructureDetect(byte[] imagebyte) { }
public string StructureDetectBase64(string imagebase64) { }
public string StructureDetectFile(string imagefile) { }
}
public sealed class StructureCells
{
public StructureCells() { }
public int Col { get; set; }
public int Row { get; set; }
public string Text { get; set; }
public System.Collections.Generic.List<PaddleOCRSharp.TextBlock> TextBlocks { get; set; }
}
public class StructureModelConfig : PaddleOCRSharp.OCRModelConfig
{
public StructureModelConfig() { }
public string table_char_dict_path { get; set; }
public string table_model_dir { get; set; }
}
public class StructureParameter : PaddleOCRSharp.OCRParameter
{
public StructureParameter() { }
public bool merge_no_span_structure { get; set; }
public int table_batch_num { get; set; }
public int table_max_len { get; set; }
}
public class TextBlock
{
public TextBlock() { }
public System.Collections.Generic.List<PaddleOCRSharp.OCRPoint> BoxPoints { get; set; }
public float Score { get; set; }
public string Text { get; set; }
public int cls_label { get; set; }
public float cls_score { get; set; }
public override string ToString() { }
}
}