OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OpenCVForUnity.CoreModule.Range Class Reference
Inheritance diagram for OpenCVForUnity.CoreModule.Range:

Public Member Functions

 Range (int s, int e)
 Range ()
 Range (double[] vals)
void set (double[] vals)
int size ()
bool empty ()
Range intersection (Range r1)
Range shift (int delta)
Range clone ()
override int GetHashCode ()
override bool Equals (Object obj)
override string ToString ()
bool Equals (Range a)

Static Public Member Functions

static Range all ()
static bool operator! (Range r)
static Range operator+ (Range r1, int delta)
static Range operator+ (int delta, Range r1)
static Range operator- (Range r1, int delta)
static Range operator& (Range r1, Range r2)
static bool operator== (Range a, Range b)
static bool operator!= (Range a, Range b)

Public Attributes

int start

Detailed Description

Template class specifying a continuous subsequence (slice) of a sequence.

class CV_EXPORTS Range

// C++ code:



Range(int _start, int _end);

Range(const CvSlice& slice);

int size() const;

bool empty() const;

static Range all();

operator CvSlice() const;

int start, end;


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 [start,end). The static method Range.all() returns a special variable that means "the whole sequence" or "the whole range", just like " <code>:</code> " in Matlab or " <code>...</code> " 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:

// C++ code:

void my_function(..., const Range& r,....)

if(r == Range.all()) {

// process all the data

else {

// process [r.start, r.end)

See also

Constructor & Destructor Documentation

◆ Range() [1/3]

OpenCVForUnity.CoreModule.Range.Range ( int  s,
int  e 

◆ Range() [2/3]

OpenCVForUnity.CoreModule.Range.Range ( )

◆ Range() [3/3]

OpenCVForUnity.CoreModule.Range.Range ( double []  vals)

Member Function Documentation

◆ all()

static Range OpenCVForUnity.CoreModule.Range.all ( )

◆ clone()

Range OpenCVForUnity.CoreModule.Range.clone ( )

◆ empty()

bool OpenCVForUnity.CoreModule.Range.empty ( )

◆ Equals() [1/2]

bool OpenCVForUnity.CoreModule.Range.Equals ( Range  a)

◆ Equals() [2/2]

override bool OpenCVForUnity.CoreModule.Range.Equals ( Object  obj)

◆ GetHashCode()

override int OpenCVForUnity.CoreModule.Range.GetHashCode ( )

◆ intersection()

Range OpenCVForUnity.CoreModule.Range.intersection ( Range  r1)

◆ operator!()

static bool OpenCVForUnity.CoreModule.Range.operator! ( Range  r)

◆ operator!=()

static bool OpenCVForUnity.CoreModule.Range.operator!= ( Range  a,
Range  b 

◆ operator&()

static Range OpenCVForUnity.CoreModule.Range.operator & ( Range  r1,
Range  r2 

◆ operator+() [1/2]

static Range OpenCVForUnity.CoreModule.Range.operator+ ( Range  r1,
int  delta 

◆ operator+() [2/2]

static Range OpenCVForUnity.CoreModule.Range.operator+ ( int  delta,
Range  r1 

◆ operator-()

static Range OpenCVForUnity.CoreModule.Range.operator- ( Range  r1,
int  delta 

◆ operator==()

static bool OpenCVForUnity.CoreModule.Range.operator== ( Range  a,
Range  b 

◆ set()

void OpenCVForUnity.CoreModule.Range.set ( double []  vals)

◆ shift()

Range OpenCVForUnity.CoreModule.Range.shift ( int  delta)

◆ size()

int OpenCVForUnity.CoreModule.Range.size ( )

◆ ToString()

override string OpenCVForUnity.CoreModule.Range.ToString ( )

Member Data Documentation

◆ start

int OpenCVForUnity.CoreModule.Range.start

The documentation for this class was generated from the following files: