OpenCV 2.4.2

org.opencv.core
Class Range

java.lang.Object
  extended by org.opencv.core.Range

public class Range
extends java.lang.Object

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 [start,end).

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:

See Also:
org.opencv.core.Range

Field Summary
 int end
           
 int start
           
 
Constructor Summary
Range()
           
Range(double[] vals)
           
Range(int s, int e)
           
 
Method Summary
static Range all()
           
 Range clone()
           
 boolean empty()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 Range intersection(Range r1)
           
 void set(double[] vals)
           
 Range shift(int delta)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

end

public int end

start

public int start
Constructor Detail

Range

public Range()

Range

public Range(double[] vals)

Range

public Range(int s,
             int e)
Method Detail

all

public static Range all()

clone

public Range clone()
Overrides:
clone in class java.lang.Object

empty

public boolean empty()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

intersection

public Range intersection(Range r1)

set

public void set(double[] vals)

shift

public Range shift(int delta)

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Official OpenCV 2.4 Documentation