Class: OpenCV::Cv::Moments

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ Moments

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Moments.



7965
7966
7967
7968
7969
7970
7971
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7965

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? MomentsStruct
                       ptr
                   else
                       MomentsStruct.new(FFI::AutoPointer.new(ptr,MomentsStruct.method(:release)))
                   end
end

Instance Attribute Details

#__obj_ptr__Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7962
7963
7964
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7962

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

.from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



7957
7958
7959
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7957

def self.from_native(ptr,context)
    rbind_from_native(ptr,context)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


7926
7927
7928
7929
7930
7931
7932
7933
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7926

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

.rbind_from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7945
7946
7947
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7945

def self.rbind_from_native(ptr,context)
    Moments.new(ptr)
end

.rbind_to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7936
7937
7938
7939
7940
7941
7942
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7936

def self.rbind_to_native(obj,context)
    if obj.is_a? Moments
        obj.__obj_ptr__
    else
        raise TypeError, "expected kind of #{name}, was #{obj.class}"
    end
end

.to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



7951
7952
7953
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7951

def self.to_native(obj,context)
    rbind_to_native(obj,context)
end

Instance Method Details

#__owner__?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

returns true if the underlying pointer is owner of the real object

Returns:

  • (Boolean)


7976
7977
7978
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7976

def __owner__?
    @__obj_ptr__[:bowner]
end

#m00Object

methods wrapper for double m00



7990
7991
7992
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7990

def m00()
    Rbind::cv_moments_getm00( self)
end

#m00=(value) ⇒ Object

wrapper for double m00



7995
7996
7997
# File 'lib/ruby/ropencv/ropencv_types.rb', line 7995

def m00=(value)
    Rbind::cv_moments_setm00( self, value)
end

#m01Object

wrapper for double m01



8010
8011
8012
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8010

def m01()
    Rbind::cv_moments_getm01( self)
end

#m01=(value) ⇒ Object

wrapper for double m01



8015
8016
8017
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8015

def m01=(value)
    Rbind::cv_moments_setm01( self, value)
end

#m02Object

wrapper for double m02



8040
8041
8042
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8040

def m02()
    Rbind::cv_moments_getm02( self)
end

#m02=(value) ⇒ Object

wrapper for double m02



8045
8046
8047
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8045

def m02=(value)
    Rbind::cv_moments_setm02( self, value)
end

#m03Object

wrapper for double m03



8080
8081
8082
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8080

def m03()
    Rbind::cv_moments_getm03( self)
end

#m03=(value) ⇒ Object

wrapper for double m03



8085
8086
8087
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8085

def m03=(value)
    Rbind::cv_moments_setm03( self, value)
end

#m10Object

wrapper for double m10



8000
8001
8002
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8000

def m10()
    Rbind::cv_moments_getm10( self)
end

#m10=(value) ⇒ Object

wrapper for double m10



8005
8006
8007
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8005

def m10=(value)
    Rbind::cv_moments_setm10( self, value)
end

#m11Object

wrapper for double m11



8030
8031
8032
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8030

def m11()
    Rbind::cv_moments_getm11( self)
end

#m11=(value) ⇒ Object

wrapper for double m11



8035
8036
8037
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8035

def m11=(value)
    Rbind::cv_moments_setm11( self, value)
end

#m12Object

wrapper for double m12



8070
8071
8072
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8070

def m12()
    Rbind::cv_moments_getm12( self)
end

#m12=(value) ⇒ Object

wrapper for double m12



8075
8076
8077
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8075

def m12=(value)
    Rbind::cv_moments_setm12( self, value)
end

#m20Object

wrapper for double m20



8020
8021
8022
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8020

def m20()
    Rbind::cv_moments_getm20( self)
end

#m20=(value) ⇒ Object

wrapper for double m20



8025
8026
8027
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8025

def m20=(value)
    Rbind::cv_moments_setm20( self, value)
end

#m21Object

wrapper for double m21



8060
8061
8062
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8060

def m21()
    Rbind::cv_moments_getm21( self)
end

#m21=(value) ⇒ Object

wrapper for double m21



8065
8066
8067
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8065

def m21=(value)
    Rbind::cv_moments_setm21( self, value)
end

#m30Object

wrapper for double m30



8050
8051
8052
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8050

def m30()
    Rbind::cv_moments_getm30( self)
end

#m30=(value) ⇒ Object

wrapper for double m30



8055
8056
8057
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8055

def m30=(value)
    Rbind::cv_moments_setm30( self, value)
end

#mu02Object

wrapper for double mu02



8110
8111
8112
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8110

