[−][src]Struct opencv::core::Range
Template class specifying a continuous subsequence (slice) of a sequence.
The class is used to specify a row or a column span in a matrix ( Mat ) and for many other purposes. Range(a,b) is basically the same as a:b in Matlab or a..b in Python. As in Python, start is an inclusive left boundary of the range and end is an exclusive right boundary of the range. Such a half-opened interval is usually denoted as .
The static method Range::all() returns a special variable that means "the whole sequence" or "the whole range", just like " : " in Matlab or " ... " in Python. All the methods and functions in OpenCV that take Range support this special Range::all() value. But, of course, in case of your own custom processing, you will probably have to check and handle it explicitly:
void my_function(..., const Range& r, ....) { if(r == Range::all()) { // process all the data } else { // process [r.start, r.end) } }
Implementations
impl Range
[src]
pub fn as_raw_Range(&self) -> *const c_void
[src]
pub fn as_raw_mut_Range(&mut self) -> *mut c_void
[src]
impl Range
[src]
pub fn default() -> Result<Range>
[src]
////////////////////////////// Range /////////////////////////////////
pub fn new(_start: i32, _end: i32) -> Result<Range>
[src]
pub fn all() -> Result<Range>
[src]
Trait Implementations
impl Boxed for Range
[src]
pub unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
pub fn into_raw(self) -> *mut c_void
[src]
pub fn as_raw(&self) -> *const c_void
[src]
pub fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for Range
[src]
impl RangeTrait for Range
[src]
pub fn as_raw_Range(&self) -> *const c_void
[src]
pub fn as_raw_mut_Range(&mut self) -> *mut c_void
[src]
pub fn start(&self) -> i32
[src]
pub fn set_start(&mut self, val: i32)
[src]
pub fn end(&self) -> i32
[src]
pub fn set_end(&mut self, val: i32)
[src]
pub fn size(&self) -> Result<i32>
[src]
pub fn empty(&self) -> Result<bool>
[src]
impl Send for Range
[src]
impl VectorElement for Range where
Vector<Range>: VectorExtern<Range>,
[src]
Vector<Range>: VectorExtern<Range>,
Auto Trait Implementations
impl RefUnwindSafe for Range
[src]
impl !Sync for Range
[src]
impl Unpin for Range
[src]
impl UnwindSafe for Range
[src]
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>,