Skip to content

Commit

Permalink
Add OutputArray and InputOutputArray implementations for Mat_
Browse files Browse the repository at this point in the history
  • Loading branch information
twistedfall committed Sep 17, 2022
1 parent 2bc0520 commit a17c4fe
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/manual/core/mat/mat_.rs
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use crate::{
core::{_InputArray, Mat, MatTrait, MatTraitConst, MatTraitConstManual, MatTraitManual, ToInputArray},
core::{_InputArray, _InputOutputArray, _OutputArray, Mat, MatTrait, MatTraitConst, MatTraitConstManual, MatTraitManual, ToInputArray, ToInputOutputArray, ToOutputArray},
Error,
Result,
traits::{Boxed, OpenCVType, OpenCVTypeArg, OpenCVTypeExternContainer},
Expand Down Expand Up @@ -130,6 +130,20 @@ impl<T> ToInputArray for Mat_<T> {
}
}

impl<T> ToOutputArray for Mat_<T> {
#[inline]
fn output_array(&mut self) -> Result<_OutputArray> {
self.inner.output_array()
}
}

impl<T> ToInputOutputArray for Mat_<T> {
#[inline]
fn input_output_array(&mut self) -> Result<_InputOutputArray> {
self.inner.input_output_array()
}
}

impl<T> OpenCVType<'_> for Mat_<T> {
type Arg = Self;
type ExternReceive = *mut c_void;
Expand Down

0 comments on commit a17c4fe

Please sign in to comment.