What is this encoder with micro DC motor in camera auto focus system?
Your diagnosis is correct. Those are optical slot sensors and use an infrared LED on one side of the slot and, probably, a photo-transistor on the other.

You should be able to identify the LED side using a multimeter diode test function. Expect about 1.4 V forward voltage drop. On power-up you might be able to check LED operation with your phone camera which will be sensitive to infrared.



From the comments:


  ... why are there 5 wires, and only one wire being shared between the sensors. Shouldn't the Vcc and GND both be shared?








simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Likely schematic for the flexible PCB showing the off-board LED current-limiting resistors.

Don't forget that you can't parallel LEDs and expect good results. Each will need a series resistor and, since they don't appear on the PCB, they must be in the camera. See if that matches what you have.