Class: CVFFI::ImagePatch::Mask
- Inherits:
-
Object
- Object
- CVFFI::ImagePatch::Mask
- Defined in:
- lib/opencv-ffi-wrappers/features2d/image_patch.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(size) ⇒ Mask
constructor
A new instance of Mask.
Constructor Details
#initialize(size) ⇒ Mask
Returns a new instance of Mask.
12 13 14 |
# File 'lib/opencv-ffi-wrappers/features2d/image_patch.rb', line 12 def initialize(size) @size = size end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
11 12 13 |
# File 'lib/opencv-ffi-wrappers/features2d/image_patch.rb', line 11 def size @size end |
Class Method Details
.make(params) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/opencv-ffi-wrappers/features2d/image_patch.rb', line 16 def self.make( params ) case params.shape when :square SquareMask.new( params.size ) when :circle, :circular CircularMask.new(params.size ) else raise "Don't know how to make shape #{params.shape}" end end |