Creates a sequence that represents the specified slice of the input sequence. The new sequence either shares the elements with the original sequence or has own copy of the elements. So if one needs to process a part of sequence but the processing function does not have a slice parameter, the required sub-sequence may be extracted using this function

C# | Visual Basic | Visual C++ |
public Seq<T> Slice( MCvSlice slice, MemStorage storage, bool copy_data )
Public Function Slice ( _ slice As MCvSlice, _ storage As MemStorage, _ copy_data As Boolean _ ) As Seq(Of T)
public: Seq<T>^ Slice( MCvSlice slice, MemStorage^ storage, bool copy_data )

- slice (MCvSlice)
- The part of the sequence to extract
- storage (MemStorage)
- The destination storage to keep the new sequence header and the copied data if any. If it is NULL, the function uses the storage containing the input sequence.
- copy_data (Boolean)
- The flag that indicates whether to copy the elements of the extracted slice

A sequence that represents the specified slice of the input sequence