Class: OpenCV::Cv::FarnebackOpticalFlow

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

.create(num_levels = 5, pyr_scale = 0.5, fast_pyramids = false, win_size = 13, num_iters = 10, poly_n = 5, poly_sigma = 1.1, flags = 0) ⇒ Cv::Ptr::Cv_FarnebackOpticalFlow

Note:

wrapper for static method const cv::Ptrcv::FarnebackOpticalFlow cv::FarnebackOpticalFlow::create(int numLevels = 5, double pyrScale = 0.5, bool fastPyramids = false, int winSize = 13, int numIters = 10, int polyN = 5, double polySigma = 1.1, int flags = 0)

Parameters:

  • num_levels (Fixnum) (defaults to: 5)
  • pyr_scale (Double) (defaults to: 0.5)
  • fast_pyramids (Bool) (defaults to: false)
  • win_size (Fixnum) (defaults to: 13)
  • num_iters (Fixnum) (defaults to: 10)
  • poly_n (Fixnum) (defaults to: 5)
  • poly_sigma (Double) (defaults to: 1.1)
  • flags (Fixnum) (defaults to: 0)

Returns:



41423
41424
41425
# File 'lib/ropencv/ropencv_types.rb', line 41423

def self.create(num_levels = 5, pyr_scale = 0.5, fast_pyramids = false, win_size = 13, num_iters = 10, poly_n = 5, poly_sigma = 1.1, flags = 0)
    Rbind::cv_farneback_optical_flow_create(num_levels, pyr_scale, fast_pyramids, win_size, num_iters, poly_n, poly_sigma, flags)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


41195
41196
41197
41198
41199
41200
41201
41202
# File 'lib/ropencv/ropencv_types.rb', line 41195

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(FarnebackOpticalFlowStruct)
        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



41191
41192
41193
# File 'lib/ropencv/ropencv_types.rb', line 41191

def self.null
    new(FarnebackOpticalFlowStruct.new)
end

Instance Method Details

#calc(_i0, _i1, flow) ⇒ Void

Note:

method wrapper for void cv::FarnebackOpticalFlow::calc(const cv::Mat I0, const cv::Mat I1, cv::Mat& flow)

Parameters:

Returns:

  • (Void)


41446
41447
41448
41449
# File 'lib/ropencv/ropencv_types.rb', line 41446

def calc(_i0, _i1, flow)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_calc( self, _i0, _i1, flow)
end

#cast_to_algorithm(parse_ownership) ⇒ Cv::Algorithm Also known as: castToAlgorithm

Note:

