对于cvStartReadSeq函数官方文档说明如下:
Initializes the process of sequential reading from a sequence.
Parameters: |
|
---|
The function initializes the reader state. After that, all the sequence elements from the first one down to the last one can be read by subsequent calls of the macro CV_READ_SEQ_ELEM( read_elem, reader ) in the case of forward reading and by using CV_REV_READ_SEQ_ELEM(read_elem, reader ) in the case of reverse reading. Both macros put the sequence element to read_elem and move the reading pointer toward the next element. A circular structure of sequence blocks is used for the reading process, that is, after the last element has been read by the macro CV_READ_SEQ_ELEM , the first element is read when the macro is called again. The same applies to CV_REV_READ_SEQ_ELEM . There is no function to finish the reading process, since it neither changes the sequence nor creates any temporary buffers. The reader field ptrpoints to the current element of the sequence that is to be read next. The code below demonstrates how to use the sequence writer and reader.
相关说明:
seq
函数 cvStartReadSeq 初始化读取部分的状态。毕竟,顺序读取可通过调用宏 CV_READ_SEQ_ELEM( read_elem, reader ),逆序读取可通过调用宏CV_REV_READ_SEQ_ELEM( read_elem, reader )。这两个宏都将序列元素读进read_elem中, 并将指针移到下一个元素。下面代码显示了如何去使用reader 和 writer.
原文地址:http://blog.csdn.net/gggg_ggg/article/details/46349701