Class: OpenCV::Cv::HOGDescriptor
- Inherits:
-
Object
- Object
- OpenCV::Cv::HOGDescriptor
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ruby/ropencv/ropencv_types.rb
Constants collapse
- L2Hys =
0
- DEFAULT_NLEVELS =
64
Instance Attribute Summary collapse
- #__obj_ptr__ ⇒ Object readonly private
Class Method Summary collapse
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
-
.get_daimler_people_detector ⇒ Object
wrapper for vector_float cv::HOGDescriptor::getDaimlerPeopleDetector().
-
.get_default_people_detector ⇒ Object
wrapper for vector_float cv::HOGDescriptor::getDefaultPeopleDetector().
- .new(*args) ⇒ Object
- .rbind_from_native(ptr, context) ⇒ Object private
- .rbind_to_native(obj, context) ⇒ Object private
-
.to_native(obj, context) ⇒ Object
private
can be overwritten by the user.
Instance Method Summary collapse
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#block_size ⇒ Object
wrapper for const cv::Size blockSize.
-
#block_stride ⇒ Object
wrapper for const cv::Size blockStride.
-
#cell_size ⇒ Object
wrapper for const cv::Size cellSize.
-
#check_detector_size ⇒ Object
wrapper for bool cv::HOGDescriptor::checkDetectorSize().
-
#compute(img, descriptors, win_stride = Cv::Size.new(), padding = Cv::Size.new(), locations = VectorPoint.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::compute(const cv::Mat img, vector_float descriptors, const cv::Size winStride=Size(), const cv::Size padding=Size(), const vector_Point locations=vector_Point()).
-
#compute_gradient(img, grad, angle_ofs, padding_t_l = Cv::Size.new(), padding_b_r = Cv::Size.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::computeGradient(const cv::Mat img, cv::Mat grad, cv::Mat angleOfs, const cv::Size paddingTL=Size(), const cv::Size paddingBR=Size()).
-
#deriv_aperture ⇒ Object
wrapper for int derivAperture.
-
#detect(img, found_locations, weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), search_locations = VectorPoint.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::detect(const cv::Mat img, vector_Point foundLocations, vector_double weights, double hitThreshold=0, const cv::Size winStride=Size(), const cv::Size padding=Size(), const vector_Point searchLocations=vector_Point()).
-
#detect_multi_scale(img, found_locations, found_weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), scale = 1.05, final_threshold = 2.0, use_meanshift_grouping = false) ⇒ Object
wrapper for void cv::HOGDescriptor::detectMultiScale(const cv::Mat img, vector_Rect foundLocations, vector_double foundWeights, double hitThreshold=0, const cv::Size winStride=Size(), const cv::Size padding=Size(), double scale=1.05, double finalThreshold=2.0, bool useMeanshiftGrouping=false).
-
#gamma_correction ⇒ Object
wrapper for bool gammaCorrection.
-
#get_descriptor_size ⇒ Object
wrapper for size_t cv::HOGDescriptor::getDescriptorSize().
-
#get_win_sigma ⇒ Object
wrapper for double cv::HOGDescriptor::getWinSigma().
-
#histogram_norm_type ⇒ Object
wrapper for int histogramNormType.
-
#initialize(ptr) ⇒ HOGDescriptor
constructor
private
A new instance of HOGDescriptor.
-
#l2_hys_threshold ⇒ Object
wrapper for double L2HysThreshold.
-
#load(filename, objname = Cv::String.new()) ⇒ Object
wrapper for bool cv::HOGDescriptor::load(const cv::String filename, const cv::String objname=String()).
-
#nbins ⇒ Object
wrapper for int nbins.
-
#nlevels ⇒ Object
wrapper for int nlevels.
-
#save(filename, objname = Cv::String.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::save(const cv::String filename, const cv::String objname=String()).
-
#setsvm_detector(_svmdetector) ⇒ Object
wrapper for void cv::HOGDescriptor::setSVMDetector(const cv::Mat _svmdetector).
-
#svm_detector ⇒ Object
wrapper for const vector_float svmDetector.
-
#win_sigma ⇒ Object
wrapper for double winSigma.
-
#win_size ⇒ Object
methods wrapper for const cv::Size winSize.
Constructor Details
#initialize(ptr) ⇒ HOGDescriptor
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 HOGDescriptor.
12725 12726 12727 12728 12729 12730 12731 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12725 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? HOGDescriptorStruct ptr else HOGDescriptorStruct.new(FFI::AutoPointer.new(ptr,HOGDescriptorStruct.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.
12722 12723 12724 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12722 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
12717 12718 12719 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12717 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_daimler_people_detector ⇒ Object
wrapper for vector_float cv::HOGDescriptor::getDaimlerPeopleDetector()
12882 12883 12884 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12882 def self.get_daimler_people_detector() Rbind::cv_hog_descriptor_get_daimler_people_detector() end |
.get_default_people_detector ⇒ Object
wrapper for vector_float cv::HOGDescriptor::getDefaultPeopleDetector()
12877 12878 12879 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12877 def self.get_default_people_detector() Rbind::cv_hog_descriptor_get_default_people_detector() end |
.new(*args) ⇒ Object
12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12648 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(HOGDescriptorStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for cv::HOGDescriptor::HOGDescriptor() @@cv_hog_descriptor_hog_descriptor_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@cv_hog_descriptor_hog_descriptor_defaults0[i] end begin return Rbind::cv_hog_descriptor_hog_descriptor(*args) rescue TypeError => e @error = e end end # wrapper for cv::HOGDescriptor::HOGDescriptor(const cv::Size _winSize, const cv::Size _blockSize, const cv::Size _blockStride, const cv::Size _cellSize, int _nbins, int _derivAperture=1, double _winSigma=-1, int _histogramNormType=HOGDescriptor::L2Hys, double _L2HysThreshold=0.2, bool _gammaCorrection=false, int _nlevels=HOGDescriptor::DEFAULT_NLEVELS) @@cv_hog_descriptor_hog_descriptor2_defaults1 ||= [nil, nil, nil, nil, nil, 1, -1, HOGDescriptor::L2Hys, 0.2, false, HOGDescriptor::DEFAULT_NLEVELS] if(args.size >= 5 && args.size <= 11) args.size.upto(10) do |i| args[i] = @@cv_hog_descriptor_hog_descriptor2_defaults1[i] end begin return Rbind::cv_hog_descriptor_hog_descriptor2(*args) rescue TypeError => e @error = e end end # wrapper for cv::HOGDescriptor::HOGDescriptor(const cv::String filename) @@cv_hog_descriptor_hog_descriptor3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) args.size.upto(0) do |i| args[i] = @@cv_hog_descriptor_hog_descriptor3_defaults2[i] end begin return Rbind::cv_hog_descriptor_hog_descriptor3(*args) rescue TypeError => e @error = e end 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.
12705 12706 12707 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12705 def self.rbind_from_native(ptr,context) HOGDescriptor.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.
12696 12697 12698 12699 12700 12701 12702 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12696 def self.rbind_to_native(obj,context) if obj.is_a? HOGDescriptor 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
12711 12712 12713 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12711 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
12736 12737 12738 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12736 def __owner__? @__obj_ptr__[:bowner] end |
#block_size ⇒ Object
wrapper for const cv::Size blockSize
12760 12761 12762 12763 12764 12765 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12760 def block_size() result = Rbind::cv_hog_descriptor_get_block_size( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#block_stride ⇒ Object
wrapper for const cv::Size blockStride
12768 12769 12770 12771 12772 12773 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12768 def block_stride() result = Rbind::cv_hog_descriptor_get_block_stride( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#cell_size ⇒ Object
wrapper for const cv::Size cellSize
12776 12777 12778 12779 12780 12781 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12776 def cell_size() result = Rbind::cv_hog_descriptor_get_cell_size( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#check_detector_size ⇒ Object
wrapper for bool cv::HOGDescriptor::checkDetectorSize()
12832 12833 12834 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12832 def check_detector_size() Rbind::cv_hog_descriptor_check_detector_size( self) end |
#compute(img, descriptors, win_stride = Cv::Size.new(), padding = Cv::Size.new(), locations = VectorPoint.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::compute(const cv::Mat img, vector_float descriptors, const cv::Size winStride=Size(), const cv::Size padding=Size(), const vector_Point locations=vector_Point())
12857 12858 12859 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12857 def compute(img, descriptors, win_stride = Cv::Size.new(), padding = Cv::Size.new(), locations = VectorPoint.new()) Rbind::cv_hog_descriptor_compute( self, img, descriptors, win_stride, padding, locations) end |
#compute_gradient(img, grad, angle_ofs, padding_t_l = Cv::Size.new(), padding_b_r = Cv::Size.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::computeGradient(const cv::Mat img, cv::Mat grad, cv::Mat angleOfs, const cv::Size paddingTL=Size(), const cv::Size paddingBR=Size())
12872 12873 12874 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12872 def compute_gradient(img, grad, angle_ofs, padding_t_l = Cv::Size.new(), padding_b_r = Cv::Size.new()) Rbind::cv_hog_descriptor_compute_gradient( self, img, grad, angle_ofs, padding_t_l, padding_b_r) end |
#deriv_aperture ⇒ Object
wrapper for int derivAperture
12789 12790 12791 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12789 def deriv_aperture() Rbind::cv_hog_descriptor_get_deriv_aperture( self) end |
#detect(img, found_locations, weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), search_locations = VectorPoint.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::detect(const cv::Mat img, vector_Point foundLocations, vector_double weights, double hitThreshold=0, const cv::Size winStride=Size(), const cv::Size padding=Size(), const vector_Point searchLocations=vector_Point())
12862 12863 12864 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12862 def detect(img, found_locations, weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), search_locations = VectorPoint.new()) Rbind::cv_hog_descriptor_detect( self, img, found_locations, weights, hit_threshold, win_stride, padding, search_locations) end |
#detect_multi_scale(img, found_locations, found_weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), scale = 1.05, final_threshold = 2.0, use_meanshift_grouping = false) ⇒ Object
wrapper for void cv::HOGDescriptor::detectMultiScale(const cv::Mat img, vector_Rect foundLocations, vector_double foundWeights, double hitThreshold=0, const cv::Size winStride=Size(), const cv::Size padding=Size(), double scale=1.05, double finalThreshold=2.0, bool useMeanshiftGrouping=false)
12867 12868 12869 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12867 def detect_multi_scale(img, found_locations, found_weights, hit_threshold = 0, win_stride = Cv::Size.new(), padding = Cv::Size.new(), scale = 1.05, final_threshold = 2.0, use_meanshift_grouping = false) Rbind::cv_hog_descriptor_detect_multi_scale( self, img, found_locations, found_weights, hit_threshold, win_stride, padding, scale, final_threshold, use_meanshift_grouping) end |
#gamma_correction ⇒ Object
wrapper for bool gammaCorrection
12809 12810 12811 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12809 def gamma_correction() Rbind::cv_hog_descriptor_get_gamma_correction( self) end |
#get_descriptor_size ⇒ Object
wrapper for size_t cv::HOGDescriptor::getDescriptorSize()
12827 12828 12829 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12827 def get_descriptor_size() Rbind::cv_hog_descriptor_get_descriptor_size( self) end |
#get_win_sigma ⇒ Object
wrapper for double cv::HOGDescriptor::getWinSigma()
12837 12838 12839 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12837 def get_win_sigma() Rbind::cv_hog_descriptor_get_win_sigma( self) end |
#histogram_norm_type ⇒ Object
wrapper for int histogramNormType
12799 12800 12801 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12799 def histogram_norm_type() Rbind::cv_hog_descriptor_get_histogram_norm_type( self) end |
#l2_hys_threshold ⇒ Object
wrapper for double L2HysThreshold
12804 12805 12806 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12804 def l2_hys_threshold() Rbind::cv_hog_descriptor_get_l2_hys_threshold( self) end |
#load(filename, objname = Cv::String.new()) ⇒ Object
wrapper for bool cv::HOGDescriptor::load(const cv::String filename, const cv::String objname=String())
12847 12848 12849 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12847 def load(filename, objname = Cv::String.new()) Rbind::cv_hog_descriptor_load( self, filename, objname) end |
#nbins ⇒ Object
wrapper for int nbins
12784 12785 12786 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12784 def nbins() Rbind::cv_hog_descriptor_get_nbins( self) end |
#nlevels ⇒ Object
wrapper for int nlevels
12822 12823 12824 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12822 def nlevels() Rbind::cv_hog_descriptor_get_nlevels( self) end |
#save(filename, objname = Cv::String.new()) ⇒ Object
wrapper for void cv::HOGDescriptor::save(const cv::String filename, const cv::String objname=String())
12852 12853 12854 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12852 def save(filename, objname = Cv::String.new()) Rbind::cv_hog_descriptor_save( self, filename, objname) end |
#setsvm_detector(_svmdetector) ⇒ Object
wrapper for void cv::HOGDescriptor::setSVMDetector(const cv::Mat _svmdetector)
12842 12843 12844 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12842 def setsvm_detector(_svmdetector) Rbind::cv_hog_descriptor_setsvm_detector( self, _svmdetector) end |
#svm_detector ⇒ Object
wrapper for const vector_float svmDetector
12814 12815 12816 12817 12818 12819 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12814 def svm_detector() result = Rbind::cv_hog_descriptor_get_svm_detector( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#win_sigma ⇒ Object
wrapper for double winSigma
12794 12795 12796 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12794 def win_sigma() Rbind::cv_hog_descriptor_get_win_sigma( self) end |
#win_size ⇒ Object
methods wrapper for const cv::Size winSize
12752 12753 12754 12755 12756 12757 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12752 def win_size() result = Rbind::cv_hog_descriptor_get_win_size( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |