Class: MoondreamClient::Detect::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/moondream-client/detect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_maxFloat (readonly)

Returns Normalized maximum x coordinate (0.0..1.0).

Returns:

  • (Float)

    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_minFloat (readonly)

Returns Normalized minimum x coordinate (0.0..1.0).

Returns:

  • (Float)

    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_maxFloat (readonly)

Returns Normalized maximum y coordinate (0.0..1.0).

Returns:

  • (Float)

    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_minFloat (readonly)

Returns Normalized minimum y coordinate (0.0..1.0).

Returns:

  • (Float)

    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