Adding the camera and detector code