module TensorflowLite::Image::Detection::BoundingBox

Included Modules

Direct including types

Defined in:

tflite_image/detection/bounding_box.cr

Instance Method Summary

Instance methods inherited from module TensorflowLite::Image::Detection::Lines

lines : Indexable(Detection::Line) lines

Instance methods inherited from module TensorflowLite::Image::Detection::Classification

index : Int32 index, label : String | Nil label, score : Float32 score

Instance Method Detail

def adjust_bounding_box(target_aspect_ratio : Float64, image_width : Int32, image_height : Int32) #

This allows us to extract features from an image in the correct aspect ratio for further processing


[View source]
def area : Float32 #

Calculate the area


[View source]
def aspect_ratio : Float64 #

Calculate current aspect ratio


[View source]
def bottom : Float32 #

[View source]
abstract def boundary : Detection::Line #

[View source]
def height : Float32 #

[View source]
def left : Float32 #

[View source]
def right : Float32 #

[View source]
def to_pixel_coordinates(image_width : Int32, image_height : Int32) #

Convert percentage-based dimensions to pixel coordinates


[View source]
def top : Float32 #

[View source]
def width : Float32 #

Calculate width and height in percentage


[View source]