Class: TencentCloud::Ocr::V20181119::TextDetection
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Ocr::V20181119::TextDetection
- Defined in:
- lib/v20181119/models.rb
Overview
文字识别结果
Instance Attribute Summary collapse
-
#AdvancedInfo ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#Confidence ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#DetectedText ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#ItemPolygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#Polygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#WordCoordPoint ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
-
#Words ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(detectedtext = nil, confidence = nil, polygon = nil, advancedinfo = nil, itempolygon = nil, words = nil, wordcoordpoint = nil) ⇒ TextDetection
constructor
A new instance of TextDetection.
Constructor Details
#initialize(detectedtext = nil, confidence = nil, polygon = nil, advancedinfo = nil, itempolygon = nil, words = nil, wordcoordpoint = nil) ⇒ TextDetection
Returns a new instance of TextDetection.
12006 12007 12008 12009 12010 12011 12012 12013 12014 |
# File 'lib/v20181119/models.rb', line 12006 def initialize(detectedtext=nil, confidence=nil, polygon=nil, advancedinfo=nil, itempolygon=nil, words=nil, wordcoordpoint=nil) @DetectedText = detectedtext @Confidence = confidence @Polygon = polygon @AdvancedInfo = advancedinfo @ItemPolygon = itempolygon @Words = words @WordCoordPoint = wordcoordpoint end |
Instance Attribute Details
#AdvancedInfo ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def AdvancedInfo @AdvancedInfo end |
#Confidence ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def Confidence @Confidence end |
#DetectedText ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def DetectedText @DetectedText end |
#ItemPolygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def ItemPolygon @ItemPolygon end |
#Polygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def Polygon @Polygon end |
#WordCoordPoint ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def WordCoordPoint @WordCoordPoint end |
#Words ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12004 12005 12006 |
# File 'lib/v20181119/models.rb', line 12004 def Words @Words end |
Instance Method Details
#deserialize(params) ⇒ Object
12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 |
# File 'lib/v20181119/models.rb', line 12016 def deserialize(params) @DetectedText = params['DetectedText'] @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 @AdvancedInfo = params['AdvancedInfo'] unless params['ItemPolygon'].nil? @ItemPolygon = ItemCoord.new @ItemPolygon.deserialize(params['ItemPolygon']) end unless params['Words'].nil? @Words = [] params['Words'].each do |i| detectedwords_tmp = DetectedWords.new detectedwords_tmp.deserialize(i) @Words << detectedwords_tmp end end unless params['WordCoordPoint'].nil? @WordCoordPoint = [] params['WordCoordPoint'].each do |i| detectedwordcoordpoint_tmp = DetectedWordCoordPoint.new detectedwordcoordpoint_tmp.deserialize(i) @WordCoordPoint << detectedwordcoordpoint_tmp end end end |