pub struct Features { /* private fields */ }Expand description
A set of Array objects (usually, used in Computer vision context)
Features struct is used by computer vision functions
to return the outcome of their operation. Typically, such output
has the following Arrays:
- X positions of the features
- Y positions of the features
- Scores of the features
- Orientations of the features
- Sizes of the features
§Sharing Across Threads
While sharing this object with other threads, there is no need to wrap this in an Arc object unless only one such object is required to exist. The reason being that ArrayFire’s internal details that are pointed to by the features handle are appropriately reference counted in thread safe manner. However, if these features are to be edited, then please do wrap the object using a Mutex or Read-Write lock.
Implementations§
Source§impl Features
impl Features
Sourcepub fn new(n: u64) -> Self
pub fn new(n: u64) -> Self
Create and return an object of type Features
This object is basically a bunch of Arrays.
Sourcepub fn num_features(&self) -> i64
pub fn num_features(&self) -> i64
Get total number of features found
Sourcepub fn orientation(&self) -> Array<f32>
pub fn orientation(&self) -> Array<f32>
Get orientation Array
Sourcepub unsafe fn get(&self) -> af_features
pub unsafe fn get(&self) -> af_features
Get the internal handle for Features object