Drowsiness detection is vital in preventing accidents. Eye state analysis — Detecting whether the eye is open or closed — is critical step for drowsiness detection. In this article we proposed an innovative algorithm for detecting eyes in drowsiness detection which is based on morphology. Morphological processes are one of the powerful instruments for analysing images even with low quality, so it can be possible to actualize this method even with one Megapixel webcams. This method has best performance in dimness conditions. We analyse our eye state analysis algorithm via 5 sequences of frames in video for 10 different intervals between face and camera and show superior results compared to the common technique based on distance between eyelids that are distance depended.