Class: TencentCloud::Ocr::V20181119::WaybillOCRRequest

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20181119/models.rb

Overview

WaybillOCR请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(imagebase64 = nil, imageurl = nil, enablepredetect = nil, ispdf = nil, pdfpagenumber = nil) ⇒ WaybillOCRRequest

Returns a new instance of WaybillOCRRequest.



15032
15033
15034
15035
15036
15037
15038
# File 'lib/v20181119/models.rb', line 15032

def initialize(imagebase64=nil, imageurl=nil, enablepredetect=nil, ispdf=nil, pdfpagenumber=nil)
  @ImageBase64 = imagebase64
  @ImageUrl = imageurl
  @EnablePreDetect = enablepredetect
  @IsPdf = ispdf
  @PdfPageNumber = pdfpagenumber
end

Instance Attribute Details

#EnablePreDetectObject

Parameters:

  • ImageBase64:

    图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。

  • ImageUrl:

    图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。

  • EnablePreDetect:

    预检测开关,当待识别运单占整个输入图像的比例较小时,建议打开预检测开关。默认值为false。

  • IsPdf:

    是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。

  • PdfPageNumber:

    需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。



15030
15031
15032
# File 'lib/v20181119/models.rb', line 15030

def EnablePreDetect
  @EnablePreDetect
end

#ImageBase64Object

Parameters:

  • ImageBase64:

    图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。

  • ImageUrl:

    图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。

  • EnablePreDetect:

    预检测开关,当待识别运单占整个输入图像的比例较小时,建议打开预检测开关。默认值为false。

  • IsPdf:

    是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。

  • PdfPageNumber:

    需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。



15030
15031
15032
# File 'lib/v20181119/models.rb', line 15030

def ImageBase64
  @ImageBase64
end

#ImageUrlObject

Parameters:

  • ImageBase64:

    图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。

  • ImageUrl:

    图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。

  • EnablePreDetect:

    预检测开关,当待识别运单占整个输入图像的比例较小时,建议打开预检测开关。默认值为false。

  • IsPdf:

    是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。

  • PdfPageNumber:

    需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。



15030
15031
15032
# File 'lib/v20181119/models.rb', line 15030

def ImageUrl
  @ImageUrl
end

#IsPdfObject

Parameters:

  • ImageBase64:

    图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。

  • ImageUrl:

    图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。

  • EnablePreDetect:

    预检测开关,当待识别运单占整个输入图像的比例较小时,建议打开预检测开关。默认值为false。

  • IsPdf:

    是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。

  • PdfPageNumber:

    需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。



15030
15031
15032
# File 'lib/v20181119/models.rb', line 15030

def IsPdf
  @IsPdf
end

#PdfPageNumberObject

Parameters:

  • ImageBase64:

    图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。

  • ImageUrl:

    图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。

  • EnablePreDetect:

    预检测开关,当待识别运单占整个输入图像的比例较小时,建议打开预检测开关。默认值为false。

  • IsPdf:

    是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。

  • PdfPageNumber:

    需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。



15030
15031
15032
# File 'lib/v20181119/models.rb', line 15030

def PdfPageNumber
  @PdfPageNumber
end

Instance Method Details

#deserialize(params) ⇒ Object



15040
15041
15042
15043
15044
15045
15046
# File 'lib/v20181119/models.rb', line 15040

def deserialize(params)
  @ImageBase64 = params['ImageBase64']
  @ImageUrl = params['ImageUrl']
  @EnablePreDetect = params['EnablePreDetect']
  @IsPdf = params['IsPdf']
  @PdfPageNumber = params['PdfPageNumber']
end