Class MockOcrService

java.lang.Object
cn.com.anysdk.ocr.service.impl.MockOcrService
All Implemented Interfaces:
IOcrService

public class MockOcrService extends Object implements IOcrService
  • Constructor Details

    • MockOcrService

      public MockOcrService()
  • Method Details

    • recognize

      public OcrResult recognize(File file, OcrOptions options)
      Description copied from interface: IOcrService
      识别图片文件
      Specified by:
      recognize in interface IOcrService
      Parameters:
      file - 图片文件
      options - 识别选项
      Returns:
      识别结果
    • recognize

      public OcrResult recognize(InputStream inputStream, OcrOptions options)
      Description copied from interface: IOcrService
      识别图片输入流
      Specified by:
      recognize in interface IOcrService
      Parameters:
      inputStream - 图片输入流
      options - 识别选项
      Returns:
      识别结果
    • recognize

      public OcrResult recognize(byte[] imageBytes, OcrOptions options)
      Description copied from interface: IOcrService
      识别图片字节数组
      Specified by:
      recognize in interface IOcrService
      Parameters:
      imageBytes - 图片字节数组
      options - 识别选项
      Returns:
      识别结果
    • recognize

      public OcrResult recognize(String url, OcrOptions options)
      Description copied from interface: IOcrService
      识别图片 URL
      Specified by:
      recognize in interface IOcrService
      Parameters:
      url - 图片 URL
      options - 识别选项
      Returns:
      识别结果