Class: OpenCV::Cv::Stitcher

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

Constants collapse

OK =
0
ERR_NEED_MORE_IMGS =
1
ERR_HOMOGRAPHY_EST_FAIL =
2
ERR_CAMERA_PARAMS_ADJUST_FAIL =
3
PANORAMA =
0
SCANS =
1

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mode = :PANORAMA) ⇒ Cv::Ptr::Cv_Stitcher

Note:

wrapper for static method const cv::Ptrcv::Stitcher cv::Stitcher::create(cv::Stitcher::Mode mode = Stitcher::PANORAMA)

methods

Parameters:

  • mode (Cv::Stitcher::Mode) (defaults to: :PANORAMA)

Returns:



76400
76401
76402
# File 'lib/ropencv/ropencv_types.rb', line 76400

def self.create(mode = :PANORAMA)
    Rbind::cv_stitcher_create(mode)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


76309
76310
76311
76312
76313
76314
76315
76316
# File 'lib/ropencv/ropencv_types.rb', line 76309

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



76305
76306
76307
# File 'lib/ropencv/ropencv_types.rb', line 76305

def self.null
    new(StitcherStruct.new)
end

Instance Method Details

#compose_panorama(pano) ⇒ Cv::Stitcher::Status #compose_panorama(images, pano) ⇒ Cv::Stitcher::Status

Note:

wrapper for overloaded method compose_panorama

Overloads:

  • #compose_panorama(pano) ⇒ Cv::Stitcher::Status

    Parameters:

    Returns:

    • (Cv::Stitcher::Status)
  • #compose_panorama(images, pano) ⇒ Cv::Stitcher::Status

    Parameters:

    Returns:

    • (Cv::Stitcher::Status)

Raises:

  • (ArgumentError)


76525
76526
76527
76528
76529
76530
76531
76532
76533
76534
76535
76536
76537
76538
76539
76540
76541
76542
76543
76544
76545
76546
76547
76548
76549
76550
76551
76552
76553
76554
76555
76556
# File 'lib/ropencv/ropencv_types.rb', line 76525

