StructureParameter.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2021 raoyutian Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. using System.Runtime.InteropServices;
  15. namespace PaddleOCRSharp
  16. {
  17. /// <summary>
  18. /// OCR识别参数
  19. /// </summary>
  20. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  21. public class StructureParameter:OCRParameter
  22. {
  23. /// <summary>
  24. /// 输入图像长宽大于488时,等比例缩放图像,默认488
  25. /// </summary>
  26. public int table_max_len { get; set; } = 488;
  27. /// <summary>
  28. /// 是否合并空单元格
  29. /// </summary>
  30. [field: MarshalAs(UnmanagedType.I1)]
  31. public bool merge_no_span_structure { get; set; } = true;
  32. /// <summary>
  33. /// 批量识别数量
  34. /// </summary>
  35. public int table_batch_num { get; set; } = 1;
  36. }
  37. }