Class: OpenCV::Cv::Detail::HomographyBasedEstimator

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

Parameters:

  • is_focals_estimated (Bool)

Raises:

  • (ArgumentError)


14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
# File 'lib/ropencv/ropencv_types.rb', line 14141

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(HomographyBasedEstimatorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # overloaded method wrapper for cv::detail::HomographyBasedEstimator::HomographyBasedEstimator(bool is_focals_estimated = false)
    @@cv_detail_homography_based_estimator_homography_based_estimator_defaults0 ||= [false]
    if(args.size >= 0 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_detail_homography_based_estimator_homography_based_estimator_defaults0[i]
        end
        begin
                return Rbind::cv_detail_homography_based_estimator_homography_based_estimator(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



14136
14137
14138
# File 'lib/ropencv/ropencv_types.rb', line 14136

def self.null
    new(HomographyBasedEstimatorStruct.new)
end

Instance Method Details

#apply(features, pairwise_matches, cameras) ⇒ Bool

Note:

method wrapper for bool cv::detail::HomographyBasedEstimator::operator()(const std::vectorcv::detail::ImageFeatures features, const std::vectorcv::detail::MatchesInfo pairwise_matches, std::vectorcv::detail::CameraParams& cameras)

Parameters:

Returns:

  • (Bool)


14255
14256
14257
14258
# File 'lib/ropencv/ropencv_types.rb', line 14255

def apply(features, pairwise_matches, cameras)
    __validate_pointer__
    Rbind::cv_detail_homography_based_estimator_apply( self, features, pairwise_matches, cameras)
end

#cast_to_estimator(parse_ownership) ⇒ Cv::Detail::Estimator Also known as: castToEstimator

Note:

method wrapper for cv::detail::Estimator* cv::detail::HomographyBasedEstimator::castToEstimator(bool parse_ownership)

methods

Parameters:

  • parse_ownership (Bool)

Returns:



14239
14240
14241
14242
14243
14244
14245
14246
14247
# File 'lib/ropencv/ropencv_types.rb', line 14239

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

#to_sObject

converts HomographyBasedEstimator into a string by crawling through all its attributes



14227
14228
14229
# File 'lib/ropencv/ropencv_types.rb', line 14227

def to_s
    "#<cv::detail::HomographyBasedEstimator >"
end