def compose_panorama(*args)
    __validate_pointer__
    # overloaded method wrapper for cv::Stitcher::Status cv::Stitcher::composePanorama(cv::Mat& pano)
    @@cv_stitcher_compose_panorama_defaults0 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_stitcher_compose_panorama_defaults0[i]
        end
        begin
                return Rbind::cv_stitcher_compose_panorama(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Stitcher::Status cv::Stitcher::composePanorama(const std::vector<cv::Mat> images, cv::Mat& pano)
    @@cv_stitcher_compose_panorama__2_defaults1 ||= [nil, nil]
    if(args.size >= 2 && args.size <= 2)
        targs = args.clone
        targs.size.upto(1) do |i|
            targs[i] = @@cv_stitcher_compose_panorama__2_defaults1[i]
        end
        begin
                return Rbind::cv_stitcher_compose_panorama__2(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

#compositing_resolDouble Also known as: compositingResol

Note:

method wrapper for double cv::Stitcher::compositingResol()

Returns:

  • (Double)


76440
76441
76442
76443
# File 'lib/ropencv/ropencv_types.rb', line 76440

def compositing_resol()
    __validate_pointer__
    Rbind::cv_stitcher_compositing_resol( self)
end

#estimate_transform(images, masks = Std::Vector::Cv_Mat.new()) ⇒ Cv::Stitcher::Status Also known as: estimateTransform

Note:

method wrapper for cv::Stitcher::Status cv::Stitcher::estimateTransform(const std::vectorcv::Mat images, const std::vectorcv::Mat masks = vector())

Parameters:

Returns:

  • (Cv::Stitcher::Status)


76510
76511
76512
76513
# File 'lib/ropencv/ropencv_types.rb', line 76510

def estimate_transform(images, masks = Std::Vector::Cv_Mat.new())
    __validate_pointer__
    Rbind::cv_stitcher_estimate_transform( self, images, masks)
end

#interpolation_flagsCv::InterpolationFlags Also known as: interpolationFlags

Note:

method wrapper for cv::InterpolationFlags cv::Stitcher::interpolationFlags()

Returns:

  • (Cv::InterpolationFlags)


76491
76492
76493
76494
# File 'lib/ropencv/ropencv_types.rb', line 76491

def interpolation_flags()
    __validate_pointer__
    Rbind::cv_stitcher_interpolation_flags( self)
end

#pano_confidence_threshDouble Also known as: panoConfidenceThresh

Note:

method wrapper for double cv::Stitcher::panoConfidenceThresh()

Returns:

  • (Double)


76457
76458
76459
76460
# File 'lib/ropencv/ropencv_types.rb', line 76457

def pano_confidence_thresh()
    __validate_pointer__
    Rbind::cv_stitcher_pano_confidence_thresh( self)
end

#registration_resolDouble Also known as: registrationResol

Note:

method wrapper for double cv::Stitcher::registrationResol()

Returns:

  • (Double)


76406
76407
76408
76409
# File 'lib/ropencv/ropencv_types.rb', line 76406

def registration_resol()
    __validate_pointer__
    Rbind::cv_stitcher_registration_resol( self)
end

#seam_estimation_resolDouble Also known as: seamEstimationResol

Note:

method wrapper for double cv::Stitcher::seamEstimationResol()

Returns:

  • (Double)


76423
76424
76425
76426
# File 'lib/ropencv/ropencv_types.rb', line 76423

def seam_estimation_resol()
    __validate_pointer__
    Rbind::cv_stitcher_seam_estimation_resol( self)
end

#set_compositing_resol(resol_mpx) ⇒ Void Also known as: setCompositingResol

Note:

method wrapper for void cv::Stitcher::setCompositingResol(double resol_mpx)

Parameters:

  • resol_mpx (Double)

Returns:

  • (Void)


76449
76450
76451
76452
# File 'lib/ropencv/ropencv_types.rb', line 76449

def set_compositing_resol(resol_mpx)
    __validate_pointer__
    Rbind::cv_stitcher_set_compositing_resol( self, resol_mpx)
end

#set_interpolation_flags(interp_flags) ⇒ Void Also known as: setInterpolationFlags

Note:

method wrapper for void cv::Stitcher::setInterpolationFlags(cv::InterpolationFlags interp_flags)

Parameters:

  • interp_flags (Cv::InterpolationFlags)

Returns:

  • (Void)


76500
76501
76502
76503
# File 'lib/ropencv/ropencv_types.rb', line 76500

def set_interpolation_flags(interp_flags)
    __validate_pointer__
    Rbind::cv_stitcher_set_interpolation_flags( self, interp_flags)
end

#set_pano_confidence_thresh(conf_thresh) ⇒ Void Also known as: setPanoConfidenceThresh

Note:

method wrapper for void cv::Stitcher::setPanoConfidenceThresh(double conf_thresh)

Parameters:

  • conf_thresh (Double)

Returns:

  • (Void)


76466
76467
76468
76469
# File 'lib/ropencv/ropencv_types.rb', line 76466

def set_pano_confidence_thresh(conf_thresh)
    __validate_pointer__
    Rbind::cv_stitcher_set_pano_confidence_thresh( self, conf_thresh)
end

#set_registration_resol(resol_mpx) ⇒ Void Also known as: setRegistrationResol

Note:

method wrapper for void cv::Stitcher::setRegistrationResol(double resol_mpx)

Parameters:

  • resol_mpx (Double)

Returns:

  • (Void)


76415
76416
76417
76418
# File 'lib/ropencv/ropencv_types.rb', line 76415

def set_registration_resol(resol_mpx)
    __validate_pointer__
    Rbind::cv_stitcher_set_registration_resol( self, resol_mpx)
end

#set_seam_estimation_resol(resol_mpx) ⇒ Void Also known as: setSeamEstimationResol

Note:

method wrapper for void cv::Stitcher::setSeamEstimationResol(double resol_mpx)

Parameters:

  • resol_mpx (Double)

Returns:

  • (Void)


76432
76433
76434
76435
# File 'lib/ropencv/ropencv_types.rb', line 76432

def set_seam_estimation_resol(resol_mpx)
    __validate_pointer__
    Rbind::cv_stitcher_set_seam_estimation_resol( self, resol_mpx)
end

#set_wave_correction(flag) ⇒ Void Also known as: setWaveCorrection

Note:

method wrapper for void cv::Stitcher::setWaveCorrection(bool flag)

Parameters:

  • flag (Bool)

Returns:

  • (Void)


76483
76484
76485
76486
# File 'lib/ropencv/ropencv_types.rb', line 76483

def set_wave_correction(flag)
    __validate_pointer__
    Rbind::cv_stitcher_set_wave_correction( self, flag)
end

#stitch(images, pano) ⇒ Cv::Stitcher::Status #stitch(images, masks, pano) ⇒ Cv::Stitcher::Status

Note:

wrapper for overloaded method stitch

Overloads:

Raises:

  • (ArgumentError)


76569
76570
76571
76572
76573
76574
76575
76576
76577
76578
76579
76580
76581
76582
76583
76584
76585
76586
76587
76588
76589
76590
76591
76592
76593
76594
76595
76596
76597
76598
76599
76600
# File 'lib/ropencv/ropencv_types.rb', line 76569

def stitch(*args)
    __validate_pointer__
    # overloaded method wrapper for cv::Stitcher::Status cv::Stitcher::stitch(const std::vector<cv::Mat> images, cv::Mat& pano)
    @@cv_stitcher_stitch_defaults0 ||= [nil, nil]
    if(args.size >= 2 && args.size <= 2)
        targs = args.clone
        targs.size.upto(1) do |i|
            targs[i] = @@cv_stitcher_stitch_defaults0[i]
        end
        begin
                return Rbind::cv_stitcher_stitch(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Stitcher::Status cv::Stitcher::stitch(const std::vector<cv::Mat> images, const std::vector<cv::Mat> masks, cv::Mat& pano)
    @@cv_stitcher_stitch__2_defaults1 ||= [nil, nil, nil]
    if(args.size >= 3 && args.size <= 3)
        targs = args.clone
        targs.size.upto(2) do |i|
            targs[i] = @@cv_stitcher_stitch__2_defaults1[i]
        end
        begin
                return Rbind::cv_stitcher_stitch__2(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

#to_sObject

converts Stitcher into a string by crawling through all its attributes



76382
76383
76384
# File 'lib/ropencv/ropencv_types.rb', line 76382

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

#wave_correctionBool Also known as: waveCorrection

Note:

method wrapper for bool cv::Stitcher::waveCorrection()

Returns:

  • (Bool)


76474
76475
76476
76477
# File 'lib/ropencv/ropencv_types.rb', line 76474

def wave_correction()
    __validate_pointer__
    Rbind::cv_stitcher_wave_correction( self)
end

#work_scaleDouble Also known as: workScale

Note:

method wrapper for double cv::Stitcher::workScale()

Returns:

  • (Double)


76604
76605
76606
76607
# File 'lib/ropencv/ropencv_types.rb', line 76604

def work_scale()
    __validate_pointer__
    Rbind::cv_stitcher_work_scale( self)
end