Class: OpenCV::Cv::SparseOpticalFlow

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

.cast_from_algorithm(ptr, parse_ownership) ⇒ Cv::SparseOpticalFlow Also known as: castFromAlgorithm

Note:

wrapper for static method cv::SparseOpticalFlow* cv::SparseOpticalFlow::castFromAlgorithm(cv::Algorithm* ptr, bool parse_ownership)

Parameters:

Returns:



41092
41093
41094
# File 'lib/ropencv/ropencv_types.rb', line 41092

def self.cast_from_algorithm(ptr, parse_ownership)
    Rbind::cv_sparse_optical_flow_cast_from_algorithm(ptr, parse_ownership)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


40979
40980
40981
40982
40983
40984
40985
40986
# File 'lib/ropencv/ropencv_types.rb', line 40979

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



40975
40976
40977
# File 'lib/ropencv/ropencv_types.rb', line 40975

def self.null
    new(SparseOpticalFlowStruct.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::SparseOpticalFlow::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)

methods

Parameters:

Returns:

  • (Void)


41069
41070
41071
41072
# File 'lib/ropencv/ropencv_types.rb', line 41069

def calc(prev_img, next_img, prev_pts, next_pts, status, err = Cv::Mat.new())
    __validate_pointer__
    Rbind::cv_sparse_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::SparseOpticalFlow::castToAlgorithm(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



41077
41078
41079
41080
41081
41082
41083
41084
41085
# File 'lib/ropencv/ropencv_types.rb', line 41077

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_sparse_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

#clearVoid

Note:

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

Returns:

  • (Void)


41099
41100
41101
41102
# File 'lib/ropencv/ropencv_types.rb', line 41099

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

#emptyBool

Note:

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

Returns:

  • (Bool)


41123
41124
41125
41126
# File 'lib/ropencv/ropencv_types.rb', line 41123

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

#get_default_nameStd::String Also known as: getDefaultName

Note:

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

Returns:



41138
41139
41140
41141
41142
41143
41144
41145
41146
# File 'lib/ropencv/ropencv_types.rb', line 41138

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

#read(fn) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


41116
41117
41118
41119
# File 'lib/ropencv/ropencv_types.rb', line 41116

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

#save(filename) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


41131
41132
41133
41134
# File 'lib/ropencv/ropencv_types.rb', line 41131

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

#to_sObject

converts SparseOpticalFlow into a string by crawling through all its attributes



41052
41053
41054
# File 'lib/ropencv/ropencv_types.rb', line 41052

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

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

Note:

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

Parameters:

Returns:

  • (Void)


41108
41109
41110
41111
# File 'lib/ropencv/ropencv_types.rb', line 41108

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