Using Gray coding to read angular position of a rotator, need suitable sensor

Hi people,

I want to build an angular measurement system that can read the angular position of a rotator with a circumference of 502 mm, with an accuracy of at least 1 degree. I've drawn a 'strip' of Gray code (I've included an example of Gray code) with nine lines of 9 millimeter high and 502 mm long, that can be wrapped around the rotator, to create a sort of angular encoding. I need to find a sensor that is can discern black and white and is suitable to read this as a sort of barcode (also included below, a part of the Gray code, unfortunately in this image there are no black/white parts, but imagine this like the upper image). I have tried a linear photodiode array, but those get distorted by the ambient light too much.

So to clarify, it needs to read it as indicated by the red stripes:


With every vertical strip being around 1mm wide.