Class: TencentCloud::Mrs::V20200910::OcrInfo

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

Overview

图片完整的OCR信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items = nil, text = nil) ⇒ OcrInfo

Returns a new instance of OcrInfo.



7212
7213
7214
7215
# File 'lib/v20200910/models.rb', line 7212

def initialize(items=nil, text=nil)
  @Items = items
  @Text = text
end

Instance Attribute Details

#ItemsObject

Parameters:

  • Items:

    图片进行OCR之后得到的所有包含字块的OCR信息

  • Text:

    图片进行OCR之后得到的所有字符



7210
7211
7212
# File 'lib/v20200910/models.rb', line 7210

def Items
  @Items
end

#TextObject

Parameters:

  • Items:

    图片进行OCR之后得到的所有包含字块的OCR信息

  • Text:

    图片进行OCR之后得到的所有字符



7210
7211
7212
# File 'lib/v20200910/models.rb', line 7210

def Text
  @Text
end

Instance Method Details

#deserialize(params) ⇒ Object



7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
# File 'lib/v20200910/models.rb', line 7217

def deserialize(params)
  unless params['Items'].nil?
    @Items = []
    params['Items'].each do |i|
      ocritem_tmp = OcrItem.new
      ocritem_tmp.deserialize(i)
      @Items << ocritem_tmp
    end
  end
  @Text = params['Text']
end