Class: OpenCV::Cv::SparsePyrLKOpticalFlow

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(win_size = Cv::Size.new(21, 21), max_level = 3, crit = Cv::TermCriteria.new(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), flags = 0, min_eig_threshold = 1e-4) ⇒ Cv::Ptr::Cv_SparsePyrLKOpticalFlow

Note:

wrapper for static method const cv::Ptrcv::SparsePyrLKOpticalFlow cv::SparsePyrLKOpticalFlow::create(const cv::Size winSize = Size(21, 21), int maxLevel = 3, const cv::TermCriteria crit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4)

Parameters:

  • win_size (Cv::Size) (defaults to: Cv::Size.new(21, 21))
  • max_level (Fixnum) (defaults to: 3)
  • crit (Cv::TermCriteria) (defaults to: Cv::TermCriteria.new(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01))
  • flags (Fixnum) (defaults to: 0)
  • min_eig_threshold (Double) (defaults to: 1e-4)

Returns:



43539
43540
43541
# File 'lib/ropencv/ropencv_types.rb', line 43539

def self.create(win_size = Cv::Size.new(21, 21), max_level = 3, crit = Cv::TermCriteria.new(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), flags = 0, min_eig_threshold = 1e-4)
    Rbind::cv_sparse_pyrlk_optical_flow_create(win_size, max_level, crit, flags, min_eig_threshold)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


43355
43356
43357
43358
43359
43360
43361
43362
# File 'lib/ropencv/ropencv_types.rb', line 43355

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



43351
43352
43353
# File 'lib/ropencv/ropencv_types.rb', line 43351

def self.null
    new(SparsePyrLKOpticalFlowStruct.new)
end

Instance Method Details

#calc(prev_img, next_img, prev_pts, next_pts, status, err = Cv::Mat.new()) ⇒ Void

Note:

method wrapper for void cv::SparsePyrLKOpticalFlow::calc(const cv::Mat prevImg, const cv::Mat nextImg, const cv::Mat prevPts, cv::Mat& nextPts, cv::Mat& status, const cv::Mat err = cv::Mat()/O)

Parameters:

Returns:

  • (Void)


43565
43566
43567
43568
# File 'lib/ropencv/ropencv_types.rb', line 43565

def calc(prev_img, next_img, prev_pts, next_pts, status, err = Cv::Mat.new())
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_calc( self, prev_img, next_img, prev_pts, next_pts, status, err)
end

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

Note:

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

Parameters:

  • parse_ownership (Bool)

Returns:



43573
43574
43575
43576
43577
43578
43579
43580
43581
# File 'lib/ropencv/ropencv_types.rb', line 43573

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_sparse_pyrlk_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_sparse_optical_flow(parse_ownership) ⇒ Cv::SparseOpticalFlow Also known as: castToSparseOpticalFlow

Note:

