To detect and track eye images, distinctive features of user eye are used. Generally, an eye-tracking and detection system can be divided into four steps: Face detection, eye region detection, pupil detection and eye tracking. To find the position of pupil, first, face region must be separated from the rest of the image using bag of pixels, this will cause the images background to be non effective in our next steps. We used from horizontal projection, to separate a region containing eyes and eyebrow. This will result in decreasing the computational complexity and ignoring some factors such as bread. Finally, in proposed method points with the highest values of are selected as the eye candidate's. The eye region is well detected among these points. Color entropy in the eye region is used to eliminate the irrelevant candidates. With a pixel of the iris or pupil can be achieved center of pupil. To find the center of pupil can be used line intersection method in the next step, we perform eye tracking. The proposed method achieve a correct eye detection rate of 97.3% on testing set that gathered from different images of face data. Moreover, in the case of glasses the performance is still acceptable.