[][src]Struct opencv::core::Range

pub struct Range { /* fields omitted */ }

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 inline formula .

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]

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]

impl Drop for Range[src]

impl RangeTrait for Range[src]

impl Send for Range[src]

impl VectorElement for Range where
    Vector<Range>: VectorExtern<Range>, 
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.