Class: OpenCV::Cv::BackgroundSubtractorMOG2

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)


38799
38800
38801
38802
38803
38804
38805
38806
# File 'lib/ropencv/ropencv_types.rb', line 38799

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



38795
38796
38797
# File 'lib/ropencv/ropencv_types.rb', line 38795

def self.null
    new(BackgroundSubtractorMOG2Struct.new)
end

Instance Method Details

#apply(image, fgmask, learning_rate = -1)) ⇒ Void

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::apply(const cv::Mat image, cv::Mat& fgmask, double learningRate = -1)

Parameters:

  • image (Cv::Mat)
  • fgmask (Cv::Mat)
  • learning_rate (Double) (defaults to: -1))

Returns:

  • (Void)


39090
39091
39092
39093
# File 'lib/ropencv/ropencv_types.rb', line 39090

def apply(image, fgmask, learning_rate = -1)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_apply( self, image, fgmask, learning_rate)
end

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

Note:

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

Parameters:

  • parse_ownership (Bool)

Returns:



39121
39122
39123
39124
39125
39126
39127
39128
39129
# File 'lib/ropencv/ropencv_types.rb', line 39121

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_background_subtractormog2_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_background_subtractor(parse_ownership) ⇒ Cv::BackgroundSubtractor Also known as: castToBackgroundSubtractor

Note:

