Class: Google::Cloud::Vision::V1p3beta1::Block
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::V1p3beta1::Block
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb
Overview
Logical element on the page.
Defined Under Namespace
Modules: BlockType
Instance Attribute Summary collapse
-
#block_type ⇒ ::Google::Cloud::Vision::V1p3beta1::Block::BlockType
Detected block type (text, image etc) for this block.
-
#bounding_box ⇒ ::Google::Cloud::Vision::V1p3beta1::BoundingPoly
The bounding box for the block.
-
#confidence ⇒ ::Float
Confidence of the OCR results on the block.
-
#paragraphs ⇒ ::Array<::Google::Cloud::Vision::V1p3beta1::Paragraph>
List of paragraphs in this block (if this blocks is of type text).
-
#property ⇒ ::Google::Cloud::Vision::V1p3beta1::TextAnnotation::TextProperty
Additional information detected for the block.
Instance Attribute Details
#block_type ⇒ ::Google::Cloud::Vision::V1p3beta1::Block::BlockType
Returns Detected block type (text, image etc) for this block.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb', line 161 class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of a block (text, image etc) as identified by OCR. module BlockType # Unknown block type. UNKNOWN = 0 # Regular text block. TEXT = 1 # Table block. TABLE = 2 # Image block. PICTURE = 3 # Horizontal/vertical line box. RULER = 4 # Barcode block. BARCODE = 5 end end |
#bounding_box ⇒ ::Google::Cloud::Vision::V1p3beta1::BoundingPoly
Returns The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:
when the text is horizontal it might look like:
0----1 | | 3----2
when it's rotated 180 degrees around the top-left corner it becomes:
2----3 | | 1----0
and the vertice order will still be (0, 1, 2, 3).
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb', line 161 class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of a block (text, image etc) as identified by OCR. module BlockType # Unknown block type. UNKNOWN = 0 # Regular text block. TEXT = 1 # Table block. TABLE = 2 # Image block. PICTURE = 3 # Horizontal/vertical line box. RULER = 4 # Barcode block. BARCODE = 5 end end |
#confidence ⇒ ::Float
Returns Confidence of the OCR results on the block. Range [0, 1].
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb', line 161 class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of a block (text, image etc) as identified by OCR. module BlockType # Unknown block type. UNKNOWN = 0 # Regular text block. TEXT = 1 # Table block. TABLE = 2 # Image block. PICTURE = 3 # Horizontal/vertical line box. RULER = 4 # Barcode block. BARCODE = 5 end end |
#paragraphs ⇒ ::Array<::Google::Cloud::Vision::V1p3beta1::Paragraph>
Returns List of paragraphs in this block (if this blocks is of type text).
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb', line 161 class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of a block (text, image etc) as identified by OCR. module BlockType # Unknown block type. UNKNOWN = 0 # Regular text block. TEXT = 1 # Table block. TABLE = 2 # Image block. PICTURE = 3 # Horizontal/vertical line box. RULER = 4 # Barcode block. BARCODE = 5 end end |
#property ⇒ ::Google::Cloud::Vision::V1p3beta1::TextAnnotation::TextProperty
Returns Additional information detected for the block.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb', line 161 class Block include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of a block (text, image etc) as identified by OCR. module BlockType # Unknown block type. UNKNOWN = 0 # Regular text block. TEXT = 1 # Table block. TABLE = 2 # Image block. PICTURE = 3 # Horizontal/vertical line box. RULER = 4 # Barcode block. BARCODE = 5 end end |