Contour style tracking on gpu

Has anyone done this?

Maybe a compute shader job?

edit: or maybe opencv gpu?