Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

I run this simple code:

import cv2

im=cv2.imread('homer.jpg')

# 420 x 630
roi=im[0:209,0:209] cv2.namedWindow('gl',cv2.WINDOW_OPENGL) cv2.imshow('gl',im1) cv2.waitKey(0) cv2.destroyAllWindows()

I get this error each time I set the WINDOW_OPENGL flag with roi:

begueradj@begueradj-darwin:~/Desktop$ python here.py 
(420, 630, 3)
init done 
opengl support available 
OpenCV Error: Assertion failed (mat.isContinuous()) in copyFrom, file /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp, line 1151
Traceback (most recent call last):
  File "here.py", line 9, in <module>
    cv2.imshow('gl',im1)
cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

Note that this error disappears when I display im instead (with the same flag)

Why is this ? How to fix it ?

cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

I run this simple code:

import cv2

im=cv2.imread('homer.jpg')

# 420 x 630
roi=im[0:209,0:209] cv2.namedWindow('gl',cv2.WINDOW_OPENGL) cv2.imshow('gl',im1) cv2.waitKey(0) cv2.destroyAllWindows()

I get this error each time I set the WINDOW_OPENGL flag with roi:

begueradj@begueradj-darwin:~/Desktop$ python here.py 
(420, 630, 3)
init done 
opengl support available 
OpenCV Error: Assertion failed (mat.isContinuous()) in copyFrom, file /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp, line 1151
Traceback (most recent call last):
  File "here.py", line 9, in <module>
    cv2.imshow('gl',im1)
cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

Note that this error disappears when I display im instead (with the same flag)

Why is this ? How to fix it ?

error: (-215) mat.isContinuous() in function copyFrom

I run this simple code:

import cv2
cv2    
im=cv2.imread('homer.jpg')

# 420 x 630
roi=im[0:209,0:209] cv2.namedWindow('gl',cv2.WINDOW_OPENGL) cv2.imshow('gl',im1) cv2.waitKey(0) cv2.destroyAllWindows()

cv2.destroyAllWindows()

I get this error each time I set the WINDOW_OPENGL flag with roi:

begueradj@begueradj-darwin:~/Desktop$ python here.py 
(420, 630, 3)
init done 
opengl support available 
OpenCV Error: Assertion failed (mat.isContinuous()) in copyFrom, file /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp, line 1151
Traceback (most recent call last):
  File "here.py", line 9, in <module>
    cv2.imshow('gl',im1)
cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

Note that this error disappears when I display im instead (with the same flag)

Why is this ? How to fix it ?

error: (-215) mat.isContinuous() in function copyFrom

I run this simple code:

import cv2    
im=cv2.imread('homer.jpg')
# 420 x 630    
roi=im[0:209,0:209]
cv2.namedWindow('gl',cv2.WINDOW_OPENGL)
cv2.imshow('gl',im1)
cv2.imshow('gl',roi)
cv2.waitKey(0)
cv2.destroyAllWindows()

I get this error each time I set the WINDOW_OPENGL flag with roi:

begueradj@begueradj-darwin:~/Desktop$ python here.py 
(420, 630, 3)
init done 
opengl support available 
OpenCV Error: Assertion failed (mat.isContinuous()) in copyFrom, file /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp, line 1151
Traceback (most recent call last):
  File "here.py", line 9, in <module>
    cv2.imshow('gl',im1)
cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

Note that this error disappears when I display im instead (with the same flag)

Why is this ? How to fix it ?

error: (-215) mat.isContinuous() in function copyFrom

I run this simple code:

import cv2    
im=cv2.imread('homer.jpg')
# 420 x 630    
roi=im[0:209,0:209]
cv2.namedWindow('gl',cv2.WINDOW_OPENGL)
cv2.imshow('gl',roi)
cv2.waitKey(0)
cv2.destroyAllWindows()

I get this error each time I set the WINDOW_OPENGL flag with roi:

begueradj@begueradj-darwin:~/Desktop$ python here.py 
(420, 630, 3)
init done 
opengl support available 
OpenCV Error: Assertion failed (mat.isContinuous()) in copyFrom, file /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp, line 1151
Traceback (most recent call last):
  File "here.py", line 9, in <module>
    cv2.imshow('gl',im1)
cv2.imshow('gl',roi)
cv2.error: /home/begueradj/opencv/opencv-2.4.10/modules/core/src/opengl_interop.cpp:1151: error: (-215) mat.isContinuous() in function copyFrom

Note that this error disappears when I display im instead (with the same flag)

Why is this ? How to fix it ?