[−][src]Struct opencv::core::_OutputArray
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
impl _OutputArray
[src]
pub fn as_raw__OutputArray(&self) -> *const c_void
[src]
pub fn as_raw_mut__OutputArray(&mut self) -> *mut c_void
[src]
impl _OutputArray
[src]
pub fn default() -> Result<_OutputArray>
[src]
/////////////////////////////////////////////////////////////////////////////////////
pub fn new(_flags: i32, _obj: *mut c_void) -> Result<_OutputArray>
[src]
pub fn from_mat_mut(m: &mut Mat) -> Result<_OutputArray>
[src]
pub fn from_mat_vec_mut(vec: &mut Vector<Mat>) -> Result<_OutputArray>
[src]
pub fn from_gpumat_mut(d_mat: &mut GpuMat) -> Result<_OutputArray>
[src]
pub fn from_gpumat_vec_mut(d_mat: &mut Vector<GpuMat>) -> Result<_OutputArray>
[src]
pub fn new_1(buf: &mut Buffer) -> Result<_OutputArray>
[src]
pub fn from_hostmem_mut(cuda_mem: &mut HostMem) -> Result<_OutputArray>
[src]
pub fn from_umat_mut(m: &mut UMat) -> Result<_OutputArray>
[src]
pub fn from_umat_vec_mut(vec: &mut Vector<UMat>) -> Result<_OutputArray>
[src]
pub fn from_mat(m: &Mat) -> Result<_OutputArray>
[src]
pub fn from_mat_vec(vec: &Vector<Mat>) -> Result<_OutputArray>
[src]
pub fn from_gpumat(d_mat: &GpuMat) -> Result<_OutputArray>
[src]
pub fn new_2(buf: &Buffer) -> Result<_OutputArray>
[src]
pub fn from_hostmem(cuda_mem: &HostMem) -> Result<_OutputArray>
[src]
pub fn from_umat(m: &UMat) -> Result<_OutputArray>
[src]
pub fn from_umat_vec(vec: &Vector<UMat>) -> Result<_OutputArray>
[src]
Trait Implementations
impl Boxed for _OutputArray
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for _OutputArray
[src]
impl Send for _OutputArray
[src]
impl _InputArrayTrait for _OutputArray
[src]
fn as_raw__InputArray(&self) -> *const c_void
[src]
fn as_raw_mut__InputArray(&mut self) -> *mut c_void
[src]
fn get_mat(&self, idx: i32) -> Result<Mat>
[src]
fn get_mat_(&self, idx: i32) -> Result<Mat>
[src]
fn get_umat(&self, idx: i32) -> Result<UMat>
[src]
fn get_mat_vector(&self, mv: &mut Vector<Mat>) -> Result<()>
[src]
fn get_umat_vector(&self, umv: &mut Vector<UMat>) -> Result<()>
[src]
fn get_gpu_mat_vector(&self, gpumv: &mut Vector<GpuMat>) -> Result<()>
[src]
fn get_gpu_mat(&self) -> Result<GpuMat>
[src]
fn get_o_gl_buffer(&self) -> Result<Buffer>
[src]
fn get_flags(&self) -> Result<i32>
[src]
fn get_obj(&self) -> Result<*mut c_void>
[src]
fn get_sz(&self) -> Result<Size>
[src]
fn kind(&self) -> Result<_InputArray_KindFlag>
[src]
fn dims(&self, i: i32) -> Result<i32>
[src]
fn cols(&self, i: i32) -> Result<i32>
[src]
fn rows(&self, i: i32) -> Result<i32>
[src]
fn size(&self, i: i32) -> Result<Size>
[src]
fn sizend(&self, sz: &mut i32, i: i32) -> Result<i32>
[src]
fn same_size(&self, arr: &dyn ToInputArray) -> Result<bool>
[src]
fn total(&self, i: i32) -> Result<size_t>
[src]
fn typ(&self, i: i32) -> Result<i32>
[src]
fn depth(&self, i: i32) -> Result<i32>
[src]
fn channels(&self, i: i32) -> Result<i32>
[src]
fn is_continuous(&self, i: i32) -> Result<bool>
[src]
fn is_submatrix(&self, i: i32) -> Result<bool>
[src]
fn empty(&self) -> Result<bool>
[src]
fn copy_to(&self, arr: &mut dyn ToOutputArray) -> Result<()>
[src]
fn copy_to_masked(
&self,
arr: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
[src]
&self,
arr: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
fn offset(&self, i: i32) -> Result<size_t>
[src]
fn step(&self, i: i32) -> Result<size_t>
[src]
fn is_mat(&self) -> Result<bool>
[src]
fn is_umat(&self) -> Result<bool>
[src]
fn is_mat_vector(&self) -> Result<bool>
[src]
fn is_umat_vector(&self) -> Result<bool>
[src]
fn is_matx(&self) -> Result<bool>
[src]
fn is_vector(&self) -> Result<bool>
[src]
fn is_gpu_mat(&self) -> Result<bool>
[src]
fn is_gpu_mat_vector(&self) -> Result<bool>
[src]
impl _OutputArrayTrait for _OutputArray
[src]
fn as_raw__OutputArray(&self) -> *const c_void
[src]
fn as_raw_mut__OutputArray(&mut self) -> *mut c_void
[src]
fn fixed_size(&self) -> Result<bool>
[src]
fn fixed_type(&self) -> Result<bool>
[src]
fn needed(&self) -> Result<bool>
[src]
fn get_mat_ref(&self, i: i32) -> Result<Mat>
[src]
fn get_umat_ref(&self, i: i32) -> Result<UMat>
[src]
fn get_gpu_mat_ref(&self) -> Result<GpuMat>
[src]
fn get_gpu_mat_vec_ref(&self) -> Result<Vector<GpuMat>>
[src]
fn get_o_gl_buffer_ref(&self) -> Result<Buffer>
[src]
fn get_host_mem_ref(&self) -> Result<HostMem>
[src]
fn create_size(
&self,
sz: Size,
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
[src]
&self,
sz: Size,
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<()>
[src]
&self,
rows: i32,
cols: 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<()>
[src]
&self,
size: &[i32],
typ: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: _OutputArray_DepthMask
) -> Result<()>
unsafe fn create_same_size(
&self,
arr: &dyn ToInputArray,
mtype: i32
) -> Result<()>
[src]
&self,
arr: &dyn ToInputArray,
mtype: i32
) -> Result<()>
fn release(&self) -> Result<()>
[src]
fn clear(&self) -> Result<()>
[src]
fn set_to(
&self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<()>
[src]
&self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<()>
fn assign(&self, u: &UMat) -> Result<()>
[src]
fn assign_1(&self, m: &Mat) -> Result<()>
[src]
fn assign_2(&self, v: &Vector<UMat>) -> Result<()>
[src]
fn assign_3(&self, v: &Vector<Mat>) -> Result<()>
[src]
fn move_(&self, u: &mut UMat) -> Result<()>
[src]
fn move__1(&self, m: &mut Mat) -> Result<()>
[src]
Auto Trait Implementations
impl RefUnwindSafe for _OutputArray
impl !Sync for _OutputArray
impl Unpin for _OutputArray
impl UnwindSafe for _OutputArray
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,