On several devices on the Curiosity rover there are marks (see red ellipses in the image below).

I thought that they are used in order for machine vision to determine the angle at which a particular part is turned. But some of them are placed on presumably static pats (e. g. at the end of the white shaft in the image below).
So what is the purpose of these marks?