(::Google::Cloud::Vision::V1::BoundingPoly) — 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:
value (::Google::Cloud::Vision::V1::BoundingPoly) — 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 vertex order will still be (0, 1, 2, 3).
Returns
(::Google::Cloud::Vision::V1::BoundingPoly) — 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 vertex order will still be (0, 1, 2, 3).
#confidence
defconfidence()->::Float
Returns
(::Float) — Confidence of the OCR results on the block. Range [0, 1].
#confidence=
defconfidence=(value)->::Float
Parameter
value (::Float) — Confidence of the OCR results on the block. Range [0, 1].
Returns
(::Float) — Confidence of the OCR results on the block. Range [0, 1].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Vision V1 API - Class Google::Cloud::Vision::V1::Block (v1.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.1 (latest)](/ruby/docs/reference/google-cloud-vision-v1/latest/Google-Cloud-Vision-V1-Block)\n- [1.3.0](/ruby/docs/reference/google-cloud-vision-v1/1.3.0/Google-Cloud-Vision-V1-Block)\n- [1.2.1](/ruby/docs/reference/google-cloud-vision-v1/1.2.1/Google-Cloud-Vision-V1-Block)\n- [1.1.0](/ruby/docs/reference/google-cloud-vision-v1/1.1.0/Google-Cloud-Vision-V1-Block)\n- [1.0.1](/ruby/docs/reference/google-cloud-vision-v1/1.0.1/Google-Cloud-Vision-V1-Block)\n- [0.15.0](/ruby/docs/reference/google-cloud-vision-v1/0.15.0/Google-Cloud-Vision-V1-Block)\n- [0.14.0](/ruby/docs/reference/google-cloud-vision-v1/0.14.0/Google-Cloud-Vision-V1-Block)\n- [0.13.2](/ruby/docs/reference/google-cloud-vision-v1/0.13.2/Google-Cloud-Vision-V1-Block)\n- [0.12.0](/ruby/docs/reference/google-cloud-vision-v1/0.12.0/Google-Cloud-Vision-V1-Block)\n- [0.11.1](/ruby/docs/reference/google-cloud-vision-v1/0.11.1/Google-Cloud-Vision-V1-Block)\n- [0.10.0](/ruby/docs/reference/google-cloud-vision-v1/0.10.0/Google-Cloud-Vision-V1-Block)\n- [0.9.0](/ruby/docs/reference/google-cloud-vision-v1/0.9.0/Google-Cloud-Vision-V1-Block)\n- [0.8.0](/ruby/docs/reference/google-cloud-vision-v1/0.8.0/Google-Cloud-Vision-V1-Block)\n- [0.7.0](/ruby/docs/reference/google-cloud-vision-v1/0.7.0/Google-Cloud-Vision-V1-Block)\n- [0.6.4](/ruby/docs/reference/google-cloud-vision-v1/0.6.4/Google-Cloud-Vision-V1-Block) \nReference documentation and code samples for the Cloud Vision V1 API class Google::Cloud::Vision::V1::Block.\n\nLogical element on the page. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #block_type\n\n def block_type() -\u003e ::Google::Cloud::Vision::V1::Block::BlockType\n\n**Returns**\n\n- ([::Google::Cloud::Vision::V1::Block::BlockType](./Google-Cloud-Vision-V1-Block-BlockType)) --- Detected block type (text, image etc) for this block.\n\n### #block_type=\n\n def block_type=(value) -\u003e ::Google::Cloud::Vision::V1::Block::BlockType\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Vision::V1::Block::BlockType](./Google-Cloud-Vision-V1-Block-BlockType)) --- Detected block type (text, image etc) for this block. \n**Returns**\n\n- ([::Google::Cloud::Vision::V1::Block::BlockType](./Google-Cloud-Vision-V1-Block-BlockType)) --- Detected block type (text, image etc) for this block.\n\n### #bounding_box\n\n def bounding_box() -\u003e ::Google::Cloud::Vision::V1::BoundingPoly\n\n**Returns**\n\n- ([::Google::Cloud::Vision::V1::BoundingPoly](./Google-Cloud-Vision-V1-BoundingPoly)) --- 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:\n\n\n - when the text is horizontal it might look like:\n\n 0----1\n | |\n 3----2\n\n - when it's rotated 180 degrees around the top-left corner it becomes:\n\n 2----3\n | |\n 1----0\n\n and the vertex order will still be (0, 1, 2, 3).\n\n### #bounding_box=\n\n def bounding_box=(value) -\u003e ::Google::Cloud::Vision::V1::BoundingPoly\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Vision::V1::BoundingPoly](./Google-Cloud-Vision-V1-BoundingPoly)) --- 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:\n\n\n - when the text is horizontal it might look like:\n\n 0----1\n | |\n 3----2\n\n - when it's rotated 180 degrees around the top-left corner it becomes:\n\n 2----3\n | |\n 1----0\n\nand the vertex order will still be (0, 1, 2, 3). \n**Returns**\n\n- ([::Google::Cloud::Vision::V1::BoundingPoly](./Google-Cloud-Vision-V1-BoundingPoly)) --- 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:\n\n\n - when the text is horizontal it might look like:\n\n 0----1\n | |\n 3----2\n\n - when it's rotated 180 degrees around the top-left corner it becomes:\n\n 2----3\n | |\n 1----0\n\n and the vertex order will still be (0, 1, 2, 3).\n\n### #confidence\n\n def confidence() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- Confidence of the OCR results on the block. Range \\[0, 1\\].\n\n### #confidence=\n\n def confidence=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- Confidence of the OCR results on the block. Range \\[0, 1\\]. \n**Returns**\n\n- (::Float) --- Confidence of the OCR results on the block. Range \\[0, 1\\].\n\n### #paragraphs\n\n def paragraphs() -\u003e ::Array\u003c::Google::Cloud::Vision::V1::Paragraph\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Vision::V1::Paragraph](./Google-Cloud-Vision-V1-Paragraph)\\\u003e) --- List of paragraphs in this block (if this blocks is of type text).\n\n### #paragraphs=\n\n def paragraphs=(value) -\u003e ::Array\u003c::Google::Cloud::Vision::V1::Paragraph\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Vision::V1::Paragraph](./Google-Cloud-Vision-V1-Paragraph)\\\u003e) --- List of paragraphs in this block (if this blocks is of type text). \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Vision::V1::Paragraph](./Google-Cloud-Vision-V1-Paragraph)\\\u003e) --- List of paragraphs in this block (if this blocks is of type text).\n\n### #property\n\n def property() -\u003e ::Google::Cloud::Vision::V1::TextAnnotation::TextProperty\n\n**Returns**\n\n- ([::Google::Cloud::Vision::V1::TextAnnotation::TextProperty](./Google-Cloud-Vision-V1-TextAnnotation-TextProperty)) --- Additional information detected for the block.\n\n### #property=\n\n def property=(value) -\u003e ::Google::Cloud::Vision::V1::TextAnnotation::TextProperty\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Vision::V1::TextAnnotation::TextProperty](./Google-Cloud-Vision-V1-TextAnnotation-TextProperty)) --- Additional information detected for the block. \n**Returns**\n\n- ([::Google::Cloud::Vision::V1::TextAnnotation::TextProperty](./Google-Cloud-Vision-V1-TextAnnotation-TextProperty)) --- Additional information detected for the block."]]