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.



7185
7186
7187
7188
# File 'lib/v20200910/models.rb', line 7185

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

Instance Attribute Details

#ItemsObject

Parameters:

  • Items:

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

  • Text:

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



7183
7184
7185
# File 'lib/v20200910/models.rb', line 7183

def Items
  @Items
end

#TextObject

Parameters:

  • Items:

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

  • Text:

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



7183
7184
7185
# File 'lib/v20200910/models.rb', line 7183

def Text
  @Text
end

Instance Method Details

#deserialize(params) ⇒ Object



7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
# File 'lib/v20200910/models.rb', line 7190

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