[][src]Trait opencv::hub_prelude::_OutputArrayTrait

pub trait _OutputArrayTrait: _InputArrayTrait {
    pub fn as_raw__OutputArray(&self) -> *const c_void;
pub fn as_raw_mut__OutputArray(&mut self) -> *mut c_void; pub fn fixed_size(&self) -> Result<bool> { ... }
pub fn fixed_type(&self) -> Result<bool> { ... }
pub fn needed(&self) -> Result<bool> { ... }
pub fn get_mat_ref(&self, i: i32) -> Result<Mat> { ... }
pub fn get_umat_ref(&self, i: i32) -> Result<UMat> { ... }
pub fn get_gpu_mat_ref(&self) -> Result<GpuMat> { ... }
pub fn get_gpu_mat_vec_ref(&self) -> Result<Vector<GpuMat>> { ... }
pub fn get_o_gl_buffer_ref(&self) -> Result<Buffer> { ... }
pub fn get_host_mem_ref(&self) -> Result<HostMem> { ... }
pub fn create_size(
        &self,
        sz: Size,
        typ: i32,
        i: i32,
        allow_transposed: bool,
        fixed_depth_mask: _OutputArray_DepthMask
    ) -> Result<()> { ... }
pub fn create(
        &self,
        rows: i32,
        cols: i32,
        typ: i32,
        i: i32,
        allow_transposed: bool,
        fixed_depth_mask: _OutputArray_DepthMask
    ) -> Result<()> { ... }
pub fn create_nd(
        &self,
        size: &[i32],
        typ: i32,
        i: i32,
        allow_transposed: bool,
        fixed_depth_mask: _OutputArray_DepthMask
    ) -> Result<()> { ... }
pub unsafe fn create_same_size(
        &self,
        arr: &dyn ToInputArray,
        mtype: i32
    ) -> Result<()> { ... }
pub fn release(&self) -> Result<()> { ... }
pub fn clear(&self) -> Result<()> { ... }
pub fn set_to(
        &self,
        value: &dyn ToInputArray,
        mask: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn assign(&self, u: &UMat) -> Result<()> { ... }
pub fn assign_1(&self, m: &Mat) -> Result<()> { ... }
pub fn assign_2(&self, v: &Vector<UMat>) -> Result<()> { ... }
pub fn assign_3(&self, v: &Vector<Mat>) -> Result<()> { ... }
pub fn move_(&self, u: &mut UMat) -> Result<()> { ... }
pub fn move__1(&self, m: &mut Mat) -> Result<()> { ... } }

This type is very similar to InputArray except that it is used for input/output and output function parameters.

Just like with InputArray, OpenCV users should not care about OutputArray, they just pass Mat, vector<T> etc. to the functions. The same limitation as for InputArray: Do not explicitly create OutputArray instances applies here too.

If you want to make your function polymorphic (i.e. accept different arrays as output parameters), it is also not very difficult. Take the sample above as the reference. Note that _OutputArray::create() needs to be called before _OutputArray::getMat(). This way you guarantee that the output array is properly allocated.

Optional output parameters. If you do not need certain output array to be computed and returned to you, pass cv::noArray(), just like you would in the case of optional input array. At the implementation level, use _OutputArray::needed() to check if certain output array needs to be computed or not.

There are several synonyms for OutputArray that are used to assist automatic Python/Java/... wrapper generators:

   typedef OutputArray OutputArrayOfArrays;
   typedef OutputArray InputOutputArray;
   typedef OutputArray InputOutputArrayOfArrays;

Required methods

Loading content...

Provided methods

pub fn fixed_size(&self) -> Result<bool>[src]

pub fn fixed_type(&self) -> Result<bool>[src]

pub fn needed(&self) -> Result<bool>[src]

pub fn get_mat_ref(&self, i: i32) -> Result<Mat>[src]

pub fn get_umat_ref(&self, i: i32) -> Result<UMat>[src]

pub fn get_gpu_mat_ref(&self) -> Result<GpuMat>[src]

pub fn get_gpu_mat_vec_ref(&self) -> Result<Vector<GpuMat>>[src]

pub fn get_o_gl_buffer_ref(&self) -> Result<Buffer>[src]

pub fn get_host_mem_ref(&self) -> Result<HostMem>[src]

pub fn create_size(
    &self,
    sz: Size,
    typ: i32,
    i: i32,
    allow_transposed: bool,
    fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
[src]

C++ default parameters

  • i: -1
  • allow_transposed: false
  • fixed_depth_mask: static_cast<_OutputArray::DepthMask>(0)

pub fn create(
    &self,
    rows: i32,
    cols: i32,
    typ: i32,
    i: i32,
    allow_transposed: bool,
    fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
[src]

C++ default parameters

  • i: -1
  • allow_transposed: false
  • fixed_depth_mask: static_cast<_OutputArray::DepthMask>(0)

pub fn create_nd(
    &self,
    size: &[i32],
    typ: i32,
    i: i32,
    allow_transposed: bool,
    fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
[src]

C++ default parameters

  • i: -1
  • allow_transposed: false
  • fixed_depth_mask: static_cast<_OutputArray::DepthMask>(0)

pub unsafe fn create_same_size(
    &self,
    arr: &dyn ToInputArray,
    mtype: i32
) -> Result<()>
[src]

pub fn release(&self) -> Result<()>[src]

pub fn clear(&self) -> Result<()>[src]

pub fn set_to(
    &self,
    value: &dyn ToInputArray,
    mask: &dyn ToInputArray
) -> Result<()>
[src]

C++ default parameters

  • mask: _InputArray()

pub fn assign(&self, u: &UMat) -> Result<()>[src]

pub fn assign_1(&self, m: &Mat) -> Result<()>[src]

pub fn assign_2(&self, v: &Vector<UMat>) -> Result<()>[src]

pub fn assign_3(&self, v: &Vector<Mat>) -> Result<()>[src]

pub fn move_(&self, u: &mut UMat) -> Result<()>[src]

pub fn move__1(&self, m: &mut Mat) -> Result<()>[src]

Loading content...

Implementors

impl _OutputArrayTrait for _InputOutputArray[src]

impl _OutputArrayTrait for _OutputArray[src]

Loading content...