Class: TencentCloud::Ocr::V20181119::TextDetectionResult

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

Overview

识别结果

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil, polygon = nil) ⇒ TextDetectionResult

Returns a new instance of TextDetectionResult.



10982
10983
10984
10985
# File 'lib/v20181119/models.rb', line 10982

def initialize(value=nil, polygon=nil)
  @Value = value
  @Polygon = polygon
end

Instance Attribute Details

#PolygonObject

Parameters:

  • Value:

    识别出的文本行内容

  • Polygon:

    坐标,以四个顶点坐标表示



10980
10981
10982
# File 'lib/v20181119/models.rb', line 10980

def Polygon
  @Polygon
end

#ValueObject

Parameters:

  • Value:

    识别出的文本行内容

  • Polygon:

    坐标,以四个顶点坐标表示



10980
10981
10982
# File 'lib/v20181119/models.rb', line 10980

def Value
  @Value
end

Instance Method Details

#deserialize(params) ⇒ Object



10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
# File 'lib/v20181119/models.rb', line 10987

def deserialize(params)
  @Value = params['Value']
  unless params['Polygon'].nil?
    @Polygon = []
    params['Polygon'].each do |i|
      coord_tmp = Coord.new
      coord_tmp.deserialize(i)
      @Polygon << coord_tmp
    end
  end
end