Class: OpenCV::Cv::Detail::DpSeamFinder

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

Constants collapse

COLOR =
0
COLOR_GRAD =
1

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Parameters:

Raises:

  • (ArgumentError)


16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
# File 'lib/ropencv/ropencv_types.rb', line 16522

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(DpSeamFinderStruct)
        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::DpSeamFinder::DpSeamFinder(const std::string costFunc)
    @@cv_detail_dp_seam_finder_dp_seam_finder_defaults0 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_detail_dp_seam_finder_dp_seam_finder_defaults0[i]
        end
        begin
                return Rbind::cv_detail_dp_seam_finder_dp_seam_finder(*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



16517
16518
16519
# File 'lib/ropencv/ropencv_types.rb', line 16517

def self.null
    new(DpSeamFinderStruct.new)
end

Instance Method Details

#cast_to_seam_finder(parse_ownership) ⇒ Cv::Detail::SeamFinder Also known as: castToSeamFinder

Note:

method wrapper for cv::detail::SeamFinder* cv::detail::DpSeamFinder::castToSeamFinder(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



16631
16632
16633
16634
16635
16636
16637
16638
16639
# File 'lib/ropencv/ropencv_types.rb', line 16631

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

#find(src, corners, masks) ⇒ Void

Note:

method wrapper for void cv::detail::DpSeamFinder::find(const std::vectorcv::UMat src, const std::vectorcv::Point corners, std::vectorcv::UMat& masks)

Parameters:

Returns:

  • (Void)


16647
16648
16649
16650
# File 'lib/ropencv/ropencv_types.rb', line 16647

def find(src, corners, masks)
    __validate_pointer__
    Rbind::cv_detail_dp_seam_finder_find( self, src, corners, masks)
end

#set_cost_function(val) ⇒ Void Also known as: setCostFunction

Note:

method wrapper for void cv::detail::DpSeamFinder::setCostFunction(const std::string val)

methods

Parameters:

Returns:

  • (Void)


16622
16623
16624
16625
# File 'lib/ropencv/ropencv_types.rb', line 16622

def set_cost_function(val)
    __validate_pointer__
    Rbind::cv_detail_dp_seam_finder_set_cost_function( self, val)
end

#to_sObject

converts DpSeamFinder into a string by crawling through all its attributes



16608
16609
16610
# File 'lib/ropencv/ropencv_types.rb', line 16608

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