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.
12054 12055 12056 12057 12058 12059 12060 12061 12062 |
# File 'lib/v20181119/models.rb', line 12054 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。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def AdvancedInfo @AdvancedInfo end |
#Confidence ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def Confidence @Confidence end |
#DetectedText ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def DetectedText @DetectedText end |
#ItemPolygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def ItemPolygon @ItemPolygon end |
#Polygon ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def Polygon @Polygon end |
#WordCoordPoint ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def WordCoordPoint @WordCoordPoint end |
#Words ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。
12052 12053 12054 |
# File 'lib/v20181119/models.rb', line 12052 def Words @Words end |
Instance Method Details
#deserialize(params) ⇒ Object
12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 |
# File 'lib/v20181119/models.rb', line 12064 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 |