Struct opencv::mcc::ColorCorrectionModel
source · pub struct ColorCorrectionModel { /* private fields */ }Expand description
Core class of ccm model
Produce a ColorCorrectionModel instance for inference
Implementations
sourceimpl ColorCorrectionModel
impl ColorCorrectionModel
sourcepub fn new(src: &Mat, constcolor: CONST_COLOR) -> Result<ColorCorrectionModel>
pub fn new(src: &Mat, constcolor: CONST_COLOR) -> Result<ColorCorrectionModel>
Color Correction Model
Supported list of color cards:
- @ref COLORCHECKER_Macbeth, the Macbeth ColorChecker
- @ref COLORCHECKER_Vinyl, the DKK ColorChecker
- @ref COLORCHECKER_DigitalSG, the DigitalSG ColorChecker with 140 squares
Parameters
-
src: detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; -
constcolor: the Built-in color card
sourcepub fn new_1(
src: &Mat,
colors: Mat,
ref_cs: COLOR_SPACE
) -> Result<ColorCorrectionModel>
pub fn new_1(
src: &Mat,
colors: Mat,
ref_cs: COLOR_SPACE
) -> Result<ColorCorrectionModel>
Color Correction Model
Parameters
-
src: detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; -
colors: the reference color values, the color values are in [0, 1].
-
ref_cs: the corresponding color space If the color type is some RGB, the format is RGB not BGR;
sourcepub fn new_2(
src: &Mat,
colors: Mat,
ref_cs: COLOR_SPACE,
colored: Mat
) -> Result<ColorCorrectionModel>
pub fn new_2(
src: &Mat,
colors: Mat,
ref_cs: COLOR_SPACE,
colored: Mat
) -> Result<ColorCorrectionModel>
Color Correction Model
Parameters
-
src: detected colors of ColorChecker patches;
the color type is RGB not BGR, and the color values are in [0, 1]; -
colors: the reference color values, the color values are in [0, 1].
-
ref_cs: the corresponding color space If the color type is some RGB, the format is RGB not BGR;
-
colored: mask of colored color
Trait Implementations
sourceimpl Boxed for ColorCorrectionModel
impl Boxed for ColorCorrectionModel
sourceimpl ColorCorrectionModelTrait for ColorCorrectionModel
impl ColorCorrectionModelTrait for ColorCorrectionModel
fn as_raw_mut_ColorCorrectionModel(&mut self) -> *mut c_void
sourcefn set_color_space(&mut self, cs: COLOR_SPACE) -> Result<()>
fn set_color_space(&mut self, cs: COLOR_SPACE) -> Result<()>
set ColorSpace Read more
sourcefn set_distance(&mut self, distance: DISTANCE_TYPE) -> Result<()>
fn set_distance(&mut self, distance: DISTANCE_TYPE) -> Result<()>
set Distance Read more
sourcefn set_linear(&mut self, linear_type: LINEAR_TYPE) -> Result<()>
fn set_linear(&mut self, linear_type: LINEAR_TYPE) -> Result<()>
set Linear Read more
sourcefn set_saturated_threshold(&mut self, lower: &f64, upper: &f64) -> Result<()>
fn set_saturated_threshold(&mut self, lower: &f64, upper: &f64) -> Result<()>
set SaturatedThreshold.
The colors in the closed interval [lower, upper] are reserved to participate
in the calculation of the loss function and initialization parameters Read more
sourcefn set_initial_method(
&mut self,
initial_method_type: INITIAL_METHOD_TYPE
) -> Result<()>
fn set_initial_method(
&mut self,
initial_method_type: INITIAL_METHOD_TYPE
) -> Result<()>
set InitialMethod Read more
sourceimpl ColorCorrectionModelTraitConst for ColorCorrectionModel
impl ColorCorrectionModelTraitConst for ColorCorrectionModel
fn as_raw_ColorCorrectionModel(&self) -> *const c_void
fn get_ccm(&self) -> Result<Mat>
fn get_loss(&self) -> Result<f64>
fn get_src_rgbl(&self) -> Result<Mat>
fn get_dst_rgbl(&self) -> Result<Mat>
fn get_mask(&self) -> Result<Mat>
fn get_weights(&self) -> Result<Mat>
sourceimpl Drop for ColorCorrectionModel
impl Drop for ColorCorrectionModel
impl Send for ColorCorrectionModel
Auto Trait Implementations
impl RefUnwindSafe for ColorCorrectionModel
impl !Sync for ColorCorrectionModel
impl Unpin for ColorCorrectionModel
impl UnwindSafe for ColorCorrectionModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more