Class: OpenCV::Cv::Tracker

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ropencv/ropencv_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


44198
44199
44200
44201
44202
44203
44204
44205
# File 'lib/ropencv/ropencv_types.rb', line 44198

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(TrackerStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



44194
44195
44196
# File 'lib/ropencv/ropencv_types.rb', line 44194

def self.null
    new(TrackerStruct.new)
end

Instance Method Details

#init(image, bounding_box) ⇒ Void

Note:

method wrapper for void cv::Tracker::init(const cv::Mat image, const cv::Rect boundingBox)

methods

Parameters:

Returns:

  • (Void)


44284
44285
44286
44287
# File 'lib/ropencv/ropencv_types.rb', line 44284

def init(image, bounding_box)
    __validate_pointer__
    Rbind::cv_tracker_init( self, image, bounding_box)
end

#to_sObject

converts Tracker into a string by crawling through all its attributes



44271
44272
44273
# File 'lib/ropencv/ropencv_types.rb', line 44271

def to_s
    "#<cv::Tracker >"
end

#update(image, bounding_box) ⇒ Bool

Note:

method wrapper for bool cv::Tracker::update(const cv::Mat image, cv::Rect& boundingBox)

Parameters:

Returns:

  • (Bool)


44293
44294
44295
44296
# File 'lib/ropencv/ropencv_types.rb', line 44293

def update(image, bounding_box)
    __validate_pointer__
    Rbind::cv_tracker_update( self, image, bounding_box)
end