Ordering a linked list #614
Unanswered
yves-surrel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To segment an image, I first use a scan kernel to get a list of contour pixels, which are not ordered along the contour but follow the scan logic (from top left to bottom right, row-wise). Each entry of this list is a
struct
with a fieldcurrent
and a fieldnext
, which are the linear index of the pixel in the image and the linear index of the next pixel along the contour. E.g.What would be the most efficient way to order that list, to make entries follow the contour in the right order? E.g.
The only solution I found is to do it sequentially in a single work item, which is awfully slow (as expected, but not that much): 40 ms for 10,000 pixels. What better?
Beta Was this translation helpful? Give feedback.
All reactions