Struct opencv::core::PCA [] [src]

pub struct PCA {
    pub ptr: *mut c_void,
}

Fields

ptr

Methods

impl PCA

fn as_raw_PCA(&self) -> *mut c_void

impl PCA

fn default() -> Result<PCA, String>

default constructor

fn new_mat_max(data: &Mat, mean: &Mat, flags: i32, maxComponents: i32) -> Result<PCA, String>

the constructor that performs PCA

default value for arguments: - maxComponents: default 0

fn new_mat_variance(data: &Mat, mean: &Mat, flags: i32, retainedVariance: f64) -> Result<PCA, String>

fn compute_var(&mut self, data: &Mat, mean: &Mat, flags: i32, retainedVariance: f64) -> Result<PCA, String>

fn project(&self, vec: &Mat) -> Result<Mat, String>

projects vector from the original space to the principal components subspace

fn project_to(&self, vec: &Mat, result: &Mat) -> Result<(), String>

projects vector from the original space to the principal components subspace

fn back_project(&self, vec: &Mat) -> Result<Mat, String>

reconstructs the original vector from the projection

fn back_project_to(&self, vec: &Mat, result: &Mat) -> Result<(), String>

reconstructs the original vector from the projection

Trait Implementations

impl Drop for PCA

fn drop(&mut self)