开发者

How to randomly access a point in a CvSeq?

开发者 https://www.devze.com 2023-02-20 00:29 出处:网络
Can we randomly access a point in开发者_如何学C a CvSeq object?We can traverse it, so I imagine it\'s possible in a simple manner.How is this accomplished?I have found it.There is a method called cvGe

Can we randomly access a point in开发者_如何学C a CvSeq object? We can traverse it, so I imagine it's possible in a simple manner. How is this accomplished?


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号