Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

I am trying to use following code :

import numpy as np

import cv2

cap=cv2.VideoCapture('video.avi')

ret, old_frame = cap.read()

old_gray = cv2.cvtColor(old_frame, cv2.COLOR_BGR2GRAY)

And I end up with following error :

error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

What could be the cause ? If i change the input of cap from .avi file to 0 (default camera) the programm works fine. Any suggestions? Thanks in advance !