Class: Kreuzberg::OcrBoundingGeometryQuadrilateral
- Inherits:
-
Data
- Object
- Data
- Kreuzberg::OcrBoundingGeometryQuadrilateral
- Extended by:
- T::Sig
- Includes:
- OcrBoundingGeometry
- Defined in:
- lib/kreuzberg/native.rb
Overview
4-point quadrilateral for rotated/skewed text (PaddleOCR).
Points are in clockwise order starting from top-left: ‘[top_left, top_right, bottom_right, bottom_left]`
Instance Attribute Summary collapse
-
#points ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#points ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
4172 4173 4174 |
# File 'lib/kreuzberg/native.rb', line 4172 def points @points end |
Class Method Details
.from_hash(hash) ⇒ Object
4189 4190 4191 |
# File 'lib/kreuzberg/native.rb', line 4189 def self.from_hash(hash) new(points: hash[:points] || hash["points"]) end |
Instance Method Details
#quadrilateral? ⇒ Boolean
4184 |
# File 'lib/kreuzberg/native.rb', line 4184 def quadrilateral? = true |
#rectangle? ⇒ Boolean
4181 |
# File 'lib/kreuzberg/native.rb', line 4181 def rectangle? = false |