Reputation: 235
Can we randomly access a point in a CvSeq object? We can traverse it, so I imagine it's possible in a simple manner. How is this accomplished?
Upvotes: 1
Views: 788
Reputation: 235
I have found it. There is a method called cvGetSeqElem
, which takes in the sequence and the index. Thanks for the help though. This might just follow the linked list linearly, but it's simpler than manually coding the search.
Upvotes: 2
Reputation: 96109
cvSeq is a linked list - you have to follow the chain of links, you have no idea where the next entry is stored in memory.
Upvotes: 0
Reputation: 6043
Looking at the OpenCV API (http://opencv.willowgarage.com/documentation/dynamic_structures.html) it doesn't sound possible. Looks to be some form of linked list implementation, which means that the only way to access an element part way though is to follow the links.
Upvotes: 0