antoinelame / GazeTracking

👀 Eye Tracking library easily implementable to your projects
MIT License
1.85k stars 505 forks source link

Opencv bilateral filter error #1

Closed trohit920 closed 5 years ago

trohit920 commented 5 years ago

Hello, i am trying to run your algorithm but got this error. Please take a look. I am using Ubuntu 16.04 with Python 3.5.2.

Traceback (most recent call last):
  File "example.py", line 12, in <module>
    gaze.refresh()
  File "/home/rohit/Desktop/drowsiness/GazeTracking/gaze_tracking/gaze_tracking.py", line 24, in refresh
    self.pupil_left.process(self.eyes.frame_left)
  File "/home/rohit/Desktop/drowsiness/GazeTracking/gaze_tracking/pupil.py", line 36, in process
    self.modified_frame = self.image_processing(frame)
  File "/home/rohit/Desktop/drowsiness/GazeTracking/gaze_tracking/pupil.py", line 28, in image_processing
    new_frame = cv2.bilateralFilter(eye_frame, 10, 15, 15)
cv2.error: OpenCV(3.4.5) /io/opencv/modules/imgproc/src/bilateral_filter.cpp:642: error: (-215:Assertion failed) (src.type() == CV_8UC1 || src.type() == CV_8UC3) && src.data != dst.data in function 'bilateralFilter_8u'

Any help will he appreciated.

antoinelame commented 5 years ago

Hello, This error could appear at the start of the program when the algorithm was trying to detect the iris while the eyes had not been detected yet.

I made a commit, it should be fixed now.