Class: MoondreamClient::Detect::BoundingBox
- Inherits:
-
Object
- Object
- MoondreamClient::Detect::BoundingBox
- Defined in:
- lib/moondream-client/detect.rb
Instance Attribute Summary collapse
-
#x_max ⇒ Float
readonly
Normalized maximum x coordinate (0.0..1.0).
-
#x_min ⇒ Float
readonly
Normalized minimum x coordinate (0.0..1.0).
-
#y_max ⇒ Float
readonly
Normalized maximum y coordinate (0.0..1.0).
-
#y_min ⇒ Float
readonly
Normalized minimum y coordinate (0.0..1.0).
Instance Method Summary collapse
-
#initialize(x_min:, y_min:, x_max:, y_max:) ⇒ BoundingBox
constructor
A new instance of BoundingBox.
Constructor Details
#initialize(x_min:, y_min:, x_max:, y_max:) ⇒ BoundingBox
Returns a new instance of BoundingBox.
15 16 17 18 19 20 |
# File 'lib/moondream-client/detect.rb', line 15 def initialize(x_min:, y_min:, x_max:, y_max:) @x_min = x_min @y_min = y_min @x_max = x_max @y_max = y_max end |
Instance Attribute Details
#x_max ⇒ Float (readonly)
Returns Normalized maximum x coordinate (0.0..1.0).
11 12 13 |
# File 'lib/moondream-client/detect.rb', line 11 def x_max @x_max end |
#x_min ⇒ Float (readonly)
Returns Normalized minimum x coordinate (0.0..1.0).
7 8 9 |
# File 'lib/moondream-client/detect.rb', line 7 def x_min @x_min end |
#y_max ⇒ Float (readonly)
Returns Normalized maximum y coordinate (0.0..1.0).
13 14 15 |
# File 'lib/moondream-client/detect.rb', line 13 def y_max @y_max end |
#y_min ⇒ Float (readonly)
Returns Normalized minimum y coordinate (0.0..1.0).
9 10 11 |
# File 'lib/moondream-client/detect.rb', line 9 def y_min @y_min end |