class PlateRecognizer::Box
Attributes
xmax[RW]
xmin[RW]
ymax[RW]
ymin[RW]
Public Class Methods
new(opts)
click to toggle source
# File lib/plate_recognizer.rb, line 50 def initialize(opts) @ymin = opts.fetch('ymin') @xmin = opts.fetch('xmin') @ymax = opts.fetch('ymax') @xmax = opts.fetch('xmax') end
Public Instance Methods
height()
click to toggle source
# File lib/plate_recognizer.rb, line 61 def height ymax - ymin end
polygon()
click to toggle source
# File lib/plate_recognizer.rb, line 65 def polygon [ "#{xmin},#{ymin}", "#{xmin},#{ymax}", "#{xmax},#{ymax}", "#{xmax},#{ymin}" ].join(' ') end
width()
click to toggle source
# File lib/plate_recognizer.rb, line 57 def width xmax - xmin end