Struct opencv::core::_OutputArray
source · [−]pub struct _OutputArray { /* private fields */ }
Expand description
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;
Implementations
sourceimpl _OutputArray
impl _OutputArray
sourcepub fn default() -> Result<_OutputArray>
pub fn default() -> Result<_OutputArray>
/////////////////////////////////////////////////////////////////////////////////////
pub unsafe fn new(_flags: i32, _obj: *mut c_void) -> Result<_OutputArray>
pub fn from_mat_mut(m: &mut Mat) -> Result<_OutputArray>
pub fn from_mat_vec_mut(vec: &mut Vector<Mat>) -> Result<_OutputArray>
pub fn from_gpumat_mut(d_mat: &mut GpuMat) -> Result<_OutputArray>
pub fn from_gpumat_vec_mut(d_mat: &mut Vector<GpuMat>) -> Result<_OutputArray>
pub fn new_1(buf: &mut Buffer) -> Result<_OutputArray>
pub fn from_hostmem_mut(cuda_mem: &mut HostMem) -> Result<_OutputArray>
pub fn from_umat_mut(m: &mut UMat) -> Result<_OutputArray>
pub fn from_umat_vec_mut(vec: &mut Vector<UMat>) -> Result<_OutputArray>
pub fn from_mat(m: &Mat) -> Result<_OutputArray>
pub fn from_mat_vec(vec: &Vector<Mat>) -> Result<_OutputArray>
pub fn from_gpumat(d_mat: &GpuMat) -> Result<_OutputArray>
pub fn new_2(buf: &Buffer) -> Result<_OutputArray>
pub fn from_hostmem(cuda_mem: &HostMem) -> Result<_OutputArray>
pub fn from_umat(m: &UMat) -> Result<_OutputArray>
pub fn from_umat_vec(vec: &Vector<UMat>) -> Result<_OutputArray>
Trait Implementations
sourceimpl Boxed for _OutputArray
impl Boxed for _OutputArray
sourceimpl Drop for _OutputArray
impl Drop for _OutputArray
sourceimpl From<_InputOutputArray> for _OutputArray
impl From<_InputOutputArray> for _OutputArray
sourcefn from(s: _InputOutputArray) -> Self
fn from(s: _InputOutputArray) -> Self
Converts to this type from the input type.
sourceimpl From<_OutputArray> for _InputArray
impl From<_OutputArray> for _InputArray
sourcefn from(s: _OutputArray) -> Self
fn from(s: _OutputArray) -> Self
Converts to this type from the input type.
sourceimpl _InputArrayTrait for _OutputArray
impl _InputArrayTrait for _OutputArray
fn as_raw_mut__InputArray(&mut self) -> *mut c_void
sourceimpl _InputArrayTraitConst for _OutputArray
impl _InputArrayTraitConst for _OutputArray
fn as_raw__InputArray(&self) -> *const c_void
fn get_mat_vector(&self, mv: &mut Vector<Mat>) -> Result<()>
fn get_umat_vector(&self, umv: &mut Vector<UMat>) -> Result<()>
fn get_gpu_mat_vector(&self, gpumv: &mut Vector<GpuMat>) -> Result<()>
fn get_gpu_mat(&self) -> Result<GpuMat>
fn get_o_gl_buffer(&self) -> Result<Buffer>
fn get_flags(&self) -> Result<i32>
fn get_obj(&self) -> Result<*mut c_void>
fn get_sz(&self) -> Result<Size>
fn kind(&self) -> Result<_InputArray_KindFlag>
fn same_size(&self, arr: &dyn ToInputArray) -> Result<bool>
fn empty(&self) -> Result<bool>
fn copy_to(&self, arr: &mut dyn ToOutputArray) -> Result<()>
fn copy_to_masked(
&self,
arr: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
fn is_mat(&self) -> Result<bool>
fn is_umat(&self) -> Result<bool>
fn is_mat_vector(&self) -> Result<bool>
fn is_umat_vector(&self) -> Result<bool>
fn is_matx(&self) -> Result<bool>
fn is_vector(&self) -> Result<bool>
fn is_gpu_mat(&self) -> Result<bool>
fn is_gpu_mat_vector(&self) -> Result<bool>
sourceimpl _OutputArrayTrait for _OutputArray
impl _OutputArrayTrait for _OutputArray
fn as_raw_mut__OutputArray(&mut self) -> *mut c_void
sourceimpl _OutputArrayTraitConst for _OutputArray
impl _OutputArrayTraitConst for _OutputArray
fn as_raw__OutputArray(&self) -> *const c_void
fn fixed_size(&self) -> Result<bool>
fn fixed_type(&self) -> Result<bool>
fn needed(&self) -> Result<bool>
fn get_gpu_mat_ref(&self) -> Result<GpuMat>
fn get_gpu_mat_vec_ref(&self) -> Result<Vector<GpuMat>>
fn get_o_gl_buffer_ref(&self) -> Result<Buffer>
fn get_host_mem_ref(&self) -> Result<HostMem>
sourcefn create_size(
&self,
sz: Size,
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
fn create_size(
&self,
sz: Size,
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
C++ default parameters Read more
sourcefn create(
&self,
rows: i32,
cols: i32,
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
fn create(
&self,
rows: i32,
cols: i32,
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
C++ default parameters Read more
sourcefn create_nd(
&self,
size: &[i32],
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
fn create_nd(
&self,
size: &[i32],
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
C++ default parameters Read more
unsafe fn create_same_size(
&self,
arr: &dyn ToInputArray,
mtype: i32
) -> Result<()>
fn release(&self) -> Result<()>
fn clear(&self) -> Result<()>
sourcefn set_to(
&self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<()>
fn set_to(
&self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<()>
C++ default parameters Read more
fn assign(&self, u: &UMat) -> Result<()>
fn assign_1(&self, m: &Mat) -> Result<()>
fn assign_2(&self, v: &Vector<UMat>) -> Result<()>
fn assign_3(&self, v: &Vector<Mat>) -> Result<()>
fn move_(&self, u: &mut UMat) -> Result<()>
fn move__1(&self, m: &mut Mat) -> Result<()>
impl Send for _OutputArray
Auto Trait Implementations
impl RefUnwindSafe for _OutputArray
impl !Sync for _OutputArray
impl Unpin for _OutputArray
impl UnwindSafe for _OutputArray
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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