Class: Xberg::OcrBoundingGeometryQuadrilateral
- Inherits:
-
Data
- Object
- Data
- Xberg::OcrBoundingGeometryQuadrilateral
- Extended by:
- T::Sig
- Includes:
- OcrBoundingGeometry
- Defined in:
- lib/xberg/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
Returns the value of attribute points.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#points ⇒ Object (readonly)
Returns the value of attribute points
4574 4575 4576 |
# File 'lib/xberg/native.rb', line 4574 def points @points end |
Class Method Details
.from_hash(hash) ⇒ Object
4588 4589 4590 |
# File 'lib/xberg/native.rb', line 4588 def self.from_hash(hash) new(points: hash[:points] || hash["points"]) end |
Instance Method Details
#quadrilateral? ⇒ Boolean
4584 4585 4586 |
# File 'lib/xberg/native.rb', line 4584 def quadrilateral? = true # @param hash [Hash] deserialized from the native extension # @return [self] |
#rectangle? ⇒ Boolean
4582 |
# File 'lib/xberg/native.rb', line 4582 def rectangle? = false |