1. A method for gesture recognition in an optical system using a touchless slider having first and second reference points positioned along an axis, the method comprising: obtaining a plurality of first reflectance values by measuring an amplitude of light reflected from an object relative to the first reference point, wherein each first reflectance value corresponds to a different point in time and wherein the object does not contact the first reference point; obtaining a plurality of second reflectance values by measuring an amplitude of light reflected from the object relative to the second reference point, wherein each second reflectance value corresponds to a different point in time and wherein the object does not contact the second reference point; comparing the plurality of first and second reflectance values to identify a plurality of ratio values between the first reflectance values and the second reflectance values, wherein each of the plurality of ratio values corresponds to one of the points in time; and determining at least one of a position and a direction of movement of the object relative to the first and second reference points based on the identified plurality of ratio values.