Class: OpenCV::Cv::VideoCapture
- Inherits:
-
Object
- Object
- OpenCV::Cv::VideoCapture
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #get(prop_id) ⇒ Double
- #grab ⇒ Bool
- #is_opened ⇒ Bool (also: #isOpened)
-
#open(*args) ⇒ Object
methods.
- #read(image) ⇒ Bool
- #release ⇒ Void
- #retrieve(image, channel = 0) ⇒ Bool
- #set(prop_id, value) ⇒ Bool
-
#to_s ⇒ Object
converts VideoCapture into a string by crawling through all its attributes.
Class Method Details
.video_capture ⇒ Object .video_capture(filename) ⇒ Object .video_capture(device) ⇒ Object
29595 29596 29597 29598 29599 29600 29601 29602 29603 29604 29605 29606 29607 29608 29609 29610 29611 29612 29613 29614 29615 29616 29617 29618 29619 29620 29621 29622 29623 29624 29625 29626 29627 29628 29629 29630 29631 29632 29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 |
# File 'lib/ropencv/ropencv_types.rb', line 29595 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(VideoCaptureStruct) 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::VideoCapture::VideoCapture() @@cv_video_capture_video_capture_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_video_capture_video_capture_defaults0[i] end begin return Rbind::cv_video_capture_video_capture(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::VideoCapture::VideoCapture(const cv::String filename) @@cv_video_capture_video_capture2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_video_capture_video_capture2_defaults1[i] end begin return Rbind::cv_video_capture_video_capture2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::VideoCapture::VideoCapture(int device) @@cv_video_capture_video_capture3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_video_capture_video_capture3_defaults2[i] end begin return Rbind::cv_video_capture_video_capture3(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
29584 29585 29586 |
# File 'lib/ropencv/ropencv_types.rb', line 29584 def self.null new(VideoCaptureStruct.new) end |
Instance Method Details
#get(prop_id) ⇒ Double
Note:
method wrapper for double cv::VideoCapture::get(int propId)
29810 29811 29812 29813 |
# File 'lib/ropencv/ropencv_types.rb', line 29810 def get(prop_id) __validate_pointer__ Rbind::cv_video_capture_get( self, prop_id) end |
#grab ⇒ Bool
Note:
method wrapper for bool cv::VideoCapture::grab()
29776 29777 29778 29779 |
# File 'lib/ropencv/ropencv_types.rb', line 29776 def grab() __validate_pointer__ Rbind::cv_video_capture_grab( self) end |
#is_opened ⇒ Bool Also known as: isOpened
Note:
method wrapper for bool cv::VideoCapture::isOpened()
29761 29762 29763 29764 |
# File 'lib/ropencv/ropencv_types.rb', line 29761 def is_opened() __validate_pointer__ Rbind::cv_video_capture_is_opened( self) end |
#open(filename) ⇒ Bool #open(device) ⇒ Bool
Note:
wrapper for overloaded method open
methods
29726 29727 29728 29729 29730 29731 29732 29733 29734 29735 29736 29737 29738 29739 29740 29741 29742 29743 29744 29745 29746 29747 29748 29749 29750 29751 29752 29753 29754 29755 29756 29757 |
# File 'lib/ropencv/ropencv_types.rb', line 29726 def open(*args) __validate_pointer__ # overloaded method wrapper for bool cv::VideoCapture::open(const cv::String filename) @@cv_video_capture_open_defaults0 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_video_capture_open_defaults0[i] end begin return Rbind::cv_video_capture_open(self,*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for bool cv::VideoCapture::open(int device) @@cv_video_capture_open2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_video_capture_open2_defaults1[i] end begin return Rbind::cv_video_capture_open2(self,*targs) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#read(image) ⇒ Bool
Note:
method wrapper for bool cv::VideoCapture::read(cv::Mat& image)
29793 29794 29795 29796 |
# File 'lib/ropencv/ropencv_types.rb', line 29793 def read(image) __validate_pointer__ Rbind::cv_video_capture_read( self, image) end |
#release ⇒ Void
Note:
method wrapper for void cv::VideoCapture::release()
29769 29770 29771 29772 |
# File 'lib/ropencv/ropencv_types.rb', line 29769 def release() __validate_pointer__ Rbind::cv_video_capture_release( self) end |
#retrieve(image, channel = 0) ⇒ Bool
Note:
method wrapper for bool cv::VideoCapture::retrieve(cv::Mat& image, int channel = 0)
29785 29786 29787 29788 |
# File 'lib/ropencv/ropencv_types.rb', line 29785 def retrieve(image, channel = 0) __validate_pointer__ Rbind::cv_video_capture_retrieve( self, image, channel) end |
#set(prop_id, value) ⇒ Bool
Note:
method wrapper for bool cv::VideoCapture::set(int propId, double value)
29802 29803 29804 29805 |
# File 'lib/ropencv/ropencv_types.rb', line 29802 def set(prop_id, value) __validate_pointer__ Rbind::cv_video_capture_set( self, prop_id, value) end |
#to_s ⇒ Object
converts VideoCapture into a string by crawling through all its attributes
29709 29710 29711 |
# File 'lib/ropencv/ropencv_types.rb', line 29709 def to_s "#<cv::VideoCapture >" end |