Ask Your Question

Revision history [back]

Assertion failed, cv2.canny in opencv 3.1

System:

  • opencv 3.1
  • mint 17.2
  • python 2.7.6
  • pycharm 2016.2 prof
  • ipython 5.0

Error message taken from ipython:

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /home/georg/ocv31/modules/core/src/matrix.cpp, line 477 terminate called after throwing an instance of 'cv::Exception' what(): /home/georg/ocv31/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

Warning: Program '/usr/local/bin/ipython' crashed.

In [1]: import cv2

In [2]: import numpy as np

In [3]: a = np.zeros((31,20), np.uint8)

In [4]: b = cv2.Canny(a, 60, 300, L2gradient=True)

After this lines, ipython crashes with the messages above. It will not crash after setting L2gradient to False, or if changing the shape (e.g. 30,20).

The same happens with pycharm.

I have not had this message with opencv 3.0.

Can somebody help me?

Assertion failed, failed on picture size (31 px, #), cv2.canny in opencv 3.1

System:

  • opencv 3.1
  • mint 17.2
  • python 2.7.6
  • pycharm 2016.2 prof
  • ipython 5.0

Error message taken from ipython:

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /home/georg/ocv31/modules/core/src/matrix.cpp, line 477 terminate called after throwing an instance of 'cv::Exception' what(): /home/georg/ocv31/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

Warning: Program '/usr/local/bin/ipython' crashed.

In [1]: import cv2

In [2]: import numpy as np

In [3]: a = np.zeros((31,20), np.uint8)

In [4]: b = cv2.Canny(a, 60, 300, L2gradient=True)

After this lines, ipython crashes with the messages above. It will not crash after setting L2gradient to False, or if changing the shape (e.g. 30,20).

The same happens with pycharm.

I have not had this message with opencv 3.0.

Can somebody help me?

09.08.2016: Now I have installed ocv 2.4.13. Everything is working well.

BTW: The Message Corrupt JPEG data: 2 extraneous bytes before marker 0x# is also disappeared (Logitech c270).

Assertion failed on picture size (31 px, #), cv2.canny in opencv 3.1

System:

  • opencv 3.1
  • mint 17.2
  • python 2.7.6
  • pycharm 2016.2 prof
  • ipython 5.0

Error message taken from ipython:

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /home/georg/ocv31/modules/core/src/matrix.cpp, line 477 terminate called after throwing an instance of 'cv::Exception' what(): /home/georg/ocv31/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

Warning: Program '/usr/local/bin/ipython' crashed.

In [1]: import cv2

In [2]: import numpy as np

In [3]: a = np.zeros((31,20), np.uint8)

In [4]: b = cv2.Canny(a, 60, 300, L2gradient=True)

After this lines, ipython crashes with the messages above. It will not crash after setting L2gradient to False, or if changing the shape (e.g. 30,20).

The same happens with pycharm.

I have not had this message with opencv 3.0.

Can somebody help me?

09.08.2016: Now I have installed ocv 2.4.13. Everything is working well.

BTW: The Message Corrupt JPEG data: 2 extraneous bytes before marker 0x# during reading the video frames, is also disappeared (Logitech c270).

Assertion failed on picture size (31 px, #), cv2.canny in opencv 3.1

System:

  • opencv 3.1
  • mint 17.2
  • python 2.7.6
  • pycharm 2016.2 prof
  • ipython 5.0

Error message taken from ipython:

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /home/georg/ocv31/modules/core/src/matrix.cpp, line 477 terminate called after throwing an instance of 'cv::Exception' what(): /home/georg/ocv31/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

Warning: Program '/usr/local/bin/ipython' crashed.

In [1]: import cv2

In [2]: import numpy as np

In [3]: a = np.zeros((31,20), np.uint8)

In [4]: b = cv2.Canny(a, 60, 300, L2gradient=True)

After this lines, ipython crashes with the messages above. It will not crash after setting L2gradient to False, or if changing the shape (e.g. 30,20).

The same happens with pycharm.

I have not had this message with opencv 3.0.

Can somebody help me?

09.08.2016: Now I have installed ocv 2.4.13. Everything is working well.

BTW: The Message Corrupt JPEG data: 2 extraneous bytes before marker 0x# during reading the video frames, is also disappeared (Logitech c270).