Opamp - is this a floating problem

The opamp has a bias current of 7nA - should it be fed a voltage from a high-impedance source that bias current will produce
a voltage error. For a 1M impedance it would be a 7mV error, for 1k impedance only 7uV (well below the input offset spec
of 50uA).

So if your grey scale sensor has a low impedance (1k or below rather than 1M) there will be no problem.

However that opamp won't do what you want from 5V supply (the strict minimum supply voltage is 5V, and has a common-mode
input range of only 2 to 3V at that supply).

You need a comparator ideally, or if an opamp a rail-to-rail input opamp - this particular opamp is designed for high-end audio,
not low voltage.