python: data type = 5 is not supported (Bug #2505)


Added by sergey slob almost 2 years ago. Updated over 1 year ago.


Status:Done Start date:2012-11-05
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:python bindings
Target version:2.4.4
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

Description

windows 7 x86
OpenCV 2.4.3
python 2.6

Некоторые примеры из samples\python2 падают с такой ошибкой:

samples\python2\squares.py
Traceback (most recent call last):
File "C:\opencv2.4.3\samples\python2\squares.py", line 40, in <module>
squares = find_squares(img)
File "C:\opencv2.4.3\samples\python2\squares.py", line 27, in find_squares
cnt_len = cv2.arcLength(cnt, True)
TypeError: curve data type = 5 is not supported

samples\python2\watershed.py
Traceback (most recent call last):
File "C:\opencv2.4.3\samples\python2\watershed.py", line 77, in <module>
App(fn).run()
File "C:\opencv2.4.3\samples\python2\watershed.py", line 60, in run
self.watershed()
File "C:\opencv2.4.3\samples\python2\watershed.py", line 48, in watershed
vis = cv2.addWeighted(self.img, 0.5, overlay, 0.5, 0.0, dtype=cv2.CV_8UC3)
TypeError: src2 data type = 5 is not supported


Related issues (Add)


Associated revisions

Revision cd46a674
Added by Vadim Pisarevsky almost 2 years ago

applied patch #2611 that also likely fixes #2505

Revision a519bbc6
Added by Vadim Pisarevsky almost 2 years ago

Extended python bindings to support scalar values and tuples in place of InputArray (i.e. Mat) - ticket #2658. Added tests for #2611, #2505, #2658

Revision 2320ec76
Added by Vadim Pisarevsky almost 2 years ago

Extended python bindings to support scalar values and tuples in place of InputArray (i.e. Mat) - ticket #2658. Added tests for #2611, #2505, #2658

History

Updated by Yves Yves almost 2 years ago

Same here:

cnt, _ = cv2.findContours(canny, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
print cnt.size, cnt.shape, cnt.dtype
cnt_len = cv2.arcLength(cnt, True)

Crash while saying:

""" 
68 (34, 1, 2) int32
Traceback (most recent call last):
    cnt_len = cv2.arcLength(cnt, True)
TypeError: curve data type = 5 is not supported

""" 

Updated by Andrey Kamaev almost 2 years ago

The patch from #2611 probably fixes this issue.

Updated by Vadim Pisarevsky almost 2 years ago

  • Target version deleted ()
  • Affected version set to 2.4.3

Updated by Vadim Pisarevsky almost 2 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Vadim Pisarevsky almost 2 years ago

  • Assignee set to Vadim Pisarevsky

Updated by Vadim Pisarevsky almost 2 years ago

fixed in 2.4 branch

  • Status changed from Open to Done

Updated by Kirill Kornyakov over 1 year ago

  • Target version set to 2.4.4

Also available in: Atom PDF