def mu02()
    Rbind::cv_moments_get_mu02( self)
end

#mu02=(value) ⇒ Object

wrapper for double mu02



8115
8116
8117
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8115

def mu02=(value)
    Rbind::cv_moments_set_mu02( self, value)
end

#mu03Object

wrapper for double mu03



8150
8151
8152
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8150

def mu03()
    Rbind::cv_moments_get_mu03( self)
end

#mu03=(value) ⇒ Object

wrapper for double mu03



8155
8156
8157
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8155

def mu03=(value)
    Rbind::cv_moments_set_mu03( self, value)
end

#mu11Object

wrapper for double mu11



8100
8101
8102
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8100

def mu11()
    Rbind::cv_moments_get_mu11( self)
end

#mu11=(value) ⇒ Object

wrapper for double mu11



8105
8106
8107
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8105

def mu11=(value)
    Rbind::cv_moments_set_mu11( self, value)
end

#mu12Object

wrapper for double mu12



8140
8141
8142
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8140

def mu12()
    Rbind::cv_moments_get_mu12( self)
end

#mu12=(value) ⇒ Object

wrapper for double mu12



8145
8146
8147
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8145

def mu12=(value)
    Rbind::cv_moments_set_mu12( self, value)
end

#mu20Object

wrapper for double mu20



8090
8091
8092
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8090

def mu20()
    Rbind::cv_moments_get_mu20( self)
end

#mu20=(value) ⇒ Object

wrapper for double mu20



8095
8096
8097
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8095

def mu20=(value)
    Rbind::cv_moments_set_mu20( self, value)
end

#mu21Object

wrapper for double mu21



8130
8131
8132
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8130

def mu21()
    Rbind::cv_moments_get_mu21( self)
end

#mu21=(value) ⇒ Object

wrapper for double mu21



8135
8136
8137
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8135

def mu21=(value)
    Rbind::cv_moments_set_mu21( self, value)
end

#mu30Object

wrapper for double mu30



8120
8121
8122
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8120

def mu30()
    Rbind::cv_moments_get_mu30( self)
end

#mu30=(value) ⇒ Object

wrapper for double mu30



8125
8126
8127
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8125

def mu30=(value)
    Rbind::cv_moments_set_mu30( self, value)
end

#nu02Object

wrapper for double nu02



8180
8181
8182
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8180

def nu02()
    Rbind::cv_moments_get_nu02( self)
end

#nu02=(value) ⇒ Object

wrapper for double nu02



8185
8186
8187
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8185

def nu02=(value)
    Rbind::cv_moments_set_nu02( self, value)
end

#nu03Object

wrapper for double nu03



8220
8221
8222
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8220

def nu03()
    Rbind::cv_moments_get_nu03( self)
end

#nu03=(value) ⇒ Object

wrapper for double nu03



8225
8226
8227
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8225

def nu03=(value)
    Rbind::cv_moments_set_nu03( self, value)
end

#nu11Object

wrapper for double nu11



8170
8171
8172
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8170

def nu11()
    Rbind::cv_moments_get_nu11( self)
end

#nu11=(value) ⇒ Object

wrapper for double nu11



8175
8176
8177
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8175

def nu11=(value)
    Rbind::cv_moments_set_nu11( self, value)
end

#nu12Object

wrapper for double nu12



8210
8211
8212
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8210

def nu12()
    Rbind::cv_moments_get_nu12( self)
end

#nu12=(value) ⇒ Object

wrapper for double nu12



8215
8216
8217
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8215

def nu12=(value)
    Rbind::cv_moments_set_nu12( self, value)
end

#nu20Object

wrapper for double nu20



8160
8161
8162
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8160

def nu20()
    Rbind::cv_moments_get_nu20( self)
end

#nu20=(value) ⇒ Object

wrapper for double nu20



8165
8166
8167
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8165

def nu20=(value)
    Rbind::cv_moments_set_nu20( self, value)
end

#nu21Object

wrapper for double nu21



8200
8201
8202
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8200

def nu21()
    Rbind::cv_moments_get_nu21( self)
end

#nu21=(value) ⇒ Object

wrapper for double nu21



8205
8206
8207
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8205

def nu21=(value)
    Rbind::cv_moments_set_nu21( self, value)
end

#nu30Object

wrapper for double nu30



8190
8191
8192
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8190

def nu30()
    Rbind::cv_moments_get_nu30( self)
end

#nu30=(value) ⇒ Object

wrapper for double nu30



8195
8196
8197
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8195

def nu30=(value)
    Rbind::cv_moments_set_nu30( self, value)
end