method wrapper for cv::SparseOpticalFlow* cv::SparsePyrLKOpticalFlow::castToSparseOpticalFlow(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



43546
43547
43548
43549
43550
43551
43552
43553
43554
# File 'lib/ropencv/ropencv_types.rb', line 43546

def cast_to_sparse_optical_flow(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_sparse_pyrlk_optical_flow_cast_to_sparse_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::SparsePyrLKOpticalFlow::clear()

Returns:

  • (Void)


43586
43587
43588
43589
# File 'lib/ropencv/ropencv_types.rb', line 43586

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

#emptyBool

Note:

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

Returns:

  • (Bool)


43610
43611
43612
43613
# File 'lib/ropencv/ropencv_types.rb', line 43610

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

#get_default_nameStd::String Also known as: getDefaultName

Note:

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

Returns:



43625
43626
43627
43628
43629
43630
43631
43632
43633
# File 'lib/ropencv/ropencv_types.rb', line 43625

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_sparse_pyrlk_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_flagsFixnum Also known as: getFlags

Note:

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

Returns:

  • (Fixnum)


43500
43501
43502
43503
# File 'lib/ropencv/ropencv_types.rb', line 43500

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

#get_max_levelFixnum Also known as: getMaxLevel

Note:

method wrapper for int cv::SparsePyrLKOpticalFlow::getMaxLevel()

Returns:

  • (Fixnum)


43461
43462
43463
43464
# File 'lib/ropencv/ropencv_types.rb', line 43461

def get_max_level()
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_get_max_level( self)
end

#get_min_eig_thresholdDouble Also known as: getMinEigThreshold

Note:

method wrapper for double cv::SparsePyrLKOpticalFlow::getMinEigThreshold()

Returns:

  • (Double)


43517
43518
43519
43520
# File 'lib/ropencv/ropencv_types.rb', line 43517

def get_min_eig_threshold()
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_get_min_eig_threshold( self)
end

#get_term_criteriaCv::TermCriteria Also known as: getTermCriteria

Note:

method wrapper for const cv::TermCriteria cv::SparsePyrLKOpticalFlow::getTermCriteria()

Returns:



43478
43479
43480
43481
43482
43483
43484
43485
43486
# File 'lib/ropencv/ropencv_types.rb', line 43478

def get_term_criteria()
    __validate_pointer__
    result = Rbind::cv_sparse_pyrlk_optical_flow_get_term_criteria( 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_win_sizeCv::Size Also known as: getWinSize

Note:

method wrapper for const cv::Size cv::SparsePyrLKOpticalFlow::getWinSize()

methods

Returns:



43439
43440
43441
43442
43443
43444
43445
43446
43447
# File 'lib/ropencv/ropencv_types.rb', line 43439

def get_win_size()
    __validate_pointer__
    result = Rbind::cv_sparse_pyrlk_optical_flow_get_win_size( 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

#read(fn) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


43603
43604
43605
43606
# File 'lib/ropencv/ropencv_types.rb', line 43603

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

#save(filename) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


43618
43619
43620
43621
# File 'lib/ropencv/ropencv_types.rb', line 43618

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

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

Note:

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

Parameters:

  • flags (Fixnum)

Returns:

  • (Void)


43509
43510
43511
43512
# File 'lib/ropencv/ropencv_types.rb', line 43509

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

#set_max_level(max_level) ⇒ Void Also known as: setMaxLevel

Note:

method wrapper for void cv::SparsePyrLKOpticalFlow::setMaxLevel(int maxLevel)

Parameters:

  • max_level (Fixnum)

Returns:

  • (Void)


43470
43471
43472
43473
# File 'lib/ropencv/ropencv_types.rb', line 43470

def set_max_level(max_level)
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_set_max_level( self, max_level)
end

#set_min_eig_threshold(min_eig_threshold) ⇒ Void Also known as: setMinEigThreshold

Note:

method wrapper for void cv::SparsePyrLKOpticalFlow::setMinEigThreshold(double minEigThreshold)

Parameters:

  • min_eig_threshold (Double)

Returns:

  • (Void)


43526
43527
43528
43529
# File 'lib/ropencv/ropencv_types.rb', line 43526

def set_min_eig_threshold(min_eig_threshold)
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_set_min_eig_threshold( self, min_eig_threshold)
end

#set_term_criteria(crit) ⇒ Void Also known as: setTermCriteria

Note:

method wrapper for void cv::SparsePyrLKOpticalFlow::setTermCriteria(const cv::TermCriteria crit)

Parameters:

Returns:

  • (Void)


43492
43493
43494
43495
# File 'lib/ropencv/ropencv_types.rb', line 43492

def set_term_criteria(crit)
    __validate_pointer__
    Rbind::cv_sparse_pyrlk_optical_flow_set_term_criteria( self, crit)
end

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

Note:

method wrapper for void cv::SparsePyrLKOpticalFlow::setWinSize(const cv::Size winSize)

Parameters:

Returns:

  • (Void)


43453
43454
43455
43456
# File 'lib/ropencv/ropencv_types.rb', line 43453

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

#to_sObject

converts SparsePyrLKOpticalFlow into a string by crawling through all its attributes



43428
43429
43430
# File 'lib/ropencv/ropencv_types.rb', line 43428

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

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

Note:

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

Parameters:

Returns:

  • (Void)


43595
43596
43597
43598
# File 'lib/ropencv/ropencv_types.rb', line 43595

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