[−][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;
Methods
impl _OutputArray
[src]
pub fn as_raw__OutputArray(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[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(m: &mut Mat) -> Result<_OutputArray>
[src]
pub fn from_mat_vec(vec: &mut VectorOfMat) -> Result<_OutputArray>
[src]
pub fn new_1(vec: &mut VectorOfbool) -> Result<_OutputArray>
[src]
pub fn new_2(unnamed_arg: &mut VectorOfVectorOfbool) -> Result<_OutputArray>
[src]
pub fn from_umat(m: &mut UMat) -> Result<_OutputArray>
[src]
pub fn from_umat_vec(vec: &mut VectorOfUMat) -> Result<_OutputArray>
[src]
Trait Implementations
impl Drop for _OutputArray
[src]
impl Send for _OutputArray
[src]
impl _InputArrayTrait for _OutputArray
[src]
fn as_raw__InputArray(&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_u_mat(&self, idx: i32) -> Result<UMat>
[src]
fn get_mat_vector(&self, mv: &mut VectorOfMat) -> Result<()>
[src]
fn get_u_mat_vector(&self, umv: &mut VectorOfUMat) -> Result<()>
[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<i32>
[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 _type(&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_with_mask(
&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_u_mat(&self) -> Result<bool>
[src]
fn is_mat_vector(&self) -> Result<bool>
[src]
fn is_u_mat_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) -> *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_u_mat_ref(&self, i: i32) -> Result<UMat>
[src]
fn create(
&self,
sz: Size,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
[src]
&self,
sz: Size,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
fn create_1(
&self,
rows: i32,
cols: i32,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
[src]
&self,
rows: i32,
cols: i32,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
fn create_2(
&self,
dims: i32,
size: &i32,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
[src]
&self,
dims: i32,
size: &i32,
_type: i32,
i: i32,
allow_transposed: bool,
fixed_depth_mask: i32
) -> Result<()>
fn create_same_size(&self, arr: &dyn ToInputArray, mtype: i32) -> Result<()>
[src]
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: &VectorOfUMat) -> Result<()>
[src]
fn assign_3(&self, v: &VectorOfMat) -> 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,
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 = !
The type returned in the event of a conversion error.
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>,