method wrapper for cv::BackgroundSubtractor* cv::BackgroundSubtractorMOG2::castToBackgroundSubtractor(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



39098
39099
39100
39101
39102
39103
39104
39105
39106
# File 'lib/ropencv/ropencv_types.rb', line 39098

def cast_to_background_subtractor(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_background_subtractormog2_cast_to_background_subtractor( 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::BackgroundSubtractorMOG2::clear()

Returns:

  • (Void)


39134
39135
39136
39137
# File 'lib/ropencv/ropencv_types.rb', line 39134

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

#emptyBool

Note:

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

Returns:

  • (Bool)


39158
39159
39160
39161
# File 'lib/ropencv/ropencv_types.rb', line 39158

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

#get_background_image(background_image) ⇒ Void Also known as: getBackgroundImage

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::getBackgroundImage(cv::Mat& backgroundImage)

Parameters:

Returns:

  • (Void)


39112
39113
39114
39115
# File 'lib/ropencv/ropencv_types.rb', line 39112

def get_background_image(background_image)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_background_image( self, background_image)
end

#get_background_ratioDouble Also known as: getBackgroundRatio

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getBackgroundRatio()

Returns:

  • (Double)


38917
38918
38919
38920
# File 'lib/ropencv/ropencv_types.rb', line 38917

def get_background_ratio()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_background_ratio( self)
end

#get_complexity_reduction_thresholdDouble Also known as: getComplexityReductionThreshold

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getComplexityReductionThreshold()

Returns:

  • (Double)


39019
39020
39021
39022
# File 'lib/ropencv/ropencv_types.rb', line 39019

def get_complexity_reduction_threshold()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_complexity_reduction_threshold( self)
end

#get_default_nameStd::String Also known as: getDefaultName

Note:

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

Returns:



39173
39174
39175
39176
39177
39178
39179
39180
39181
# File 'lib/ropencv/ropencv_types.rb', line 39173

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_background_subtractormog2_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_detect_shadowsBool Also known as: getDetectShadows

Note:

method wrapper for bool cv::BackgroundSubtractorMOG2::getDetectShadows()

Returns:

  • (Bool)


39036
39037
39038
39039
# File 'lib/ropencv/ropencv_types.rb', line 39036

def get_detect_shadows()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_detect_shadows( self)
end

#get_historyFixnum Also known as: getHistory

Note:

method wrapper for int cv::BackgroundSubtractorMOG2::getHistory()

methods

Returns:

  • (Fixnum)


38883
38884
38885
38886
# File 'lib/ropencv/ropencv_types.rb', line 38883

def get_history()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_history( self)
end

#get_shadow_thresholdDouble Also known as: getShadowThreshold

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getShadowThreshold()

Returns:

  • (Double)


39070
39071
39072
39073
# File 'lib/ropencv/ropencv_types.rb', line 39070

def get_shadow_threshold()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_shadow_threshold( self)
end

#get_shadow_valueFixnum Also known as: getShadowValue

Note:

method wrapper for int cv::BackgroundSubtractorMOG2::getShadowValue()

Returns:

  • (Fixnum)


39053
39054
39055
39056
# File 'lib/ropencv/ropencv_types.rb', line 39053

def get_shadow_value()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_shadow_value( self)
end

#get_var_initDouble Also known as: getVarInit

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getVarInit()

Returns:

  • (Double)


38968
38969
38970
38971
# File 'lib/ropencv/ropencv_types.rb', line 38968

def get_var_init()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_var_init( self)
end

#get_var_maxDouble Also known as: getVarMax

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getVarMax()

Returns:

  • (Double)


39002
39003
39004
39005
# File 'lib/ropencv/ropencv_types.rb', line 39002

def get_var_max()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_var_max( self)
end

#get_var_minDouble Also known as: getVarMin

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getVarMin()

Returns:

  • (Double)


38985
38986
38987
38988
# File 'lib/ropencv/ropencv_types.rb', line 38985

def get_var_min()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_var_min( self)
end

#get_var_thresholdDouble Also known as: getVarThreshold

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getVarThreshold()

Returns:

  • (Double)


38934
38935
38936
38937
# File 'lib/ropencv/ropencv_types.rb', line 38934

def get_var_threshold()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_var_threshold( self)
end

#get_var_threshold_genDouble Also known as: getVarThresholdGen

Note:

method wrapper for double cv::BackgroundSubtractorMOG2::getVarThresholdGen()

Returns:

  • (Double)


38951
38952
38953
38954
# File 'lib/ropencv/ropencv_types.rb', line 38951

def get_var_threshold_gen()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_get_var_threshold_gen( self)
end

#getn_mixturesFixnum Also known as: getNMixtures

Note:

method wrapper for int cv::BackgroundSubtractorMOG2::getNMixtures()

Returns:

  • (Fixnum)


38900
38901
38902
38903
# File 'lib/ropencv/ropencv_types.rb', line 38900

def getn_mixtures()
    __validate_pointer__
    Rbind::cv_background_subtractormog2_getn_mixtures( self)
end

#read(fn) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


39151
39152
39153
39154
# File 'lib/ropencv/ropencv_types.rb', line 39151

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

#save(filename) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


39166
39167
39168
39169
# File 'lib/ropencv/ropencv_types.rb', line 39166

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

#set_background_ratio(ratio) ⇒ Void Also known as: setBackgroundRatio

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setBackgroundRatio(double ratio)

Parameters:

  • ratio (Double)

Returns:

  • (Void)


38926
38927
38928
38929
# File 'lib/ropencv/ropencv_types.rb', line 38926

def set_background_ratio(ratio)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_background_ratio( self, ratio)
end

#set_complexity_reduction_threshold(ct) ⇒ Void Also known as: setComplexityReductionThreshold

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setComplexityReductionThreshold(double ct)

Parameters:

  • ct (Double)

Returns:

  • (Void)


39028
39029
39030
39031
# File 'lib/ropencv/ropencv_types.rb', line 39028

def set_complexity_reduction_threshold(ct)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_complexity_reduction_threshold( self, ct)
end

#set_detect_shadows(detect_shadows) ⇒ Void Also known as: setDetectShadows

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setDetectShadows(bool detectShadows)

Parameters:

  • detect_shadows (Bool)

Returns:

  • (Void)


39045
39046
39047
39048
# File 'lib/ropencv/ropencv_types.rb', line 39045

def set_detect_shadows(detect_shadows)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_detect_shadows( self, detect_shadows)
end

#set_history(history) ⇒ Void Also known as: setHistory

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setHistory(int history)

Parameters:

  • history (Fixnum)

Returns:

  • (Void)


38892
38893
38894
38895
# File 'lib/ropencv/ropencv_types.rb', line 38892

def set_history(history)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_history( self, history)
end

#set_shadow_threshold(threshold) ⇒ Void Also known as: setShadowThreshold

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setShadowThreshold(double threshold)

Parameters:

  • threshold (Double)

Returns:

  • (Void)


39079
39080
39081
39082
# File 'lib/ropencv/ropencv_types.rb', line 39079

def set_shadow_threshold(threshold)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_shadow_threshold( self, threshold)
end

#set_shadow_value(value) ⇒ Void Also known as: setShadowValue

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setShadowValue(int value)

Parameters:

  • value (Fixnum)

Returns:

  • (Void)


39062
39063
39064
39065
# File 'lib/ropencv/ropencv_types.rb', line 39062

def set_shadow_value(value)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_shadow_value( self, value)
end

#set_var_init(var_init) ⇒ Void Also known as: setVarInit

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setVarInit(double varInit)

Parameters:

  • var_init (Double)

Returns:

  • (Void)


38977
38978
38979
38980
# File 'lib/ropencv/ropencv_types.rb', line 38977

def set_var_init(var_init)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_var_init( self, var_init)
end

#set_var_max(var_max) ⇒ Void Also known as: setVarMax

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setVarMax(double varMax)

Parameters:

  • var_max (Double)

Returns:

  • (Void)


39011
39012
39013
39014
# File 'lib/ropencv/ropencv_types.rb', line 39011

def set_var_max(var_max)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_var_max( self, var_max)
end

#set_var_min(var_min) ⇒ Void Also known as: setVarMin

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setVarMin(double varMin)

Parameters:

  • var_min (Double)

Returns:

  • (Void)


38994
38995
38996
38997
# File 'lib/ropencv/ropencv_types.rb', line 38994

def set_var_min(var_min)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_var_min( self, var_min)
end

#set_var_threshold(var_threshold) ⇒ Void Also known as: setVarThreshold

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setVarThreshold(double varThreshold)

Parameters:

  • var_threshold (Double)

Returns:

  • (Void)


38943
38944
38945
38946
# File 'lib/ropencv/ropencv_types.rb', line 38943

def set_var_threshold(var_threshold)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_var_threshold( self, var_threshold)
end

#set_var_threshold_gen(var_threshold_gen) ⇒ Void Also known as: setVarThresholdGen

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setVarThresholdGen(double varThresholdGen)

Parameters:

  • var_threshold_gen (Double)

Returns:

  • (Void)


38960
38961
38962
38963
# File 'lib/ropencv/ropencv_types.rb', line 38960

def set_var_threshold_gen(var_threshold_gen)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_set_var_threshold_gen( self, var_threshold_gen)
end

#setn_mixtures(nmixtures) ⇒ Void Also known as: setNMixtures

Note:

method wrapper for void cv::BackgroundSubtractorMOG2::setNMixtures(int nmixtures)

Parameters:

  • nmixtures (Fixnum)

Returns:

  • (Void)


38909
38910
38911
38912
# File 'lib/ropencv/ropencv_types.rb', line 38909

def setn_mixtures(nmixtures)
    __validate_pointer__
    Rbind::cv_background_subtractormog2_setn_mixtures( self, nmixtures)
end

#to_sObject

converts BackgroundSubtractorMOG2 into a string by crawling through all its attributes



38872
38873
38874
# File 'lib/ropencv/ropencv_types.rb', line 38872

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

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

Note:

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

Parameters:

Returns:

  • (Void)


39143
39144
39145
39146
# File 'lib/ropencv/ropencv_types.rb', line 39143

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