method wrapper for cv::Algorithm* cv::FarnebackOpticalFlow::castToAlgorithm(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



41462
41463
41464
41465
41466
41467
41468
41469
41470
# File 'lib/ropencv/ropencv_types.rb', line 41462

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_farneback_optical_flow_cast_to_algorithm( self, parse_ownership)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#cast_to_dense_optical_flow(parse_ownership) ⇒ Cv::DenseOpticalFlow Also known as: castToDenseOpticalFlow

Note:

method wrapper for cv::DenseOpticalFlow* cv::FarnebackOpticalFlow::castToDenseOpticalFlow(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



41430
41431
41432
41433
41434
41435
41436
41437
41438
# File 'lib/ropencv/ropencv_types.rb', line 41430

def cast_to_dense_optical_flow(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_farneback_optical_flow_cast_to_dense_optical_flow( self, parse_ownership)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#clearVoid

Note:

method wrapper for void cv::FarnebackOpticalFlow::clear()

Returns:

  • (Void)


41475
41476
41477
41478
# File 'lib/ropencv/ropencv_types.rb', line 41475

def clear()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_clear( self)
end

#collect_garbageVoid Also known as: collectGarbage

Note:

method wrapper for void cv::FarnebackOpticalFlow::collectGarbage()

Returns:

  • (Void)


41453
41454
41455
41456
# File 'lib/ropencv/ropencv_types.rb', line 41453

def collect_garbage()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_collect_garbage( self)
end

#emptyBool

Note:

method wrapper for bool cv::FarnebackOpticalFlow::empty()

Returns:

  • (Bool)


41499
41500
41501
41502
# File 'lib/ropencv/ropencv_types.rb', line 41499

def empty()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_empty( self)
end

#get_default_nameStd::String Also known as: getDefaultName

Note:

method wrapper for const std::string cv::FarnebackOpticalFlow::getDefaultName()

Returns:



41514
41515
41516
41517
41518
41519
41520
41521
41522
# File 'lib/ropencv/ropencv_types.rb', line 41514

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_farneback_optical_flow_get_default_name( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#get_fast_pyramidsBool Also known as: getFastPyramids

Note:

method wrapper for bool cv::FarnebackOpticalFlow::getFastPyramids()

Returns:

  • (Bool)


41313
41314
41315
41316
# File 'lib/ropencv/ropencv_types.rb', line 41313

def get_fast_pyramids()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_fast_pyramids( self)
end

#get_flagsFixnum Also known as: getFlags

Note:

method wrapper for int cv::FarnebackOpticalFlow::getFlags()

Returns:

  • (Fixnum)


41398
41399
41400
41401
# File 'lib/ropencv/ropencv_types.rb', line 41398

def get_flags()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_flags( self)
end

#get_num_itersFixnum Also known as: getNumIters

Note:

method wrapper for int cv::FarnebackOpticalFlow::getNumIters()

Returns:

  • (Fixnum)


41347
41348
41349
41350
# File 'lib/ropencv/ropencv_types.rb', line 41347

def get_num_iters()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_num_iters( self)
end

#get_num_levelsFixnum Also known as: getNumLevels

Note:

method wrapper for int cv::FarnebackOpticalFlow::getNumLevels()

methods

Returns:

  • (Fixnum)


41279
41280
41281
41282
# File 'lib/ropencv/ropencv_types.rb', line 41279

def get_num_levels()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_num_levels( self)
end

#get_poly_sigmaDouble Also known as: getPolySigma

Note:

method wrapper for double cv::FarnebackOpticalFlow::getPolySigma()

Returns:

  • (Double)


41381
41382
41383
41384
# File 'lib/ropencv/ropencv_types.rb', line 41381

def get_poly_sigma()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_poly_sigma( self)
end

#get_polynFixnum Also known as: getPolyN

Note:

method wrapper for int cv::FarnebackOpticalFlow::getPolyN()

Returns:

  • (Fixnum)


41364
41365
41366
41367
# File 'lib/ropencv/ropencv_types.rb', line 41364

def get_polyn()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_polyn( self)
end

#get_pyr_scaleDouble Also known as: getPyrScale

Note:

method wrapper for double cv::FarnebackOpticalFlow::getPyrScale()

Returns:

  • (Double)


41296
41297
41298
41299
# File 'lib/ropencv/ropencv_types.rb', line 41296

def get_pyr_scale()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_pyr_scale( self)
end

#get_win_sizeFixnum Also known as: getWinSize

Note:

method wrapper for int cv::FarnebackOpticalFlow::getWinSize()

Returns:

  • (Fixnum)


41330
41331
41332
41333
# File 'lib/ropencv/ropencv_types.rb', line 41330

def get_win_size()
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_get_win_size( self)
end

#read(fn) ⇒ Void

Note:

method wrapper for void cv::FarnebackOpticalFlow::read(const cv::FileNode fn)

Parameters:

Returns:

  • (Void)


41492
41493
41494
41495
# File 'lib/ropencv/ropencv_types.rb', line 41492

def read(fn)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_read( self, fn)
end

#save(filename) ⇒ Void

Note:

method wrapper for void cv::FarnebackOpticalFlow::save(const std::string filename)

Parameters:

Returns:

  • (Void)


41507
41508
41509
41510
# File 'lib/ropencv/ropencv_types.rb', line 41507

def save(filename)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_save( self, filename)
end

#set_fast_pyramids(fast_pyramids) ⇒ Void Also known as: setFastPyramids

Note:

method wrapper for void cv::FarnebackOpticalFlow::setFastPyramids(bool fastPyramids)

Parameters:

  • fast_pyramids (Bool)

Returns:

  • (Void)


41322
41323
41324
41325
# File 'lib/ropencv/ropencv_types.rb', line 41322

def set_fast_pyramids(fast_pyramids)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_fast_pyramids( self, fast_pyramids)
end

#set_flags(flags) ⇒ Void Also known as: setFlags

Note:

method wrapper for void cv::FarnebackOpticalFlow::setFlags(int flags)

Parameters:

  • flags (Fixnum)

Returns:

  • (Void)


41407
41408
41409
41410
# File 'lib/ropencv/ropencv_types.rb', line 41407

def set_flags(flags)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_flags( self, flags)
end

#set_num_iters(num_iters) ⇒ Void Also known as: setNumIters

Note:

method wrapper for void cv::FarnebackOpticalFlow::setNumIters(int numIters)

Parameters:

  • num_iters (Fixnum)

Returns:

  • (Void)


41356
41357
41358
41359
# File 'lib/ropencv/ropencv_types.rb', line 41356

def set_num_iters(num_iters)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_num_iters( self, num_iters)
end

#set_num_levels(num_levels) ⇒ Void Also known as: setNumLevels

Note:

method wrapper for void cv::FarnebackOpticalFlow::setNumLevels(int numLevels)

Parameters:

  • num_levels (Fixnum)

Returns:

  • (Void)


41288
41289
41290
41291
# File 'lib/ropencv/ropencv_types.rb', line 41288

def set_num_levels(num_levels)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_num_levels( self, num_levels)
end

#set_poly_sigma(poly_sigma) ⇒ Void Also known as: setPolySigma

Note:

method wrapper for void cv::FarnebackOpticalFlow::setPolySigma(double polySigma)

Parameters:

  • poly_sigma (Double)

Returns:

  • (Void)


41390
41391
41392
41393
# File 'lib/ropencv/ropencv_types.rb', line 41390

def set_poly_sigma(poly_sigma)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_poly_sigma( self, poly_sigma)
end

#set_polyn(poly_n) ⇒ Void Also known as: setPolyN

Note:

method wrapper for void cv::FarnebackOpticalFlow::setPolyN(int polyN)

Parameters:

  • poly_n (Fixnum)

Returns:

  • (Void)


41373
41374
41375
41376
# File 'lib/ropencv/ropencv_types.rb', line 41373

def set_polyn(poly_n)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_polyn( self, poly_n)
end

#set_pyr_scale(pyr_scale) ⇒ Void Also known as: setPyrScale

Note:

method wrapper for void cv::FarnebackOpticalFlow::setPyrScale(double pyrScale)

Parameters:

  • pyr_scale (Double)

Returns:

  • (Void)


41305
41306
41307
41308
# File 'lib/ropencv/ropencv_types.rb', line 41305

def set_pyr_scale(pyr_scale)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_pyr_scale( self, pyr_scale)
end

#set_win_size(win_size) ⇒ Void Also known as: setWinSize

Note:

method wrapper for void cv::FarnebackOpticalFlow::setWinSize(int winSize)

Parameters:

  • win_size (Fixnum)

Returns:

  • (Void)


41339
41340
41341
41342
# File 'lib/ropencv/ropencv_types.rb', line 41339

def set_win_size(win_size)
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_set_win_size( self, win_size)
end

#to_sObject

converts FarnebackOpticalFlow into a string by crawling through all its attributes



41268
41269
41270
# File 'lib/ropencv/ropencv_types.rb', line 41268

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

#write(fs, name = Std::String.new()) ⇒ Void

Note:

method wrapper for void cv::FarnebackOpticalFlow::write(const cv::Ptrcv::FileStorage fs, const std::string name = String())

Parameters:

Returns:

  • (Void)


41484
41485
41486
41487
# File 'lib/ropencv/ropencv_types.rb', line 41484

def write(fs, name = Std::String.new())
    __validate_pointer__
    Rbind::cv_farneback_optical_flow_write( self, fs, name)
end