Class: TencentCloud::Ocr::V20181119::TableCellInfo

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

Overview

单元格数据

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coltl = nil, rowtl = nil, colbr = nil, rowbr = nil, text = nil, type = nil, confidence = nil, polygon = nil) ⇒ TableCellInfo

Returns a new instance of TableCellInfo.



10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
# File 'lib/v20181119/models.rb', line 10336

def initialize(coltl=nil, rowtl=nil, colbr=nil, rowbr=nil, text=nil, type=nil, confidence=nil, polygon=nil)
  @ColTl = coltl
  @RowTl = rowtl
  @ColBr = colbr
  @RowBr = rowbr
  @Text = text
  @Type = type
  @Confidence = confidence
  @Polygon = polygon
end

Instance Attribute Details

#ColBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def ColBr
  @ColBr
end

#ColTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def ColTl
  @ColTl
end

#ConfidenceObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def Confidence
  @Confidence
end

#PolygonObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def Polygon
  @Polygon
end

#RowBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def RowBr
  @RowBr
end

#RowTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def RowTl
  @RowTl
end

#TextObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def Text
  @Text
end

#TypeObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格内识别出的字符串文本,若文本存在多行,以换行符“n”隔开

  • Type:

    单元格类型

  • Confidence:

    单元格置信度

  • Polygon:

    单元格在图像中的四点坐标



10334
10335
10336
# File 'lib/v20181119/models.rb', line 10334

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
# File 'lib/v20181119/models.rb', line 10347

def deserialize(params)
  @ColTl = params['ColTl']
  @RowTl = params['RowTl']
  @ColBr = params['ColBr']
  @RowBr = params['RowBr']
  @Text = params['Text']
  @Type = params['Type']
  @Confidence = params['Confidence']
  unless params['Polygon'].nil?
    @Polygon = []
    params['Polygon'].each do |i|
      coord_tmp = Coord.new
      coord_tmp.deserialize(i)
      @Polygon << coord_tmp
    end
  end
end