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.
12104 12105 12106 12107 12108 12109 12110 12111 12112 |
# File 'lib/v20181119/models.rb', line 12104 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。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def AdvancedInfo @AdvancedInfo end |
#Confidence ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def Confidence @Confidence end |
#DetectedText ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def DetectedText @DetectedText end |
#ItemPolygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def ItemPolygon @ItemPolygon end |
#Polygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def Polygon @Polygon end |
#WordCoordPoint ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def WordCoordPoint @WordCoordPoint end |
#Words ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。 GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12102 12103 12104 |
# File 'lib/v20181119/models.rb', line 12102 def Words @Words end |
Instance Method Details
#deserialize(params) ⇒ Object
12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 |
# File 'lib/v20181119/models.rb', line 12114 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 |