INFRARED SENSOR THAT RECOGNIZES LINE AT 5 CM OF THIS

Guys, what I foresee to get accuracy on a sensor q recognizes a black line 1 cm wide on a white background that is 5 cm away

scheme:

| ----------- 5CM ----------- |

BLACK LINE (1 cm of load)

Can someone tell me how to mount some? using an IV led and a receiver or something like that?

P.S.:Sorry if I posted in the wrong place, I'm new to the forum

Do not double post.