closed
So it seems that there is a problem when cv2.cvtColor() is called in emotion-program.py, which is considered odd since it is a standard function in OpenCV
What version of OpenCV are you running? I suspect that since your path says "opencv-2.4.8", you are probably running an old version of OpenCV. This program was tested with OpenCV 3 or above, try installing OpenCV 3.0 or above and tell us if you still receive the same issue.
I already tried installing OpenCV 3.0, and the issue still persists. I have attached an image below for your reference

Edit: I looked up the error "OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor", and it looks like it has something to do with the code(?).
It is possible that the problem is variable "frame_f" could be null.
Right before line 54 (prev_gray = cv2.cvtColor(frame_f, cv2.COLOR_BGR2GRAY)), can you insert this code and tell me what prints out:
cv2.imshow("Test frame", frame_f) cv2.waitKey(0)
If frame_f is not null, then a picture show pop up.
Hi i'm getting fx,fy = flow[y,x].T IndexError: arrays used as indices must be of integer (or boolean) type error while running the emotion-program.py
Please help me with this